From bbf3187bdefa35d9ca1c9dc27d3145083e8fb96f Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 30 May 2011 01:06:06 +0200 Subject: digital/io-hub: move: post events instead of handling them This caused problem because the move FSM can receive events after the top FSM (this depends on the order of the FSM), and therefore, it can receive the robot_move_success event that was for the top FSM. --- digital/io-hub/src/robospierre/move.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'digital/io-hub') diff --git a/digital/io-hub/src/robospierre/move.c b/digital/io-hub/src/robospierre/move.c index 7ce9b3c8..e89e6d6b 100644 --- a/digital/io-hub/src/robospierre/move.c +++ b/digital/io-hub/src/robospierre/move.c @@ -82,7 +82,7 @@ move_start (position_t position, uint8_t backward) /* Reset try counter. */ move_data.try_again_counter = 3; /* Start the FSM. */ - FSM_HANDLE (AI, move_start); + fsm_queue_post_event (FSM_EVENT (AI, move_start)); } void @@ -97,7 +97,7 @@ move_start_noangle (vect_t position, uint8_t backward, int16_t shorten) /* Reset try counter. */ move_data.try_again_counter = 3; /* Start the FSM. */ - FSM_HANDLE (AI, move_start); + fsm_queue_post_event (FSM_EVENT (AI, move_start)); } void -- cgit v1.2.3