diff --git a/tabs/servos.js b/tabs/servos.js index 507bb77d..24f8c301 100755 --- a/tabs/servos.js +++ b/tabs/servos.js @@ -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();