summaryrefslogtreecommitdiff
path: root/digital/io/src
diff options
context:
space:
mode:
authorJérémy Dufour2008-05-03 13:30:04 +0200
committerJérémy Dufour2008-05-03 13:30:04 +0200
commitfc4ff69e525bd536eaffe07cda393638c734437d (patch)
tree46bf39016aed120aae4fa48cc5447f492770e962 /digital/io/src
parent23bce6a75a17b9cd9d3f35a251baa1b0635697a4 (diff)
* 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.
Diffstat (limited to 'digital/io/src')
-rw-r--r--digital/io/src/getsamples.fsm2
-rw-r--r--digital/io/src/getsamples_cb.c13
-rw-r--r--digital/io/src/playground.h2
3 files changed, 16 insertions, 1 deletions
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
@@ -364,6 +364,19 @@ getsamples__MOVE_AWAY_FROM_DISTRIBUTOR__arm_pass_noted_position (void)
}
/*
+ * 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
* move a little bit backward from the 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)