1
0
Fork 0
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:
Konstantin Sharlaimov (DigitalEntity) 2018-03-22 21:09:47 +10:00
parent a1774e5bac
commit 6fd6fc293f

View file

@ -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();