Main torque vectoring control loop.
More...
#include <stdint.h>
#include "can_library/generated/TORQUE_VECTOR.h"
#include "common/utils/max.h"
#include "sensors.h"
#include "vcu.h"
|
|
void | control_init (void) |
| |
|
void | vcu_driver_request_CALLBACK (void) |
| |
|
void | control_loop () |
| |
|
|
volatile vcu_mode_t | vcu_mode = VCU_MODE_TUNING |
| |
|
volatile bool | is_tv_enabled = true |
| |
|
volatile bool | is_regen_enabled = true |
| |
| volatile vcu_settings_data_t | vcu_settings [5] |
| |
|
volatile uint32_t | last_vcu_settings_tx = 0 |
| |
◆ vcu_settings
| volatile vcu_settings_data_t vcu_settings[5] |
Initial value:= {
[VCU_MODE_ACCEL] = {
.lateral_gain = 50,
.longitudinal_gain = 50,
.electronic_brake_bias = 50
},
[VCU_MODE_SKIDPAD] = {
.lateral_gain = 50,
.longitudinal_gain = 50,
.electronic_brake_bias = 50
},
[VCU_MODE_AUTOCROSS] = {
.lateral_gain = 50,
.longitudinal_gain = 50,
.electronic_brake_bias = 50
},
[VCU_MODE_ENDURANCE] = {
.lateral_gain = 50,
.longitudinal_gain = 50,
.electronic_brake_bias = 50
},
[VCU_MODE_TUNING] = {
.lateral_gain = 50,
.longitudinal_gain = 50,
.electronic_brake_bias = 50
}
}