mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 11:59:51 +03:00
Report logic condiotion activation status
This commit is contained in:
parent
e3b89453e8
commit
9c627f7445
9 changed files with 109 additions and 1 deletions
|
@ -564,6 +564,16 @@ var mspHelper = (function (gui) {
|
|||
}
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP2_INAV_LOGIC_CONDITIONS_STATUS:
|
||||
if (data.byteLength % 4 === 0) {
|
||||
let index = 0;
|
||||
for (i = 0; i < data.byteLength; i += 4) {
|
||||
LOGIC_CONDITIONS_STATUS.set(index, data.getInt32(i, true));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP2_INAV_SET_LOGIC_CONDITIONS:
|
||||
console.log("Logic conditions saved");
|
||||
break;
|
||||
|
@ -3335,5 +3345,21 @@ var mspHelper = (function (gui) {
|
|||
}
|
||||
};
|
||||
|
||||
self.loadBrakingConfig = function(callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.1.0")) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_MC_BRAKING, false, false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
self.loadSensorStatus = function (callback) {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.3.0")) {
|
||||
MSP.send_message(MSPCodes.MSP2_INAV_LOGIC_CONDITIONS_STATUS, false, false, callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return self;
|
||||
})(GUI);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue