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