-
-
Notifications
You must be signed in to change notification settings - Fork 491
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 can I use an older version of MAVLink with MAVSDK? #1946
Comments
If you change the version of MAVLink, you change the generated headers. If those headers break the compilation, you have to fix it. So in this case you would have to fork MAVSDK and go fix I think |
I wonder if there's interest in allowing older versions of MAVLink? I don't think it would be too hard, except for the fact that MAVLink is maybe not very stringent with its versioning. |
I don't think there is any kind of reliable versioning at all, is there? Other than v1/v2 🤔 |
I didn't think so either. I think it's something that MAVLink could do better. It would be useful for allowing tools to communicate with different protocols without changing source code. |
MAVLink broke the build here but not the protocol. So if you have an older MAVLink version where you use the "Reserved" enum it will be binary compatible. We had a big discussion on the MAVLink call whether "reserved" enums/defines should have even been used in source or whether they are "reserved" and not to be used. There are pros and cons, it's not clear cut. You can see the history here: mavlink/mavlink#1818 |
I'm interfacing with a vehicle that's using MAVLink messages that are outdated when compared to the current definitions for some messages. I've compiled the outdated MAVLink definitions into headers, and pointed MAVSDK to the location for those headers so they would be used:
$(CMAKE) -B build/default -S . -DMAVLINK_DIALECT=all -DMAVLINK_HEADERS=../mavlink-headers
I get an error during compilation of the
system_impl.cpp
file telling me that enums that are being checked for don't exist:These look like they're created / used by Ardupilot. Is there some way I could tell MAVSDK that I'm not using Ardupilot?
Or, is there another way around this problem? Conditional compilation? Compile-time static checks? Is there a 'hack' that I could use to get this working quickly?
CMake:
v3.25.1
Ubuntu:
18.04
MAVSDK:
v1.4.9
Thanks!
The text was updated successfully, but these errors were encountered: