mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
Added arming enable to the 'motor test enable' switch.
This commit is contained in:
parent
a791255d46
commit
808c33860a
4 changed files with 47 additions and 39 deletions
|
@ -2022,6 +2022,28 @@ MspHelper.prototype.sendRxFailConfig = function(onCompleteCallback) {
|
|||
}
|
||||
}
|
||||
|
||||
MspHelper.prototype.setArmingEnabled = function(doEnable, onCompleteCallback) {
|
||||
if (semver.gte(CONFIG.apiVersion, "1.37.0") && (doEnable === CONFIG.arming_disabled)) {
|
||||
CONFIG.arming_disabled = !doEnable;
|
||||
|
||||
MSP.send_message(MSPCodes.MSP_ARMING_DISABLE, mspHelper.crunch(MSPCodes.MSP_ARMING_DISABLE), false, function () {
|
||||
if (doEnable) {
|
||||
GUI.log(chrome.i18n.getMessage('armingEnabled'));
|
||||
} else {
|
||||
GUI.log(chrome.i18n.getMessage('armingDisabled'));
|
||||
}
|
||||
|
||||
if (onCompleteCallback) {
|
||||
onCompleteCallback();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (onCompleteCallback) {
|
||||
onCompleteCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MSP.SDCARD_STATE_NOT_PRESENT = 0; //TODO, move these to better place
|
||||
MSP.SDCARD_STATE_FATAL = 1;
|
||||
MSP.SDCARD_STATE_CARD_INIT = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue