Refactored timer event names
`EVENT_SEG*_EXCEEDED` is now `EVENT_SEG*_HAS_TO_EXPIRE`. Also added new events
`EVENT_SEG*_TOO_LATE` which should be triggered when a puck is too late.
Add timers for state `b1_realized_object`
This introduce the new state `b1_realized_object_seg1_ok`, this state is entered
when the `EVENT_SEG1_HAS_TO_EXPIRE` event is triggered. `b1_realized_object_seg1_ok::dispatched_event_sensor_height()`
now handles the good case. `b1_realized_object::dispatched_event_sensor_height()` handles the token is too early,
`b1_realized_object_seg1_ok::dispatched_event_seg1_too_late()` handles the token is too late.
Add missing registration for timer events to segment 1 states
Update comments and todo for FSM1 (timers)
Seperate `state.cpp` into two files `fsm1.cpp` and `fsm2.cpp`
Each file contains its states of each FSM. This should give a better
overview.
Add timers for state `b1_token_too_small`
This introduce the new state `b1_token_too_small_seg2_ok`, this state is entered
when the `EVENT_SEG2_HAS_TO_EXPIRE` event is triggered. `b1_token_too_small_seg2_ok::dispatched_event_sensor_slide()`
now handles the good case. `b1_token_too_small::dispatched_event_sensor_slide()` handles the too early case.
`b1_token_too_small_seg2_ok::dispatched_event_seg2_too_late()` handles the too late case.
Add timers for state `b1_valid_height`
This introduce the new state `b1_valid_height_seg3_ok`, this state is entered
when the `EVENT_SEG3_HAS_TO_EXPIRE` event is triggered. `b1_valid_height_seg3_ok::dispatched_event_sensor_exit()`
now handled the good case. `b1_valid_height::dispatched_event_sensor_exit()` handles the too early case.
`b1_valid_height_seg3_ok::dispatched_event_seg3_too_late()` handles the too late case.
Fix `get_times()` program
It should now give more realistic time values.
Add empty error states
Implement transitions into error states (FSM1)
Add timers of `b1_valid_height::dispatched_event_sensor_switch_rising()` to storage
Add TODOs to error states and set lights (not finished)
Implement timers (FSM1) (need further adjustments)
Add proper handling for concurrent ISR events
This functions iterates over the `sival_int` value delivered
by the ISR. If one of the bits is set, its value is executed
by calling `direct_call_event(...)` for each settet bit.
This function is not tested.
Delete old concurrent events
This deletes `EVENT_SWITCH_METAL_CONCURRENT`,
`EVENT_SWITCH_ENTRANCE_CONCURRENT`.
Merge branch 'topic/fsm_timed' into develop
Fix compile