Skip to content

Commit

Permalink
Minor adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
CL16gtgh committed May 18, 2024
1 parent 455aab3 commit 04524b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions include/MCU_rev15_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ 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 float STEERING_IIR_ALPHA = 0.7f; // shaves off around 1 deg of max discrepancy

#endif /* __MCU15_H__ */
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct inverters
// */

SysClock sys_clock;
SteeringSystem steering_system(&steering1, 0.8);
SteeringSystem steering_system(&steering1, STEERING_IIR_ALPHA);
BuzzerController buzzer(BUZZER_ON_INTERVAL);

SafetySystem safety_system(&ams_interface, &wd_interface);
Expand Down
12 changes: 6 additions & 6 deletions test/test_systems/steering_system_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include <gmock/gmock.h>
#include "SteeringSystem.h"

#define PRIMARY_ALPHA (0.6)
#define SECONDARY_ALPHA (0.6)
#define WARN_DISCREPANCY_OFFSET (0.5)
#define ERR_DISCREPANCY_OFFSET (0.5)
#define WARN_FILTER_LATENCY (6)
#define ERR_FILTER_LATENCY (7)
#define PRIMARY_ALPHA (0.7) // parameter used on car
#define SECONDARY_ALPHA (0.7)
#define WARN_DISCREPANCY_OFFSET (0.6)
#define ERR_DISCREPANCY_OFFSET (0.6)
#define WARN_FILTER_LATENCY (8)
#define ERR_FILTER_LATENCY (9)

TEST(SteeringSystemTesting, test_steering_nominal)
{
Expand Down

0 comments on commit 04524b7

Please sign in to comment.