1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Merge pull request #136 from TheAngularity/patch-1

disable accelerometer calibration button when accelerometer not enabled
This commit is contained in:
Michael Keller 2016-07-22 22:29:04 +12:00 committed by GitHub
commit 1fdb7a8eaa

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)) {