From 16ba99149b495db68836dc464bbcfe5cc8b8b8be Mon Sep 17 00:00:00 2001 From: Leonard Hall Date: Thu, 20 May 2021 20:12:20 +0930 Subject: [PATCH] AC_PID: Fix before squash 2 --- libraries/AC_PID/AC_PID_2D.cpp | 2 +- libraries/AC_PID/AC_PID_2D.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AC_PID/AC_PID_2D.cpp b/libraries/AC_PID/AC_PID_2D.cpp index b052e256f1..0bbfb210d0 100644 --- a/libraries/AC_PID/AC_PID_2D.cpp +++ b/libraries/AC_PID/AC_PID_2D.cpp @@ -149,7 +149,7 @@ Vector2f AC_PID_2D::get_p() const return _error * _kp; } -Vector2f AC_PID_2D::get_i() const +const Vector2f& AC_PID_2D::get_i() const { return _integrator; } diff --git a/libraries/AC_PID/AC_PID_2D.h b/libraries/AC_PID/AC_PID_2D.h index 8dce58b160..766f6d9905 100644 --- a/libraries/AC_PID/AC_PID_2D.h +++ b/libraries/AC_PID/AC_PID_2D.h @@ -33,7 +33,7 @@ public: // get results from pid controller Vector2f get_p() const; - Vector2f get_i() const; + const Vector2f& get_i() const; Vector2f get_d() const; Vector2f get_ff(); const Vector2f& get_error() const { return _error; }