Professional Documents
Culture Documents
Driveservice
Driveservice
PublicFunctions:DriveForward,DriveForwardHalf,Reverse,AttackReverse,Stop,
Rotate,RotateBump,Turn180,AttackTurn180
DriveForward
Setdirectiononbothwheelstoforward
setdutyonbothwheelstoFULL_DUTY
EndDriveForward
DriveForwardHalf
Setdirectiononbothwheelstoforward
setdutyonbothwheelstoHAF_DUTY
EndDriveForwardHalf
Reverse
InitializeREVERSE_TIMERtimerwithREVERSE_TIMEtostopwhendone
Setdirectiononbothwheelstobackward
setdutyonbothwheelstoFULL_DUTY
EndReverse
AttackReverse
InitializeREVERSE_TIMERtimerwithATTACK_REVERSE_TIMEtostopwhendone
Setdirectiononbothwheelstobackward
setdutyonbothwheelstoFULL_DUTY
EndAttackReverse
Stop
Setdirectiononbothwheelstoforward
setdutyonbothwheelsto0
EndStop
Rotate
Setdirectiononleftwheeltobackward
Setdireciononrightwheeltoforward
SetdutyonbothwheelstoFULL_DUTY
EndRotate
RotateBump
Setdirectiononleftwheeltoforward
Setdireciononrightwheeltobackward
SetdutyonbothwheelstoFULL_DUTY
EndRotateBump
Turn180
InitializeROTATION_TIMERwithROTATION_TIME_180
CallRotateBumpfunction
EndTurn180
AttackTurn180
InitializeROTATION_TIMERwithATTACK_ROTATION_TIME
CallRotateBumpfunction
EndAttackTurn180
EndDriveService