From 822095b96569faf10a6841cf3892b5db29f0c01b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 26 Jun 2023 14:32:09 -0700 Subject: [PATCH] this also works, but it adds a bunch of indirection --- selfdrive/car/toyota/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index c82507f82e..7a10bd82d1 100644 --- a/selfdrive/car/toyota/interface.py +++ b/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