Merge pull request #136 from TheAngularity/patch-1
disable accelerometer calibration button when accelerometer not enabled10.3.x-maintenance
commit
1fdb7a8eaa
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue