diff --git a/launch_env.sh b/launch_env.sh index 314366f42..bc75a4902 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -5,6 +5,8 @@ export MKL_NUM_THREADS=1 export NUMEXPR_NUM_THREADS=1 export OPENBLAS_NUM_THREADS=1 export VECLIB_MAXIMUM_THREADS=1 +export FINGERPRINT="KIA_CARNIVAL_4TH_GEN" +export SKIP_FW_QUERY="1" # models get lower priority than ui # - ui is ~5ms diff --git a/opendbc_repo/opendbc/car/hyundai/interface.py b/opendbc_repo/opendbc/car/hyundai/interface.py index 19c273ca0..7bf810c70 100644 --- a/opendbc_repo/opendbc/car/hyundai/interface.py +++ b/opendbc_repo/opendbc/car/hyundai/interface.py @@ -43,9 +43,9 @@ class CarInterface(CarInterfaceBase): ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN] - # Check if the car is hybrid. Only HEV/PHEV cars have 0xFA on E-CAN. - if 0xFA 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 if lka_steering: # detect LKA steering @@ -53,9 +53,6 @@ class CarInterface(CarInterfaceBase): if 0x110 in fingerprint[CAN.CAM]: ret.flags |= HyundaiFlags.CANFD_LKA_STEERING_ALT.value else: - # no LKA steering - 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 @@ -67,6 +64,10 @@ class CarInterface(CarInterfaceBase): 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_repo/opendbc/car/hyundai/values.py b/opendbc_repo/opendbc/car/hyundai/values.py index e239298a0..7e3c4b4ad 100644 --- a/opendbc_repo/opendbc/car/hyundai/values.py +++ b/opendbc_repo/opendbc/car/hyundai/values.py @@ -523,7 +523,6 @@ class CAR(Platforms): HyundaiCarDocs("Kia Carnival (China only) 2023", car_parts=CarParts.common([CarHarness.hyundai_k])) ], CarSpecs(mass=2087, wheelbase=3.09, steerRatio=14.23), - flags=HyundaiFlags.RADAR_SCC, ) # Genesis