summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/gutter_cb.c
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-24 23:47:40 +0200
committerJérémy Dufour2008-04-24 23:47:40 +0200
commit4d88c551ef61836af59f86ca1dd41c47ed2ead9a (patch)
tree54816330083f6340665b565ac34b3276ee0bb1dc /digital/io/src/gutter_cb.c
parent457485aebff5c6bbe9e4075dd0f61bbafa9dc8d9 (diff)
* digital/io/src
- when a sub FSM finished, it posts an event for the top FSM which will be notified in the next main loop iteration (rather than the actual one).
Diffstat (limited to 'digital/io/src/gutter_cb.c')
-rw-r--r--digital/io/src/gutter_cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/digital/io/src/gutter_cb.c b/digital/io/src/gutter_cb.c
index 3824a259..22696c20 100644
--- a/digital/io/src/gutter_cb.c
+++ b/digital/io/src/gutter_cb.c
@@ -29,6 +29,7 @@
#include "asserv.h" /* asserv_go_to_the_wall */
#include "trap.h" /* trap_* */
#include "playground.h" /* PG_GUTTER_A */
+#include "main.h" /* main_post_event_for_top_fsm */
/**
* Gutter private data to wait a certain number of cycles.
@@ -97,6 +98,6 @@ gutter__DROP_BALLS__wait_finished (void)
/* Close the rear panel */
trap_close_rear_panel ();
/* Tell the top FSM we have finished */
- fsm_handle_event (&top_fsm, TOP_EVENT_gutter_fsm_finished);
+ main_post_event_for_top_fsm = TOP_EVENT_gutter_fsm_finished + 1;
return gutter_next (DROP_BALLS, wait_finished);
}