summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/top_cb.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-04-10 13:51:28 +0200
committerNélio Laranjeiro2008-04-10 13:51:28 +0200
commit370fa5662360eaa582bed9d55e092b627aef8920 (patch)
tree6221fb25269ddcbffbcb994ec13a2a84a6f3a4cb /digital/io/src/top_cb.c
parentd117245f36bb255a3d8badc0fe75495e69d81f1d (diff)
Start to fill the FSMs. (not finished).
Diffstat (limited to 'digital/io/src/top_cb.c')
-rw-r--r--digital/io/src/top_cb.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/digital/io/src/top_cb.c b/digital/io/src/top_cb.c
index 52a5129d..bf92b204 100644
--- a/digital/io/src/top_cb.c
+++ b/digital/io/src/top_cb.c
@@ -7,7 +7,9 @@
*/
#include "common.h"
#include "fsm.h"
+#include "top.h"
#include "top_cb.h"
+#include "getsamples.h"
/*
* START =ok=>
@@ -17,6 +19,20 @@
fsm_branch_t
top__START__ok (void)
{
+ // Call the get samples state machine.
+
+ // Blue color.
+ if (top_data.team_color == BLUE_TEAM)
+ {
+ getsamples_start (BLUE_DISTRIBUTOR_X, BLUE_DISTRIBUTOR_Y,
+ top_data.sequence);
+ }
+ else
+ {
+ getsamples_start (RED_DISTRIBUTOR_X, RED_DISTRIBUTOR_Y,
+ top_data.sequence);
+ }
+
return top_next (START, ok);
}