Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

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

You might also like