Commit 76efcc81 authored by Don Gagne's avatar Don Gagne

Remove 0 test

parent 8d7acf62
......@@ -721,9 +721,6 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me
setFirmwareVersion(majorVersion, minorVersion, patchVersion, versionType);
}
// Git hash
if (*((uint64_t*)(&autopilotVersion.flight_custom_version[0])) != 0) {
// PX4 Firmware stores the first 16 characters of the git hash as binary, with the individual bytes in reverse order
if (px4Firmware()) {
// Lower 3 bytes is custom version
int majorVersion, minorVersion, patchVersion;
......@@ -732,8 +729,7 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me
patchVersion = autopilotVersion.flight_custom_version[0];
setFirmwareCustomVersion(majorVersion, minorVersion, patchVersion);
qDebug() << majorVersion << minorVersion << patchVersion;
// 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--) {
......@@ -744,7 +740,6 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me
_gitHash = QString::fromUtf8((char*)autopilotVersion.flight_custom_version, 8);
}
emit gitHashChanged(_gitHash);
}
_setCapabilities(autopilotVersion.capabilities);
_startPlanRequest();
......
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