YMotorDriverServo.h
- Committer:
- inst
- Date:
- 2015-08-30
- Revision:
- 1:d1ca02f9536c
- Parent:
- 0:9931e2ddc451
- Child:
- 2:16e29a3a8f58
File content as of revision 1:d1ca02f9536c:
#ifndef INCLUDED_YMOTOR_DRIVER_SERVO_H #define INCLUDED_YMOTOR_DRIVER_SERVO_H #include "mbed.h" #include "YMotorDriverBase.h" #include "PID.h" class YMotorDriverServo : public YMotorDriverBase, public PID{ public: YMotorDriverServo( char address, int id ); ~YMotorDriverServo(); private: virtual void updateSpecial(); virtual void updateI2CSlave(); virtual void control( float c ); static const float mAllowableError; static const PinName mAnalogInPinName; static const float mLowPassFilterCoeff; static const float mPCoeff[]; static const float mICoeff[]; static const float mDCoeff[]; static const float mServoMaxDuty; static const float mServoMinDuty; AnalogIn* mAnalogIn; float mPosition; float mTargetPosition; bool mHasWorked; int mID; }; #endif