diff --git a/src/FirmwarePlugin/FirmwarePlugin.cc b/src/FirmwarePlugin/FirmwarePlugin.cc index 5f57fca..88e82a6 100644 --- a/src/FirmwarePlugin/FirmwarePlugin.cc +++ b/src/FirmwarePlugin/FirmwarePlugin.cc @@ -824,6 +824,14 @@ void FirmwarePlugin::checkIfIsLatestStable(Vehicle* vehicle) _versionFileDownloadFinished(remoteFile, localFile, vehicle); sender()->deleteLater(); }); + connect( + downloader, + &QGCFileDownload::error, + this, + [=](QString errorMsg) { + qCDebug(FirmwarePluginLog) << "Failed to download the latest fw version file. Error: " << errorMsg; + downloader->deleteLater(); + }); downloader->download(versionFile); } diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 794bbdf..6b8b623 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1343,7 +1343,8 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me nullStr[8] = 0; _gitHash = nullStr; } - if (_toolbox->corePlugin()->options()->checkFirmwareVersion()) { + if (_toolbox->corePlugin()->options()->checkFirmwareVersion() && !_checkLatestStableFWDone) { + _checkLatestStableFWDone = true; _firmwarePlugin->checkIfIsLatestStable(this); } emit gitHashChanged(_gitHash); diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index b124d80..7b56c07 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -1504,6 +1504,7 @@ private: bool _isROIEnabled = false; Joystick* _activeJoystick = nullptr; + bool _checkLatestStableFWDone = false; int _firmwareMajorVersion; int _firmwareMinorVersion; int _firmwarePatchVersion;