From 109986bceea5e74aab4530039c77e9e36dd517c9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Oct 2021 08:15:24 +1100 Subject: [PATCH] Plane: reset target speed on disarm allows for multiple auto missions with DO_CHANGE_SPEED --- ArduPlane/AP_Arming.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduPlane/AP_Arming.cpp b/ArduPlane/AP_Arming.cpp index 057bec9238..dd86879c51 100644 --- a/ArduPlane/AP_Arming.cpp +++ b/ArduPlane/AP_Arming.cpp @@ -262,6 +262,10 @@ bool AP_Arming_Plane::disarm(const AP_Arming::Method method, bool do_disarm_chec } #endif + // re-initialize speed variable used in AUTO and GUIDED for + // DO_CHANGE_SPEED commands + plane.new_airspeed_cm = -1; + gcs().send_text(MAV_SEVERITY_INFO, "Throttle disarmed"); return true;