mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 04:15:28 +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
|
@ -103,21 +103,6 @@ var ANALOG = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var MISC = {
|
var MISC = {
|
||||||
PowerTrigger1: 0, // intPowerTrigger1 (aka useless trash)
|
|
||||||
minthrottle: 0,
|
|
||||||
maxthrottle: 0,
|
|
||||||
mincommand: 0,
|
|
||||||
failsafe_throttle: 0,
|
|
||||||
plog0: 0, // plog useless shit
|
|
||||||
plog1: 0, // plog useless shit
|
|
||||||
mag_declination: 0, // not checked
|
|
||||||
vbatscale: 0,
|
|
||||||
vbatmincellvoltage: 0,
|
|
||||||
vbatmaxcellvoltage: 0,
|
|
||||||
empty: 0 // unknown
|
|
||||||
};
|
|
||||||
|
|
||||||
var MISCV2 = { // TODO temporary, will figure out a better solution in the future
|
|
||||||
midrc: 0,
|
midrc: 0,
|
||||||
minthrottle: 0,
|
minthrottle: 0,
|
||||||
maxthrottle: 0,
|
maxthrottle: 0,
|
||||||
|
|
11
js/msp.js
11
js/msp.js
|
@ -301,18 +301,21 @@ MSP.process_data = function(code, message_buffer, message_length) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_MISC: // 22 bytes
|
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.minthrottle = data.getUint16(2, 1); // 0-2000
|
||||||
MISC.maxthrottle = data.getUint16(4, 1); // 0-2000
|
MISC.maxthrottle = data.getUint16(4, 1); // 0-2000
|
||||||
MISC.mincommand = data.getUint16(6, 1); // 0-2000
|
MISC.mincommand = data.getUint16(6, 1); // 0-2000
|
||||||
MISC.failsafe_throttle = data.getUint16(8, 1); // 1000-2000
|
MISC.failsafe_throttle = data.getUint16(8, 1); // 1000-2000
|
||||||
MISC.plog0 = data.getUint16(10, 1);
|
MISC.gps_type = data.getUint8(10);
|
||||||
MISC.plog1 = data.getUint32(12, 1);
|
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.mag_declination = data.getInt16(16, 1); // -18000-18000
|
||||||
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
||||||
MISC.vbatmincellvoltage = data.getUint8(19, 1) / 10; // 10-50
|
MISC.vbatmincellvoltage = data.getUint8(19, 1) / 10; // 10-50
|
||||||
MISC.vbatmaxcellvoltage = data.getUint8(20, 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;
|
break;
|
||||||
case MSP_codes.MSP_MOTOR_PINS:
|
case MSP_codes.MSP_MOTOR_PINS:
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue