AC_PID: expose parameters as AP_Float

this enables full tuning capability
This commit is contained in:
Andrew Tridgell 2016-05-06 14:43:12 +10:00
parent dbe9091d58
commit 412dc10353
3 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ public:
void operator() (const float p) { _kp = p; }
// accessors
float kP() const { return _kp.get(); }
AP_Float &kP() { return _kp; }
void kP(const float v) { _kp.set(v); }
static const struct AP_Param::GroupInfo var_info[];

View File

@ -57,9 +57,9 @@ public:
void operator() (float p, float i, float d, float imaxval, float input_filt_hz, float dt );
// get accessors
float kP() const { return _kp.get(); }
float kI() const { return _ki.get(); }
float kD() const { return _kd.get(); }
AP_Float &kP() { return _kp; }
AP_Float &kI() { return _ki; }
AP_Float &kD() { return _kd; }
float imax() const { return _imax.get(); }
float filt_hz() const { return _filt_hz.get(); }
float get_filt_alpha() const;

View File

@ -51,8 +51,8 @@ public:
void operator() (float p, float i, float imaxval, float input_filt_hz, float dt);
// get accessors
float kP() const { return _kp.get(); }
float kI() const { return _ki.get(); }
AP_Float &kP() { return _kp; }
AP_Float &kI() { return _ki; }
float imax() const { return _imax.get(); }
float filt_hz() const { return _filt_hz.get(); }
float get_filt_alpha() const { return _filt_alpha; }