1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 12:55:13 +03:00

Report raw baro altitude in sensors tab

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2017-01-29 21:15:55 +10:00
parent 97341e95ca
commit 191aa6ac86
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);