summaryrefslogtreecommitdiffhomepage
path: root/digital/io
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-04-22 22:42:33 +0200
committerNélio Laranjeiro2008-04-22 22:42:33 +0200
commit70f6e1c553456fb60de91a3765cb87bb666a4f78 (patch)
tree2901e35d8e76f6c6181fa2397c8e458a64d1304a /digital/io
parent57aa8754858a40a98348071e233f578c7a64d430 (diff)
move.fsm: Update the move.fsm to add virtual events.
Diffstat (limited to 'digital/io')
-rw-r--r--digital/io/src/move.fsm15
1 files changed, 4 insertions, 11 deletions
diff --git a/digital/io/src/move.fsm b/digital/io/src/move.fsm
index e36e4e86..5e2f877b 100644
--- a/digital/io/src/move.fsm
+++ b/digital/io/src/move.fsm
@@ -4,7 +4,6 @@ move
States:
IDLE
DESIRED_POSITION
- COMPUTE_POS
MOVE_ON_LEFT
MOVE_ON_RIGHT
@@ -12,8 +11,6 @@ Events:
start
reached
blocked
- near_left_border
- near_right_border
IDLE:
start -> DESIRED_POSITION
@@ -22,8 +19,10 @@ IDLE:
DESIRED_POSITION:
reached -> IDLE
The position provided by the user has been reached, the FSM can stop.
- blocked -> COMPUTE_POS
- The robot will compute the position from the border and will take the decision to go on the left or on the right.
+ blocked:near_left_border -> MOVE_ON_RIGHT
+ The robot will compute the position from the border and will take the decision to go on the right because the left border is too near.
+ blocked:near_right_border -> MOVE_ON_LEFT
+ The robot will compute the position from the border and will take the decision to go on the left because the right border is too near.
MOVE_ON_LEFT:
reached -> DESIRED_POSITION
@@ -36,9 +35,3 @@ MOVE_ON_RIGHT:
The position has been reached. It will now try to reach the position provided by the user.
blocked -> MOVE_ON_LEFT
The robot will try to go on the left because the previous movement block on the left.
-
-COMPUTE_POS:
- near_left_border -> MOVE_ON_RIGHT
- The robot is near the left border it shall try to move on the right.
- near_right_border -> MOVE_ON_LEFT
- The robot is near the right border it shall try to move on the left.