pymavlink icon indicating copy to clipboard operation
pymavlink copied to clipboard

enum_is_a_bitmask does not work correctly

Open python36 opened this issue 3 years ago • 1 comments

https://github.com/ArduPilot/pymavlink/blob/4dac715e4e394714d0676fa6675ff89d2871f380/generator/mavgen_swift.py#L249-L257 This don't work for https://mavlink.io/en/messages/common.html#ATTITUDE_TARGET_TYPEMASK

python36 avatar Apr 19 '21 11:04 python36

If an enumeration is a bitmask, it is defined as such in the XML specification, so I think that this function is redundant and line 302 of mavgen_swift.py could be removed:

enum.is_a_bitmask = enum_is_a_bitmask(enum)

Then any references to enum.is_a_bitmask can be replaced with enum.bitmask.

shancock884 avatar Jan 11 '24 10:01 shancock884