YMotorDriverServo.h@1:d1ca02f9536c, 2015-08-30 (annotated)
- Committer:
- inst
- Date:
- Sun Aug 30 23:26:12 2015 +0000
- Revision:
- 1:d1ca02f9536c
- Parent:
- 0:9931e2ddc451
- Child:
- 2:16e29a3a8f58
; ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
inst | 0:9931e2ddc451 | 1 | #ifndef INCLUDED_YMOTOR_DRIVER_SERVO_H |
inst | 0:9931e2ddc451 | 2 | #define INCLUDED_YMOTOR_DRIVER_SERVO_H |
inst | 0:9931e2ddc451 | 3 | |
inst | 0:9931e2ddc451 | 4 | #include "mbed.h" |
inst | 0:9931e2ddc451 | 5 | #include "YMotorDriverBase.h" |
inst | 0:9931e2ddc451 | 6 | #include "PID.h" |
inst | 0:9931e2ddc451 | 7 | |
inst | 0:9931e2ddc451 | 8 | class YMotorDriverServo : public YMotorDriverBase, public PID{ |
inst | 0:9931e2ddc451 | 9 | public: |
inst | 0:9931e2ddc451 | 10 | YMotorDriverServo( char address, int id ); |
inst | 0:9931e2ddc451 | 11 | ~YMotorDriverServo(); |
inst | 0:9931e2ddc451 | 12 | |
inst | 0:9931e2ddc451 | 13 | private: |
inst | 1:d1ca02f9536c | 14 | virtual void updateSpecial(); |
inst | 1:d1ca02f9536c | 15 | virtual void updateI2CSlave(); |
inst | 0:9931e2ddc451 | 16 | virtual void control( float c ); |
inst | 0:9931e2ddc451 | 17 | |
inst | 0:9931e2ddc451 | 18 | static const float mAllowableError; |
inst | 0:9931e2ddc451 | 19 | static const PinName mAnalogInPinName; |
inst | 0:9931e2ddc451 | 20 | static const float mLowPassFilterCoeff; |
inst | 0:9931e2ddc451 | 21 | static const float mPCoeff[]; |
inst | 0:9931e2ddc451 | 22 | static const float mICoeff[]; |
inst | 0:9931e2ddc451 | 23 | static const float mDCoeff[]; |
inst | 1:d1ca02f9536c | 24 | static const float mServoMaxDuty; |
inst | 1:d1ca02f9536c | 25 | static const float mServoMinDuty; |
inst | 0:9931e2ddc451 | 26 | |
inst | 0:9931e2ddc451 | 27 | AnalogIn* mAnalogIn; |
inst | 0:9931e2ddc451 | 28 | float mPosition; |
inst | 0:9931e2ddc451 | 29 | float mTargetPosition; |
inst | 1:d1ca02f9536c | 30 | bool mHasWorked; |
inst | 0:9931e2ddc451 | 31 | int mID; |
inst | 0:9931e2ddc451 | 32 | }; |
inst | 0:9931e2ddc451 | 33 | |
inst | 0:9931e2ddc451 | 34 | #endif |