Skip to content

Commit

Permalink
Dikshit/steering calibration (#1302)
Browse files Browse the repository at this point in the history
### Changelist 
Calibrated the steering sensor

### Testing Done
Tested on car!

### Resolved Tickets
<!-- Link any tickets that this PR resolves. -->
  • Loading branch information
DJ90864 authored Jun 7, 2024
1 parent 36f9049 commit 0418f38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/quadruna/FSM/src/io/io_steering.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void io_steering_init(const SteeringConfig *steering_config)
float io_steering_getAngleDegrees(void)
{
// Steering angle = (ADC Voltage - Voltage Offset) * Degree Per Volt
const float STEERING_ANGLE_VOLTAGE_OFFSET = 2.325f;
const float STEERING_ANGLE_VOLTAGE_OFFSET = 2.21f;
const float DEGREE_PER_VOLT = 360.0f / (MAX_STEERING_VOLTAGE - MIN_STEERING_VOLTAGE);
float steering_voltage = hw_adc_getVoltage(config->steering);
return DEGREE_PER_VOLT * (steering_voltage - STEERING_ANGLE_VOLTAGE_OFFSET);
Expand Down

0 comments on commit 0418f38

Please sign in to comment.