added ability to get the integrator for debugging
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1117 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
7945937874
commit
f64fab442d
@ -96,10 +96,10 @@ public:
|
|||||||
|
|
||||||
/// @name parameter accessors
|
/// @name parameter accessors
|
||||||
//@{
|
//@{
|
||||||
float kP() { return _gain_array[0]; }
|
float kP() { return _gain_array[0]; }
|
||||||
float kI() { return _gain_array[1]; }
|
float kI() { return _gain_array[1]; }
|
||||||
float kD() { return _gain_array[2]; }
|
float kD() { return _gain_array[2]; }
|
||||||
float imax() { return _gain_array[3]; }
|
float imax() { return _gain_array[3]; }
|
||||||
|
|
||||||
void kP(const float v) { _gain_array[0] = v; }
|
void kP(const float v) { _gain_array[0] = v; }
|
||||||
void kI(const float v) { _gain_array[1] = v; }
|
void kI(const float v) { _gain_array[1] = v; }
|
||||||
@ -111,6 +111,8 @@ public:
|
|||||||
{ kP(p); kI(i); kD(d); imax(max); }
|
{ kP(p); kI(i); kD(d); imax(max); }
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
float get_integrator() { return _integrator; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint16_t _address; ///< EEPROM address for save/restore of P/I/D
|
uint16_t _address; ///< EEPROM address for save/restore of P/I/D
|
||||||
float *_gain_array; ///< pointer to the gains for this pid
|
float *_gain_array; ///< pointer to the gains for this pid
|
||||||
|
Loading…
Reference in New Issue
Block a user