Commit c7d11881 authored by Jacob Walser's avatar Jacob Walser

Remove nmea serial port for mobile builds

parent 55737026
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
#include "UDPLink.h" #include "UDPLink.h"
#include "TCPLink.h" #include "TCPLink.h"
#include "SettingsManager.h" #include "SettingsManager.h"
#include "PositionManager.h"
#ifdef QGC_ENABLE_BLUETOOTH #ifdef QGC_ENABLE_BLUETOOTH
#include "BluetoothLink.h" #include "BluetoothLink.h"
#endif #endif
#ifndef __mobile__ #ifndef __mobile__
#include "GPSManager.h" #include "GPSManager.h"
#include "PositionManager.h"
#endif #endif
QGC_LOGGING_CATEGORY(LinkManagerLog, "LinkManagerLog") QGC_LOGGING_CATEGORY(LinkManagerLog, "LinkManagerLog")
...@@ -51,7 +51,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox) ...@@ -51,7 +51,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox)
, _mavlinkChannelsUsedBitMask(1) // We never use channel 0 to avoid sequence numbering problems , _mavlinkChannelsUsedBitMask(1) // We never use channel 0 to avoid sequence numbering problems
, _autoConnectSettings(NULL) , _autoConnectSettings(NULL)
, _mavlinkProtocol(NULL) , _mavlinkProtocol(NULL)
#ifndef __mobile__
, _nmeaPort(NULL) , _nmeaPort(NULL)
#endif
{ {
qmlRegisterUncreatableType<LinkManager> ("QGroundControl", 1, 0, "LinkManager", "Reference only"); qmlRegisterUncreatableType<LinkManager> ("QGroundControl", 1, 0, "LinkManager", "Reference only");
qmlRegisterUncreatableType<LinkConfiguration> ("QGroundControl", 1, 0, "LinkConfiguration", "Reference only"); qmlRegisterUncreatableType<LinkConfiguration> ("QGroundControl", 1, 0, "LinkConfiguration", "Reference only");
...@@ -66,7 +68,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox) ...@@ -66,7 +68,9 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox)
LinkManager::~LinkManager() LinkManager::~LinkManager()
{ {
#ifndef __mobile__
delete _nmeaPort; delete _nmeaPort;
#endif
} }
void LinkManager::setToolbox(QGCToolbox *toolbox) void LinkManager::setToolbox(QGCToolbox *toolbox)
...@@ -502,6 +506,7 @@ void LinkManager::_updateAutoConnectLinks(void) ...@@ -502,6 +506,7 @@ void LinkManager::_updateAutoConnectLinks(void)
QGCSerialPortInfo::BoardType_t boardType; QGCSerialPortInfo::BoardType_t boardType;
QString boardName; QString boardName;
#ifndef __mobile__
if (portInfo.systemLocation().trimmed() == _autoConnectSettings->autoConnectNmeaPort()->cookedValueString()) { if (portInfo.systemLocation().trimmed() == _autoConnectSettings->autoConnectNmeaPort()->cookedValueString()) {
if (portInfo.systemLocation().trimmed() != _nmeaDeviceName) { if (portInfo.systemLocation().trimmed() != _nmeaDeviceName) {
_nmeaDeviceName = portInfo.systemLocation().trimmed(); _nmeaDeviceName = portInfo.systemLocation().trimmed();
...@@ -525,7 +530,9 @@ void LinkManager::_updateAutoConnectLinks(void) ...@@ -525,7 +530,9 @@ void LinkManager::_updateAutoConnectLinks(void)
_nmeaPort->setBaudRate(_nmeaBaud); _nmeaPort->setBaudRate(_nmeaBaud);
qCDebug(LinkManagerLog) << "Configuring nmea baudrate" << _nmeaBaud; qCDebug(LinkManagerLog) << "Configuring nmea baudrate" << _nmeaBaud;
} }
} else if (portInfo.getBoardInfo(boardType, boardName)) { } else
#endif
if (portInfo.getBoardInfo(boardType, boardName)) {
if (portInfo.isBootloader()) { if (portInfo.isBootloader()) {
// Don't connect to bootloader // Don't connect to bootloader
qCDebug(LinkManagerLog) << "Waiting for bootloader to finish" << portInfo.systemLocation(); qCDebug(LinkManagerLog) << "Waiting for bootloader to finish" << portInfo.systemLocation();
......
...@@ -235,9 +235,11 @@ private: ...@@ -235,9 +235,11 @@ private:
static const int _autoconnectConnectDelayMSecs; static const int _autoconnectConnectDelayMSecs;
// NMEA GPS device for GCS position // NMEA GPS device for GCS position
#ifndef __mobile__
QString _nmeaDeviceName; QString _nmeaDeviceName;
QSerialPort* _nmeaPort; QSerialPort* _nmeaPort;
uint32_t _nmeaBaud; uint32_t _nmeaBaud;
#endif
}; };
#endif #endif
...@@ -493,7 +493,7 @@ QGCView { ...@@ -493,7 +493,7 @@ QGCView {
Row { Row {
width: parent.width width: parent.width
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
visible: !ScreenTools.isiOS visible: !ScreenTools.isMobile
&& QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaPort.visible && QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaPort.visible
&& QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaBaud.visible && QGroundControl.settingsManager.autoConnectSettings.autoConnectNmeaBaud.visible
......
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