summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémy Dufour2009-05-21 18:00:06 +0200
committerJérémy Dufour2009-05-21 18:00:06 +0200
commit2d0f9967c6e3e8d7a15012b5f7648f5bccef531b (patch)
tree2817a2e59d6cd9ae983f2b6e7ff3d1de96c61bb3
parentd8d46ee757cf6ecb7df3029d1ae703665f45771e (diff)
* digital/io/src:
- add a second position to unload pucks on the main circle.
-rw-r--r--digital/io/src/top.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/digital/io/src/top.c b/digital/io/src/top.c
index 04633bf8..a6ec42ce 100644
--- a/digital/io/src/top.c
+++ b/digital/io/src/top.c
@@ -140,15 +140,18 @@ void
top_get_next_position_to_unload_puck (asserv_position_t *position)
{
/* TODO: enahnce. */
+ static uint8_t index = 0;
static const asserv_position_t unload[] =
{
{ 1500, 600, 270 },
+ { 1500, 2100 - 600, 90 },
};
/* Sanity check. */
if (position)
{
- position->x = PG_X_VALUE_COMPUTING (unload->x);
- position->y = unload->y;
- position->a = PG_A_VALUE_COMPUTING (unload->a * BOT_ANGLE_DEGREE);
+ position->x = PG_X_VALUE_COMPUTING (unload[index].x);
+ position->y = unload[index].y;
+ position->a = PG_A_VALUE_COMPUTING (unload[index].a * BOT_ANGLE_DEGREE);
+ index = (index + 1) % 2;
}
}