From 64ebc3b4fd1eb1f6cfcfaded95066fa5c464034e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=80=90TIM=E3=80=91?= <90225659+CT921@users.noreply.github.com> Date: Fri, 28 Jan 2022 07:33:18 +0800 Subject: [PATCH] Toyota: Prius V fixups (#23640) * Fine tune Prius-V control parameter * Adjust DBC file and enable SNG support *Adjust the DBC file to CT200H, the parameters of this model are closer to PRIUS V *Add PRIUS V to NO_STOP_TIMER_CAR list to enable SNG support * Update interface.py remove spaces * Update values.py Mod DBC to toyota_rav4_2017_pt_generated * Update values.py The file has been updated to resolve the conflict and can be directly merged Co-authored-by: Adeeb Shihadeh old-commit-hash: eaebf01e581b910763eb23ed3e15af1559e84dc6 --- selfdrive/car/toyota/interface.py | 5 +++-- selfdrive/car/toyota/values.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 53ab749253..adc58a2099 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -39,11 +39,12 @@ class CarInterface(CarInterfaceBase): ret.steerActuatorDelay = 0.3 elif candidate == CAR.PRIUS_V: + stop_and_go = True ret.wheelbase = 2.78 - ret.steerRatio = 17.8 + ret.steerRatio = 17.4 tire_stiffness_factor = 0.5533 ret.mass = 4387. * CV.LB_TO_KG + STD_CARGO_KG - set_lat_tune(ret.lateralTuning, LatTunes.PID_L) + set_lat_tune(ret.lateralTuning, LatTunes.LQR_RAV4) elif candidate in (CAR.RAV4, CAR.RAV4H): stop_and_go = True if (candidate in CAR.RAV4H) else False diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index 615099cb26..391502a733 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -1704,7 +1704,7 @@ DBC = { } # These cars have non-standard EPS torque scale factors. All others are 73 -EPS_SCALE = defaultdict(lambda: 73, {CAR.PRIUS: 66, CAR.COROLLA: 88, CAR.LEXUS_IS: 77, CAR.LEXUS_RC: 77, CAR.LEXUS_CTH: 100}) +EPS_SCALE = defaultdict(lambda: 73, {CAR.PRIUS: 66, CAR.COROLLA: 88, CAR.LEXUS_IS: 77, CAR.LEXUS_RC: 77, CAR.LEXUS_CTH: 100, CAR.PRIUS_V: 100}) # Toyota/Lexus Safety Sense 2.0 and 2.5 TSS2_CAR = {CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.RAV4H_TSS2, @@ -1714,4 +1714,4 @@ TSS2_CAR = {CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS NO_DSU_CAR = TSS2_CAR | {CAR.CHR, CAR.CHRH, CAR.CAMRY, CAR.CAMRYH} # no resume button press required -NO_STOP_TIMER_CAR = TSS2_CAR | {CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.SIENNA, CAR.LEXUS_ESH} +NO_STOP_TIMER_CAR = TSS2_CAR | {CAR.PRIUS_V, CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.SIENNA, CAR.LEXUS_ESH}