diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 8528005eb5..28912645ac 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -230,11 +230,10 @@ class CarInterface(CarInterfaceBase): # to a negative value, so it won't matter. ret.minEnableSpeed = -1. if (stop_and_go or ret.enableGasInterceptor) else MIN_ACC_SPEED - if ret.enableGasInterceptor: - set_long_tune(ret.longitudinalTuning, LongTunes.PEDAL) - elif candidate in TSS2_CAR: + if candidate in TSS2_CAR or ret.enableGasInterceptor: set_long_tune(ret.longitudinalTuning, LongTunes.TSS2) - ret.stoppingDecelRate = 0.3 # reach stopping target smoothly + if candidate in TSS2_CAR: + ret.stoppingDecelRate = 0.3 # reach stopping target smoothly else: set_long_tune(ret.longitudinalTuning, LongTunes.TSS) diff --git a/selfdrive/car/toyota/tunes.py b/selfdrive/car/toyota/tunes.py index fc538b9698..b73ab4c8c9 100644 --- a/selfdrive/car/toyota/tunes.py +++ b/selfdrive/car/toyota/tunes.py @@ -2,9 +2,8 @@ from enum import Enum class LongTunes(Enum): - PEDAL = 0 - TSS2 = 1 - TSS = 2 + TSS2 = 0 + TSS = 1 class LatTunes(Enum): INDI_PRIUS = 0 @@ -28,7 +27,7 @@ class LatTunes(Enum): ###### LONG ###### def set_long_tune(tune, name): # Improved longitudinal tune - if name == LongTunes.TSS2 or name == LongTunes.PEDAL: + if name == LongTunes.TSS2: tune.deadzoneBP = [0., 8.05] tune.deadzoneV = [.0, .14] tune.kpBP = [0., 5., 20.]