PER Firmware
Loading...
Searching...
No Matches
vehicle_fsm.c File Reference

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"
Include dependency graph for vehicle_fsm.c:

Functions

static bool is_start_button_pressed ()
 
static bool is_brakes_engaged ()
 
static bool is_buzzing_time_elapsed ()
 
static void update_brake_light ()
 
static void update_tsal ()
 
void vehicle_fsm_periodic (void)
 

Variables

car_t g_car
 

Detailed Description

Master vehicle state machine implementation.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ is_brakes_engaged()

static bool is_brakes_engaged ( )
inlinestatic
Here is the caller graph for this function:

◆ is_buzzing_time_elapsed()

static bool is_buzzing_time_elapsed ( )
inlinestatic
Here is the caller graph for this function:

◆ is_start_button_pressed()

static bool is_start_button_pressed ( )
inlinestatic
Here is the caller graph for this function:

◆ update_brake_light()

static void update_brake_light ( )
static
Here is the caller graph for this function:

◆ update_tsal()

static void update_tsal ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vehicle_fsm_periodic()

void vehicle_fsm_periodic ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_car

car_t 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,
}