Skip to content

Commit

Permalink
Plane:reset in landing seq on mode change while disarmed
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Oct 14, 2023
1 parent c980e04 commit e64698d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ArduPlane/mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ bool Mode::enter()
// but it should be harmless to disable the fence temporarily in these situations as well
plane.fence.manual_recovery_start();
#endif
//reset mission if in landing sequence,disarmed,not flying,and have changed to a non-autothrttle mode to clear prearm
if (plane.mission.get_in_landing_sequence_flag() &&
!plane.is_flying() && !plane.arming.is_armed_and_safety_off() &&
!plane.throttle_suppressed) {
plane.mission.reset();
}
}

return enter_result;
Expand Down

0 comments on commit e64698d

Please sign in to comment.