summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/getsamples_cb.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-04-12 02:03:38 +0200
committerNélio Laranjeiro2008-04-12 02:03:38 +0200
commit3c7512d1619b2e73424790f157aec3926e39e838 (patch)
treece237207867f09cc64e262db198a7d307358bd7e /digital/io/src/getsamples_cb.c
parent1dd17a56e081e19dd1f8de9ea2035a6f4d83d1db (diff)
Update the fsms.
Diffstat (limited to 'digital/io/src/getsamples_cb.c')
-rw-r--r--digital/io/src/getsamples_cb.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/digital/io/src/getsamples_cb.c b/digital/io/src/getsamples_cb.c
index 68268795..3c15fc42 100644
--- a/digital/io/src/getsamples_cb.c
+++ b/digital/io/src/getsamples_cb.c
@@ -75,7 +75,7 @@ getsamples__START__ok (void)
/*
* TAKE_SAMPLES =sample_took=>
- * no_more => BACKWARD
+ * no_more => END
* If the quantity of samples are taken, then go backward and continue classifying the samples.
* more => TAKE_SAMPLES
* Continue to take samples and classify the next sample.
@@ -96,35 +96,11 @@ getsamples__TAKE_SAMPLES__sample_took (void)
asserv_goto (getsamples_data.distributor_x - 200,
getsamples_data.distributor_y - 200);
+ fsm_handle_event (&top_fsm, getsamples_data.event);
return getsamples_next_branch (TAKE_SAMPLES, sample_took, no_more);
}
}
-/*
- * BACKWARD =position_reached=>
- * => END
- * Ending this state machine.
- */
-fsm_branch_t
-getsamples__BACKWARD__position_reached (void)
-{
- asserv_move_arm (5000, 100);
-
- fsm_handle_event (&top_fsm, TOP_EVENT_samples_took);
- return getsamples_next (BACKWARD, position_reached);
-}
-
-/*
- * GO_TO_POSITION =position_failed=>
- * => GO_TO_POSITION
- * Go to another point before trying to go to this one again.
- */
-fsm_branch_t
-getsamples__GO_TO_POSITION__position_failed (void)
-{
- // TODO In this case i don't know what to do.
- return getsamples_next (GO_TO_POSITION, position_failed);
-}
/*
* GO_TO_POSITION =position_reached=>