From ed5d11cd56d6cca73f2e8445888f710bdc6a8042 Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 17 Jul 2016 12:18:19 +1200 Subject: [PATCH] Fixed 'Show All PIDs' button. --- tabs/pid_tuning.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 5efd4c92..038e7ce0 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -337,20 +337,6 @@ TABS.pid_tuning.initialize = function (callback) { } } - var showAllButton = $('#showAllPids'); - - function updatePidDisplay() { - if (!TABS.pid_tuning.showAllPids) { - hideUnusedPids(); - - showAllButton.text(chrome.i18n.getMessage("pidTuningShowAllPids")); - } else { - showAllPids(); - - showAllButton.text(chrome.i18n.getMessage("pidTuningHideUnusedPids")); - } - } - function drawAxes(curveContext, width, height, scaleHeight) { curveContext.strokeStyle = '#000000'; curveContext.lineWidth = 4; @@ -440,6 +426,20 @@ TABS.pid_tuning.initialize = function (callback) { self.currentRates.pitch_rate = RC_tuning.roll_pitch_rate; } + var showAllButton = $('#showAllPids'); + + function updatePidDisplay() { + if (!TABS.pid_tuning.showAllPids) { + hideUnusedPids(); + + showAllButton.text(chrome.i18n.getMessage("pidTuningShowAllPids")); + } else { + showAllPids(); + + showAllButton.text(chrome.i18n.getMessage("pidTuningHideUnusedPids")); + } + } + updatePidDisplay(); showAllButton.on('click', function(){