diff --git a/opendbc_repo/opendbc/car/hyundai/fingerprints.py b/opendbc_repo/opendbc/car/hyundai/fingerprints.py index 428bd6131..7a6462177 100644 --- a/opendbc_repo/opendbc/car/hyundai/fingerprints.py +++ b/opendbc_repo/opendbc/car/hyundai/fingerprints.py @@ -1395,6 +1395,17 @@ FW_VERSIONS = { b'\xf1\x00T02601BL T02900A1 WCN7T20XXX900NS4\xf7\xccz\xf6', ], }, + CAR.HYUNDAI_ELANTRA_HEV_2022_NON_SCC: { + (Ecu.eps, 0x7d4, None): [ + b'\xf1\x00CN7 MDPS C 1.00 1.02 56310/BY050 4CNHC102', + ], + (Ecu.fwdCamera, 0x7c4, None): [ + b'\xf1\x00CN7HMFC AT USA LHD 1.00 1.04 99210-AA000 210205', + ], + (Ecu.transmission, 0x7e1, None): [ + b'\xf1\x006U3L0_C2\x00\x006U3K3051\x00\x00HCN0G16NS0\x00\x00\x00\x00', + ], + }, CAR.HYUNDAI_BAYON_1ST_GEN_NON_SCC: { (Ecu.fwdCamera, 0x7c4, None): [ b'\xf1\x00BC3 LKA AT EUR LHD 1.00 1.01 99211-Q0100 261', diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index 4bbd5505b..f458a7b6a 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -54,6 +54,7 @@ CANFD_EXPECTED_ECUS = {Ecu.fwdCamera, Ecu.fwdRadar} HYUNDAI_NON_SCC_CARS = ( CAR.HYUNDAI_BAYON_1ST_GEN_NON_SCC, CAR.HYUNDAI_ELANTRA_2022_NON_SCC, + CAR.HYUNDAI_ELANTRA_HEV_2022_NON_SCC, CAR.HYUNDAI_KONA_NON_SCC, CAR.HYUNDAI_KONA_EV_NON_SCC, CAR.KIA_CEED_PHEV_2022_NON_SCC, @@ -121,6 +122,9 @@ class TestHyundaiFingerprint: assert palisade_2023.safetyConfigs[-1].safetyParam & HyundaiSafetyFlags.CANCEL_BTN_ENABLE def test_non_scc_flag_quirks(self): + elantra_hev = CarInterface.get_params(CAR.HYUNDAI_ELANTRA_HEV_2022_NON_SCC, gen_empty_fingerprint(), [], True, False, False, None) + assert elantra_hev.flags & HyundaiFlags.HYBRID + forte_2019 = CarInterface.get_params(CAR.KIA_FORTE_2019_NON_SCC, gen_empty_fingerprint(), [], True, False, False, None) assert forte_2019.flags & HyundaiFlags.NON_SCC_NO_FCA assert not (forte_2019.flags & HyundaiFlags.NON_SCC_RADAR_FCA) diff --git a/opendbc_repo/opendbc/car/hyundai/values.py b/opendbc_repo/opendbc/car/hyundai/values.py index 03f6c3f81..7116bfda7 100644 --- a/opendbc_repo/opendbc/car/hyundai/values.py +++ b/opendbc_repo/opendbc/car/hyundai/values.py @@ -710,6 +710,11 @@ class CAR(Platforms): HYUNDAI_ELANTRA_2021.specs, flags=HyundaiFlags.CHECKSUM_CRC8, ) + HYUNDAI_ELANTRA_HEV_2022_NON_SCC = HyundaiNonSccPlatformConfig( + [HyundaiNonSccCarDocs("Hyundai Elantra Hybrid Non-SCC 2022", car_parts=CarParts.common([CarHarness.hyundai_k]))], + HYUNDAI_ELANTRA_HEV_2021.specs, + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, + ) HYUNDAI_KONA_NON_SCC = HyundaiNonSccPlatformConfig( [HyundaiNonSccCarDocs("Hyundai Kona Non-SCC 2019", car_parts=CarParts.common([CarHarness.hyundai_b]))], HYUNDAI_KONA.specs, diff --git a/opendbc_repo/opendbc/car/torque_data/substitute.toml b/opendbc_repo/opendbc/car/torque_data/substitute.toml index 3893aa5e4..f4096289b 100644 --- a/opendbc_repo/opendbc/car/torque_data/substitute.toml +++ b/opendbc_repo/opendbc/car/torque_data/substitute.toml @@ -54,6 +54,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "KIA_SELTOS_2023_NON_SCC" = "HYUNDAI_SONATA" "HYUNDAI_KONA_NON_SCC" = "HYUNDAI_KONA_EV" "HYUNDAI_ELANTRA_2022_NON_SCC" = "HYUNDAI_ELANTRA_2021" +"HYUNDAI_ELANTRA_HEV_2022_NON_SCC" = "HYUNDAI_ELANTRA_HEV_2021" "GENESIS_G70_2021_NON_SCC" = "HYUNDAI_SONATA" "HYUNDAI_BAYON_1ST_GEN_NON_SCC" = "HYUNDAI_SONATA"