Merge pull request #120 from mikeller/fix_show_all_pids

Fixed 'Show All PIDs' button.
10.3.x-maintenance
Michael Keller 2016-07-17 12:20:17 +12:00 committed by GitHub
commit a4c1ca1ffc
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(){