summaryrefslogtreecommitdiff
path: root/digital/io-hub
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-30 01:06:06 +0200
committerNicolas Schodet2011-05-30 01:12:06 +0200
commitbbf3187bdefa35d9ca1c9dc27d3145083e8fb96f (patch)
tree5a1d8a43c8c54e53cdc775cb1eb2b0dddeddfb58 /digital/io-hub
parent00f78226167fcb06d8b0c4bddf97018c4c2175ef (diff)
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.
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/robospierre/move.c4
1 files changed, 2 insertions, 2 deletions
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