From 80b3da91dac28a5895a8cb9f0477a7008365dd56 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 1 Apr 2010 23:57:20 +0200 Subject: digital/io: wipe-out old robot code, closes #112 --- digital/io/src/elevator.fsm | 125 -------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 digital/io/src/elevator.fsm (limited to 'digital/io/src/elevator.fsm') diff --git a/digital/io/src/elevator.fsm b/digital/io/src/elevator.fsm deleted file mode 100644 index fee7b6ba..00000000 --- a/digital/io/src/elevator.fsm +++ /dev/null @@ -1,125 +0,0 @@ -# Elevator FSM -# Control the elevator's position and doors. -elevator - -States: - IDLE - waiting for the beginning of the round - WAIT_JACK_IN - waiting for the jack - INIT - init the elevator position and open door - GO_TO_POS_X - go to a position to be ready to get a new puck - WAIT_A_PUCK - waiting for a new puck (hurry up filter bridge!) - WAIT_BRIDGE_EMPTY[timeout=675] - waiting bridge empty - WAIT_POS_ORDER - waiting for position order (depending where we want to drop our column) - GO_TO_POS_Y - go to a position + 1cm to be ready to release pucks - WAIT_FOR_RELEASE_ORDER - ready to open doors at your command - LAND_ELEVATOR - land elevator to the ground - MINI_CLOSE[timeout=45] - try to unblock pucks - OPEN_DOORS[timeout=450] - releasing pucks - WAIT_FOR_CLOSE_ORDER - ready to close doors at your command - CLOSE_DOORS[timeout=675] - closing the elevator's doors - - -Events: - start - io power on! - jack_inserted_into_bot - jack into the bot - in_position - elevator is in position - new_puck - we received a new puck from FB (filter bridge, not facebook) - order_bypass - Dont wait to have 4 pucks but we wait we don't have puck before bridge - bridge_empty - the bridge is empty - order_received - we received a new order - doors_opened - doors are opened - state_timeout - -IDLE: - start -> WAIT_JACK_IN - waiting for jack - -WAIT_JACK_IN: - jack_inserted_into_bot -> INIT - open doors. - find the zero of the elevator. - -INIT: - doors_opened -> GO_TO_POS_X - doors opened, close doors. - -GO_TO_POS_X: - in_position -> WAIT_A_PUCK -# FIXME, we should go to a WAIT_FIRST_POS because we are not really ready to -# load some pucks (but this will not happen...). - elevator in position zero, move to first position. - -WAIT_A_PUCK: - 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 - order_bypass -> WAIT_BRIDGE_EMPTY - elevator filling has been shut, get ready to drop pucks - -WAIT_BRIDGE_EMPTY: - bridge_empty -> GO_TO_POS_Y - bridge is empty, we are happy, we drop the column - state_timeout -> GO_TO_POS_Y - we suppose bridge is empty and we said it to the fsm - new_puck -> WAIT_A_PUCK - We have a new puck, elevator must move, we go to WAIT_A_PUCK - - -WAIT_POS_ORDER: - order_received -> GO_TO_POS_Y - go to position Y - -GO_TO_POS_Y: - in_position -> WAIT_FOR_RELEASE_ORDER - ready to release pucks at altitude Y - -WAIT_FOR_RELEASE_ORDER: - order_received -> LAND_ELEVATOR - make the elevator touch the target zone - -LAND_ELEVATOR: - in_position -> OPEN_DOORS - release pucks to the target position (I hope) - -OPEN_DOORS: - doors_opened -> WAIT_FOR_CLOSE_ORDER - wait for close order - state_timeout -> MINI_CLOSE - try to unblock doors - -MINI_CLOSE: - state_timeout -> OPEN_DOORS - try to release pucks again - -WAIT_FOR_CLOSE_ORDER: - order_received -> CLOSE_DOORS - closing doors - -CLOSE_DOORS: - state_timeout -> GO_TO_POS_X - pucks are released and elevator is ready to make a new column -- cgit v1.2.3