Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fb052d2a
Commit
fb052d2a
authored
Mar 17, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only a single MAVLink dialect is supported
parent
4574fd52
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
41 deletions
+24
-41
QGCExternalLibs.pri
QGCExternalLibs.pri
+20
-37
user_config.pri.dist
user_config.pri.dist
+4
-4
No files found.
QGCExternalLibs.pri
View file @
fb052d2a
...
@@ -78,10 +78,9 @@ else {
...
@@ -78,10 +78,9 @@ else {
# the selected autopilot system.
# the selected autopilot system.
#
#
# If the user config file exists, it will be included. If this file
# If the user config file exists, it will be included. If this file
# specifies the MAVLINK_CONF variable with a list of MAVLink
# specifies the MAVLINK_CONF variable with a MAVLink dialect, support
# dialects, support for them will be compiled in to QGC. It will also
# for it will be compiled in to QGC. It will also create a
# create a QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use within
# QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use within the actual code.
# the actual code.
#
#
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v1.0
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v1.0
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
...
@@ -90,52 +89,36 @@ DEFINES += MAVLINK_NO_DATA
...
@@ -90,52 +89,36 @@ DEFINES += MAVLINK_NO_DATA
# First we select the dialect, checking for valid user selection
# 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
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
!isEmpty(MAVLINK_CONF) {
for(dialect, MAVLINK_CONF) {
message($$sprintf("Using MAVLink dialect '%1' specified at the command line.", $$MAVLINK_CONF))
exists($$MAVLINKPATH/$$dialect) {
MAVLINK_DIALECTS += $$dialect
message($$sprintf("Using MAVLink dialect '%1' specified at the command line.", $$dialect))
} else {
error($$sprintf("MAVLink dialect '%1' specified at the command line does not exist at '%2'!", $$dialect, $$MAVLINKPATH_REL))
}
}
}
}
# Otherwise they can specify MAVLINK_CONF within user_config.pri
else:infile(user_config.pri, MAVLINK_CONF) {
else:infile(user_config.pri, MAVLINK_CONF) {
MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
!isEmpty(MAVLINK_CONF) {
!isEmpty(MAVLINK_CONF) {
for(dialect, MAVLINK_CONF) {
message($$sprintf("Using MAVLink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
exists($$MAVLINKPATH/$$dialect) {
MAVLINK_DIALECTS += $$dialect
message($$sprintf("Using MAVLink dialect '%1' specified in user_config.pri", $$dialect))
} else {
error($$sprintf("MAVLink dialect '%1' specified in user_config.pri does not exist at '%2'!", $$dialect, $$MAVLINKPATH_REL))
}
}
}
}
}
}
# If no valid user selection is found, default to the ardupilotmega if it's available.
# If no valid user selection is found, default to the ardupilotmega if it's available.
# Note: This can be a list of several dialects.
# Note: This can be a list of several dialects.
else {
else {
DEFAULT_MAVLINK_DIALECTS=ardupilotmega
MAVLINK_CONF=ardupilotmega
for(dialect, DEFAULT_MAVLINK_DIALECTS) {
message($$sprintf("Using default MAVLink dialect '%1'.", $$MAVLINK_CONF))
exists($$MAVLINKPATH/$$dialect) {
MAVLINK_DIALECTS += $$dialect
message($$sprintf("Using default MAVLink dialect '%1'.", $$dialect))
} else {
warning($$sprintf("Default MAVLink dialect '%1' does not exist at '%2'!", $$dialect, $$MAVLINKPATH_REL))
}
}
}
}
# Then we add the proper include paths dependent on the dialects and notify
#
the user of the current
dialect.
#
Then we add the proper include paths dependent on the
dialect.
INCLUDEPATH += $$MAVLINKPATH
INCLUDEPATH += $$MAVLINKPATH
!isEmpty(MAVLINK_DIALECTS) {
!isEmpty(MAVLINK_CONF) {
for(dialect, MAVLINK_DIALECTS) {
count(MAVLINK_CONF, 1) {
INCLUDEPATH += $$MAVLINKPATH/$$dialect
exists($$MAVLINKPATH/$$MAVLINK_CONF) {
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$dialect))
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 {
} else {
warning("No
valid MAVLink dialects foun
d, only common messages supported.")
warning("No
MAVLink dialect specifie
d, only common messages supported.")
INCLUDEPATH += $$MAVLINKPATH/common
INCLUDEPATH += $$MAVLINKPATH/common
}
}
...
...
user_config.pri.dist
View file @
fb052d2a
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
#
#
#-------------------------------------------------
#-------------------------------------------------
# Specify
MAVLink dialects
to compile support for here. This variable is processed
# Specify
the MAVLink dialect
to compile support for here. This variable is processed
# by QGCExternalLibs.pri, which handles MAVLink configuration.
# by QGCExternalLibs.pri, which handles MAVLink configuration.
The dialect should
#
To specify dialects to include set MAVLINK_CONF to a space-separated list of dialects.
#
correspond to an include folder under `libs/mavlink/include/mavlink/v1.0`. You can
#
Each dialect should correspond to an include folder under `libs/mavlink/include`
#
also force a build to use only common mavlink message by setting MAVLINK_CONF to empty here.
#MAVLINK_CONF = pixhawk
#MAVLINK_CONF = pixhawk
# Override compilation of QGroundControl's features in your build. This overrides the default
# Override compilation of QGroundControl's features in your build. This overrides the default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment