Activegameplaysm
Activegameplaysm
QueryActiveGameplaySM:
Returns state of ActiveGamePlaySM
QueryCurrentMiner:
Returns the current target MINER
SetCurrentTargetMiner:
Sets the current target MINER
DuringIdleGameplay:
If the event is ES_ENTRY
Stop the motors
End if
DuringLook4Miner:
If the event is ES_ENTRY
Call StartLooking4MinerSM
Else if event is ES_EXIT
Call RunLook4MinerSM
Else
Call RunLook4MinerSM and return event
DuringGetMiner:
If the event is ES_ENTRY
Start a hard reset timer
Stop the motors
Set the speed to get the MINER
Post drive forward to MotorSM
Else if the event is ES_EXIT
Stop the motors
End if
DuringWaiting2Grab:
If the event is ES_ENTRY
Start a hard reset timer
Set the speed to grab the MINER
Set the drive odometer to drive forward distance
Post drive forward to MotorSM
End if
DuringTransportMiner:
If the event is ES_ENTRY
Start a hard reset timer
Query target destination from Brains
Post target destination to NavigationSM
End if
DuringMinerDestinationReached:
If the event is ES_ENTRY
Start a hard reset timer
Set the drive odometer to back-up distance
Post drive backward to MotorSM
End if