Skip to content

Commit 5607d30

Browse files
committed
clip max requested accel to 1.0, with PID up to 1.5
1 parent 62a8688 commit 5607d30

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
@@ -89,12 +89,13 @@ def update(self, active, CS, CP, long_plan, accel_limits, extras):
8989
a_target = clip(a_target, ACCEL_MIN_ISO, ACCEL_MAX_ISO)
9090

9191
self.pid.neg_limit = accel_limits[0]
92-
if CS.sportOn:
93-
pass # already max accel from CarControllerParams
94-
elif CS.econOn:
95-
accel_limits[1] = 1.3
96-
else:
97-
accel_limits[1] = 1.5
92+
# if CS.sportOn:
93+
# pass # already max accel from CarControllerParams
94+
# elif CS.econOn:
95+
# accel_limits[1] = 1.3
96+
# else:
97+
# accel_limits[1] = 1.5
98+
accel_limits[1] = 1.5
9899
self.pid.pos_limit = accel_limits[1]
99100

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

0 commit comments

Comments
 (0)