diff --git a/libraries/AC_PID/AC_HELI_PID.cpp b/libraries/AC_PID/AC_HELI_PID.cpp index 0e599a160c..9631bc09e9 100644 --- a/libraries/AC_PID/AC_HELI_PID.cpp +++ b/libraries/AC_PID/AC_HELI_PID.cpp @@ -102,13 +102,6 @@ const AP_Param::GroupInfo AC_HELI_PID::var_info[] = { AP_GROUPEND }; -/// Constructor for PID -AC_HELI_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 dff_val) : - AC_PID(initial_p, initial_i, initial_d, initial_ff, initial_imax, initial_filt_T_hz, initial_filt_E_hz, initial_filt_D_hz, dff_val) -{ - _last_requested_rate = 0; -} - // This is an integrator which tends to decay to zero naturally // if the error is zero. diff --git a/libraries/AC_PID/AC_HELI_PID.h b/libraries/AC_PID/AC_HELI_PID.h index d9f323d34a..7e76f9cade 100644 --- a/libraries/AC_PID/AC_HELI_PID.h +++ b/libraries/AC_PID/AC_HELI_PID.h @@ -16,11 +16,15 @@ static const float AC_PID_LEAK_MIN = 0.1f; // Default I-term Leak Minimum class AC_HELI_PID : public AC_PID { 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 dff_val=0); - CLASS_NO_COPY(AC_HELI_PID); + /// Constructor for PID + AC_HELI_PID(const AC_PID::Defaults &defaults) : + AC_PID{defaults} + { + _last_requested_rate = 0; + } + /// update_leaky_i - replacement for get_i but output is leaked at leak_rate void update_leaky_i(float leak_rate);