From 331037945d5e0146868a82707e7cc9e14942e58f Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Wed, 23 Apr 2008 10:23:03 +0200 Subject: * digital/io/src - seperate chrono into two files (source and header) ; - add necessary functions to end the match ; - integrate it into the main loop ; - partial integration into the simulator (need to simulate a counter). --- digital/io/src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'digital/io/src/main.c') diff --git a/digital/io/src/main.c b/digital/io/src/main.c index 883bb25d..efcd9d4e 100644 --- a/digital/io/src/main.c +++ b/digital/io/src/main.c @@ -43,6 +43,7 @@ #include "giboulee.h" /* team_color */ #include "getsamples.h" /* getsamples_start */ #include "top.h" /* top_* */ +#include "chrono.h" /* chrono_end_match */ #include "io.h" @@ -106,6 +107,15 @@ main_loop (void) /* Manage UART protocol */ proto_accept (uart0_getc ()); + /* Is match over? */ + if (chrono_is_match_over ()) + { + /* End it and block here indefinitely */ + chrono_end_match (42); + /* Safety */ + return; + } + /* Update TWI module to get new data from the asserv board */ asserv_update_status (); -- cgit v1.2.3