Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
943cb967
Commit
943cb967
authored
Feb 28, 2019
by
Gus Grubba
Browse files
CP - Disable APM code if it's disabled in the build.
parent
3e04eab0
Changes
4
Hide whitespace changes
Inline
Side-by-side
QGCExternalLibs.pri
View file @
943cb967
...
...
@@ -53,6 +53,7 @@ isEmpty(MAVLINK_CONF) {
contains (CONFIG, QGC_DISABLE_APM_MAVLINK) {
message("Disable APM MAVLink support")
DEFINES += NO_ARDUPILOT_DIALECT
CONFIG += ArdupilotDisabled
}
# First we select the dialect, checking for valid user selection
...
...
qgroundcontrol.pro
View file @
943cb967
...
...
@@ -596,7 +596,6 @@ HEADERS += \
src
/
QmlControls
/
RCChannelMonitorController
.
h
\
src
/
QmlControls
/
ScreenToolsController
.
h
\
src
/
QtLocationPlugin
/
QMLControl
/
QGCMapEngineManager
.
h
\
src
/
Settings
/
APMMavlinkStreamRateSettings
.
h
\
src
/
Settings
/
AppSettings
.
h
\
src
/
Settings
/
AutoConnectSettings
.
h
\
src
/
Settings
/
BrandImageSettings
.
h
\
...
...
@@ -800,7 +799,6 @@ SOURCES += \
src
/
QmlControls
/
RCChannelMonitorController
.
cc
\
src
/
QmlControls
/
ScreenToolsController
.
cc
\
src
/
QtLocationPlugin
/
QMLControl
/
QGCMapEngineManager
.
cc
\
src
/
Settings
/
APMMavlinkStreamRateSettings
.
cc
\
src
/
Settings
/
AppSettings
.
cc
\
src
/
Settings
/
AutoConnectSettings
.
cc
\
src
/
Settings
/
BrandImageSettings
.
cc
\
...
...
@@ -965,6 +963,14 @@ SOURCES += \
#
ArduPilot
FirmwarePlugin
!
ArdupilotDisabled
{
INCLUDEPATH
+=
\
src
/
Settings
/
APMMavlinkStreamRateSettings
.
h
\
SOURCES
+=
\
src
/
Settings
/
APMMavlinkStreamRateSettings
.
cc
\
}
APMFirmwarePlugin
{
RESOURCES
*=
src
/
FirmwarePlugin
/
APM
/
APMResources
.
qrc
...
...
src/Settings/SettingsManager.cc
View file @
943cb967
...
...
@@ -26,7 +26,9 @@ SettingsManager::SettingsManager(QGCApplication* app, QGCToolbox* toolbox)
,
_flyViewSettings
(
nullptr
)
,
_planViewSettings
(
nullptr
)
,
_brandImageSettings
(
nullptr
)
#if !defined(NO_ARDUPILOT_DIALECT)
,
_apmMavlinkStreamRateSettings
(
nullptr
)
#endif
{
}
...
...
@@ -46,7 +48,9 @@ void SettingsManager::setToolbox(QGCToolbox *toolbox)
_flyViewSettings
=
new
FlyViewSettings
(
this
);
_planViewSettings
=
new
PlanViewSettings
(
this
);
_brandImageSettings
=
new
BrandImageSettings
(
this
);
#if !defined(NO_ARDUPILOT_DIALECT)
_apmMavlinkStreamRateSettings
=
new
APMMavlinkStreamRateSettings
(
this
);
#endif
#if defined(QGC_AIRMAP_ENABLED)
_airMapSettings
=
new
AirMapSettings
(
this
);
#endif
...
...
src/Settings/SettingsManager.h
View file @
943cb967
...
...
@@ -49,8 +49,9 @@ public:
Q_PROPERTY
(
QObject
*
flyViewSettings
READ
flyViewSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
planViewSettings
READ
planViewSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
brandImageSettings
READ
brandImageSettings
CONSTANT
)
#if !defined(NO_ARDUPILOT_DIALECT)
Q_PROPERTY
(
QObject
*
apmMavlinkStreamRateSettings
READ
apmMavlinkStreamRateSettings
CONSTANT
)
#endif
// Override from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
@@ -66,8 +67,9 @@ public:
FlyViewSettings
*
flyViewSettings
(
void
)
{
return
_flyViewSettings
;
}
PlanViewSettings
*
planViewSettings
(
void
)
{
return
_planViewSettings
;
}
BrandImageSettings
*
brandImageSettings
(
void
)
{
return
_brandImageSettings
;
}
#if !defined(NO_ARDUPILOT_DIALECT)
APMMavlinkStreamRateSettings
*
apmMavlinkStreamRateSettings
(
void
)
{
return
_apmMavlinkStreamRateSettings
;
}
#endif
private:
#if defined(QGC_AIRMAP_ENABLED)
AirMapSettings
*
_airMapSettings
;
...
...
@@ -81,7 +83,9 @@ private:
FlyViewSettings
*
_flyViewSettings
;
PlanViewSettings
*
_planViewSettings
;
BrandImageSettings
*
_brandImageSettings
;
#if !defined(NO_ARDUPILOT_DIALECT)
APMMavlinkStreamRateSettings
*
_apmMavlinkStreamRateSettings
;
#endif
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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