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:
commit
1cb064a194
1 changed files with 2 additions and 5 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue