From 98a10d5c181d40f8ea3d600d712ed249417a963e Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 23 Apr 2010 00:33:53 +0200 Subject: digital/avr/modules/path: use vect_t in interface --- digital/io/src/ai_move_cb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'digital/io/src/ai_move_cb.c') diff --git a/digital/io/src/ai_move_cb.c b/digital/io/src/ai_move_cb.c index bca348f6..faabadb2 100644 --- a/digital/io/src/ai_move_cb.c +++ b/digital/io/src/ai_move_cb.c @@ -60,18 +60,17 @@ move_get_next_position (void) position_t current_pos; asserv_get_position (¤t_pos); /* Give the current position of the bot to the path module */ - path_endpoints (current_pos.v.x, current_pos.v.y, - move_data.final.v.x, move_data.final.v.y); + path_endpoints (current_pos.v, move_data.final.v); /* Update the path module */ path_update (); - found = path_get_next (&dst.x, &dst.y); + found = path_get_next (&dst); /* If not found, try to escape. */ if (!found) { slow = 1; path_escape (8); path_update (); - found = path_get_next (&dst.x, &dst.y); + found = path_get_next (&dst); } /* If the path is found, move. */ if (found) @@ -175,7 +174,7 @@ ai__MOVE_MOVING__bot_move_failed (void) : -(BOT_SIZE_BACK + MOVE_REAL_OBSTACLE_RADIUS); vect_from_polar_uf016 (&obstacle_pos, dist, robot_pos.a); vect_translate (&obstacle_pos, &robot_pos.v); - path_obstacle (0, obstacle_pos.x, obstacle_pos.y, MOVE_OBSTACLE_RADIUS, 0, + path_obstacle (0, obstacle_pos, MOVE_OBSTACLE_RADIUS, 0, MOVE_OBSTACLE_VALIDITY); /* Move backward to turn freely. */ asserv_move_linearly (asserv_get_last_moving_direction () == 1 ? -- cgit v1.2.3