From d7211fc08b077030cf7f065d3834e201d17c18a5 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 13 Apr 2010 00:21:48 +0200 Subject: digital/io/src: refactor position and angle macros --- digital/io/src/ai_top_cb.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'digital/io/src/ai_top_cb.c') diff --git a/digital/io/src/ai_top_cb.c b/digital/io/src/ai_top_cb.c index 91937ad2..60f2c148 100644 --- a/digital/io/src/ai_top_cb.c +++ b/digital/io/src/ai_top_cb.c @@ -58,10 +58,7 @@ ai__IDLE__start (void) fsm_branch_t ai__WAIT_INIT_TO_FINISH__init_match_is_started (void) { - position_t pos; - pos.v.x = PG_X_VALUE_COMPUTING (2000); - pos.v.y = 1000; - pos.a = PG_A_VALUE_COMPUTING (0); + position_t pos = PG_POSITION_DEG (2000, 1000, 0); move_start (pos, 0); return ai_next (WAIT_INIT_TO_FINISH, init_match_is_started); } @@ -74,10 +71,7 @@ ai__WAIT_INIT_TO_FINISH__init_match_is_started (void) fsm_branch_t ai__GO_FAR__move_fsm_succeed (void) { - position_t pos; - pos.v.x = PG_X_VALUE_COMPUTING (1000); - pos.v.y = 1000; - pos.a = PG_A_VALUE_COMPUTING (0); + position_t pos = PG_POSITION_DEG (1000, 1000, 0); move_start (pos, 0); return ai_next (GO_FAR, move_fsm_succeed); } @@ -90,10 +84,7 @@ ai__GO_FAR__move_fsm_succeed (void) fsm_branch_t ai__GO_NEAR__move_fsm_succeed (void) { - position_t pos; - pos.v.x = PG_X_VALUE_COMPUTING (2000); - pos.v.y = 1000; - pos.a = PG_A_VALUE_COMPUTING (0); + position_t pos = PG_POSITION_DEG (2000, 1000, 0); move_start (pos, 0); return ai_next (GO_NEAR, move_fsm_succeed); } -- cgit v1.2.3