summaryrefslogtreecommitdiffhomepage
path: root/digital/io
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io')
-rw-r--r--digital/io/src/ai_move_cb.c9
-rw-r--r--digital/io/src/move.c4
-rw-r--r--digital/io/src/simu.host.c4
3 files changed, 8 insertions, 9 deletions
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 (&current_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 ?
diff --git a/digital/io/src/move.c b/digital/io/src/move.c
index 6eb9bfde..c0676c3d 100644
--- a/digital/io/src/move.c
+++ b/digital/io/src/move.c
@@ -54,8 +54,8 @@ move_obstacles_update (void)
{
uint8_t i;
for (i = 0; i < main_obstacles_nb; i++)
- path_obstacle (i, main_obstacles_pos[i].x, main_obstacles_pos[i].y,
- MOVE_OBSTACLE_RADIUS, 0, MOVE_OBSTACLE_VALIDITY);
+ path_obstacle (i, main_obstacles_pos[i], MOVE_OBSTACLE_RADIUS, 0,
+ MOVE_OBSTACLE_VALIDITY);
}
void
diff --git a/digital/io/src/simu.host.c b/digital/io/src/simu.host.c
index c4f607d0..bc4c404f 100644
--- a/digital/io/src/simu.host.c
+++ b/digital/io/src/simu.host.c
@@ -236,14 +236,14 @@ eeprom_clear_param (void)
/** Send computed path. */
void
-simu_send_path (uint16_t *points, uint8_t len,
+simu_send_path (vect_t *points, uint8_t len,
struct path_obstacle_t *obstacles, uint8_t obstacles_nb)
{
int i;
mex_msg_t *m;
m = mex_msg_new (MSG_SIMU_IO_PATH);
for (i = 0; i < len; i++)
- mex_msg_push (m, "h", points[i]);
+ mex_msg_push (m, "hh", points[i].x, points[i].y);
mex_node_send (m);
}