17#include "global_enums.h"
29struct PowerSenseStorage;
34#define FRONT_CONTROLLER_ACCEL_INPUT_DEADZONE 0.02f
37#define FRONT_CONTROLLER_ACCEL_REMAP_MIN 0.10f
40#define FRONT_CONTROLLER_ACCEL_CURVE_EXPONENT 2.0f
43#define FRONT_CONTROLLER_ACCEL_LPF_ALPHA 0.25f
46#define WS22_CONTROLLER_MAX_VELOCITY 12000
49#define MAX_VEHICLE_SPEED_KPH 50
StatusCode front_controller_init(FrontControllerStorage *storage, FrontControllerConfig *config)
Initialize the front controller interface.
Definition: front_controller.c:57
VehicleDriveState
Vehicle drive states.
Definition: global_enums.h:32
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Definition: accel_pedal.h:32
Definition: brake_pedal.h:31
Front Controller configuration data.
Definition: front_controller.h:54
float brake_low_pass_filter_alpha
Definition: front_controller.h:60
float accel_low_pass_filter_alpha
Definition: front_controller.h:58
float accel_input_deadzone
Definition: front_controller.h:55
float accel_input_curve_exponent
Definition: front_controller.h:57
float accel_input_remap_min
Definition: front_controller.h:56
float brake_pedal_deadzone
Definition: front_controller.h:59
Front Controller storage.
Definition: front_controller.h:66
struct AccelPedalStorage * accel_pedal_storage
Definition: front_controller.h:75
struct OpdStorage * opd_storage
Definition: front_controller.h:78
struct Ws22MotorCanStorage * ws22_motor_can_storage
Definition: front_controller.h:77
struct BrakePedalStorage * brake_pedal_storage
Definition: front_controller.h:76
FrontControllerConfig * config
Definition: front_controller.h:80
struct PowerManagerStorage * power_manager_storage
Definition: front_controller.h:74
bool brake_enabled
Definition: front_controller.h:67
float accel_percentage
Definition: front_controller.h:71
VehicleDriveState currentDriveState
Definition: front_controller.h:72
uint32_t vehicle_speed_kph
Definition: front_controller.h:69
Definition: power_manager.h:28
WS22 motor CAN interface storage structure.
Definition: ws22_motor_can.h:96