From b9f4de0b51cae68165b2aa44dc1cb33fd0994ab1 Mon Sep 17 00:00:00 2001 From: Jaeyoung Lim Date: Fri, 13 Feb 2026 05:41:27 -0700 Subject: [PATCH] Fix TECS throttle integrator runaway (#26472) --- src/lib/tecs/TECS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/tecs/TECS.cpp b/src/lib/tecs/TECS.cpp index 5ff73eb83c..69d124239d 100644 --- a/src/lib/tecs/TECS.cpp +++ b/src/lib/tecs/TECS.cpp @@ -590,7 +590,9 @@ void TECSControl::_calcThrottleControlUpdate(float dt, const STERateLimit &limit if (_throttle_setpoint >= param.throttle_max) { throttle_integ_input = math::min(0.f, throttle_integ_input); - } else if (_throttle_setpoint <= param.throttle_min) { + } + + if (_throttle_setpoint <= param.throttle_min) { throttle_integ_input = math::max(0.f, throttle_integ_input); }