Skip to content

Conversation

@tbolin
Copy link

@tbolin tbolin commented Jan 16, 2026

Bump the MAVLink version to the latest as of 2026-01-16.

Also adds support for the "superseded" tag , which is required for the new message definitions.

@tbolin tbolin marked this pull request as draft January 16, 2026 14:06
@tbolin tbolin marked this pull request as ready for review January 16, 2026 14:39
@pv42
Copy link
Contributor

pv42 commented Jan 16, 2026

There seem to be new dialects added with this change. They should be properly integrated (feature gate defined in cargo.toml and doc for there existence in the lib.rs top comment).

@onur-ozkan
Copy link
Collaborator

There seem to be new dialects added with this change. They should be properly integrated (feature gate defined in cargo.toml and doc for there existence in the lib.rs top comment).

Good catch. I just created this issue regarding to same problem.

@tbolin
Copy link
Author

tbolin commented Jan 19, 2026

I have added feature gates and documentation for the new dialects. However, cargo test --features arbitrary,standard fails.
I think the problem is that common defines but does not actually use the MavBool enum, so the parser defines it as a normal enum and not with bitflags, and then

    pub fn as_bool(&self) -> bool {
        self.contains(Self::MAV_BOOL_TRUE)
    }

is invalid, since self.contains doesn't exist.

@tbolin
Copy link
Author

tbolin commented Jan 20, 2026

cargo test --features arbitrary,standard should compile and pass now.
I changed self.contains(Self::MAV_BOOL_TRUE) to *self == Self::MAV_BOOL_TRUE

Comment on lines -641 to +642
self.contains(Self::MAV_BOOL_TRUE)
*self == Self::MAV_BOOL_TRUE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not right as self implements bitflags.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need some input on how to solve this.
The problem is that self does not implement bitflags if the dialect defines MAV_BOOL but does not use it in any messages (e.g. the standard dialect).

I think the best solution would be to default to either u8 or i8 if the type of MAV_BOOL can't be deduced from how it is used in the dialect. Then MAV_BOOL would always implement bitflags and self.contains(Self::MAV_BOOL_TRUE) would always be valid.

The only way I could see that this could cause problems is if a dialect that currently defines but not use MAV_BOOL starts using MAV_BOOL in a way that does not agree with the default.
However, I'm not sure if the current solution (not implementing bitflags at all) would be any better in that case.

I'm also open to other suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants