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:
commit
1fdb7a8eaa
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue