diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d86757e4..9211ca90 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2515,5 +2515,8 @@ }, "mixerPresetTitle": { "message": "Mixer preset" + }, + "fcFirmwareUpdateRequired": { + "message": "Flight Controller firmware has to be updated to latest version to use this function" } } diff --git a/tabs/mixer.html b/tabs/mixer.html index ca109281..7b44fe47 100644 --- a/tabs/mixer.html +++ b/tabs/mixer.html @@ -1,5 +1,6 @@
-
+ +
Mixer
diff --git a/tabs/mixer.js b/tabs/mixer.js index bf0e6d29..5dd9e6db 100644 --- a/tabs/mixer.js +++ b/tabs/mixer.js @@ -158,6 +158,11 @@ TABS.mixer.initialize = function (callback, scrollPosition) { function processHtml() { + if (!FC.isNewMixer()) { + $('#mixer-hidden-content').removeClass("is-hidden"); + $('#mixer-main-content').remove(); + } + $servoMixTable = $('#servo-mix-table'); $servoMixTableBody = $servoMixTable.find('tbody'); $motorMixTable = $('#motor-mix-table'); @@ -184,7 +189,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { $platformSelect.find("*").remove(); - for (i in platforms) { + for (let i in platforms) { if (platforms.hasOwnProperty(i)) { let p = platforms[i]; $platformSelect.append(''); diff --git a/tabs/motors.js b/tabs/motors.js index 920305e9..2607b2eb 100644 --- a/tabs/motors.js +++ b/tabs/motors.js @@ -188,7 +188,11 @@ TABS.motors.initialize = function (callback) { $motorsEnableTestMode.prop('checked', false); $motorsEnableTestMode.prop('disabled', true); - update_model(MIXER_CONFIG.appliedMixerPreset); + if (FC.isNewMixer()) { + update_model(MIXER_CONFIG.appliedMixerPreset);; + } else { + update_model(BF_CONFIG.mixerConfiguration); + } // Always start with default/empty sensor data array, clean slate all initSensorData(); diff --git a/tabs/setup.js b/tabs/setup.js index 5ce4cdfd..9b1bf592 100755 --- a/tabs/setup.js +++ b/tabs/setup.js @@ -1,4 +1,4 @@ -/*global chrome*/ +/*global $,chrome,FC,helper,mspHelper,MIXER_CONFIG,BF_CONFIG*/ 'use strict'; TABS.setup = { @@ -240,7 +240,11 @@ TABS.setup.initialize3D = function () { // // load the model including materials if (useWebGlRenderer) { - model_file = helper.mixer.getById(BF_CONFIG.mixerConfiguration).model; + if (FC.isNewMixer()) { + model_file = helper.mixer.getById(MIXER_CONFIG.appliedMixerPreset).model; + } else { + model_file = helper.mixer.getById(BF_CONFIG.mixerConfiguration).model; + } } else { model_file = 'fallback' }