From a07b9473d9c95904a9f0ff9e6bb5f9431d8735d2 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 22 Apr 2008 21:57:24 +0200 Subject: * digital/io/src: - made the arm control work. --- digital/io/src/asserv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'digital/io/src/asserv.c') diff --git a/digital/io/src/asserv.c b/digital/io/src/asserv.c index edf08a5d..9addd320 100644 --- a/digital/io/src/asserv.c +++ b/digital/io/src/asserv.c @@ -424,15 +424,6 @@ asserv_move_arm (int16_t offset, uint8_t speed) asserv_move_arm_absolute (asserv_arm_current_position, speed); } -/* Move the arm to close the input hole. */ -void -asserv_close_input_hole (void) -{ - /* Move the arm */ - asserv_move_arm (asserv_arm_current_position % - BOT_ARM_THIRD_ROUND, BOT_ARM_SPEED); -} - /* Set current X position. */ void asserv_set_x_position (int32_t x) @@ -551,9 +542,10 @@ uint8_t asserv_arm_position_reached (void) { /* If the position has been reached */ - /* TODO: manage overflow! */ if (asserv_arm_notify_position && - (asserv_get_arm_position () >= asserv_arm_notify_position)) + ((int16_t) (asserv_get_arm_position () + - asserv_arm_notify_position) >= 0)) return 1; return 0; } + -- cgit v1.2.3