From 68f259308967a8a72704e4f7f2470538f1a4f858 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Jul 2024 08:00:11 +1000 Subject: [PATCH] AC_Fence: fixed FENCE_AUTOENABLE=2 needs to auto-enable on takeoff complete --- libraries/AC_Fence/AC_Fence.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AC_Fence/AC_Fence.cpp b/libraries/AC_Fence/AC_Fence.cpp index 808f926fa8..7cfa677c50 100644 --- a/libraries/AC_Fence/AC_Fence.cpp +++ b/libraries/AC_Fence/AC_Fence.cpp @@ -325,7 +325,8 @@ void AC_Fence::auto_disable_fence_on_disarming(void) */ void AC_Fence::auto_enable_fence_after_takeoff(void) { - if (auto_enabled() != AC_Fence::AutoEnable::ENABLE_ON_AUTO_TAKEOFF) { + if (auto_enabled() != AutoEnable::ENABLE_ON_AUTO_TAKEOFF && + auto_enabled() != AutoEnable::ENABLE_DISABLE_FLOOR_ONLY) { return; }