|
|
|
@ -212,10 +212,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.enableDsu = len(found_ecus) > 0 and Ecu.dsu not in found_ecus and candidate not in (NO_DSU_CAR | UNSUPPORTED_DSU_CAR) and not (ret.flags & ToyotaFlags.SMART_DSU) |
|
|
|
|
ret.enableGasInterceptor = 0x201 in fingerprint[0] |
|
|
|
|
|
|
|
|
|
# Use SDSU to send ACC_CONTROL |
|
|
|
|
# Use SDSU if detected and toggled is enabled |
|
|
|
|
# If the smartDsu is detected in these cars and toggle is enabled, or |
|
|
|
|
|
|
|
|
|
# if the smartDSU is detected, openpilot can send ACC_CONTROL and the smartDSU will block it from the DSU or radar. |
|
|
|
|
# since we don't yet parse radar on TSS2 radar-based ACC cars, gate longitudinal behind experimental toggle |
|
|
|
|
use_sdsu = bool(ret.flags & ToyotaFlags.SMART_DSU) |
|
|
|
@ -230,16 +226,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
# openpilot longitudinal enabled when experimental long is toggled: |
|
|
|
|
# - TSS2 radar ACC cars w/ smart-DSU installed |
|
|
|
|
ret.openpilotLongitudinalControl = use_sdsu or ret.enableDsu or candidate in (TSS2_CAR - RADAR_ACC_CAR) |
|
|
|
|
|
|
|
|
|
if ret.radarUnavailable: |
|
|
|
|
# On TSS2 radar-based ACC cars, the SDSU is a filter on the ACC_CONTROL message from the radar |
|
|
|
|
ret.openpilotLongitudinalControl = ret.experimentalLongitudinalAvailable and experimental_long |
|
|
|
|
else: |
|
|
|
|
# On these cars, the SDSU filters the ACC_CONTROL message from the DSU |
|
|
|
|
ret.openpilotLongitudinalControl = ret.openpilotLongitudinalControl or bool(ret.flags & ToyotaFlags.SMART_DSU) |
|
|
|
|
ret.openpilotLongitudinalControl = (experimental_long and ret.experimentalLongitudinalAvailable) or bool(ret.flags & ToyotaFlags.SMART_DSU) or ret.enableDsu or candidate in (TSS2_CAR - RADAR_ACC_CAR) |
|
|
|
|
ret.openpilotLongitudinalControl = bool(ret.flags & ToyotaFlags.SMART_DSU) or ret.enableDsu or candidate in (TSS2_CAR - RADAR_ACC_CAR) |
|
|
|
|
|
|
|
|
|
ret.autoResumeSng = ret.openpilotLongitudinalControl and candidate in NO_STOP_TIMER_CAR |
|
|
|
|
|
|
|
|
|
if not ret.openpilotLongitudinalControl: |
|
|
|
|