Master vehicle state machine implementation.
More...
#include "vehicle_fsm.h"
#include "can_library/faults_common.h"
#include "can_library/generated/MAIN_MODULE.h"
#include "common/phal_G4/gpio/gpio.h"
#include "main.h"
#include "powertrain.h"
#include "torque_controller.h"
Master vehicle state machine implementation.
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ is_brakes_engaged()
| static bool is_brakes_engaged |
( |
| ) |
|
|
inlinestatic |
◆ is_buzzing_time_elapsed()
| static bool is_buzzing_time_elapsed |
( |
| ) |
|
|
inlinestatic |
◆ is_start_button_pressed()
| static bool is_start_button_pressed |
( |
| ) |
|
|
inlinestatic |
◆ update_brake_light()
| static void update_brake_light |
( |
| ) |
|
|
static |
◆ update_tsal()
| static void update_tsal |
( |
| ) |
|
|
static |
◆ vehicle_fsm_periodic()
| void vehicle_fsm_periodic |
( |
void | | ) |
|
◆ g_car
Initial value:= {
.current_state = CAR_STATE_FATAL,
.next_state = CAR_STATE_FATAL,
.buzzer_start_time = 0,
.brake_light = false,
.tsal_green_enable = false,
.tsal_red_enable = false,
.buzzer_enable = false,
}