mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 13:25:24 +03:00
Rely on apiVersion for gyro bit detection
This commit is contained in:
parent
2c4a97aee2
commit
8efbd9bc92
1 changed files with 5 additions and 11 deletions
|
@ -442,19 +442,13 @@ function have_sensor(sensors_detected, sensor_code) {
|
||||||
return bit_check(sensors_detected, 3);
|
return bit_check(sensors_detected, 3);
|
||||||
case 'sonar':
|
case 'sonar':
|
||||||
return bit_check(sensors_detected, 4);
|
return bit_check(sensors_detected, 4);
|
||||||
}
|
|
||||||
|
|
||||||
if (bit_check(sensors_detected, 5)) {
|
|
||||||
switch (sensor_code) {
|
|
||||||
case 'gyro':
|
case 'gyro':
|
||||||
return bit_check(sensors_detected, 6);
|
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
|
||||||
}
|
return bit_check(sensors_detected, 5);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sensor_code == 'gyro) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue