1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 21:05:28 +03:00

Merge pull request #121 from iNavFlight/msp-altitude-1_6

Report raw baro altitude in sensors tab
This commit is contained in:
Paweł Spychalski 2017-01-30 21:45:23 +01:00 committed by GitHub
commit 618f719f6a
4 changed files with 26 additions and 16 deletions

View file

@ -177,6 +177,10 @@ var mspHelper = (function (gui) {
break;
case MSPCodes.MSP_ALTITUDE:
SENSOR_DATA.altitude = parseFloat((data.getInt32(0, true) / 100.0).toFixed(2)); // correct scale factor
// On 1.6 and above this provides also baro raw altitude
if (semver.gte(CONFIG.flightControllerVersion, "1.6.0")) {
SENSOR_DATA.barometer = parseFloat((data.getInt32(6, true) / 100.0).toFixed(2)); // correct scale factor
}
break;
case MSPCodes.MSP_SONAR:
SENSOR_DATA.sonar = data.getInt32(0, true);