AC_Fence: fixed FENCE_AUTOENABLE=2

needs to auto-enable on takeoff complete
This commit is contained in:
Andrew Tridgell 2024-07-18 08:00:11 +10:00 committed by Peter Barker
parent e4f76cd27d
commit 68f2593089
1 changed files with 2 additions and 1 deletions

View File

@ -325,7 +325,8 @@ void AC_Fence::auto_disable_fence_on_disarming(void)
*/ */
void AC_Fence::auto_enable_fence_after_takeoff(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; return;
} }