Skip to content

Commit

Permalink
Plane: mode LoiterAltQLand to use QRTL
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Oct 19, 2023
1 parent e05780c commit 3eadda6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ArduPlane/mode_LoiterAltQLand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ void ModeLoiterAltQLand::switch_qland()
{
ftype dist;
if ((!plane.current_loc.get_alt_distance(plane.next_WP_loc, dist) || is_negative(dist)) && plane.nav_controller->reached_loiter_target()) {
plane.set_mode(plane.mode_qland, ModeReason::LOITER_ALT_REACHED_QLAND);
const Location loiter_wp = plane.next_WP_loc;
plane.set_mode(plane.mode_qrtl, ModeReason::LOITER_ALT_REACHED_QLAND);
plane.set_next_WP(loiter_wp);
}
}

Expand Down

0 comments on commit 3eadda6

Please sign in to comment.