Skip to content

Commit

Permalink
AC_Fence: fixed FENCE_AUTOENABLE=2
Browse files Browse the repository at this point in the history
needs to auto-enable on takeoff complete
  • Loading branch information
tridge authored and andyp1per committed Jul 19, 2024
1 parent 43566e0 commit f676d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/AC_Fence/AC_Fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f676d41

Please sign in to comment.