mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-09 06:52:05 +08:00
Toyota PCM Compensation tune and bugfixes
* Do not reset long mpc weight (perform better) * Lower stopAccel for quicker response for TSS2.
This commit is contained in:
@@ -148,15 +148,14 @@ class CarInterface(CarInterfaceBase):
|
||||
# dp
|
||||
if Params().get_bool("dp_toyota_pcm_compensation"):
|
||||
# on stock Toyota this is -2.5
|
||||
ret.stopAccel = -2.5
|
||||
if candidate in TSS2_CAR:
|
||||
ret.stopAccel = -1.2
|
||||
else:
|
||||
ret.stopAccel = -2.5
|
||||
|
||||
tune.deadzoneBP = [0., 16., 20., 30.]
|
||||
tune.deadzoneV = [.04, .05, .08, .15]
|
||||
ret.stoppingDecelRate = 0.17
|
||||
tune.kpBP = [0., 5.]
|
||||
tune.kpV = [0.8, 1.]
|
||||
tune.kiBP = [0., 5.]
|
||||
tune.kiV = [0.3, 1.]
|
||||
tune.kpV = [0.]
|
||||
tune.kiV = [0.5]
|
||||
elif candidate in TSS2_CAR:
|
||||
tune.kpV = [0.0]
|
||||
tune.kiV = [0.5]
|
||||
|
||||
@@ -136,10 +136,6 @@ class LongitudinalPlanner:
|
||||
# Reset current state when not engaged, or user is controlling the speed
|
||||
reset_state = long_control_off if self.CP.openpilotLongitudinalControl else not sm['controlsState'].enabled
|
||||
|
||||
# dp
|
||||
if not reset_state:
|
||||
reset_state = self._dynamic_endtoend_controller.has_changed()
|
||||
|
||||
# No change cost when user is controlling the speed, or when standstill
|
||||
prev_accel_constraint = not (reset_state or sm['carState'].standstill)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user