-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does MAVLink versioning work in v1, v2 #77
Comments
Correct.
Yes, they can't be used, so I guess they are not sent? [HW Edited] Yes, definitely not.
Correct.
I think so, yes. [HW Edited] Yes, according to existing docs from Lorenz
Presumably, not sure. [HW Edited] Yes, according to existing docs from Lorenz
Sounds right, I'm not 100% sure. [HW Edited] BUT, the concern here is that this does not appear to calculate CRC on extension fields: ArduPilot/pymavlink#196
I have never understood these flags, and I don't think they are implemented or tested. [HW Edited] This is correct. They may not be tested, but they are implemented in the C library - i.e. there is a test against the incompatible flags supported by the parser. At this time the only incompatible flag is support for signing: MAVLINK_IFLAG_MASK FYI, these are documented in MAVLink 2 > Packet Compatibility Flags. In essence they allow you to specify that the frame has to be handled specially - the implementation could then encode/decode a different frame format.
Not sure. [HW Edited] Fairly sure this is true for message definitions.
I think it is silently dropped. [HW Edited] I think on further inspection that the helper decoder function
There is also the [https://mavlink.io/en/messages/common.html#PROTOCOL_VERSION) check that would presumably resolve some of the problems listed here if it was implemented everywhere. [HW Edited] THanks. IMO probably not because
This would only be of some use if it included current/min/max version compatibility for the spec AND the spec version was iterated every time it was updated in any way. Even so this would just tell you that the mavlink version could process the messages, not whether the system would handle them.
Right, but dialects are a whole other ballpark different from just the versioning problems.
I think this [HW Edited] THanks. I think you mean the other way round - it is the wire protocol version, not the XML version. That makes sense but is very "not useful".
[HW Edited] I don't think either of them are used. Looking at mavparse.py the version is collected but not used, and the dialect is completely ignored. |
No, I meant it as I said it. The wire protocol is v1.0 and v2.0. The xml version was always 3.
Sad, too much stuff that isn't used. |
This is attempting to get clarification on versioning question I raised here: mavlink/mavlink#795 (comment)
Versioning in MAVLink is quite unclear. It is not clear:
Ultimately the point of versioning is to ensure that systems are able to recognise and handle compatible messages - that they don't inadvertently attempt to handle messages they don't understand.
I think MAVLink handles the compatibility/version problem in the following way.
<extension>
tag before new message fields).So as above MAVLink 1 receivers will only handle MAVLink 1 messages. MAVLink 2 messages will get additional messages (id>256) and fields for low id messages. As far as I can tell, the only versioning check available is the CRC - you can tell if a message is compatible.
The implication is that if you iterate a dialect you can add new messages, but you can't modify, remove or replace a message without breaking compatibility. If you break this compatibility you can't tell what version it happened in - all you can really do is make both ends update to the latest version of the dialect.
There are two other "versioning" artifacts in the message definitions.
The text was updated successfully, but these errors were encountered: