From 2d75b0312ebda6edd4ae47763c0d5aa5c1a32908 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Mon, 11 Dec 2023 18:27:45 +0000 Subject: [PATCH] AC_PID: return P and D as output with slew limit and sum limit applyed --- libraries/AC_PID/AC_PID.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AC_PID/AC_PID.cpp b/libraries/AC_PID/AC_PID.cpp index 358535592f..aa19e44a5f 100644 --- a/libraries/AC_PID/AC_PID.cpp +++ b/libraries/AC_PID/AC_PID.cpp @@ -323,7 +323,7 @@ void AC_PID::update_i(float dt, bool limit) float AC_PID::get_p() const { - return _error * _kp; + return _pid_info.P; } float AC_PID::get_i() const @@ -333,7 +333,7 @@ float AC_PID::get_i() const float AC_PID::get_d() const { - return _kd * _derivative; + return _pid_info.D; } float AC_PID::get_ff() const