From 166cb48c1fcac038b1c3fe0d0db6d1dc68dd2dab Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Jul 2024 09:59:50 +1000 Subject: [PATCH] Copter: fully honour FENCE_OPTION to disable mode changes 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 --- ArduCopter/mode.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ArduCopter/mode.cpp b/ArduCopter/mode.cpp index 89bfbc3235f3a..19de3725dbbeb 100644 --- a/ArduCopter/mode.cpp +++ b/ArduCopter/mode.cpp @@ -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) {