From aee65133f5500aa3659297f156786122668ffa66 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Fri, 18 Apr 2008 00:56:07 +0200 Subject: Modified gutter FSM to go to the Wall after putting the robot back to the gutter. --- digital/io/src/test/gutter/main.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'digital/io/src/test') diff --git a/digital/io/src/test/gutter/main.c b/digital/io/src/test/gutter/main.c index 877545fc..059f5f34 100644 --- a/digital/io/src/test/gutter/main.c +++ b/digital/io/src/test/gutter/main.c @@ -37,6 +37,12 @@ gutter_print_test (fsm_t *gutter) case GUTTER_STATE_IDLE: printf ("IDLE"); break; + case GUTTER_STATE_ROTATE_REAR_SIDE_TO_GUTTER: + printf ("ROTATE_REAR_SIDE_TO_GUTTER"); + break; + case GUTTER_STATE_GO_TO_THE_GUTTER_WALL: + printf ("GO_TO_THE_GUTTER_WALL"); + break; case GUTTER_STATE_CLOSE_COLLECTOR: printf ("CLOSE COLLECTOR"); break; @@ -54,7 +60,17 @@ main (void) { fsm_init (&gutter_fsm); + gutter_print_test (&gutter_fsm); fsm_handle_event (&gutter_fsm, GUTTER_EVENT_start); + + // Request the main_loop to go to next state because the angle had + // been reached. + fsm_handle_event (&gutter_fsm, GUTTER_EVENT_rotation_done); + gutter_print_test (&gutter_fsm); + + // Request the main_loop to go to next state because the angle had + // been reached. + fsm_handle_event (&gutter_fsm, GUTTER_EVENT_ready); gutter_print_test (&gutter_fsm); fsm_handle_event (&gutter_fsm, GUTTER_EVENT_collector_opened); @@ -78,3 +94,16 @@ trap_close_rear_panel(void) printf ("\t Close rear panel\n"); } +void +asserv_goto_angle (int16_t angle) +{ + printf ("\t Angle requested\n"); +} + +/* Go to the wall (moving backward). */ +void +asserv_go_to_the_wall (void) +{ + printf ("\t go to the wall\n"); +} + -- cgit v1.2.3