Steering.h
- Committer:
- inst
- Date:
- 2015-08-21
- Revision:
- 1:4b719f80e9c4
- Parent:
- 0:0bac1fed0273
- Child:
- 2:8be8699c5afd
File content as of revision 1:4b719f80e9c4:
#ifndef INCLUDED_STEERING_H #define INCLUDED_STEERING_H #include "Command.h" class XBee; class I2CMotor; class I2CServo; class Steering{ public: Steering( I2CMotor** t, I2CServo** s, XBee* xbee ); ~Steering(); void update( Command c ); private: void updateMove( Command command ); void updateAbsRoll( Command command ); void updateRoll( Command command ); void updateStop( Command command ); void updateWaitServo( Command command ); void setServoPositionByActionType( Command::ActionType action, Command command ); void setServoPositionWhenMove( Command command ); void setServoPositionWhenRoll(); void setServoPositionWhenStop(); static const int mNumOfTire; static const float mAllowableError; static const float mStoppingMoveAngle; static const float mRollTirePosition[]; float mOffsetHeadingAngle; float mMoveDirection_rad; I2CMotor** mTire; I2CServo** mServo; XBee* mXBee; Command::ActionType mActionType; Command::ActionType mNextActionType; }; #endif