pymavlink
pymavlink copied to clipboard
enum_is_a_bitmask does not work correctly
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
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
.