24 lines
No EOL
643 B
Text
24 lines
No EOL
643 B
Text
@startuml
|
|
skinparam monochrome true
|
|
start
|
|
:start_period(100 ms);
|
|
while ()
|
|
:wait_next_period();
|
|
if(shouldSendImage)then(true)
|
|
:Img image=camera.Grab();
|
|
if (shouldComputePosition)then(true)
|
|
:Position position=image.SearchRobot();
|
|
:image.DrawRobot(position);
|
|
:MessagePosition msgToSend=new MessagePosition(MESSAGE_CAM_POSITION,position);
|
|
:messageToMon!msgToSend;
|
|
endif
|
|
if (arena)then(null)
|
|
else
|
|
:image.DrawArena(arena);
|
|
endif
|
|
:MessageImg msgToSend=new MessageImg(MESSAGE_CAM_IMAGE,&image);
|
|
:messageToMon!msgToSend;
|
|
endif
|
|
endwhile
|
|
stop
|
|
@enduml |