Commit 78539f56 authored by Don Gagne's avatar Don Gagne

Use ardupilotmega mavlink dialect

This way QGC can support both PX4 and APM Flight Stack messages at the
same time.
parent 445c8527
......@@ -7,29 +7,25 @@ WindowsBuild {
# [REQUIRED] Add support for the MAVLink communications protocol.
# Some logic is involved here in selecting the proper dialect for
# the selected autopilot system.
# If the user config file exists, it will be included. If this file
# specifies the MAVLINK_CONF variable with a MAVLink dialect, support
# for it will be compiled in to QGC. It will also create a
# QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use within the actual code.
# Mavlink dialect is hardwired to arudpilotmega for now. The reason being
# the current codebase supports both PX4 and APM flight stack. PX4 flight stack
# only usese common mavlink specifications, wherease APM flight stack uses custom
# mavlink specifications which add to common. So by using the adupilotmega dialect
# QGC can support both in the same codebase.
# Once the mavlink helper routines include support for multiple dialects within
# a single compiled codebase this hardwiring of dialect can go away. But until then
# this "workaround" is needed.
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v1.0
MAVLINK_CONF = ardupilotmega
# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
message($$sprintf("Using MAVLink dialect '%1' specified at the command line.", $$MAVLINK_CONF))
# Otherwise they can specify MAVLINK_CONF within user_config.pri
else:exists(user_config.pri):infile(user_config.pri, MAVLINK_CONF) {
MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
!isEmpty(MAVLINK_CONF) {
message($$sprintf("Using MAVLink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
message($$sprintf("Using MAVLink dialect '%1'.", $$MAVLINK_CONF))
# Then we add the proper include paths dependent on the dialect.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment