1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 08:15:22 +03:00

Merge pull request #139 from TheAngularity/patch-4

replace bit_check with have_sensor for better readable and cleanup
This commit is contained in:
Anton 2016-07-22 13:14:55 +02:00 committed by GitHub
commit 1cb064a194

View file

@ -54,18 +54,15 @@ TABS.setup.initialize = function (callback) {
// set heading in interactive block
$('span.heading').text(chrome.i18n.getMessage('initialSetupAttitude', [0]));
// check if we have accelerometer
// check if we have accelerometer and magnetometer
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)) {
if (!have_sensor(CONFIG.activeSensors, 'mag')) {
$('a.calibrateMag').addClass('disabled');
$('default_btn').addClass('disabled');
}
self.initializeInstruments();