Toyota: move stop and go cars to one tuple (#31726)

* One tuple!

* rm
pull/31682/head
Shane Smiskol 1 year ago committed by GitHub
parent fcd33786ca
commit 1b9df8aca6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 18
      selfdrive/car/toyota/interface.py

@ -61,19 +61,10 @@ class CarInterface(CarInterfaceBase):
ret.steerActuatorDelay = 0.25 ret.steerActuatorDelay = 0.25
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning, steering_angle_deadzone_deg=0.2) CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning, steering_angle_deadzone_deg=0.2)
elif candidate in (CAR.RAV4, CAR.RAV4H):
stop_and_go = True if (candidate in CAR.RAV4H) else False
elif candidate in (CAR.LEXUS_RX, CAR.LEXUS_RX_TSS2): elif candidate in (CAR.LEXUS_RX, CAR.LEXUS_RX_TSS2):
stop_and_go = True stop_and_go = True
ret.wheelSpeedFactor = 1.035 ret.wheelSpeedFactor = 1.035
elif candidate in (CAR.CHR, CAR.CHR_TSS2):
stop_and_go = True
elif candidate in (CAR.CAMRY, CAR.CAMRY_TSS2):
stop_and_go = True
elif candidate in (CAR.AVALON, CAR.AVALON_2019, CAR.AVALON_TSS2): elif candidate in (CAR.AVALON, CAR.AVALON_2019, CAR.AVALON_TSS2):
# starting from 2019, all Avalon variants have stop and go # starting from 2019, all Avalon variants have stop and go
# https://engage.toyota.com/static/images/toyota_safety_sense/TSS_Applicability_Chart.pdf # https://engage.toyota.com/static/images/toyota_safety_sense/TSS_Applicability_Chart.pdf
@ -96,13 +87,8 @@ class CarInterface(CarInterfaceBase):
ret.lateralTuning.pid.kf = 0.00004 ret.lateralTuning.pid.kf = 0.00004
break break
elif candidate == CAR.SIENNA: elif candidate in (CAR.RAV4H, CAR.CHR, CAR.CAMRY, CAR.SIENNA, CAR.LEXUS_CTH, CAR.LEXUS_NX):
stop_and_go = True # TODO: Some of these platforms are not advertised to have full range ACC, are they similar to SNG_WITHOUT_DSU cars?
elif candidate == CAR.LEXUS_CTH:
stop_and_go = True
elif candidate in (CAR.LEXUS_NX, CAR.LEXUS_NX_TSS2):
stop_and_go = True stop_and_go = True
# TODO: these models can do stop and go, but unclear if it requires sDSU or unplugging DSU. # TODO: these models can do stop and go, but unclear if it requires sDSU or unplugging DSU.

Loading…
Cancel
Save