Browse Source

Fix up support for Mavlink All dialect

QGC4.4
Don Gagne 1 year ago committed by Don Gagne
parent
commit
740397e87b
  1. 19
      QGCExternalLibs.pri
  2. 1
      custom-example/custom.pri

19
QGCExternalLibs.pri

@ -55,6 +55,7 @@ isEmpty(MAVLINK_CONF) { @@ -55,6 +55,7 @@ isEmpty(MAVLINK_CONF) {
message($$sprintf("Using user-supplied mavlink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
} else {
MAVLINK_CONF = all
message($$sprintf("Using MAVLink dialect '%1'.", $$MAVLINK_CONF))
}
}
@ -67,32 +68,18 @@ contains (CONFIG, QGC_DISABLE_APM_MAVLINK) { @@ -67,32 +68,18 @@ contains (CONFIG, QGC_DISABLE_APM_MAVLINK) {
CONFIG += ArdupilotEnabled
}
# 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'.", $$MAVLINK_CONF))
}
# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH
exists($$MAVLINKPATH/common) {
!isEmpty(MAVLINK_CONF) {
count(MAVLINK_CONF, 1) {
count(MAVLINK_CONF, 1) {
exists($$MAVLINKPATH/$$MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
} else {
error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
}
} else {
error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
}
} else {
INCLUDEPATH += $$MAVLINKPATH/common
}
} else {
error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
}
#

1
custom-example/custom.pri

@ -23,7 +23,6 @@ DEFINES += APP_VERSION_STR=\"\\\"$$CUSTOM_QGC_VERSION\\\"\" @@ -23,7 +23,6 @@ DEFINES += APP_VERSION_STR=\"\\\"$$CUSTOM_QGC_VERSION\\\"\"
message(Custom QGC Version: $${CUSTOM_QGC_VERSION})
# Build a single flight stack by disabling APM support
MAVLINK_CONF = common
CONFIG += QGC_DISABLE_APM_MAVLINK
CONFIG += QGC_DISABLE_APM_PLUGIN QGC_DISABLE_APM_PLUGIN_FACTORY

Loading…
Cancel
Save