From fc4ff69e525bd536eaffe07cda393638c734437d Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Sat, 3 May 2008 13:30:04 +0200 Subject: * digital/io/src - try infinitely to go the distributor even if the bot move failed (i.e. asserv is blocked) ; - decrease the position of the gutter in term of X axis. --- digital/io/src/getsamples.fsm | 2 ++ digital/io/src/getsamples_cb.c | 13 +++++++++++++ digital/io/src/playground.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/digital/io/src/getsamples.fsm b/digital/io/src/getsamples.fsm index 4b54c5f8..6b10eec1 100644 --- a/digital/io/src/getsamples.fsm +++ b/digital/io/src/getsamples.fsm @@ -59,6 +59,8 @@ OPEN_INPUT_HOLE: APPROACH_DISTRIBUTOR: bot_move_succeed -> MOVE_BACKWARD_FROM_DISTRIBUTOR move a little bit backward from the distributor + bot_move_failed -> . + try to move again MOVE_BACKWARD_FROM_DISTRIBUTOR: bot_move_succeed -> TAKE_SAMPLES diff --git a/digital/io/src/getsamples_cb.c b/digital/io/src/getsamples_cb.c index d42f05bd..0990f4ae 100644 --- a/digital/io/src/getsamples_cb.c +++ b/digital/io/src/getsamples_cb.c @@ -363,6 +363,19 @@ getsamples__MOVE_AWAY_FROM_DISTRIBUTOR__arm_pass_noted_position (void) return getsamples_next (MOVE_AWAY_FROM_DISTRIBUTOR, arm_pass_noted_position); } +/* + * APPROACH_DISTRIBUTOR =bot_move_failed=> + * => APPROACH_DISTRIBUTOR + * try to move again + */ +fsm_branch_t +getsamples__APPROACH_DISTRIBUTOR__bot_move_failed (void) +{ + /* Approach the distributor */ + asserv_go_to_distributor (); + return getsamples_next (APPROACH_DISTRIBUTOR, bot_move_failed); +} + /* * APPROACH_DISTRIBUTOR =bot_move_succeed=> * => MOVE_BACKWARD_FROM_DISTRIBUTOR diff --git a/digital/io/src/playground.h b/digital/io/src/playground.h index 6659d32b..05e0965e 100644 --- a/digital/io/src/playground.h +++ b/digital/io/src/playground.h @@ -110,7 +110,7 @@ /** * The position of the gutter. */ -#define PG_GUTTER_X (PG_X_VALUE_COMPUTING (2600)) +#define PG_GUTTER_X (PG_X_VALUE_COMPUTING (2500)) #define PG_GUTTER_Y (300) #define PG_GUTTER_A (90 * BOT_ANGLE_DEGREE) -- cgit v1.2.3