From df6bd29c4b37a0d1ffed7c4591484e49d9ca24ba Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Wed, 30 Apr 2008 01:38:38 +0200 Subject: * digital/io/src - rewrite the move FSM ; - integrate it into the main loop with the sharp and path module. --- digital/io/src/move.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'digital/io/src/move.c') diff --git a/digital/io/src/move.c b/digital/io/src/move.c index 53709d07..2c0a0c5e 100644 --- a/digital/io/src/move.c +++ b/digital/io/src/move.c @@ -27,16 +27,18 @@ #include "move.h" #include "fsm.h" +/** + * Internal data used by the move FSM. + */ struct move_data_t move_data; -/** Start a move FSM. */ +/* Go to a position with the start FSM. */ void -move_start (uint32_t position_x, uint32_t position_y) +move_start (uint16_t position_x, uint16_t position_y) { /* Set parameters. */ - move_data.position_x = position_x; - move_data.position_y = position_y; - move_data.nb_obstacle = 0; + move_data.final.x = position_x; + move_data.final.y = position_y; /* Start the FSM. */ fsm_init (&move_fsm); fsm_handle_event (&move_fsm, MOVE_EVENT_start); -- cgit v1.2.3