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 andyp1per committed Jul 23, 2024
1 parent 8d7db72 commit 166cb48
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 166cb48

Please sign in to comment.