summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/gutter.fsm
diff options
context:
space:
mode:
authorNicolas Haller2009-05-08 10:13:09 +0200
committerNicolas Haller2009-05-08 10:13:09 +0200
commit79456a7d1b2116fc8f50b82bd73b877cf8ef1bdf (patch)
tree985d7dff52f7f11943cb194b006a1653882f871e /digital/io/src/gutter.fsm
parentc5ce79b4c6c8671e0e6062706695fc05439252f5 (diff)
* digital/io/src:
- removed old FSM (gutter and getsamples)
Diffstat (limited to 'digital/io/src/gutter.fsm')
-rw-r--r--digital/io/src/gutter.fsm53
1 files changed, 0 insertions, 53 deletions
diff --git a/digital/io/src/gutter.fsm b/digital/io/src/gutter.fsm
deleted file mode 100644
index 97163cc0..00000000
--- a/digital/io/src/gutter.fsm
+++ /dev/null
@@ -1,53 +0,0 @@
-# Gutter FSM
-# Drop balls from the inside of the bot into the gutter to score points.
-gutter
-
-States:
- IDLE
- waiting for the beginning of the gutter FSM
- ROTATE_REAR_SIDE_TO_GUTTER
- stand back to the gutter
- GO_TO_THE_GUTTER_WALL
- make the bot reversing against the gutter
- DROP_BALLS
- open the collector to let the balls fall into the gutter
- WAIT_AND_TRY_AGAIN
- ask the top FSM to wake us up in a few times
-
-Events:
- start
- initialize the FSM
- bot_move_succeed
- the bot has finished to moved successfully
- bot_move_failed
- the bot movement failed (blocked by something for example)
- wait_finished
- we have wait the desired time
-
-IDLE:
- start -> ROTATE_REAR_SIDE_TO_GUTTER
- put the bot back to the gutter
-
-ROTATE_REAR_SIDE_TO_GUTTER:
- bot_move_succeed -> GO_TO_THE_GUTTER_WALL
- make the bot reversing against the gutter
-
-GO_TO_THE_GUTTER_WALL:
- bot_move_succeed -> DROP_BALLS
- open the collector to drop the balls
- wait for a while
-# TODO: handle the case where a ball is between the bot and the border,
-# preventing from fucking the wall
-# The best way is probably to abort this FSM with an error, tell the upper one
-# (top) we need to try at another place (the gutter is quite long).
- bot_move_failed -> WAIT_AND_TRY_AGAIN
- ask the top FSM to wake us up in a few times
-
-DROP_BALLS:
- wait_finished -> IDLE
- close the rear panel
- tell the top FSM we have finished
-
-WAIT_AND_TRY_AGAIN:
- wait_finished -> GO_TO_THE_GUTTER_WALL
- try the fuck the wall again