AP_Soaring: Don't check throttle status on entry to loiter, because it is automatically set on first pass in update_soaring.

This commit is contained in:
Samuel Tabor 2020-03-27 16:40:33 +00:00 committed by Andrew Tridgell
parent 3228cc3309
commit d7ce3ff72e
1 changed files with 1 additions and 2 deletions

View File

@ -10,8 +10,7 @@ bool ModeLoiter::_enter()
plane.loiter_angle_reset(); plane.loiter_angle_reset();
#if SOARING_ENABLED == ENABLED #if SOARING_ENABLED == ENABLED
if (plane.g2.soaring_controller.active_state() && if (plane.g2.soaring_controller.active_state()) {
(plane.g2.soaring_controller.suppress_throttle() || plane.aparm.throttle_max==0)) {
plane.g2.soaring_controller.init_thermalling(); plane.g2.soaring_controller.init_thermalling();
plane.g2.soaring_controller.get_target(plane.next_WP_loc); // ahead on flight path plane.g2.soaring_controller.get_target(plane.next_WP_loc); // ahead on flight path
} }