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

pull/1560/head
Willem Melching 2020-05-22 14:00:20 -07:00 committed by GitHub
parent a623ad2ab3
commit bfe7cbfe5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

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