Commit baf7dc78 authored by DonLakeFlyer's avatar DonLakeFlyer

Fix shutdown signaling on android

parent 044e3f72
...@@ -102,7 +102,8 @@ void MAVLinkProtocol::setToolbox(QGCToolbox *toolbox) ...@@ -102,7 +102,8 @@ void MAVLinkProtocol::setToolbox(QGCToolbox *toolbox)
connect(this, &MAVLinkProtocol::saveTelemetryLog, _app, &QGCApplication::saveTelemetryLogOnMainThread); connect(this, &MAVLinkProtocol::saveTelemetryLog, _app, &QGCApplication::saveTelemetryLogOnMainThread);
connect(this, &MAVLinkProtocol::checkTelemetrySavePath, _app, &QGCApplication::checkTelemetrySavePathOnMainThread); connect(this, &MAVLinkProtocol::checkTelemetrySavePath, _app, &QGCApplication::checkTelemetrySavePathOnMainThread);
connect(_multiVehicleManager->vehicles(), &QmlObjectListModel::countChanged, this, &MAVLinkProtocol::_vehicleCountChanged); connect(_multiVehicleManager, &MultiVehicleManager::vehicleAdded, this, &MAVLinkProtocol::_vehicleCountChanged);
connect(_multiVehicleManager, &MultiVehicleManager::vehicleRemoved, this, &MAVLinkProtocol::_vehicleCountChanged);
emit versionCheckChanged(m_enable_version_check); emit versionCheckChanged(m_enable_version_check);
} }
...@@ -327,8 +328,9 @@ void MAVLinkProtocol::enableVersionCheck(bool enabled) ...@@ -327,8 +328,9 @@ void MAVLinkProtocol::enableVersionCheck(bool enabled)
emit versionCheckChanged(enabled); emit versionCheckChanged(enabled);
} }
void MAVLinkProtocol::_vehicleCountChanged(int count) void MAVLinkProtocol::_vehicleCountChanged(void)
{ {
int count = _multiVehicleManager->vehicles()->count();
if (count == 0) { if (count == 0) {
// Last vehicle is gone, close out logging // Last vehicle is gone, close out logging
_stopLogging(); _stopLogging();
......
...@@ -163,7 +163,7 @@ signals: ...@@ -163,7 +163,7 @@ signals:
void checkTelemetrySavePath(void); void checkTelemetrySavePath(void);
private slots: private slots:
void _vehicleCountChanged(int count); void _vehicleCountChanged(void);
private: private:
bool _closeLogFile(void); bool _closeLogFile(void);
......
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