...
- front_power_distribution_can_rx
- Receives can messages and raises events.
- front_power_distribution_gpio
- Receives GPIO events and sets the corresponding GPIO pin states.
- front_power_distribution_current_measurement
- Periodically Reads current values from all the load switches in some period of time
- front_power_distribution_publish_data
- Periodically broadcasts the gathered data from front_power_distribution_current_measurement
- main
- initializes the modules, processes the event queue and passes it into the other modules.
...
- signal_lights_fsm
- Uses blinkers to repeatedly raise events
- Has a state machine implementing the.
- inputs:
- event names: signal_left_fsm_input, signal_right_fsm_input, hazard_fsm_input, sync
- outputs:
- signal_left_fsm_output
- signal_right_fsm_output
- signal_both_output, or you can raise a left_output and right_output...
- blink_event_generator
- uses soft_timers to repeatedly raise an event with a data field
- inputs:
- event_id
- outputs:
- raising that event_id with alternating data fields.
Events:
Incoming CAN Messages:
Message ID | Data Fields | Exported Enums |
---|---|---|
SYSTEM_CAN_MESSAGE_FRONT_POWER | uint16_t output_bitset, uint16_t state_bitset | EEFrontPowerDistributionOutput, EEFrontPowerDistributionOutputState |
SYSTEM_CAN_MESSAGE_LIGHTS | uint16_t light_type_bitset, uint16_t state_bitset | EELightType, EELightState |
SYSTEM_CAN_MESSAGE_LIGHTS_SYNC | empty | |
SYSTEM_CAN_MESSAGE_HORN | uint8_t horn_state | EEHornState |
...
Message ID | Data Fields | Exported Enums |
---|---|---|
SYSTEM_CAN_MESSAGE_FRONT_POWER_CURRENT_DATA | uint16_t output_bitset, uint16_t current_data_0, uint16_t current_data_1, uint16_t current_data_2 | EEFrontPowerDistributionOutput |
GPIO Outputs:
# | Output | Port | Pin |
---|---|---|---|
1 | Driver Display (Output) | B | 2 |
2 | Steering | A | 10 |
3 | Centre Console | A | 8 |
4 | Pedal | A | 9 |
5 | Headlight Left (may be more) | ||
6 | Headlight Right | ||
7 | Signal Left | B | 13 |
8 | Signal Right | B | 12 |
9 | Strobe Light | ||
10 | Horn | B | 14 |
11 | Driver Fan Left | B | 15 |
12 | Driver |
Display (Current sensing) | A | 1 | |
13 | Horn (Current sensing) | A | 4 |
14 | |||
15 |