From aa3cac8b66573cd21834d351a02b135f5b66c006 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 12 May 2010 15:27:05 +0200 Subject: digital/io/src: change start position --- digital/io/src/ai_init_cb.c | 4 +--- digital/io/src/ai_top_cb.c | 4 ++-- digital/io/src/bot.h | 6 ++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/digital/io/src/ai_init_cb.c b/digital/io/src/ai_init_cb.c index 5e8ea937..444b867b 100644 --- a/digital/io/src/ai_init_cb.c +++ b/digital/io/src/ai_init_cb.c @@ -179,9 +179,7 @@ fsm_branch_t ai__INIT_GO_AWAY_FROM_THE_WALL_AGAIN__bot_move_succeed (void) { /* Move away from the border. */ - asserv_goto_xya (PG_X (PG_START_ZONE_WIDTH / 2), - PG_Y (PG_LENGTH - PG_START_ZONE_LENGTH / 2), - PG_A_DEG (0), 0); + asserv_goto_xya (BOT_INIT_XYA, 0); return ai_next (INIT_GO_AWAY_FROM_THE_WALL_AGAIN, bot_move_succeed); } diff --git a/digital/io/src/ai_top_cb.c b/digital/io/src/ai_top_cb.c index 4f349ead..8fc1541e 100644 --- a/digital/io/src/ai_top_cb.c +++ b/digital/io/src/ai_top_cb.c @@ -58,7 +58,7 @@ ai__IDLE__start (void) fsm_branch_t ai__WAIT_INIT_TO_FINISH__init_match_is_started (void) { - position_t pos = PG_POSITION_DEG (825, 1253, -29); + position_t pos = PG_POSITION_DEG (375, 1503, -29); move_start (pos, 0); return ai_next (WAIT_INIT_TO_FINISH, init_match_is_started); } @@ -97,7 +97,7 @@ ai__GO_FAR__move_fsm_failed (void) fsm_branch_t ai__GO_NEAR__move_fsm_succeed (void) { - position_t pos = PG_POSITION_DEG (825, 1253, -29); + position_t pos = PG_POSITION_DEG (375, 1503, -29); move_start (pos, 0); loader_up (); return ai_next (GO_NEAR, move_fsm_succeed); diff --git a/digital/io/src/bot.h b/digital/io/src/bot.h index 77fe686b..c3960099 100644 --- a/digital/io/src/bot.h +++ b/digital/io/src/bot.h @@ -53,6 +53,12 @@ * circle needed when rotating. */ #define BOT_SIZE_RADIUS 196 +/** Start position. */ +#define BOT_INIT_XYA \ + PG_X (PG_START_ZONE_WIDTH - BOT_SIZE_RADIUS), \ + PG_Y (PG_LENGTH - PG_START_ZONE_LENGTH + BOT_SIZE_RADIUS), \ + PG_A_DEG (-76) + /** * Distance required to be away from a border to be able to turn freely. * In millimeter. -- cgit v1.2.3