rust-mavlink icon indicating copy to clipboard operation
rust-mavlink copied to clipboard

MAVLink XML change to allow exponentiation operator in bitmask flag

Open hamishwillee opened this issue 1 year ago • 2 comments

FYI We're modifying the MAVLink XSD validation file in https://github.com/ArduPilot/pymavlink/pull/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 the rust parser We're not updating the XML yet to allow other parsers time to update.

Any concerns, please raise on https://github.com/ArduPilot/pymavlink/pull/920

hamishwillee avatar Feb 15 '24 01:02 hamishwillee

Thanks for letting us know @hamishwillee

patrickelectric avatar Feb 27 '24 18:02 patrickelectric

No worries. The change went in, but we haven't updated any of the messages yet. Waiting a few weeks to give people some catchup time.

hamishwillee avatar Feb 28 '24 02:02 hamishwillee