diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 8f15bd1e7e..730a47b59d 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -27,10 +27,6 @@ class CarInterface(CarInterfaceBase): # added to selfdrive/car/tests/routes.py, we can remove it from this list. ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, } - # detect platforms with HKG CAN and CAN-FD definitions - if 0x50 in fingerprint[5] and 0x420 in fingerprint[4]: - ret.flags |= HyundaiFlags.CAN_CANFD.value - if candidate in CANFD_CAR and not (ret.flags & HyundaiFlags.CAN_CANFD.value): # detect HDA2 with ADAS Driving ECU if Ecu.adas in [fw.ecu for fw in car_fw]: @@ -291,6 +287,10 @@ class CarInterface(CarInterfaceBase): elif candidate in EV_CAR: ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_EV_GAS + # detect platforms with HKG CAN and CAN-FD definitions + if 0x50 in fingerprint[5] and 0x420 in fingerprint[4]: + ret.flags |= HyundaiFlags.CAN_CANFD.value + if candidate in (CAR.KONA, CAR.KONA_EV, CAR.KONA_HEV, CAR.KONA_EV_2022): ret.flags |= HyundaiFlags.ALT_LIMITS.value ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_ALT_LIMITS