mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 12:55:14 +03:00
Additional fix for initial run when configurator is first loaded
This commit is contained in:
parent
18c434d924
commit
78aff406e4
1 changed files with 2 additions and 4 deletions
|
@ -304,7 +304,7 @@ function read_serial(info) {
|
|||
function sensor_status(sensors_detected) {
|
||||
// initialize variable (if it wasn't)
|
||||
if (!sensor_status.previous_sensors_detected) {
|
||||
sensor_status.previous_sensors_detected = 0;
|
||||
sensor_status.previous_sensors_detected = -1; // Otherwise first iteration will not be run if sensors_detected == 0
|
||||
}
|
||||
|
||||
// update UI (if necessary)
|
||||
|
@ -326,7 +326,7 @@ function sensor_status(sensors_detected) {
|
|||
$('.accicon', e_sensor_status).removeClass('active');
|
||||
}
|
||||
|
||||
if (have_sensor(sensors_detected, 'gyro')) {
|
||||
if (true) { // Gyro status is not reported by FC
|
||||
$('.gyro', e_sensor_status).addClass('on');
|
||||
$('.gyroicon', e_sensor_status).addClass('active');
|
||||
} else {
|
||||
|
@ -379,8 +379,6 @@ function have_sensor(sensors_detected, sensor_code) {
|
|||
return bit_check(sensors_detected, 3);
|
||||
case 'sonar':
|
||||
return bit_check(sensors_detected, 4);
|
||||
case 'gyro':
|
||||
return true; // Gyro status is never reported by FC
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue