|
MCU
|
#include <MCUStateMachine.h>

Public Member Functions | |
| MCUStateMachine (BuzzerController *buzzer, DrivetrainSysType *drivetrain, DashboardInterface *dashboard, PedalsSystem *pedals, TCMuxType *mux, SafetySystem *safety_system) | |
| void | tick_state_machine (unsigned long cm, const SharedCarState_s ¤t_car_state) |
| function to tick the state machine. More... | |
| CAR_STATE | get_state () |
| bool | car_in_ready_to_drive () |
Private Member Functions | |
| void | set_state_ (CAR_STATE new_state, unsigned long curr_time) |
| void | handle_entry_logic_ (CAR_STATE new_state, unsigned long curr_time) |
| the function run upon the entry of the car into a new state More... | |
| void | handle_exit_logic_ (CAR_STATE prev_state, unsigned long curr_time) |
| function run upon the exit of a state More... | |
Private Attributes | |
| CAR_STATE | current_state_ |
| BuzzerController * | buzzer_ |
| components within state machine More... | |
| DrivetrainSysType * | drivetrain_ |
| PedalsSystem * | pedals_ |
| DashboardInterface * | dashboard_ |
| drivers within state machine More... | |
| SafetySystem * | safety_system_ |
| TCMuxType * | controller_mux_ |
Definition at line 26 of file MCUStateMachine.h.
|
inline |
Definition at line 29 of file MCUStateMachine.h.
|
inline |
Definition at line 52 of file MCUStateMachine.h.
|
inline |
Definition at line 51 of file MCUStateMachine.h.
|
private |
the function run upon the entry of the car into a new state
| new_state | the state in which we are entering |
|
private |
function run upon the exit of a state
| prev_state | the state in which we are leaving |
|
private |
| void MCUStateMachine< DrivetrainSysType >::tick_state_machine | ( | unsigned long | cm, |
| const SharedCarState_s & | current_car_state | ||
| ) |
function to tick the state machine.
| cm | current millis from systick |
| current_car_state | current state of the car (not to be confused with the CAR_STATE enum which is the state machine state) |
|
private |
components within state machine
Definition at line 67 of file MCUStateMachine.h.
|
private |
Definition at line 75 of file MCUStateMachine.h.
|
private |
Definition at line 64 of file MCUStateMachine.h.
|
private |
drivers within state machine
Definition at line 72 of file MCUStateMachine.h.
|
private |
Definition at line 68 of file MCUStateMachine.h.
|
private |
Definition at line 69 of file MCUStateMachine.h.
|
private |
Definition at line 74 of file MCUStateMachine.h.