Skip to content

Commit

Permalink
Copter: fully honour FENCE_OPTION to disable mode changes
Browse files Browse the repository at this point in the history
when the user has chosen to disallow mode change during fence breach
it should be fully implemented, without a landing exception.

as requested by Pete, and discussed on dev call
  • Loading branch information
tridge authored and peterbarker committed Jul 23, 2024
1 parent f8e5c7c commit a371a3e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ArduCopter/mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ bool Copter::set_mode(Mode::Number mode, ModeReason reason)
fence.enabled() &&
fence.option_enabled(AC_Fence::OPTIONS::DISABLE_MODE_CHANGE) &&
fence.get_breaches() &&
!flightmode->is_landing() &&
motors->armed() &&
get_control_mode_reason() == ModeReason::FENCE_BREACHED &&
!ap.land_complete) {
Expand Down

0 comments on commit a371a3e

Please sign in to comment.