diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 816ee659e..4666cc5e3 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -146,6 +146,19 @@ class CarInterface(CarInterfaceBase): else: tune.kpV = [0.0] tune.kiV = [1.2] # appears to produce minimal oscillation on TSS-P + elif (candidate in TSS2_CAR or ret.enableGasInterceptor) and params.get_bool("DragonPilotTune"): + # Credit goes to the DragonPilot team! + if candidate in TSS2_CAR: + tune.kiBP = [0., 0.1, 1., 2., 3., 5., 8., 12., 14., 20., 26., 36., 50] + tune.kiV = [0.346, 0.35, 0.33, 0.309, 0.287, 0.228, 0.222, 0.2085, 0.19, 0.17, 0.10, 0.06, 0.01] + ret.vEgoStopping = 0.25 + ret.vEgoStarting = 0.25 + ret.stopAccel = -0.40 + ret.stoppingDecelRate = 0.40 + else: + tune.kiBP = [0., 35.] + tune.kpV = [3.6, 2.4, 1.5] + tune.kiV = [0.54, 0.36] elif candidate in TSS2_CAR or ret.enableGasInterceptor: tune.kpV = [0.0] tune.kiV = [0.5]