this also works, but it adds a bunch of indirection

pull/28440/head
Shane Smiskol 2 years ago
parent c902345b5f
commit 822095b965
  1. 6
      selfdrive/car/toyota/interface.py

@ -218,10 +218,10 @@ class CarInterface(CarInterfaceBase):
# 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
ret.experimentalLongitudinalAvailable = bool(ret.flags & ToyotaFlags.SMART_DSU) and candidate in RADAR_ACC_CAR
use_sdsu = bool(ret.flags & ToyotaFlags.SMART_DSU)
if candidate in RADAR_ACC_CAR:
ret.experimentalLongitudinalAvailable = use_sdsu
use_sdsu = use_sdsu and experimental_long
if ret.experimentalLongitudinalAvailable:
use_sdsu = experimental_long
# openpilot longitudinal enabled by default:
# - non-(TSS2 radar ACC cars) w/ smartDSU installed

Loading…
Cancel
Save