Toyota: gate enableDsu on no smartDSU (#22711)

old-commit-hash: 944578ad09
commatwo_master
cydia2020 4 years ago committed by GitHub
parent 1e04063b9b
commit 8f824f3b16
  1. 2
      selfdrive/car/toyota/interface.py

@ -302,7 +302,7 @@ class CarInterface(CarInterfaceBase):
smartDsu = 0x2FF in fingerprint[0] smartDsu = 0x2FF in fingerprint[0]
# In TSS2 cars the camera does long control # In TSS2 cars the camera does long control
found_ecus = [fw.ecu for fw in car_fw] found_ecus = [fw.ecu for fw in car_fw]
ret.enableDsu = (len(found_ecus) > 0) and (Ecu.dsu not in found_ecus) and (candidate not in NO_DSU_CAR) ret.enableDsu = (len(found_ecus) > 0) and (Ecu.dsu not in found_ecus) and (candidate not in NO_DSU_CAR) and (not smartDsu)
ret.enableGasInterceptor = 0x201 in fingerprint[0] ret.enableGasInterceptor = 0x201 in fingerprint[0]
# if the smartDSU is detected, openpilot can send ACC_CMD (and the smartDSU will block it from the DSU) or not (the DSU is "connected") # if the smartDSU is detected, openpilot can send ACC_CMD (and the smartDSU will block it from the DSU) or not (the DSU is "connected")
ret.openpilotLongitudinalControl = smartDsu or ret.enableDsu or candidate in TSS2_CAR ret.openpilotLongitudinalControl = smartDsu or ret.enableDsu or candidate in TSS2_CAR

Loading…
Cancel
Save