You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the bitflag data in the project is stored with enums, which causes issues with flags that are not mutually exclusive. Rust doesn't support combining enumerated values, and thus prevents the use of multiple flags, even though the flags are cast into u16 in serialisation.
The specific case I ran into is mavlink::common::GimbalDeviceFlags, where I'd like to lock each axis. This requires setting three flags, which can be done with bitwise-OR in C++, but is currently impossible with the Rust implementation.
The text was updated successfully, but these errors were encountered:
It seems the reason that it fails is because it is not listed with display = "bitmask" in the <field>events which is what is used to decide if it should be a bitflag or a enum. This could be resolved by doing it a different way or doing some patching of the files when the code is generated.
Some of the bitflag data in the project is stored with enums, which causes issues with flags that are not mutually exclusive. Rust doesn't support combining enumerated values, and thus prevents the use of multiple flags, even though the flags are cast into
u16
in serialisation.The specific case I ran into is
mavlink::common::GimbalDeviceFlags
, where I'd like to lock each axis. This requires setting three flags, which can be done with bitwise-OR in C++, but is currently impossible with the Rust implementation.The text was updated successfully, but these errors were encountered: