mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 20:10:11 +03:00
merging MISCv2 into MISC since its both data structure and old fw/new fw compatible
This commit is contained in:
parent
7e8b1781da
commit
c37b9ff0f1
2 changed files with 7 additions and 19 deletions
11
js/msp.js
11
js/msp.js
|
@ -301,18 +301,21 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
|||
}
|
||||
break;
|
||||
case MSP_codes.MSP_MISC: // 22 bytes
|
||||
MISC.PowerTrigger1 = data.getInt16(0, 1);
|
||||
MISC.midrc = data.getInt16(0, 1);
|
||||
MISC.minthrottle = data.getUint16(2, 1); // 0-2000
|
||||
MISC.maxthrottle = data.getUint16(4, 1); // 0-2000
|
||||
MISC.mincommand = data.getUint16(6, 1); // 0-2000
|
||||
MISC.failsafe_throttle = data.getUint16(8, 1); // 1000-2000
|
||||
MISC.plog0 = data.getUint16(10, 1);
|
||||
MISC.plog1 = data.getUint32(12, 1);
|
||||
MISC.gps_type = data.getUint8(10);
|
||||
MISC.gps_baudrate = data.getUint8(11);
|
||||
MISC.gps_ubx_sbas = data.getUint8(12);
|
||||
MISC.placeholder1 = data.getUint8(13);
|
||||
MISC.placeholder2 = data.getUint16(14, 1);
|
||||
MISC.mag_declination = data.getInt16(16, 1); // -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
|
||||
MISC.empty = data.getUint8(21, 1);
|
||||
MISC.placeholder3 = data.getUint8(21, 1);
|
||||
break;
|
||||
case MSP_codes.MSP_MOTOR_PINS:
|
||||
console.log(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue