summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/test
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-04-18 00:56:07 +0200
committerNélio Laranjeiro2008-04-18 00:56:07 +0200
commitaee65133f5500aa3659297f156786122668ffa66 (patch)
tree651c8a5cb25817e6b3c036403266741d73720d29 /digital/io/src/test
parentbc77f0483fc4e41fab5ca184a8e2f2664b935d20 (diff)
Modified gutter FSM to go to the Wall after putting the robot back to
the gutter.
Diffstat (limited to 'digital/io/src/test')
-rw-r--r--digital/io/src/test/gutter/main.c29
1 files changed, 29 insertions, 0 deletions
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");
+}
+