From 46c5013bf82cc62cab56be82e7f7965a7bf95f3f Mon Sep 17 00:00:00 2001 From: George Zogopoulos Date: Tue, 10 Sep 2024 15:18:39 +0200 Subject: [PATCH] AP_TECS: Reverted TECS reset when pitch and throttle are forced --- libraries/AP_TECS/AP_TECS.cpp | 10 ---------- libraries/AP_TECS/AP_TECS.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/libraries/AP_TECS/AP_TECS.cpp b/libraries/AP_TECS/AP_TECS.cpp index 2fce40636ab38e..94bd4bffc77d25 100644 --- a/libraries/AP_TECS/AP_TECS.cpp +++ b/libraries/AP_TECS/AP_TECS.cpp @@ -1114,8 +1114,6 @@ void AP_TECS::_initialise_states(float hgt_afe) // Initialise states and variables if DT > 0.2 second or TECS is getting overriden or in climbout. _flags.reset = false; - _need_reset = _need_reset || (_flag_pitch_forced && _flag_throttle_forced); - if (_DT > 0.2f || _need_reset) { _SKE_weighting = 1.0f; _integTHR_state = 0.0f; @@ -1500,12 +1498,4 @@ void AP_TECS::_update_pitch_limits(const int32_t ptchMinCO_cd) { // don't allow max pitch to go below min pitch _PITCHmaxf = MAX(_PITCHmaxf, _PITCHminf); - - // Test if someone is forcing pitch to a specific value. - const float pitch_eps = DEG_TO_RAD*1; - if (fabsf(_PITCHmaxf-_PITCHminf)