Merge remote-tracking branch 'origin/cmake' into cmake
This commit is contained in:
commit
ebe5dc44de
3 changed files with 49 additions and 64 deletions
|
@ -1,18 +0,0 @@
|
||||||
@startuml
|
|
||||||
skinparam monochrome true
|
|
||||||
start
|
|
||||||
while ()
|
|
||||||
:openComRobot?;
|
|
||||||
:err = robot.Open();
|
|
||||||
if (err) then (robot_ok)
|
|
||||||
:msgSend = new Message(MESSAGE_ANSWER_ACK);
|
|
||||||
else
|
|
||||||
:msgSend = new Message(MESSAGE_ANSWER_NACK);
|
|
||||||
endif
|
|
||||||
:messageToMon!msgSend;
|
|
||||||
|
|
||||||
:closeComRobot?;
|
|
||||||
:robot.Close();
|
|
||||||
endwhile
|
|
||||||
stop
|
|
||||||
@enduml
|
|
|
@ -19,6 +19,7 @@ while ()
|
||||||
:stopRobot?;
|
:stopRobot?;
|
||||||
:robot.Write(new Message(MESSAGE_ROBOT_STOP));
|
:robot.Write(new Message(MESSAGE_ROBOT_STOP));
|
||||||
:robot.Close();
|
:robot.Close();
|
||||||
|
:robotStarted = false;
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
:msgSend = new Message(MESSAGE_ANSWER_NACK);
|
:msgSend = new Message(MESSAGE_ANSWER_NACK);
|
||||||
|
|
|
@ -3,53 +3,55 @@ skinparam monochrome true
|
||||||
start
|
start
|
||||||
:serverOk?;
|
:serverOk?;
|
||||||
while ()
|
while ()
|
||||||
:msgRcv = monitor.Read();
|
:msgRcv = monitor.Read();
|
||||||
if (msgRcv.CompareID(MESSAGE_MONITOR_LOST)) then (true)
|
if (msgRcv.CompareID(MESSAGE_MONITOR_LOST)) then (true)
|
||||||
:printf("Connection avec le moniteur perdue");
|
:printf("Connection avec le moniteur perdue");
|
||||||
:stopCamera!;
|
:stopCamera!;
|
||||||
:stopRobot!;
|
:stopRobot!;
|
||||||
:stopComRobot!;
|
:stopServer!;
|
||||||
:stopServer!;
|
endif
|
||||||
endif
|
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true)
|
||||||
:openComRobot!;
|
:openComRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true)
|
||||||
:watchdogMode = WITHOUT_WATCHDOG;
|
:watchdogMode = WITHOUT_WATCHDOG;
|
||||||
:startRobot!;
|
:startRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true)
|
||||||
:watchdogMode = WITH_WATCHDOG;
|
:watchdogMode = WITH_WATCHDOG;
|
||||||
:startRobot!;
|
:startRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD
|
if (msgRcv.CompareID(MESSAGE_ROBOT_RESET)) then (true)
|
||||||
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD
|
:stopRobot!;
|
||||||
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_LEFT
|
endif
|
||||||
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_RIGHT
|
if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD
|
||||||
|| msgRcv.CompareID(MESSAGE_ROBOT_STOP)) then (true)
|
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD
|
||||||
:move = msg.GetId();
|
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_LEFT
|
||||||
endif
|
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_RIGHT
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_OPEN)) then (true)
|
|| msgRcv.CompareID(MESSAGE_ROBOT_STOP)) then (true)
|
||||||
:startCamera!;
|
:move = msg.GetId();
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_CLOSE)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_OPEN)) then (true)
|
||||||
:stopCamera!;
|
:startCamera!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_ASK_ARENA)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_CLOSE)) then (true)
|
||||||
:searchArena!;
|
:stopCamera!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_ARENA_CONFIRM)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_ASK_ARENA)) then (true)
|
||||||
:validateArena!;
|
:searchArena!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_ARENA_INFIRM)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_ARENA_CONFIRM)) then (true)
|
||||||
:cancelArena!;
|
:validateArena!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_ARENA_INFIRM)) then (true)
|
||||||
:startPosition!;
|
:cancelArena!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) then (true)
|
if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) then (true)
|
||||||
:stopPosition!;
|
:startPosition!;
|
||||||
endif
|
endif
|
||||||
|
if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) then (true)
|
||||||
|
:stopPosition!;
|
||||||
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
stop
|
stop
|
||||||
@enduml
|
@enduml
|
Loading…
Reference in a new issue