Split TSS2 RAV4 tuning based on fw version (#1558)

This commit is contained in:
Willem Melching
2020-05-22 14:00:20 -07:00
committed by GitHub
parent a623ad2ab3
commit bfe7cbfe5f
+12
View File
@@ -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