From 011fd3e4e4d252d02df156a7679c6156cdc72c6a Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 14 Apr 2008 12:04:01 +0200 Subject: * digital/io/src * asserv - add an goto_angle (not implemented yet). * get sample FSM - the get sample FSM will not call any other FSM (like the move). Instead, it assumes we are already at the right place, we just ensure the angle is correct ; - update the first state in consequences ; - add an angle as parameters (maybe we can remove the X/Y). * general defines - add define to ease the opening of the input hole. --- digital/io/src/asserv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'digital/io/src/asserv.c') diff --git a/digital/io/src/asserv.c b/digital/io/src/asserv.c index d7d383c4..0b801a13 100644 --- a/digital/io/src/asserv.c +++ b/digital/io/src/asserv.c @@ -350,6 +350,16 @@ asserv_move_angularly (int16_t angle) asserv_twi_send_command ('a', 2); } +/* Move the bot to a specific angle. */ +void +asserv_goto_angle (int16_t angle) +{ + /* Put angle as parameter */ + asserv_twi_buffer_param[0] = v16_to_v8 (angle, 1); + asserv_twi_buffer_param[1] = v16_to_v8 (angle, 0); + /* TODO */ +} + /* Go to the wall (moving backward). */ void asserv_go_to_the_wall (void) -- cgit v1.2.3