Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documented way to add a protocol and keep the default set #2203

Open
drws opened this issue Oct 16, 2022 · 6 comments
Open

No documented way to add a protocol and keep the default set #2203

drws opened this issue Oct 16, 2022 · 6 comments
Labels
bug There is a defect in the code

Comments

@drws
Copy link

drws commented Oct 16, 2022

The default protocol list can be overriden, but there is no option to simply include or exclude some protocols from it. It would make a handy option sometimes.

@zuckschwerdt
Copy link
Collaborator

Please describe in more detail what you want to achieve and what you tried. The -R option should exactly handle that use case:

  [-R <device> | help] Enable only the specified device decoding protocol (can be used multiple times)
       Specify a negative number to disable a device decoding protocol (can be used multiple times)

@drws
Copy link
Author

drws commented Oct 16, 2022

Oh, sorry about missing exclusion possibility. However, I believe that a protocol cannot be included with the default list. Specifying positive number overrides the protocol list.

For example, I would like to use the default protocol list while also including protocol 216 (ANT/ANT+). Am I missing something?

@zuckschwerdt
Copy link
Collaborator

In that case use an exclusion first to setup the default list, e.g. -R -216 -R 216

@Mindavi Mindavi added the question Not a bug, but a question. (Belongs in discussions or mailinglist) label Oct 19, 2022
@drws
Copy link
Author

drws commented Oct 23, 2022

That is great to hear and will come in handy. It would still be great to have a shorter and more intuitive way, for example -R +216.

@gdt gdt added bug There is a defect in the code and removed question Not a bug, but a question. (Belongs in discussions or mailinglist) labels Sep 27, 2023
@gdt gdt changed the title Option to include/exclude protocols from the default set No documented way to add a protocol and keep the default set Sep 27, 2023
@gdt
Copy link
Collaborator

gdt commented Sep 27, 2023

IMHO this is both a doc bug, and a functionality bug.

We have a default set of enabled protocols, basically the ones that are not problematic (due to false decodes). It makes perfect sense for someone to want to add one and keep the defaults.

@gdt
Copy link
Collaborator

gdt commented Sep 27, 2023

I lean to making -R add/remove, and have another switch, perhaps "-R all" to remove all defaults. That's breaking. Another approach is to add a new "-Z n" (but not Z) to add n w/o clearing the defaults. But basically I find that "enable a decoder" removes other decoders to be very surprising/non-intuitive semantics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is a defect in the code
Projects
None yet
Development

No branches or pull requests

4 participants