Commit 24e75cfb authored by Don Gagne's avatar Don Gagne

Fix android build

parent 41866c2f
......@@ -108,9 +108,7 @@ void MAVLinkProtocol::setToolbox(QGCToolbox *toolbox)
connect(this, &MAVLinkProtocol::protocolStatusMessage, _app, &QGCApplication::criticalMessageBoxOnMainThread);
connect(this, &MAVLinkProtocol::saveTempFlightDataLog, _app, &QGCApplication::saveTempFlightDataLogOnMainThread);
#ifndef __mobile__
connect(_multiVehicleManager->vehicles(), &QmlObjectListModel::countChanged, this, &MAVLinkProtocol::_vehicleCountChanged);
#endif
emit versionCheckChanged(m_enable_version_check);
}
......@@ -631,6 +629,18 @@ int MAVLinkProtocol::getHeartbeatRate()
return _heartbeatRate;
}
void MAVLinkProtocol::_vehicleCountChanged(int count)
{
#ifndef __mobile__
if (count == 0) {
// Last vehicle is gone, close out logging
_stopLogging();
}
#else
Q_UNUSED(count);
#endif
}
#ifndef __mobile__
/// @brief Closes the log file if it is open
bool MAVLinkProtocol::_closeLogFile(void)
......@@ -726,12 +736,4 @@ void MAVLinkProtocol::deleteTempLogFiles(void)
QFile::remove(fileInfo.filePath());
}
}
void MAVLinkProtocol::_vehicleCountChanged(int count)
{
if (count == 0) {
// Last vehicle is gone, close out logging
_stopLogging();
}
}
#endif
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