From 24e126dfe0ff38bebee1d754a1216acd1cfef725 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Fri, 23 Dec 2016 20:06:42 +0100 Subject: [PATCH] motor test mode fix --- tabs/motors.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tabs/motors.js b/tabs/motors.js index e371d4ee..a1187847 100644 --- a/tabs/motors.js +++ b/tabs/motors.js @@ -12,7 +12,7 @@ TABS.motors.initialize = function (callback) { self.feature3DSupported = false; self.allowTestMode = true; - var $motorsEnableTestMode = $('#motorsEnableTestMode'); + var $motorsEnableTestMode; if (GUI.active_tab != 'motors') { GUI.active_tab = 'motors'; @@ -169,7 +169,8 @@ TABS.motors.initialize = function (callback) { } function process_html() { - // translate to user-selected language + $motorsEnableTestMode = $('#motorsEnableTestMode'); + localize(); self.feature3DEnabled = bit_check(BF_CONFIG.features, 12); @@ -377,7 +378,7 @@ TABS.motors.initialize = function (callback) { $('div.values li:not(:last)').slice(0, number_of_valid_outputs).text(val); $('div.sliders input:not(:last):first').trigger('input'); }); - + console.log($motorsEnableTestMode); $motorsEnableTestMode.change(function () { if ($(this).is(':checked')) { $('div.sliders input').slice(0, number_of_valid_outputs).prop('disabled', false);