diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 1903f1aab979e40665a4c2dff57acb455f01fa48..c9331d6227753ba4efc692e965ef80b7cf85d1f0 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -922,13 +922,13 @@ HEADERS+= \ src/Vehicle/Vehicle.h \ src/VehicleSetup/VehicleComponent.h \ -!MobileBuild { +!MobileBuild { !NoSerialBuild { HEADERS += \ src/VehicleSetup/Bootloader.h \ src/VehicleSetup/FirmwareImage.h \ src/VehicleSetup/FirmwareUpgradeController.h \ src/VehicleSetup/PX4FirmwareUpgradeThread.h \ -} +}} SOURCES += \ src/AutoPilotPlugins/AutoPilotPlugin.cc \ @@ -948,13 +948,13 @@ SOURCES += \ src/Vehicle/Vehicle.cc \ src/VehicleSetup/VehicleComponent.cc \ -!MobileBuild { +!MobileBuild { !NoSerialBuild { SOURCES += \ src/VehicleSetup/Bootloader.cc \ src/VehicleSetup/FirmwareImage.cc \ src/VehicleSetup/FirmwareUpgradeController.cc \ src/VehicleSetup/PX4FirmwareUpgradeThread.cc \ -} +}} # ArduPilot FirmwarePlugin diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index bd8def3193e0f2b715f229d405f62f169df09bd0..5aa0bb9bba328edcae4b8a1ac0939ac55cd3a1be 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -440,7 +440,9 @@ void QGCApplication::_initCommon(void) #ifndef __mobile__ qmlRegisterType (kQGCControllers, 1, 0, "ViewWidgetController"); qmlRegisterType (kQGCControllers, 1, 0, "CustomCommandWidgetController"); +#ifndef NO_SERIAL_LINK qmlRegisterType (kQGCControllers, 1, 0, "FirmwareUpgradeController"); +#endif qmlRegisterType (kQGCControllers, 1, 0, "GeoTagController"); qmlRegisterType (kQGCControllers, 1, 0, "MavlinkConsoleController"); #endif diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 753c61532720abab5ceec57d29b88ed9312ffdc3..a0ba291f4c1f4a7e14b981e780784ac5d5dbd34e 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -52,8 +52,10 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox) , _autoConnectSettings(NULL) , _mavlinkProtocol(NULL) #ifndef __mobile__ +#ifndef NO_SERIAL_LINK , _nmeaPort(NULL) #endif +#endif { qmlRegisterUncreatableType ("QGroundControl", 1, 0, "LinkManager", "Reference only"); qmlRegisterUncreatableType ("QGroundControl", 1, 0, "LinkConfiguration", "Reference only"); @@ -69,8 +71,10 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox) LinkManager::~LinkManager() { #ifndef __mobile__ +#ifndef NO_SERIAL_LINK delete _nmeaPort; #endif +#endif } void LinkManager::setToolbox(QGCToolbox *toolbox) @@ -513,6 +517,7 @@ void LinkManager::_updateAutoConnectLinks(void) QGCSerialPortInfo::BoardType_t boardType; QString boardName; +#ifndef NO_SERIAL_LINK #ifndef __mobile__ if (portInfo.systemLocation().trimmed() == _autoConnectSettings->autoConnectNmeaPort()->cookedValueString()) { if (portInfo.systemLocation().trimmed() != _nmeaDeviceName) { @@ -538,6 +543,7 @@ void LinkManager::_updateAutoConnectLinks(void) qCDebug(LinkManagerLog) << "Configuring nmea baudrate" << _nmeaBaud; } } else +#endif #endif if (portInfo.getBoardInfo(boardType, boardName)) { if (portInfo.isBootloader()) { diff --git a/src/comm/LinkManager.h b/src/comm/LinkManager.h index 7aeb62e9b8cde6b8edc44017023688d64c567ead..f09360142d62835a478973acdb0c28a1b9fba5f0 100644 --- a/src/comm/LinkManager.h +++ b/src/comm/LinkManager.h @@ -237,9 +237,11 @@ private: // NMEA GPS device for GCS position #ifndef __mobile__ +#ifndef NO_SERIAL_LINK QString _nmeaDeviceName; QSerialPort* _nmeaPort; uint32_t _nmeaBaud; #endif +#endif }; diff --git a/src/main.cc b/src/main.cc index 1811b876af63c6e5a2170c07e69155477bba8c12..62457d0149adf48fbbf431d4e84818df5b479816 100644 --- a/src/main.cc +++ b/src/main.cc @@ -56,8 +56,10 @@ #endif #ifndef __mobile__ +#ifndef NO_SERIAL_LINK Q_DECLARE_METATYPE(QGCSerialPortInfo) #endif +#endif #ifdef Q_OS_WIN @@ -159,7 +161,9 @@ int main(int argc, char *argv[]) #endif qRegisterMetaType(); #ifndef __mobile__ +#ifndef NO_SERIAL_LINK qRegisterMetaType(); +#endif #endif // We statically link our own QtLocation plugin