Skip to content

Commit

Permalink
Recalibrated bottom sensor and wheel spun
Browse files Browse the repository at this point in the history
  • Loading branch information
CL16gtgh committed May 19, 2024
1 parent 04524b7 commit c1710c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/MCU_rev15_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ const float LOADCELL_RR_OFFSET = 23.761 / LOADCELL_RR_SCALE;

// Steering parameters
const float PRIMARY_STEERING_SENSE_OFFSET = 0.0; // units are degrees
const int SECONDARY_STEERING_SENSE_LEFTMOST_BOUND = 812;
const int SECONDARY_STEERING_SENSE_RIGHTMOST_BOUND = 3179;
const int SECONDARY_STEERING_SENSE_CENTER = 1970;
const float STEERING_RANGE_DEGREES = 256.05f;
const int SECONDARY_STEERING_SENSE_LEFTMOST_BOUND = 794; // 812
const int SECONDARY_STEERING_SENSE_RIGHTMOST_BOUND = 3075; // 3179
const int SECONDARY_STEERING_SENSE_CENTER = 1960; // 1970
const float STEERING_RANGE_DEGREES = 253.0f; // 256.05f;
const float STEERING_IIR_ALPHA = 0.7f; // shaves off around 1 deg of max discrepancy

#endif /* __MCU15_H__ */
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ void loop()
{
Serial.print("Steering system reported angle (deg): ");
Serial.println(steering_system.getSteeringSystemData().angle);
Serial.print("Secondary sensor angle: ");
Serial.println(a1.get().conversions[MCU15_STEERING_CHANNEL].conversion);
Serial.print("Sensor divergence: ");
Serial.println(steering_system.getSteeringSystemData().angle - a1.get().conversions[MCU15_STEERING_CHANNEL].conversion);
Serial.println();

Serial.println();
}
Expand Down

0 comments on commit c1710c2

Please sign in to comment.