PID.h@0:e3c87254ed02, 2015-04-24 (annotated)
- Committer:
- inst
- Date:
- Fri Apr 24 07:37:55 2015 +0000
- Revision:
- 0:e3c87254ed02
?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
inst | 0:e3c87254ed02 | 1 | #ifndef INCLUDED_PID_H |
inst | 0:e3c87254ed02 | 2 | #define INCLUDED_PID_H |
inst | 0:e3c87254ed02 | 3 | |
inst | 0:e3c87254ed02 | 4 | class PID{ |
inst | 0:e3c87254ed02 | 5 | public: |
inst | 0:e3c87254ed02 | 6 | PID(); |
inst | 0:e3c87254ed02 | 7 | ~PID(); |
inst | 0:e3c87254ed02 | 8 | |
inst | 0:e3c87254ed02 | 9 | void updatePid( float diff ); |
inst | 0:e3c87254ed02 | 10 | |
inst | 0:e3c87254ed02 | 11 | float mOldDiff; |
inst | 0:e3c87254ed02 | 12 | |
inst | 0:e3c87254ed02 | 13 | private: |
inst | 0:e3c87254ed02 | 14 | static const float mPCoeff; |
inst | 0:e3c87254ed02 | 15 | static const float mICoeff; |
inst | 0:e3c87254ed02 | 16 | static const float mDCoeff; |
inst | 0:e3c87254ed02 | 17 | |
inst | 0:e3c87254ed02 | 18 | static const float mIRange; |
inst | 0:e3c87254ed02 | 19 | |
inst | 0:e3c87254ed02 | 20 | virtual void control( float c ) = 0; |
inst | 0:e3c87254ed02 | 21 | |
inst | 0:e3c87254ed02 | 22 | float mI; |
inst | 0:e3c87254ed02 | 23 | }; |
inst | 0:e3c87254ed02 | 24 | |
inst | 0:e3c87254ed02 | 25 | #endif |