From b15a220515f1d0fdec93d901577d8dd18e160514 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 29 May 2010 16:58:23 +0200 Subject: digital/io/src: add medium speed --- digital/io/src/ai_top_cb.c | 2 -- digital/io/src/bot.h | 3 +++ digital/io/src/top.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/digital/io/src/ai_top_cb.c b/digital/io/src/ai_top_cb.c index 0d7d25c3..8c781d8d 100644 --- a/digital/io/src/ai_top_cb.c +++ b/digital/io/src/ai_top_cb.c @@ -342,7 +342,6 @@ ai__COLLECT__move_fsm_failed (void) fsm_branch_t ai__COLLECT_SLOW_MOTION__bot_move_succeed (void) { - asserv_set_speed (BOT_MOVE_SLOW); if (top_collect (0)) return ai_next_branch (COLLECT_SLOW_MOTION, bot_move_succeed, collect); else @@ -358,7 +357,6 @@ ai__COLLECT_SLOW_MOTION__bot_move_succeed (void) fsm_branch_t ai__COLLECT_SLOW_MOTION__bot_move_failed (void) { - asserv_set_speed (BOT_MOVE_SLOW); if (top_collect (0)) return ai_next_branch (COLLECT_SLOW_MOTION, bot_move_failed, collect); else diff --git a/digital/io/src/bot.h b/digital/io/src/bot.h index d249c8b2..fd748af0 100644 --- a/digital/io/src/bot.h +++ b/digital/io/src/bot.h @@ -70,6 +70,9 @@ /** Fast parameters. */ #define BOT_MOVE_FAST 0x38, 0x38, 0x20, 0x20 +/** Medium parameters. */ +#define BOT_MOVE_MEDIUM 0x30, 0x30, 0x18, 0x18 + /** Slow parameters. */ #define BOT_MOVE_SLOW 0x20, 0x20, 0x10, 0x10 diff --git a/digital/io/src/top.c b/digital/io/src/top.c index 2bdbf333..06364adf 100644 --- a/digital/io/src/top.c +++ b/digital/io/src/top.c @@ -69,7 +69,7 @@ top_collect (uint8_t force) move_start_noangle (PG_VECT (2625, 253), 0, 0); return 0; } - asserv_set_speed (BOT_MOVE_SLOW); + asserv_set_speed (BOT_MOVE_MEDIUM); move_start_noangle (food_v, 0, food_shorten (top_food)); return 1; } -- cgit v1.2.3