-
Notifications
You must be signed in to change notification settings - Fork 691
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
modules: add bitmask modifying to param module #1488
modules: add bitmask modifying to param module #1488
Conversation
I have found it inconvenient at times to modify bitmasks - I've added this to the param module to make twiddling bits in parameters simpler. The one caveat is that this currently relies on the user having downloaded the parameters for the vehicle software. I'd be happy to remove that requirement but then it would allow for every parameter to be twiddled. I would potentially find that helpful for custom firmwares or development builds. If I were to allow all parameters to be treated as a bitmask, I'd at least check that the type of the parameter is not a float (if at all possible). Example output: Listing Full Bitmask
Listing Individual Bitmask Fields
Toggle/Set/Clear Bitmask Index
|
e92f6a8
to
0b0cc39
Compare
The latest update adds autocompletion for |
0b0cc39
to
83f6937
Compare
Perhaps "setbit" and "unsetbit" which takes a bit offset? Not sure about the ordering on the command-line; trend for recent years has been to have the command before the arguments on command-lines. So |
Happy to change the ordering. I wanted to be able to diagnose bits separately from the action, but if I reorder it I'd be happy to use What I don't want is to accidentally trigger |
Adds ability to toggle, set and clear bitmask fields in parameters
83f6937
to
129fc6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested here.
It would be nice to get a sanity check on the bit-offset parameter:
STABILIZE> param bitmask toggle LOG_BITMASK 98
STABILIZE> timeout setting LOG_BITMASK to 316912650057057350374175801344.000000
no link
link 1 down
no link
no link
Merged, thanks! I've wanted this for years! |
Happy to do a sanity check on the bit setting. |
Adds ability to toggle, set and clear bitmask parameters.