From 9db8b8dd95250b7ca73b0186b4042912567ba49f Mon Sep 17 00:00:00 2001 From: George Zogopoulos Date: Tue, 13 Aug 2024 16:46:57 +0200 Subject: [PATCH] Plane: Reset TECS along with other controllers --- ArduPlane/mode.cpp | 3 +++ ArduPlane/mode.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ArduPlane/mode.cpp b/ArduPlane/mode.cpp index d9fec93dff4f8..e4f97acc2c089 100644 --- a/ArduPlane/mode.cpp +++ b/ArduPlane/mode.cpp @@ -255,6 +255,9 @@ void Mode::reset_controllers() // reset steering controls plane.steer_state.locked_course = false; plane.steer_state.locked_course_err = 0; + + // reset TECS + plane.TECS_controller.reset(); } bool Mode::is_taking_off() const diff --git a/ArduPlane/mode.h b/ArduPlane/mode.h index c26a1233a87b7..230b372499ff4 100644 --- a/ArduPlane/mode.h +++ b/ArduPlane/mode.h @@ -81,7 +81,7 @@ class Mode // returns true if the vehicle can be armed in this mode bool pre_arm_checks(size_t buflen, char *buffer) const; - // Reset rate and steering controllers + // Reset rate and steering and TECS controllers void reset_controllers(); //