Skip to content

Commit fe36ff9

Browse files
committed
clip max requested accel to 1.0, with PID up to 1.5
1 parent 7f83e59 commit fe36ff9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

selfdrive/car/toyota/values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class CarControllerParams:
13-
ACCEL_MAX = 1.8 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
13+
ACCEL_MAX = 1.0 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
1414
ACCEL_MIN = -3.5 # m/s2
1515

1616
STEER_MAX = 1500

selfdrive/controls/lib/longcontrol.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ def update(self, active, CS, CP, long_plan, accel_limits, extras):
8383
a_target = clip(a_target, ACCEL_MIN_ISO, ACCEL_MAX_ISO)
8484

8585
self.pid.neg_limit = accel_limits[0]
86-
if CS.sportOn:
87-
pass # already max accel from CarControllerParams
88-
elif CS.econOn:
89-
accel_limits[1] = 1.3
90-
else:
91-
accel_limits[1] = 1.5
86+
# if CS.sportOn:
87+
# pass # already max accel from CarControllerParams
88+
# elif CS.econOn:
89+
# accel_limits[1] = 1.3
90+
# else:
91+
# accel_limits[1] = 1.5
92+
accel_limits[1] = 1.5
9293
self.pid.pos_limit = accel_limits[1]
9394

9495
# if self.op_params.get('dynamic_gas'):

0 commit comments

Comments
 (0)