summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src')
-rw-r--r--digital/io/src/move.fsm24
1 files changed, 17 insertions, 7 deletions
diff --git a/digital/io/src/move.fsm b/digital/io/src/move.fsm
index d7e175a4..ab38a478 100644
--- a/digital/io/src/move.fsm
+++ b/digital/io/src/move.fsm
@@ -10,8 +10,10 @@ States:
Events:
start
reached
- failed_or_blocked_or_near_border
- failed_or_blocked
+ failed
+ blocked
+ near_left_border
+ near_right_border
IDLE:
start -> DESIRED_POSITION
@@ -20,19 +22,27 @@ IDLE:
DESIRED_POSITION:
reached -> IDLE
The position provided by the user has been reached, the FSM can stop.
- failed_or_blocked: near_right_border -> MOVE_ON_LEFT
+ failed: near_right_border -> MOVE_ON_LEFT
+ The robot has failed to reach the position. It shall try another position before trying to reach this one again. It shall go to the on the left only if the left border is the farest one.
+ failed: near_left_border -> MOVE_ON_RIGHT
+ The robot has failed to reach the position. It shall try another position before trying to reach this one again. It shall go to the on the right only if the right border is the farest one.
+ blocked: near_left_border -> MOVE_ON_RIGHT
+ The robot has failed to reach the position. It shall try another position before trying to reach this one again. It shall go to the on the right only if the right border is the farest one.
+ blocked: near_right_border -> MOVE_ON_LEFT
The robot has failed to reach the position. It shall try another position before trying to reach this one again. It shall go to the on the left only if the left border is the farest one.
- failed_or_blocked: near_left_border -> MOVE_ON_RIGHT
- Same process as the previous one but on the right.
MOVE_ON_LEFT:
reached -> DESIRED_POSITION
The position has been reached. It will now try to reach the position provided by the user.
- failed_or_blocked_or_near_border -> MOVE_ON_RIGHT
+ failed: near_left_border -> MOVE_ON_RIGHT
The position is fail again, it will try to reach another one.
+ blocked -> MOVE_ON_RIGHT
+ The position is fail again, it will go backward to reach another one.
MOVE_ON_RIGHT:
reached -> DESIRED_POSITION
The position has been reached. It will now try to reach the position provided by the user.
- failed_or_blocked_or_near_border -> MOVE_ON_LEFT
+ failed: near_right_border -> MOVE_ON_LEFT
The position is fail again, it will try to reach another one.
+ blocked -> MOVE_ON_LEFT
+ The position is fail again, it will go backward to reach another one.