Merge pull request #393 from iNavFlight/de_smix_check

Check for custom mixer when loading/saving smix rules
pull/394/head
Konstantin Sharlaimov 7 years ago committed by GitHub
commit d13ff339e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save