summaryrefslogtreecommitdiff
path: root/digital/io/src/ai_top_cb.c
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-13 00:22:42 +0200
committerNicolas Schodet2010-04-13 00:22:42 +0200
commit3e28a1b46e8541fddb657a1e4bae2e32ba077085 (patch)
tree69c249ec8875d82c053055d761eed7507b2debac /digital/io/src/ai_top_cb.c
parent37795e2ccd5f9319833f5d0b4ebfbad9d5684350 (diff)
digital/io/src: update test top FSM
Diffstat (limited to 'digital/io/src/ai_top_cb.c')
-rw-r--r--digital/io/src/ai_top_cb.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/digital/io/src/ai_top_cb.c b/digital/io/src/ai_top_cb.c
index 60f2c148..1482dd36 100644
--- a/digital/io/src/ai_top_cb.c
+++ b/digital/io/src/ai_top_cb.c
@@ -71,12 +71,24 @@ ai__WAIT_INIT_TO_FINISH__init_match_is_started (void)
fsm_branch_t
ai__GO_FAR__move_fsm_succeed (void)
{
- position_t pos = PG_POSITION_DEG (1000, 1000, 0);
+ position_t pos = PG_POSITION_DEG (1000, 1000, 180);
move_start (pos, 0);
return ai_next (GO_FAR, move_fsm_succeed);
}
/*
+ * GO_FAR =move_fsm_failed=>
+ * => GO_NEAR
+ * go to a near point
+ */
+fsm_branch_t
+ai__GO_FAR__move_fsm_failed (void)
+{
+ ai__GO_FAR__move_fsm_succeed ();
+ return ai_next (GO_FAR, move_fsm_failed);
+}
+
+/*
* GO_NEAR =move_fsm_succeed=>
* => GO_FAR
* restart
@@ -89,3 +101,15 @@ ai__GO_NEAR__move_fsm_succeed (void)
return ai_next (GO_NEAR, move_fsm_succeed);
}
+/*
+ * GO_NEAR =move_fsm_failed=>
+ * => GO_FAR
+ * restart
+ */
+fsm_branch_t
+ai__GO_NEAR__move_fsm_failed (void)
+{
+ ai__GO_NEAR__move_fsm_succeed ();
+ return ai_next (GO_NEAR, move_fsm_failed);
+}
+