From 41dabdbf76c0030fbaa8153a66c1016da945a03b Mon Sep 17 00:00:00 2001 From: Nicholas Ionata Date: Sat, 5 Aug 2023 10:54:35 -0700 Subject: [PATCH] Plane: reset target altitude time on mode enter --- ArduPlane/mode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduPlane/mode.cpp b/ArduPlane/mode.cpp index 63559a50dd..36883707eb 100644 --- a/ArduPlane/mode.cpp +++ b/ArduPlane/mode.cpp @@ -56,6 +56,7 @@ bool Mode::enter() plane.guided_state.target_heading_type = GUIDED_HEADING_NONE; plane.guided_state.target_airspeed_cm = -1; // same as above, although an airspeed of -1 is rare on plane. plane.guided_state.target_alt = -1; // same as above, although a target alt of -1 is rare on plane. + plane.guided_state.target_alt_time_ms = 0; plane.guided_state.last_target_alt = 0; #endif