From 23bce6a75a17b9cd9d3f35a251baa1b0635697a4 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Sat, 3 May 2008 12:43:19 +0200 Subject: * digital/io/src - manage the event where the bot can be blocked (when moving) in the different FSM, by waiting and trying again ; - ensure we update the classifier (with the servos motor) even when the arm move in a state where it should not. --- digital/io/src/getsamples.fsm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'digital/io/src/getsamples.fsm') diff --git a/digital/io/src/getsamples.fsm b/digital/io/src/getsamples.fsm index 175a1824..4b54c5f8 100644 --- a/digital/io/src/getsamples.fsm +++ b/digital/io/src/getsamples.fsm @@ -25,6 +25,8 @@ States: put the arm back in front of the input hole to prevent sample to enter MOVE_BACKWARD_FROM_DISTRIBUTOR move a little bit backward from the distributor + WAIT_AND_TRY_AGAIN + wait and try again Events: start @@ -69,8 +71,10 @@ TAKE_SAMPLES: take a new one reset the timeout arm_pass_noted_position: no_more -> MOVE_AWAY_FROM_DISTRIBUTOR + store current position go backward wait_finished -> MOVE_AWAY_FROM_DISTRIBUTOR + store current position timed out, give up go backward @@ -78,6 +82,8 @@ MOVE_AWAY_FROM_DISTRIBUTOR: bot_move_succeed -> CLOSE_INPUT_HOLE close input hole setup a close timeout + bot_move_failed -> WAIT_AND_TRY_AGAIN + ask to be wake up in a certain time arm_pass_noted_position -> . prepare the classification of the taken sample @@ -89,3 +95,8 @@ CLOSE_INPUT_HOLE: tell the top FSM we have finished arm_pass_noted_position -> . prepare the classification of the taken sample + +WAIT_AND_TRY_AGAIN: + wait_finished -> MOVE_AWAY_FROM_DISTRIBUTOR + compute remaining distance (protection agains 0 & 300) + try to move away again -- cgit v1.2.3