MAVLink Customisation
QGC communicates with flight stacks using MAVLink, a very lightweight messaging protocol that has been designed for the drone ecosystem.
QGC includes the all.xml dialect by default. The all.xml
includes all other dialects in the mavlink/mavlink repository, and allows it to communicate with both PX4 and Ardupilot. Previous versions of QGC (v4.2.8 and earlier), used the ArduPilotMega.xml
dialect.
In order to add support for a new set of messages you should add them to development.xml, ArduPilotMega.xml, or common.xml (for PX4), or fork QGroundControl and include your own dialect.
To modify the version of MAVLink used by QGC:
- Update the CMake MAVLink Options in /qgroundcontrol/cmake/CustomOptions.cmake or when using the built-in custom build support you can override these options in /qgroundcontrol/custom/cmake/CustomOverrides.cmake.
- QGC_MAVLINK_GIT_REPO - This is a link to the git repo to use, by default this is a link to https://github.com/mavlink/c_library_v2. You can also build your own libraries using the MAVLink toolchain and upload to your own git repo.
- QGC_MAVLINK_GIT_TAG - This points to the git tag you would like to use in the chosen repo. This should likely be updated on occasion to use the latest version of MAVLink.
- You can also set the mavlink directory to a local path by using the CMake variable CPM_mavlink_SOURCE.