Skip to content

Commit ed7879f

Browse files
committed
Update throttle test expectations for CHILL mode
1 parent 9b66128 commit ed7879f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_throttle/test_throttle.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ TEST(ThrottleTest, LimitedThrottleRealWorldScenarios) {
6464

6565
// Emergency deceleration from high throttle
6666
EXPECT_EQ(limitedThrottle(1035, 1500, 100), 1300); // -465 -> -200 (100*2)
67-
EXPECT_EQ(limitedThrottle(1035, 1800, 50), 1600); // -765 -> -200 (50*2)
67+
EXPECT_EQ(limitedThrottle(1035, 1800, 50), 1700); // -765 -> -100 (50*2)
6868

6969
// Performance mode differences (different thresholds)
7070
// Chill mode (lower threshold)
@@ -141,7 +141,7 @@ TEST(ThrottleTest, ApplyModeRampClamp) {
141141
prevPwm = 1035;
142142
int result = applyModeRampClamp(1500, prevPwm, 0);
143143
EXPECT_EQ(prevPwm, result); // prevPwm should be updated
144-
EXPECT_EQ(result, 1045); // Should ramp by CHILL_MODE_RAMP_RATE (10)
144+
EXPECT_EQ(result, 1043); // Should ramp by CHILL_MODE_RAMP_RATE (8)
145145

146146
// Test SPORT mode (mode 1) - faster ramp, higher max
147147
prevPwm = 1035;
@@ -151,7 +151,7 @@ TEST(ThrottleTest, ApplyModeRampClamp) {
151151
// Test CHILL mode max PWM clamping
152152
prevPwm = 1840;
153153
result = applyModeRampClamp(1900, prevPwm, 0);
154-
EXPECT_EQ(result, 1850); // Should clamp to CHILL_MODE_MAX_PWM
154+
EXPECT_EQ(result, 1600); // Should clamp to CHILL_MODE_MAX_PWM
155155

156156
// Test SPORT mode allows higher PWM
157157
prevPwm = 1840;

0 commit comments

Comments
 (0)