diff --git a/opendbc/car/hyundai/fingerprints.py b/opendbc/car/hyundai/fingerprints.py index 9a56dba4d2..f13203c87c 100644 --- a/opendbc/car/hyundai/fingerprints.py +++ b/opendbc/car/hyundai/fingerprints.py @@ -908,6 +908,18 @@ b'\xf1\x00CN7 MDPS C 1.00 1.04 56310BY050\x00 4CNHC104', ], }, + CAR.HYUNDAI_ELANTRA_HEV_2024: { + (Ecu.fwdRadar, 0x7d0, None): [ + b'\xf1\x00CN7_ RDR ----- 1.00 1.01 99110-AA500 ', + ], + (Ecu.eps, 0x7d4, None): [ + b'\xf1\x00CN7 MDPS C 1.00 1.00 56300BY670\x00 4CSHC100', + ], + (Ecu.fwdCamera, 0x7c4, None): [ + b'\xf1\x00CN7HMFC AT CAN LHD 1.00 1.05 99210-AA510 240509', + b'\xf1\x00CN7HMFC AT USA LHD 1.00 1.03 99210-AA500 230918', + ], + }, CAR.HYUNDAI_KONA_HEV: { (Ecu.abs, 0x7d1, None): [ b'\xf1\x00OS IEB \x01 104 \x11 58520-CM000', diff --git a/opendbc/car/hyundai/hyundaican.py b/opendbc/car/hyundai/hyundaican.py index 00bf2dbabf..a0ab0e6603 100644 --- a/opendbc/car/hyundai/hyundaican.py +++ b/opendbc/car/hyundai/hyundaican.py @@ -38,7 +38,7 @@ def create_lkas11(packer, frame, CP, apply_steer, steer_req, CAR.HYUNDAI_ELANTRA_HEV_2021, CAR.HYUNDAI_SONATA_HYBRID, CAR.HYUNDAI_KONA_EV, CAR.HYUNDAI_KONA_HEV, CAR.HYUNDAI_KONA_EV_2022, CAR.HYUNDAI_SANTA_FE_2022, CAR.KIA_K5_2021, CAR.HYUNDAI_IONIQ_HEV_2022, CAR.HYUNDAI_SANTA_FE_HEV_2022, CAR.HYUNDAI_SANTA_FE_PHEV_2022, CAR.KIA_STINGER_2022, CAR.KIA_K5_HEV_2020, CAR.KIA_CEED, - CAR.HYUNDAI_AZERA_6TH_GEN, CAR.HYUNDAI_AZERA_HEV_6TH_GEN, CAR.HYUNDAI_CUSTIN_1ST_GEN): + CAR.HYUNDAI_AZERA_6TH_GEN, CAR.HYUNDAI_AZERA_HEV_6TH_GEN, CAR.HYUNDAI_CUSTIN_1ST_GEN, CAR.HYUNDAI_ELANTRA_HEV_2024): values["CF_Lkas_LdwsActivemode"] = int(left_lane) + (int(right_lane) << 1) values["CF_Lkas_LdwsOpt_USM"] = 2 diff --git a/opendbc/car/hyundai/values.py b/opendbc/car/hyundai/values.py index 223eb97a3d..cae208caeb 100644 --- a/opendbc/car/hyundai/values.py +++ b/opendbc/car/hyundai/values.py @@ -178,6 +178,11 @@ class CAR(Platforms): CarSpecs(mass=3017 * CV.LB_TO_KG, wheelbase=2.72, steerRatio=12.9, tireStiffnessFactor=0.65), flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.HYBRID, ) + HYUNDAI_ELANTRA_HEV_2024 = HyundaiPlatformConfig( + [HyundaiCarDocs("Hyundai Elantra Hybrid 2024-25", car_parts=CarParts.common([CarHarness.hyundai_k]))], + CarSpecs(mass=3017 * CV.LB_TO_KG, wheelbase=2.72, steerRatio=12.9, tireStiffnessFactor=0.65), + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.CAMERA_SCC | HyundaiFlags.HYBRID, + ) HYUNDAI_GENESIS = HyundaiPlatformConfig( [ # TODO: check 2015 packages diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 4430bfef88..3efaf97a46 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -180,6 +180,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("734ef96182ddf940|2022-10-02--16-41-44", HYUNDAI.HYUNDAI_ELANTRA_GT_I30), CarTestRoute("82e9cdd3f43bf83e|2021-05-15--02-42-51", HYUNDAI.HYUNDAI_ELANTRA_2021), CarTestRoute("715ac05b594e9c59|2021-06-20--16-21-07", HYUNDAI.HYUNDAI_ELANTRA_HEV_2021), + CarTestRoute("65ef8b49f9b0dd24/00000006--886bf0e0d6", HYUNDAI.HYUNDAI_ELANTRA_HEV_2024), CarTestRoute("7120aa90bbc3add7|2021-08-02--07-12-31", HYUNDAI.HYUNDAI_SONATA_HYBRID), CarTestRoute("715ac05b594e9c59|2021-10-27--23-24-56", HYUNDAI.GENESIS_G70_2020), CarTestRoute("6b0d44d22df18134|2023-05-06--10-36-55", HYUNDAI.GENESIS_GV80), diff --git a/opendbc/car/torque_data/substitute.toml b/opendbc/car/torque_data/substitute.toml index 456f823dfa..5534a7c97c 100644 --- a/opendbc/car/torque_data/substitute.toml +++ b/opendbc/car/torque_data/substitute.toml @@ -37,6 +37,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "HYUNDAI_ELANTRA" = "HYUNDAI_SONATA_LF" "HYUNDAI_ELANTRA_GT_I30" = "HYUNDAI_SONATA_LF" "HYUNDAI_ELANTRA_HEV_2021" = "HYUNDAI_SONATA" +"HYUNDAI_ELANTRA_HEV_2024" = "HYUNDAI_SONATA" "HYUNDAI_TUCSON" = "HYUNDAI_SANTA_FE" "HYUNDAI_SANTA_FE_2022" = "HYUNDAI_SANTA_FE_HEV_2022" "KIA_K5_HEV_2020" = "KIA_K5_2021" diff --git a/opendbc/dbc/hyundai_kia_generic.dbc b/opendbc/dbc/hyundai_kia_generic.dbc index d8314a45d9..e1909fd0b1 100644 --- a/opendbc/dbc/hyundai_kia_generic.dbc +++ b/opendbc/dbc/hyundai_kia_generic.dbc @@ -1481,7 +1481,7 @@ BO_ 905 SCC14: 8 SCC SG_ ACCMode : 32|3@1+ (1,0) [0|7] "" CLU,HUD,LDWS_LKAS,ESC SG_ ObjGap : 56|8@1+ (1,0) [0|255] "" CLU,HUD,ESC -BO_ 1157 LFAHDA_MFC: 4 XXX +BO_ 1157 LFAHDA_MFC: 8 XXX SG_ HDA_USM : 0|2@1+ (1,0) [0|3] "" XXX SG_ HDA_Active : 2|1@1+ (1,0) [0|1] "" XXX SG_ HDA_Icon_State : 3|2@1+ (1,0) [0|3] "" XXX