From ab88a7e7df32e1c02a175b81848bd4112b2e5c69 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 12 Oct 2022 23:23:50 -0700 Subject: [PATCH] presence of adas ecu --- selfdrive/car/hyundai/interface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 13e93c7d06..f55e4412f2 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -10,6 +10,7 @@ from selfdrive.car.disable_ecu import disable_ecu ButtonType = car.CarState.ButtonEvent.Type EventName = car.CarEvent.EventName +Ecu = car.CarParams.Ecu ENABLE_BUTTONS = (Buttons.RES_ACCEL, Buttons.SET_DECEL, Buttons.CANCEL) BUTTONS_DICT = {Buttons.RES_ACCEL: ButtonType.accelCruise, Buttons.SET_DECEL: ButtonType.decelCruise, Buttons.GAP_DIST: ButtonType.gapAdjustCruise, Buttons.CANCEL: ButtonType.cancel} @@ -33,8 +34,8 @@ class CarInterface(CarInterfaceBase): ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, CAR.ELANTRA_GT_I30} if candidate in CANFD_CAR: - # detect HDA2 with LKAS message - if 0x50 in fingerprint[6]: + # detect HDA2 with ADAS Driving ECU + if Ecu.adas in [fw.ecu for fw in car_fw]: ret.flags |= HyundaiFlags.CANFD_HDA2.value else: # non-HDA2