mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 00:35:20 +03:00
Check for custom mixer when loading/saving smix rules
This commit is contained in:
parent
a1774e5bac
commit
6fd6fc293f
1 changed files with 30 additions and 11 deletions
|
@ -11,22 +11,41 @@ TABS.servos.initialize = function (callback) {
|
|||
|
||||
var loadChainer = new MSPChainerClass();
|
||||
|
||||
loadChainer.setChain([
|
||||
mspHelper.loadServoConfiguration,
|
||||
mspHelper.loadRcData,
|
||||
mspHelper.loadBfConfig,
|
||||
mspHelper.loadServoMixRules
|
||||
]);
|
||||
if (BF_CONFIG.mixerConfiguration == 23 || BF_CONFIG.mixerConfiguration == 24 || BF_CONFIG.mixerConfiguration == 25) {
|
||||
loadChainer.setChain([
|
||||
mspHelper.loadServoConfiguration,
|
||||
mspHelper.loadRcData,
|
||||
mspHelper.loadBfConfig,
|
||||
mspHelper.loadServoMixRules
|
||||
]);
|
||||
}
|
||||
else {
|
||||
loadChainer.setChain([
|
||||
mspHelper.loadServoConfiguration,
|
||||
mspHelper.loadRcData,
|
||||
mspHelper.loadBfConfig
|
||||
]);
|
||||
}
|
||||
|
||||
loadChainer.setExitPoint(load_html);
|
||||
loadChainer.execute();
|
||||
|
||||
var saveChainer = new MSPChainerClass();
|
||||
|
||||
saveChainer.setChain([
|
||||
mspHelper.sendServoConfigurations,
|
||||
mspHelper.sendServoMixer,
|
||||
mspHelper.saveToEeprom
|
||||
]);
|
||||
if (BF_CONFIG.mixerConfiguration == 23 || BF_CONFIG.mixerConfiguration == 24 || BF_CONFIG.mixerConfiguration == 25) {
|
||||
saveChainer.setChain([
|
||||
mspHelper.sendServoConfigurations,
|
||||
mspHelper.sendServoMixer,
|
||||
mspHelper.saveToEeprom
|
||||
]);
|
||||
}
|
||||
else {
|
||||
saveChainer.setChain([
|
||||
mspHelper.sendServoConfigurations,
|
||||
mspHelper.saveToEeprom
|
||||
]);
|
||||
}
|
||||
|
||||
saveChainer.setExitPoint(function () {
|
||||
GUI.log(chrome.i18n.getMessage('servosEepromSave'));
|
||||
SERVO_RULES.cleanup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue