1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Fix: the wrong ability to turn on HORIZON_MODE without ACC sensors (#13892)

added check of acc sensor enabled condition by turn on horizon mode
This commit is contained in:
Vladimir Demidov 2024-09-16 12:36:57 +03:00 committed by GitHub
parent f71170db1b
commit 654d18ced4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1007,7 +1007,7 @@ void processRxModes(timeUs_t currentTimeUs)
}
#endif
if (IS_RC_MODE_ACTIVE(BOXHORIZON) && canUseHorizonMode) {
if (IS_RC_MODE_ACTIVE(BOXHORIZON) && canUseHorizonMode && sensors(SENSOR_ACC)) {
DISABLE_FLIGHT_MODE(ANGLE_MODE);
if (!FLIGHT_MODE(HORIZON_MODE)) {
ENABLE_FLIGHT_MODE(HORIZON_MODE);