1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

initial support for current sensor code from Lux

This commit is contained in:
cTn 2014-05-29 20:16:32 +02:00
parent f704d0f82d
commit d68bd29191
6 changed files with 29 additions and 16 deletions

View file

@ -239,9 +239,9 @@ MSP.process_data = function(code, message_buffer, message_length) {
break;
case MSP_codes.MSP_ANALOG:
ANALOG.voltage = data.getUint8(0) / 10.0;
ANALOG.power = data.getUint16(1, 1);
ANALOG.mAhdrawn = data.getUint16(1, 1);
ANALOG.rssi = data.getUint16(3, 1); // 0-1023
ANALOG.amperage = data.getUint16(5, 1);
ANALOG.amperage = data.getUint16(5, 1) * 1000; // convert from A to mA
break;
case MSP_codes.MSP_RC_TUNING:
RC_tuning.RC_RATE = parseFloat((data.getUint8(0) / 100).toFixed(2));