From 768a744393ce45c9af7cebc35a0a2aaa3f548964 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 22 May 2020 14:00:20 -0700 Subject: [PATCH] Split TSS2 RAV4 tuning based on fw version (#1558) old-commit-hash: bfe7cbfe5fda226af6195a1e0de61083a18971bb --- selfdrive/car/toyota/interface.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 84fe1b8b3a..8c8161f6ab 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -161,6 +161,12 @@ class CarInterface(CarInterfaceBase): ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kf = 0.00004 + for fw in car_fw: + if fw.ecu == "eps" and fw.fwVersion == b"8965B42170\x00\x00\x00\x00\x00\x00": + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] + ret.lateralTuning.pid.kf = 0.00007818594 + break + elif candidate == CAR.RAV4H_TSS2: stop_and_go = True ret.safetyParam = 73 @@ -171,6 +177,12 @@ class CarInterface(CarInterfaceBase): ret.mass = 3800. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kf = 0.00004 + for fw in car_fw: + if fw.ecu == "eps" and fw.fwVersion == b"8965B42170\x00\x00\x00\x00\x00\x00": + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] + ret.lateralTuning.pid.kf = 0.00007818594 + break + elif candidate in [CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2]: stop_and_go = True ret.safetyParam = 73