summaryrefslogtreecommitdiff
path: root/digital/io/src
diff options
context:
space:
mode:
authorJérémy Dufour2009-05-22 06:00:13 +0200
committerJérémy Dufour2009-05-22 06:00:13 +0200
commitf93c8db7b26b7128d779e9b0dcb9239ab3a60459 (patch)
treeed46c66a06a0e6fc1f0df104bc057940e486ca73 /digital/io/src
parent04c1d913e30605715d37fadf83e500ef769296f6 (diff)
* digital/io/src:
- do not allow to restart to go to a puck on the ground position when we have already go to the last one.
Diffstat (limited to 'digital/io/src')
-rw-r--r--digital/io/src/top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/digital/io/src/top.c b/digital/io/src/top.c
index a6ec42ce..7cdeacef 100644
--- a/digital/io/src/top.c
+++ b/digital/io/src/top.c
@@ -53,12 +53,12 @@ top_get_next_position_to_get_puck_on_the_ground (asserv_position_t *position,
};
static uint8_t current_position = 0;
- if (restart && current_position != 0)
- current_position--;
if (current_position >= (sizeof (ground_puck)
/ sizeof (asserv_position_t)))
/* No more position. */
return 0;
+ else if (restart && current_position != 0)
+ current_position--;
/* Sanity check. */
if (position)
{