From 73bbc9e206772e928878126187789448ab3d0d47 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Wed, 20 May 2009 16:04:33 +0200 Subject: * digital/io/src: - add direction support in goto command, - move FSM use the angle for the end of the movement. --- digital/io/src/asserv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'digital/io/src/asserv.c') diff --git a/digital/io/src/asserv.c b/digital/io/src/asserv.c index 3a22d0bc..062ca13a 100644 --- a/digital/io/src/asserv.c +++ b/digital/io/src/asserv.c @@ -460,7 +460,7 @@ asserv_goto_angle (int16_t angle) /* Go to an absolute position and then an absolute angle. */ void -asserv_goto_xya (uint32_t x, uint32_t y, int16_t a) +asserv_goto_xya (uint32_t x, uint32_t y, int16_t a, uint8_t backward) { x = fixed_mul_f824 (x, asserv_scale_inv); y = fixed_mul_f824 (y, asserv_scale_inv); @@ -476,7 +476,7 @@ asserv_goto_xya (uint32_t x, uint32_t y, int16_t a) asserv_twi_buffer_param[6] = v16_to_v8 (a, 1); asserv_twi_buffer_param[7] = v16_to_v8 (a, 0); /* No backward. */ - asserv_twi_buffer_param[8] = 0; + asserv_twi_buffer_param[8] = backward; /* Send the got to an absolute position and them absolute angle command to * the asserv board */ asserv_twi_send_command ('X', 9); -- cgit v1.2.3