From 85d96233455b890c83638583da11e7aa6e989e72 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Fri, 22 May 2009 06:07:55 +0200 Subject: * digital/io/src: - add a timeout when trying to get puck from the distributor, - reduce temporisation to unload pucks (wrong value). --- digital/io/src/top_cb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'digital/io/src/top_cb.c') diff --git a/digital/io/src/top_cb.c b/digital/io/src/top_cb.c index 4315515b..3dd7bafe 100644 --- a/digital/io/src/top_cb.c +++ b/digital/io/src/top_cb.c @@ -246,6 +246,25 @@ top__GET_PUCK_FROM_DISTRIBUTOR__move_fsm_failed (void) } } +/* + * GET_PUCK_FROM_DISTRIBUTOR =state_timeout=> + * => GET_PUCK_FROM_DISTRIBUTOR + * get the next distributor position and launch move FSM to go there. + */ +fsm_branch_t +top__GET_PUCK_FROM_DISTRIBUTOR__state_timeout (void) +{ + /* Close cylinder. */ + cylinder_close_order = 1; + /* Get next position. */ + asserv_position_t position; + /* Go to distributor. */ + top_get_next_position_to_get_distributor (&position, &front_position); + /* Go there. */ + move_start (position, ASSERV_BACKWARD); + return top_next (GET_PUCK_FROM_DISTRIBUTOR, state_timeout); +} + /* * STOP_TO_GO_TO_UNLOAD_AREA =move_fsm_stopped=> * => GO_TO_UNLOAD_AREA -- cgit v1.2.3