summaryrefslogtreecommitdiff
path: root/digital/io/src/asserv.c
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-22 21:57:24 +0200
committerNicolas Schodet2008-04-22 21:57:24 +0200
commita07b9473d9c95904a9f0ff9e6bb5f9431d8735d2 (patch)
tree49f4ac8e2f3ea7b0832270e271af9027fd8e75ce /digital/io/src/asserv.c
parent157aee8d63e31da7687492601f3efe5bed21f4ad (diff)
* digital/io/src:
- made the arm control work.
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;
}
+