AC_PID: use CLASS_NO_COPY()

This commit is contained in:
Andrew Tridgell 2021-06-06 18:33:35 +10:00
parent cd1f5ca494
commit 476e9fc15a
8 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,8 @@ public:
/// Constructor for PID
AC_HELI_PID(float initial_p, float initial_i, float initial_d, float initial_ff, float initial_imax, float initial_filt_T_hz, float initial_filt_E_hz, float initial_filt_D_hz, float dt);
CLASS_NO_COPY(AC_HELI_PID);
/// update_leaky_i - replacement for get_i but output is leaked at leak_rate
void update_leaky_i(float leak_rate);

View File

@ -26,6 +26,8 @@ public:
_kp = initial_p;
}
CLASS_NO_COPY(AC_P);
/// Iterate the P controller, return the new control value
///
/// Positive error produces positive output.

View File

@ -12,6 +12,8 @@ public:
// Constructor
AC_PI(float initial_p, float initial_i, float initial_imax);
CLASS_NO_COPY(AC_PI);
// update controller
float update(float measurement, float target, float dt);

View File

@ -24,6 +24,8 @@ public:
AC_PID(float initial_p, float initial_i, float initial_d, float initial_ff, float initial_imax, float initial_filt_T_hz, float initial_filt_E_hz, float initial_filt_D_hz,
float dt, float initial_srmax=0, float initial_srtau=1.0);
CLASS_NO_COPY(AC_PID);
// set_dt - set time step in seconds
void set_dt(float dt);

View File

@ -17,6 +17,8 @@ public:
// Constructor for PID
AC_PID_2D(float initial_kP, float initial_kI, float initial_kD, float initial_kFF, float initial_imax, float initial_filt_hz, float initial_filt_d_hz, float dt);
CLASS_NO_COPY(AC_PID_2D);
// set time step in seconds
void set_dt(float dt) { _dt = dt; }

View File

@ -19,6 +19,8 @@ public:
// constructor
AC_PI_2D(float initial_p, float initial_i, float initial_imax, float initial_filt_hz, float dt);
CLASS_NO_COPY(AC_PI_2D);
// set time step in seconds
void set_dt(float dt);

View File

@ -14,6 +14,8 @@ public:
// constructor
AC_P_1D(float initial_p, float dt);
CLASS_NO_COPY(AC_P_1D);
// set time step in seconds
void set_dt(float dt) { _dt = dt; }

View File

@ -14,6 +14,8 @@ public:
// constructor
AC_P_2D(float initial_p, float dt);
CLASS_NO_COPY(AC_P_2D);
// set time step in seconds
void set_dt(float dt) { _dt = dt; }