From c80d9ffb997676ca848385dcefcf0098675f8fad Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Tue, 19 May 2026 16:40:41 -0500 Subject: [PATCH] non hda ioniq --- .../opendbc/car/hyundai/fingerprints.py | 1 + .../opendbc/car/hyundai/tests/test_hyundai.py | 24 +++++++++++++------ opendbc_repo/opendbc/car/hyundai/values.py | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/opendbc_repo/opendbc/car/hyundai/fingerprints.py b/opendbc_repo/opendbc/car/hyundai/fingerprints.py index 6808e0d18..428bd6131 100644 --- a/opendbc_repo/opendbc/car/hyundai/fingerprints.py +++ b/opendbc_repo/opendbc/car/hyundai/fingerprints.py @@ -1095,6 +1095,7 @@ FW_VERSIONS = { b'\xf1\x00CE MFC AT EUR LHD 1.00 1.04 99211-KL000 221213', b'\xf1\x00CE MFC AT USA LHD 1.00 1.04 99211-KL000 221213', b'\xf1\x00CE MFC AT USA LHD 1.00 1.06 99211-KL000 230915', + b'\xf1\x00CE MFC AT CAN LHD 1.00 1.06 99211-KL000 230915', ], }, CAR.HYUNDAI_TUCSON_4TH_GEN: { diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index 3d65dd6db..c585dcf0b 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -72,13 +72,14 @@ def get_test_toggles() -> SimpleNamespace: class TestHyundaiFingerprint: def test_feature_detection(self): # LKA steering - for lka_steering in (True, False): - fingerprint = gen_empty_fingerprint() - if lka_steering: - cam_can = CanBus(None, fingerprint).CAM - fingerprint[cam_can] = [0x50, 0x110] # LKA steering messages - CP = CarInterface.get_params(CAR.KIA_EV6, fingerprint, [], False, False, False, None) - assert bool(CP.flags & HyundaiFlags.CANFD_LKA_STEERING) == lka_steering + for candidate in (CAR.KIA_EV6, CAR.HYUNDAI_IONIQ_6): + for lka_steering in (True, False): + fingerprint = gen_empty_fingerprint() + if lka_steering: + cam_can = CanBus(None, fingerprint).CAM + fingerprint[cam_can] = [0x50, 0x110] # LKA steering messages + CP = CarInterface.get_params(candidate, fingerprint, [], False, False, False, None) + assert bool(CP.flags & HyundaiFlags.CANFD_LKA_STEERING) == lka_steering # radar available for radar in (True, False): @@ -104,6 +105,15 @@ class TestHyundaiFingerprint: CP = CarInterface.get_params(CAR.KIA_SPORTAGE_HEV_2026, fingerprint, [], False, False, False, None) assert CP.flags & HyundaiFlags.SEND_LFA + def test_ioniq_6_hda1_layout_stays_non_lka(self): + fingerprint = gen_empty_fingerprint() + fingerprint[1] = {0x100: 8, 0x110: 8} + + CP = CarInterface.get_params(CAR.HYUNDAI_IONIQ_6, fingerprint, [], False, False, False, None) + + assert not (CP.flags & HyundaiFlags.CANFD_LKA_STEERING) + assert bool(CP.flags & HyundaiFlags.CANFD_CAMERA_SCC) + palisade_2023 = CarInterface.get_params(CAR.HYUNDAI_PALISADE_2023, gen_empty_fingerprint(), [], True, False, False, None) assert palisade_2023.flags & HyundaiFlags.CAN_CANFD_BLENDED assert DBC[palisade_2023.carFingerprint][Bus.pt] == "hyundai_palisade_2023_generated" diff --git a/opendbc_repo/opendbc/car/hyundai/values.py b/opendbc_repo/opendbc/car/hyundai/values.py index 87ca27d91..03f6c3f81 100644 --- a/opendbc_repo/opendbc/car/hyundai/values.py +++ b/opendbc_repo/opendbc/car/hyundai/values.py @@ -453,7 +453,7 @@ class CAR(Platforms): HYUNDAI_IONIQ_6 = HyundaiCanFDPlatformConfig( [HyundaiCarDocs("Hyundai Ioniq 6 (with HDA II) 2023-24", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p]))], HYUNDAI_IONIQ_5.specs, - flags=HyundaiFlags.EV | HyundaiFlags.CANFD_LKA_STEERING | HyundaiFlags.CANFD_LKA_STEERING_ALT | HyundaiFlags.CANFD_NO_RADAR_DISABLE, + flags=HyundaiFlags.EV | HyundaiFlags.CANFD_NO_RADAR_DISABLE, ) HYUNDAI_TUCSON_4TH_GEN = HyundaiCanFDPlatformConfig( [