Skip to content

Commit

Permalink
Fix: the wrong ability to turn on HORIZON_MODE without ACC sensors (b…
Browse files Browse the repository at this point in the history
…etaflight#13892)

added check of acc sensor enabled condition by turn on horizon mode
  • Loading branch information
demvlad authored Sep 16, 2024
1 parent f71170d commit 654d18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/fc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 654d18c

Please sign in to comment.