From 3b2eb20ef493c8028784aac7ee68f1704dca79cd Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 21 Apr 2008 23:10:58 +0200 Subject: move.fsm : upfate the fsm to have an event by physical captor. --- digital/io/src/move.fsm | 24 +++++++++++++++++------- 1 file 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. -- cgit v1.2.3