1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 04:45:18 +03:00

fix vbatmincellvoltage and vbatmaxcellvoltage scale factors inside output cruncher

This commit is contained in:
cTn 2014-11-03 18:36:29 +01:00
parent 3a4b41b259
commit a31282c6a3
2 changed files with 9 additions and 9 deletions

View file

@ -301,7 +301,7 @@ var MSP = {
MISC.multiwiicurrentoutput = data.getUint8(13);
MISC.rssi_aux_channel = data.getUint8(14);
MISC.placeholder2 = data.getUint8(15);
MISC.mag_declination = data.getInt16(16, 1); // -18000-18000
MISC.mag_declination = data.getInt16(16, 1) / 10; // -18000-18000
MISC.vbatscale = data.getUint8(18, 1); // 10-200
MISC.vbatmincellvoltage = data.getUint8(19, 1) / 10; // 10-50
MISC.vbatmaxcellvoltage = data.getUint8(20, 1) / 10; // 10-50
@ -664,11 +664,11 @@ MSP.crunch = function (code) {
buffer.push(MISC.multiwiicurrentoutput);
buffer.push(MISC.rssi_aux_channel);
buffer.push(MISC.placeholder2);
buffer.push(lowByte(MISC.mag_declination));
buffer.push(highByte(MISC.mag_declination));
buffer.push(lowByte(MISC.mag_declination * 10));
buffer.push(highByte(MISC.mag_declination * 10));
buffer.push(MISC.vbatscale);
buffer.push(MISC.vbatmincellvoltage);
buffer.push(MISC.vbatmaxcellvoltage);
buffer.push(MISC.vbatmincellvoltage * 10);
buffer.push(MISC.vbatmaxcellvoltage * 10);
buffer.push(MISC.placeholder3);
break;
case MSP_codes.MSP_SET_SERVO_CONF: