From bc8ddab9b03b50657e28e6ad8c6a70f2ba3590de Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Wed, 11 Oct 2023 11:02:55 -0700 Subject: [PATCH] AC_PID: If PD max limiting isn't active clear the flag --- libraries/AC_PID/AC_PID.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AC_PID/AC_PID.cpp b/libraries/AC_PID/AC_PID.cpp index bf154a59d7c7c0..c2a5f05272e624 100644 --- a/libraries/AC_PID/AC_PID.cpp +++ b/libraries/AC_PID/AC_PID.cpp @@ -180,6 +180,8 @@ float AC_PID::update_all(float target, float measurement, float dt, bool limit, P_out *= PD_scale; D_out *= PD_scale; _pid_info.PD_limit = true; + } else { + _pid_info.PD_limit = false; } }