CALLSET_ENTRY (loop, sw_right_loop_top) { if (event_did_follow (right_loop_bottom, right_loop_top)) { /* Ball came in from the bottom * score differently? */ award_right_loop (); } event_should_follow (right_loop_top, right_loop_bottom, TIME_2S); }
CALLSET_ENTRY (loop, sw_right_loop_bottom) { if (event_did_follow (right_loop_top, right_loop_bottom)) { award_right_loop (); } else if (event_did_follow (right_loop_bottom, right_loop_bottom)) { /* Ball came out the bottom, no loop */ } event_should_follow (right_loop_bottom, right_loop_top, TIME_2S); event_can_follow (right_loop_bottom, right_loop_bottom, TIME_2S); }
void gumball_release_task (void) { event_should_follow (gumball_release, gumball_exit, TIME_4S); while (gumball_pending_releases > 0) { gumball_geneva_tripped = FALSE; gumball_exit_tripped = FALSE; /* Original timeout was 90x33ms = 3sec */ /* Shorter timeout will work when geneva is broken */ timeout = 25; while ((gumball_geneva_tripped == FALSE) && (gumball_exit_tripped == FALSE) && (--timeout > 0)) { sol_request (SOL_GUMBALL_RELEASE); task_sleep (TIME_33MS); } sol_stop (SOL_GUMBALL_RELEASE); gumball_running = FALSE; bounded_decrement (gumball_pending_releases, 0); } task_exit (); }