From 4d88c551ef61836af59f86ca1dd41c47ed2ead9a Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Thu, 24 Apr 2008 23:47:40 +0200 Subject: * 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). --- digital/io/src/gutter_cb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'digital/io/src/gutter_cb.c') 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); } -- cgit v1.2.3