summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/asserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/asserv.c')
-rw-r--r--digital/io/src/asserv.c14
1 files changed, 3 insertions, 11 deletions
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;
}
+