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

MAVLink XML change to allow exponentiation operator in bitmask flag #93

Closed
hamishwillee opened this issue Feb 26, 2024 · 3 comments · Fixed by #94
Closed

MAVLink XML change to allow exponentiation operator in bitmask flag #93

hamishwillee opened this issue Feb 26, 2024 · 3 comments · Fixed by #94
Labels
enhancement New feature or request

Comments

@hamishwillee
Copy link

hamishwillee commented Feb 26, 2024

FYI We're modifying the MAVLink XSD validation file in ArduPilot/pymavlink#920 to allow a bitmask value to be declared using the Python exponentiation operator.

This makes it easier to immediately visualize which bit is set by a flag, because you can use the syntax

<entry value="2**15" name="BIT15" />

rather than

<entry value="32768" name=" BIT15" />

This is transparent to mavgen because the parser evaluates the number before creating the generated headers. However it may affect other parsers.
We're not updating the XML yet to allow other parsers time to update.

Any concerns, please raise on ArduPilot/pymavlink#920

@aler9
Copy link
Member

aler9 commented Feb 29, 2024

Hello Hamish, thanks for reporting the update and for taking into consideration the effects on this library.

I've updated the library and its unit tests in order to support all enum formats listed inside the PR you mentioned.

@hamishwillee
Copy link
Author

THanks @aler9 . As an aside, this has been and interesting exercise in working out which libraries are most active :-)

Copy link

github-actions bot commented Sep 8, 2024

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants