From cb9ddc2d8162ac2ec0d82579657b984335ec9aef Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 1 Apr 2010 23:57:40 +0200 Subject: digital/io/src: use one FSM with several active states, closes #83 --- digital/io/src/move.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'digital/io/src/move.c') diff --git a/digital/io/src/move.c b/digital/io/src/move.c index 181e4545..eec8799d 100644 --- a/digital/io/src/move.c +++ b/digital/io/src/move.c @@ -45,20 +45,7 @@ move_start (asserv_position_t position, uint8_t backward) move_data.final_move = 0; /* Reset move FSM flags */ main_sharp_ignore_event = 0; - main_move_wait_cycle = 0; /* Start the FSM. */ - fsm_init (&move_fsm); - fsm_handle_event (&move_fsm, MOVE_EVENT_start); + fsm_handle_event (&ai_fsm, AI_EVENT_move_start); } -void -move_stop (void) -{ - /* This is a dirty hack. */ - /* Re-init move FSM. */ - fsm_init (&move_fsm); - /* Ask the asserv to stop the motor. */ - asserv_stop_motor (); - /* Generate the event, move FSM stopped. */ - main_post_event_for_top_fsm = TOP_EVENT_move_fsm_stopped; -} -- cgit v1.2.3