summaryrefslogtreecommitdiff
path: root/digital/io/src/elevator.fsm
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/elevator.fsm')
-rw-r--r--digital/io/src/elevator.fsm24
1 files changed, 8 insertions, 16 deletions
diff --git a/digital/io/src/elevator.fsm b/digital/io/src/elevator.fsm
index 8466ae3e..70d1e297 100644
--- a/digital/io/src/elevator.fsm
+++ b/digital/io/src/elevator.fsm
@@ -9,11 +9,9 @@ States:
go to a position to be ready to get a new puck
WAIT_A_PUCK
waiting for a new puck (hurry up filter bridge!)
- BLAH
- useless state (incrementing nb_puck variable)
WAIT_POS_ORDER
waiting for position order (depending where we want to drop our column)
- GO_TO_POX_Y
+ GO_TO_POS_Y
go to a position to be ready to release pucks
WAIT_FOR_RELEASE_ORDER
ready to open doors at your command
@@ -31,10 +29,6 @@ Events:
elevator is in position
new_puck
we received a new puck from FB (filter bridge, not facebook)
- ok_for_other_pucks
- complex event (nb_pucks < 4 . (time_ok + !fb_empty))
- not_ok_for_other_pucks
- complex event !ok_for_other_pucks
time_up
complex event (!time_ok . fb_empty)
order_received
@@ -53,22 +47,20 @@ GO_TO_POS_X:
in position and ready to get a new puck
WAIT_A_PUCK:
- new_puck -> BLAH
+ new_puck: ok_for_other_pucks -> GO_TO_POS_X
incrementing nb_puck var
+ update elevator position to get a new puck
+ new_puck: not_ok_for_other_pucks -> WAIT_POS_ORDER
+ incrementing nb_puck var
+ no more time to wait a new puck
time_up -> WAIT_POS_ORDER
no more time to wait a new puck
-BLAH:
- ok_for_other_pucks -> GO_TO_POS_X
- update elevator position to get a new puck
- not_ok_for_other_pucks -> WAIT_POS_ORDER
- no more puck, going next step
-
WAIT_POS_ORDER:
- order_received -> GO_TO_POX_Y
+ order_received -> GO_TO_POS_Y
go to position Y
-GO_TO_POX_Y:
+GO_TO_POS_Y:
in_position -> WAIT_FOR_RELEASE_ORDER
ready to release pucks at altitude Y