Unverified Commit 08a7006a authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8377 from DonLakeFlyer/StableFWCheck

Vehicle only performs stable fw version check one time
parents 6eb0173e c0d503f3
......@@ -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);
}
......
......@@ -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);
......
......@@ -1504,6 +1504,7 @@ private:
bool _isROIEnabled = false;
Joystick* _activeJoystick = nullptr;
bool _checkLatestStableFWDone = false;
int _firmwareMajorVersion;
int _firmwareMinorVersion;
int _firmwarePatchVersion;
......
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