From a2a74b49773efcadeda6797ecbd66f717b431d3d Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Wed, 30 Oct 2024 12:29:34 -0700 Subject: [PATCH] Plane bs --- ArduPlane/navigation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArduPlane/navigation.cpp b/ArduPlane/navigation.cpp index edb65fc2c541d7..e3721978b9e63e 100644 --- a/ArduPlane/navigation.cpp +++ b/ArduPlane/navigation.cpp @@ -226,7 +226,9 @@ void Plane::calc_airspeed_errors() } else if (flight_stage == AP_FixedWing::FlightStage::LAND) { // Landing airspeed target - target_airspeed_cm = landing.get_target_airspeed_cm(); + // we pass in the current flight speed to allow for handling a do_change_speed that sets up + // landing patterns + target_airspeed_cm = landing.get_target_airspeed_cm(mode_auto_target_airspeed_cm()); } else if (control_mode == &mode_guided && new_airspeed_cm > 0) { //DO_CHANGE_SPEED overrides onboard guided speed commands, user would have re-enter guided mode to revert target_airspeed_cm = new_airspeed_cm; } else if (control_mode == &mode_auto) { @@ -451,4 +453,4 @@ bool Plane::reached_loiter_target(void) } #endif return nav_controller->reached_loiter_target(); -} +} \ No newline at end of file