Skip to content

Commit

Permalink
Copter: don't breach auto-fences when landed
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Jun 23, 2024
1 parent 1ca1dd7 commit aa51fc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ArduCopter/fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ void Copter::fence_check()

bool is_in_landing = flightmode->mode_number() == Mode::Number::LAND
|| flightmode->mode_number() == Mode::Number::RTL
|| flightmode->mode_number() == Mode::Number::SMART_RTL;
|| flightmode->mode_number() == Mode::Number::SMART_RTL
|| ap.land_complete || !motors->armed();

// check for new breaches; new_breaches is bitmask of fence types breached
const uint8_t new_breaches = fence.check(is_in_landing);
Expand Down

0 comments on commit aa51fc0

Please sign in to comment.