Merge pull request #136 from TheAngularity/patch-1

disable accelerometer calibration button when accelerometer not enabled
10.3.x-maintenance
Michael Keller 2016-07-22 22:29:04 +12:00 committed by GitHub
commit 1fdb7a8eaa
1 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,12 @@ TABS.setup.initialize = function (callback) {
// set heading in interactive block
$('span.heading').text(chrome.i18n.getMessage('initialSetupAttitude', [0]));
// check if we have accelerometer
if (!have_sensor(CONFIG.activeSensors, 'acc')) {
$('a.calibrateAccel').addClass('disabled');
$('default_btn').addClass('disabled');
}
// check if we have magnetometer
if (!bit_check(CONFIG.activeSensors, 2)) {