Fixed 'Show All PIDs' button.

10.3.x-maintenance
mikeller 2016-07-17 12:18:19 +12:00
parent 8438a02781
commit ed5d11cd56
1 changed files with 14 additions and 14 deletions

View File

@ -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) { function drawAxes(curveContext, width, height, scaleHeight) {
curveContext.strokeStyle = '#000000'; curveContext.strokeStyle = '#000000';
curveContext.lineWidth = 4; curveContext.lineWidth = 4;
@ -440,6 +426,20 @@ TABS.pid_tuning.initialize = function (callback) {
self.currentRates.pitch_rate = RC_tuning.roll_pitch_rate; 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(); updatePidDisplay();
showAllButton.on('click', function(){ showAllButton.on('click', function(){