Browse Source

Merge pull request #7391 from DonLakeFlyer/ArduPilotHash

ArduPilot: Fix git hash string generation
QGC4.4
Don Gagne 6 years ago committed by GitHub
parent
commit
d73fb9e41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ChangeLog.md
  2. 6
      src/Vehicle/Vehicle.cc

9
ChangeLog.md

@ -8,14 +8,19 @@ Note: This file only contains high level features or important fixes. @@ -8,14 +8,19 @@ Note: This file only contains high level features or important fixes.
* Major rewrite and bug fix pass through Structure Scan. Previous version had such bad problems that it can no longer be supported. Plans with Structure Scan will need to be recreated. New QGC will not load old Structure Scan plans.
### 3.5.1 - Not yet released
### 3.5.3 - Not yet released
* ArduPilot: Fix parameter file save generating bad characters from git hash
### 3.5.2 - Stable
* Fix Ubuntu AppImage startup failure
### 3.5.1
* Update Windows usb drivers
* Add ArduPilot CubeBlack Service Bulletin check
* Fix visibility of PX4/ArduPilot logo in toolbar
* Fix tile set count but in OfflineMaps which would cause image and elevation tile set to have incorrect counts and be incorrectly marked as download incomplete.
### 3.5.0 - Stable
### 3.5.0
* Plan GeoFence: Fix loading of fence from intermediate 3.4 code
* Structure Scan: Fix loading of structure scan height
* ArduPilot: Fix location of planned home position when not connected to vehicle. Issue #6840.

6
src/Vehicle/Vehicle.cc

@ -1309,13 +1309,15 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me @@ -1309,13 +1309,15 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me
// PX4 Firmware stores the first 16 characters of the git hash as binary, with the individual bytes in reverse order
_gitHash = "";
QByteArray array((char*)autopilotVersion.flight_custom_version, 8);
for (int i = 7; i >= 0; i--) {
_gitHash.append(QString("%1").arg(autopilotVersion.flight_custom_version[i], 2, 16, QChar('0')));
}
} else {
// APM Firmware stores the first 8 characters of the git hash as an ASCII character string
_gitHash = QString::fromUtf8((char*)autopilotVersion.flight_custom_version, 8);
char nullStr[9];
strncpy(nullStr, (char*)autopilotVersion.flight_custom_version, 8);
nullStr[8] = 0;
_gitHash = nullStr;
}
if (_toolbox->corePlugin()->options()->checkFirmwareVersion()) {
_firmwarePlugin->checkIfIsLatestStable(this);

Loading…
Cancel
Save