diff --git a/opendbc/car/hyundai/fingerprints.py b/opendbc/car/hyundai/fingerprints.py index 4b47f3cc02c..7e2322a8e3f 100644 --- a/opendbc/car/hyundai/fingerprints.py +++ b/opendbc/car/hyundai/fingerprints.py @@ -1152,6 +1152,8 @@ b'\xf1\x00KA4 MFC AT USA LHD 1.00 1.05 99210-R0000 201221', b'\xf1\x00KA4 MFC AT USA LHD 1.00 1.06 99210-R0000 220221', b'\xf1\x00KA4CMFC AT CHN LHD 1.00 1.01 99211-I4000 210525', + b'\xf1\x00KA4HMFC AT USA LHD 1.00 1.05 99210-R0500 240305', + b'\xf1\x00KA4 MFC AT USA LHD 1.00 1.05 99210-R0500 240305', ], (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00KA4_ SCC F-CUP 1.00 1.03 99110-R0000 ', @@ -1159,6 +1161,8 @@ b'\xf1\x00KA4_ SCC FHCUP 1.00 1.02 99110-R0000 ', b'\xf1\x00KA4_ SCC FHCUP 1.00 1.03 99110-R0000 ', b'\xf1\x00KA4c SCC FHCUP 1.00 1.01 99110-I4000 ', + b'\xf1\x00KAhe RDR ----- 1.00 1.01 99110-ES500 ', + b'\xf1\x00KA4_ SCC FHCUP 1.00 1.01 99110-R0510 ', ], }, CAR.KIA_K8_HEV_1ST_GEN: { diff --git a/opendbc/car/hyundai/interface.py b/opendbc/car/hyundai/interface.py index adebd4fe1da..0ee87d6b983 100644 --- a/opendbc/car/hyundai/interface.py +++ b/opendbc/car/hyundai/interface.py @@ -29,8 +29,9 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.experimentalLongitudinalAvailable = candidate not in (CANFD_UNSUPPORTED_LONGITUDINAL_CAR | CANFD_RADAR_SCC_CAR) ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN] - if 0x105 in fingerprint[CAN.ECAN]: - ret.flags |= HyundaiFlags.HYBRID.value + for fw in car_fw: + if fw.ecu == "fwdCamera" and (fw.fwVersion.startswith(b'\xf1\x00KA4HMFC')): + ret.flags |= HyundaiFlags.HYBRID.value # detect HDA2 with ADAS Driving ECU if hda2: @@ -38,9 +39,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime if 0x110 in fingerprint[CAN.CAM]: ret.flags |= HyundaiFlags.CANFD_HDA2_ALT_STEERING.value else: - # non-HDA2 - if 0x1cf not in fingerprint[CAN.ECAN]: - ret.flags |= HyundaiFlags.CANFD_ALT_BUTTONS.value if not ret.flags & HyundaiFlags.RADAR_SCC: ret.flags |= HyundaiFlags.CANFD_CAMERA_SCC.value @@ -52,6 +50,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime else: ret.flags |= HyundaiFlags.CANFD_ALT_GEARS.value + # Some HDA2 do not have 0x1cf + if 0x1cf not in fingerprint[CAN.ECAN]: + ret.flags |= HyundaiFlags.CANFD_ALT_BUTTONS.value + cfgs = [get_safety_config(structs.CarParams.SafetyModel.hyundaiCanfd), ] if CAN.ECAN >= 4: cfgs.insert(0, get_safety_config(structs.CarParams.SafetyModel.noOutput)) diff --git a/opendbc/car/hyundai/values.py b/opendbc/car/hyundai/values.py index 223eb97a3dc..e76477d6822 100644 --- a/opendbc/car/hyundai/values.py +++ b/opendbc/car/hyundai/values.py @@ -490,11 +490,11 @@ class CAR(Platforms): ) KIA_CARNIVAL_4TH_GEN = HyundaiCanFDPlatformConfig( [ - HyundaiCarDocs("Kia Carnival 2022-24", car_parts=CarParts.common([CarHarness.hyundai_a])), - HyundaiCarDocs("Kia Carnival (China only) 2023", car_parts=CarParts.common([CarHarness.hyundai_k])) + HyundaiCarDocs("Kia Carnival 2022-24", "All", car_parts=CarParts.common([CarHarness.hyundai_a])), + HyundaiCarDocs("Kia Carnival (China only) 2023", "All", car_parts=CarParts.common([CarHarness.hyundai_k])), + HyundaiCarDocs("Kia Carnival (with HDA II) 2025", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_q])), ], CarSpecs(mass=2087, wheelbase=3.09, steerRatio=14.23), - flags=HyundaiFlags.RADAR_SCC, ) # Genesis