AC_PID: remove calls to SlewCalculator2D

This commit is contained in:
Randy Mackay
2025-03-26 18:47:52 +11:00
committed by Peter Barker
parent 584c8f16f9
commit e8649c8bf6
2 changed files with 0 additions and 10 deletions
-4
View File
@@ -96,10 +96,6 @@ Vector2f AC_PID_2D::update_all(const Vector2f &target, const Vector2f &measureme
// update I term
update_i(dt, limit);
// calculate slew limit
_slew_calc.update(Vector2f{_pid_info_x.P + _pid_info_x.D, _pid_info_y.P + _pid_info_y.D}, dt);
_pid_info_x.slew_rate = _pid_info_y.slew_rate = _slew_calc.get_slew_rate();
_pid_info_x.target = _target.x;
_pid_info_x.actual = measurement.x;
-6
View File
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <cmath>
#include <AC_PID/AP_PIDInfo.h>
#include <Filter/SlewCalculator2D.h>
/// @class AC_PID_2D
/// @brief Copter PID control class
@@ -73,9 +72,6 @@ public:
void set_integrator(const Vector3f& i) { set_integrator(Vector2f{i.x, i.y}); }
void set_integrator(const Vector2f& i);
// return current slew rate of slew limiter. Will return 0 if SMAX is zero
float get_slew_rate(void) const { return _slew_calc.get_slew_rate(); }
const AP_PIDInfo& get_pid_info_x(void) const { return _pid_info_x; }
const AP_PIDInfo& get_pid_info_y(void) const { return _pid_info_y; }
@@ -103,8 +99,6 @@ protected:
AP_PIDInfo _pid_info_x;
AP_PIDInfo _pid_info_y;
SlewCalculator2D _slew_calc; // 2D slew rate calculator
private:
const float default_kp;
const float default_ki;