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:
parent
f704d0f82d
commit
d68bd29191
6 changed files with 29 additions and 16 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue