# Filter Bridge FSM # Filter column element (our colour -> go to lift, !our colour -> EJECT) filterbridge States: IDLE waiting the lift is ready to accept new puck WAIT_JACK_IN waiting for the jack to be inserted into the bot CLOSE_DOOR[timeout=225] close access to the lift (and wait 1 sec) WAIT_A_PUCK waiting for a new puck MARCEL_WAIT[timeout=45] waiting the puck is entirely in pos2 OPEN_DOOR[timeout=225] release puck to the lift and block a new puck on pos1 PUSH_PUCK push the puck to the lift Events: start robot start jack_inserted_into_bot jack into the bot puck_on_pos2 a puck has been detected on bridge's position 2 no_puck_on_pos2 there is no puck on position 2 state_timeout timeout used to wait the end of servo move IDLE: start -> WAIT_JACK_IN we wait for the jack WAIT_JACK_IN: jack_inserted_into_bot -> CLOSE_DOOR we init the bridge CLOSE_DOOR: state_timeout -> WAIT_A_PUCK we are ready, we wait a puck WAIT_A_PUCK: puck_on_pos2: lift_not_ready -> . Lift not ready, we stand by puck_on_pos2: lift_ready -> MARCEL_WAIT wait the puck is entirely on pos2 MARCEL_WAIT: state_timeout -> OPEN_DOOR lift ready, we deliver OPEN_DOOR: state_timeout -> PUSH_PUCK we push the puck to the lift PUSH_PUCK: no_puck_on_pos2 -> CLOSE_DOOR the puck disappears, we close doors