summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/path/test
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-23 00:33:53 +0200
committerNicolas Schodet2010-04-23 00:33:53 +0200
commit98a10d5c181d40f8ea3d600d712ed249417a963e (patch)
treea066093939980912ffefb94fba1f8712376fbcf1 /digital/avr/modules/path/test
parentf664a063297ce25d51e69332f864ed3e288fb116 (diff)
digital/avr/modules/path: use vect_t in interface
Diffstat (limited to 'digital/avr/modules/path/test')
-rw-r--r--digital/avr/modules/path/test/test_path.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/digital/avr/modules/path/test/test_path.c b/digital/avr/modules/path/test/test_path.c
index 218a3183..6d84bed3 100644
--- a/digital/avr/modules/path/test/test_path.c
+++ b/digital/avr/modules/path/test/test_path.c
@@ -76,7 +76,10 @@ main (int argc, char **argv)
path_init (tab[0], tab[1], tab[2], tab[3]);
read_tab (argv[2], tab, 2);
read_tab (argv[3], tab + 2, 2);
- path_endpoints (tab[0], tab[1], tab[2], tab[3]);
+ vect_t s, d;
+ s.x = tab[0]; s.y = tab[1];
+ d.x = tab[2]; d.y = tab[3];
+ path_endpoints (s, d);
read_tab (argv[4], tab, 1);
if (tab[0])
path_escape (tab[0]);
@@ -84,20 +87,22 @@ main (int argc, char **argv)
for (i = 0; i + 5 < argc; i++)
{
read_tab (argv[5 + i], tab, 4);
- path_obstacle (i, tab[0], tab[1], tab[2], tab[3], 1);
+ vect_t o;
+ o.x = tab[0]; o.y = tab[1];
+ path_obstacle (i, o, tab[2], tab[3], 1);
}
path_update ();
path_print_graph ();
- uint16_t x, y;
- if (path_get_next (&x, &y))
- printf ("// Next point: %d, %d\n", x, y);
+ vect_t p;
+ if (path_get_next (&p))
+ printf ("// Next point: %d, %d\n", p.x, p.y);
else
printf ("// Failure\n");
return 0;
}
void
-path_report (uint16_t *points, uint8_t len,
+path_report (vect_t *points, uint8_t len,
struct path_obstacle_t *obstacles, uint8_t obstacles_nb)
{
}