disable accelerometer sensor graph when accelerometer not enabled

10.3.x-maintenance
TheAngularity 2016-07-22 11:03:05 +02:00 committed by GitHub
parent af15ff910a
commit 924e9d0a16
1 changed files with 3 additions and 0 deletions

View File

@ -185,6 +185,9 @@ TABS.sensors.initialize = function (callback) {
// disable graphs for sensors that are missing
var checkboxes = $('.tab-sensors .info .checkboxes input');
if (!have_sensor(CONFIG.activeSensors, 'acc')) { // acc
checkboxes.eq(1).prop('disabled', true);
}
if (!bit_check(CONFIG.activeSensors, 1)) { // baro
checkboxes.eq(3).prop('disabled', true);
}