diff --git a/opendbc/car/hyundai/carcontroller.py b/opendbc/car/hyundai/carcontroller.py index 7533a401ef..c8a18e0dd1 100644 --- a/opendbc/car/hyundai/carcontroller.py +++ b/opendbc/car/hyundai/carcontroller.py @@ -102,9 +102,11 @@ def update(self, CC, CS, now_nanos): if self.CP.flags & HyundaiFlags.ENABLE_BLINKERS: can_sends.append(make_tester_present_msg(0x7b1, self.CAN.ECAN, suppress_response=True)) + can_canfd_hybrid = self.CP.flags & HyundaiFlags.CAN_CANFD_HYBRID + # CAN-FD platforms + hda2 = self.CP.flags & HyundaiFlags.CANFD_HDA2 if self.CP.carFingerprint in CANFD_CAR: - hda2 = self.CP.flags & HyundaiFlags.CANFD_HDA2 hda2_long = hda2 and self.CP.openpilotLongitudinalControl # steering control @@ -132,7 +134,7 @@ def update(self, CC, CS, now_nanos): self.accel_last = accel else: # button presses - can_sends.extend(self.create_button_messages(CC, CS, use_clu11=False)) + can_sends.extend(self.create_button_messages(CC, CS, use_clu11=(hda2 and can_canfd_hybrid))) else: can_sends.append(hyundaican.create_lkas11(self.packer, self.frame, self.CP, apply_steer, apply_steer_req, torque_fault, CS.lkas11, sys_warning, sys_state, CC.enabled, @@ -174,12 +176,12 @@ def create_button_messages(self, CC: structs.CarControl, CS: CarState, use_clu11 can_sends = [] if use_clu11: if CC.cruiseControl.cancel: - can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP)) + can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP, self.CAN)) elif CC.cruiseControl.resume: # send resume at a max freq of 10Hz if (self.frame - self.last_button_frame) * DT_CTRL > 0.1: # send 25 messages at a time to increases the likelihood of resume being accepted - can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.RES_ACCEL, self.CP)] * 25) + can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.RES_ACCEL, self.CP, self.CAN)] * 25) if (self.frame - self.last_button_frame) * DT_CTRL >= 0.15: self.last_button_frame = self.frame else: diff --git a/opendbc/car/hyundai/carstate.py b/opendbc/car/hyundai/carstate.py index a8f4bd9c39..5942fdfa3d 100644 --- a/opendbc/car/hyundai/carstate.py +++ b/opendbc/car/hyundai/carstate.py @@ -8,7 +8,7 @@ from opendbc.car.common.conversions import Conversions as CV from opendbc.car.hyundai.hyundaicanfd import CanBus from opendbc.car.hyundai.values import HyundaiFlags, CAR, DBC, CAN_GEARS, CAMERA_SCC_CAR, \ - CANFD_CAR, Buttons, CarControllerParams + CANFD_CAR, Buttons, CarControllerParams, CAN_CANFD_HYBRID_CAR from opendbc.car.interfaces import CarStateBase ButtonType = structs.CarState.ButtonEvent.Type @@ -32,7 +32,7 @@ def __init__(self, CP): self.gear_msg_canfd = "GEAR_ALT" if CP.flags & HyundaiFlags.CANFD_ALT_GEARS else \ "GEAR_ALT_2" if CP.flags & HyundaiFlags.CANFD_ALT_GEARS_2 else \ "GEAR_SHIFTER" - if CP.carFingerprint in CANFD_CAR: + if CP.carFingerprint in (CANFD_CAR - CAN_CANFD_HYBRID_CAR): self.shifter_values = can_define.dv[self.gear_msg_canfd]["GEAR"] elif self.CP.carFingerprint in CAN_GEARS["use_cluster_gears"]: self.shifter_values = can_define.dv["CLU15"]["CF_Clu_Gear"] @@ -58,7 +58,7 @@ def __init__(self, CP): self.params = CarControllerParams(CP) def update(self, cp, cp_cam, *_) -> structs.CarState: - if self.CP.carFingerprint in CANFD_CAR: + if self.CP.carFingerprint in (CANFD_CAR - CAN_CANFD_HYBRID_CAR): return self.update_canfd(cp, cp_cam) ret = structs.CarState() @@ -112,11 +112,12 @@ def update(self, cp, cp_cam, *_) -> structs.CarState: ret.cruiseState.standstill = False ret.cruiseState.nonAdaptive = False else: - ret.cruiseState.available = cp_cruise.vl["SCC11"]["MainMode_ACC"] == 1 + scc_bus = "SCC12" if self.CP.flags & HyundaiFlags.CAN_CANFD_HYBRID else "SCC11" + ret.cruiseState.available = cp_cruise.vl[scc_bus]["MainMode_ACC"] == 1 ret.cruiseState.enabled = cp_cruise.vl["SCC12"]["ACCMode"] != 0 - ret.cruiseState.standstill = cp_cruise.vl["SCC11"]["SCCInfoDisplay"] == 4. - ret.cruiseState.nonAdaptive = cp_cruise.vl["SCC11"]["SCCInfoDisplay"] == 2. # Shows 'Cruise Control' on dash - ret.cruiseState.speed = cp_cruise.vl["SCC11"]["VSetDis"] * speed_conv + ret.cruiseState.standstill = cp_cruise.vl[scc_bus]["SCCInfoDisplay"] == 4. + ret.cruiseState.nonAdaptive = cp_cruise.vl[scc_bus]["SCCInfoDisplay"] == 2. # Shows 'Cruise Control' on dash + ret.cruiseState.speed = cp_cruise.vl[scc_bus]["VSetDis"] * speed_conv # TODO: Find brake pressure ret.brake = 0 @@ -150,7 +151,7 @@ def update(self, cp, cp_cam, *_) -> structs.CarState: ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(gear)) - if not self.CP.openpilotLongitudinalControl: + if not self.CP.openpilotLongitudinalControl and not (self.CP.flags & HyundaiFlags.CAN_CANFD_HYBRID): aeb_src = "FCA11" if self.CP.flags & HyundaiFlags.USE_FCA.value else "SCC12" aeb_sig = "FCA_CmdAct" if self.CP.flags & HyundaiFlags.USE_FCA.value else "AEB_CmdAct" aeb_warning = cp_cruise.vl[aeb_src]["CF_VSM_Warn"] != 0 @@ -164,13 +165,17 @@ def update(self, cp, cp_cam, *_) -> structs.CarState: ret.rightBlindspot = cp.vl["LCA11"]["CF_Lca_IndRight"] != 0 # save the entire LKAS11 and CLU11 - self.lkas11 = copy.copy(cp_cam.vl["LKAS11"]) + if not (self.CP.flags & HyundaiFlags.CAN_CANFD_HYBRID): + self.lkas11 = copy.copy(cp_cam.vl["LKAS11"]) self.clu11 = copy.copy(cp.vl["CLU11"]) self.steer_state = cp.vl["MDPS12"]["CF_Mdps_ToiActive"] # 0 NOT ACTIVE, 1 ACTIVE prev_cruise_buttons = self.cruise_buttons[-1] self.cruise_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwState"]) self.main_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwMain"]) + if self.CP.flags & (HyundaiFlags.CAN_CANFD_HYBRID | HyundaiFlags.CANFD_HDA2): + self.hda2_lfa_block_msg = copy.copy(cp_cam.vl["CAM_0x2a4"]) + if self.CP.openpilotLongitudinalControl: ret.buttonEvents = create_button_events(self.cruise_buttons[-1], prev_cruise_buttons, BUTTONS_DICT) @@ -262,12 +267,14 @@ def update_canfd(self, cp, cp_cam) -> structs.CarState: return ret def get_can_parser(self, CP): - if CP.carFingerprint in CANFD_CAR: + if CP.carFingerprint in (CANFD_CAR - CAN_CANFD_HYBRID_CAR): return self.get_can_parser_canfd(CP) + mdps12_freq = 100 if CP.flags & HyundaiFlags.CAN_CANFD_HYBRID else 50 + messages = [ # address, frequency - ("MDPS12", 50), + ("MDPS12", mdps12_freq), ("TCS11", 100), ("TCS13", 50), ("TCS15", 10), @@ -281,7 +288,7 @@ def get_can_parser(self, CP): ("SAS11", 100), ] - if not CP.openpilotLongitudinalControl and CP.carFingerprint not in CAMERA_SCC_CAR: + if not CP.openpilotLongitudinalControl and not CP.flags & (HyundaiFlags.CAMERA_SCC | HyundaiFlags.CAN_CANFD_HYBRID): messages += [ ("SCC11", 50), ("SCC12", 50), @@ -289,8 +296,12 @@ def get_can_parser(self, CP): if CP.flags & HyundaiFlags.USE_FCA.value: messages.append(("FCA11", 50)) + if not CP.openpilotLongitudinalControl and CP.flags & HyundaiFlags.CAN_CANFD_HYBRID: + messages.append(("SCC12", 50)) + if CP.enableBsm: - messages.append(("LCA11", 50)) + bsm_freq = 20 if CP.flags & HyundaiFlags.CAN_CANFD_HYBRID else 50 + messages.append(("LCA11", bsm_freq)) if CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV): messages.append(("E_EMS11", 50)) @@ -309,16 +320,20 @@ def get_can_parser(self, CP): else: messages.append(("LVR12", 100)) - return CANParser(DBC[CP.carFingerprint]["pt"], messages, 0) + bus = CanBus(CP).ECAN if CP.flags & HyundaiFlags.CAN_CANFD_HYBRID else 0 + return CANParser(DBC[CP.carFingerprint]["pt"], messages, bus) @staticmethod def get_cam_can_parser(CP): - if CP.carFingerprint in CANFD_CAR: + if CP.carFingerprint in (CANFD_CAR - CAN_CANFD_HYBRID_CAR): return CarState.get_cam_can_parser_canfd(CP) - messages = [ - ("LKAS11", 100) - ] + messages = [] + + if CP.flags & HyundaiFlags.CAN_CANFD_HYBRID: + messages.append(("CAM_0x2a4", 20)) + else: + messages.append(("LKAS11", 100)) if not CP.openpilotLongitudinalControl and CP.carFingerprint in CAMERA_SCC_CAR: messages += [ @@ -329,7 +344,8 @@ def get_cam_can_parser(CP): if CP.flags & HyundaiFlags.USE_FCA.value: messages.append(("FCA11", 50)) - return CANParser(DBC[CP.carFingerprint]["pt"], messages, 2) + bus = CanBus(CP).CAM if CP.flags & HyundaiFlags.CAN_CANFD_HYBRID else 2 + return CANParser(DBC[CP.carFingerprint]["pt"], messages, bus) def get_can_parser_canfd(self, CP): messages = [ diff --git a/opendbc/car/hyundai/fingerprints.py b/opendbc/car/hyundai/fingerprints.py index d243ec566d..2eeca4e81d 100644 --- a/opendbc/car/hyundai/fingerprints.py +++ b/opendbc/car/hyundai/fingerprints.py @@ -1139,4 +1139,21 @@ b'\xf1\x00US4_ RDR ----- 1.00 1.00 99110-CG000 ', ], }, + CAR.HYUNDAI_PALISADE_2023: { + (Ecu.fwdCamera, 0x7c4, None): [ + b'\xf1\x00LX2 MFC AT USA LHD 1.00 1.04 99211-S8150 220622', + b'\xf1\x00ON MFC AT USA LHD 1.00 1.01 99211-S9150 220708', + b'\xf1\x00LX2 MFC AT USA LHD 1.00 1.03 99211-S8150 220527', + b'\xf1\x00ON MFC AT USA LHD 1.00 1.00 99211-S9160 230303', + b'\xf1\x00LX2 MFC AT USA LHD 1.00 1.00 99211-S8600 230317', + b'\xf1\x00LX2 MFC AT USA LHD 1.00 1.01 99211-S8600 230817', + ], + (Ecu.fwdRadar, 0x7d0, None): [ + b'\xf1\x00LX2_ SCC ----- 1.00 1.01 99110-S8150 ', + b'\xf1\x00ON__ SCC ----- 1.00 1.01 99110-S9150 ', + b'\xf1\x00LX2_ SCC ----- 1.00 1.00 99110-S8150 ', + b'\xf1\x00ON__ SCC ----- 1.00 1.00 99110-S9160 ', + b'\xf1\x00LX2_ SCC ----- 1.00 1.00 99110-S8600 ', + ], + }, } diff --git a/opendbc/car/hyundai/hyundaican.py b/opendbc/car/hyundai/hyundaican.py index 0b65a8aed8..704f04e579 100644 --- a/opendbc/car/hyundai/hyundaican.py +++ b/opendbc/car/hyundai/hyundaican.py @@ -95,7 +95,7 @@ def create_lkas11(packer, frame, CP, apply_steer, steer_req, return packer.make_can_msg("LKAS11", 0, values) -def create_clu11(packer, frame, clu11, button, CP): +def create_clu11(packer, frame, clu11, button, CP, CAN): values = {s: clu11[s] for s in [ "CF_Clu_CruiseSwState", "CF_Clu_CruiseSwMain", @@ -112,8 +112,14 @@ def create_clu11(packer, frame, clu11, button, CP): ]} values["CF_Clu_CruiseSwState"] = button values["CF_Clu_AliveCnt1"] = frame % 0x10 - # send buttons to camera on camera-scc based cars - bus = 2 if CP.flags & HyundaiFlags.CAMERA_SCC else 0 + + if CP.flags & HyundaiFlags.CAMERA_SCC: # send buttons to camera on camera-scc based cars + bus = 2 + elif CP.flags & HyundaiFlags.CAN_CANFD_HYBRID: + bus = CAN.ECAN + else: + bus = 0 + return packer.make_can_msg("CLU11", bus, values) diff --git a/opendbc/car/hyundai/interface.py b/opendbc/car/hyundai/interface.py index 27df5b556d..f00c86c5b9 100644 --- a/opendbc/car/hyundai/interface.py +++ b/opendbc/car/hyundai/interface.py @@ -3,7 +3,7 @@ from opendbc.car.hyundai.hyundaicanfd import CanBus from opendbc.car.hyundai.values import HyundaiFlags, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, \ CANFD_UNSUPPORTED_LONGITUDINAL_CAR, EV_CAR, HYBRID_CAR, LEGACY_SAFETY_MODE_CAR, \ - UNSUPPORTED_LONGITUDINAL_CAR, Buttons + UNSUPPORTED_LONGITUDINAL_CAR, CAN_CANFD_HYBRID_CAR, Buttons from opendbc.car.hyundai.radar_interface import RADAR_START_ADDR from opendbc.car.interfaces import CarInterfaceBase from opendbc.car.disable_ecu import disable_ecu @@ -19,25 +19,29 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.carName = "hyundai" ret.radarUnavailable = RADAR_START_ADDR not in fingerprint[1] or DBC[ret.carFingerprint]["radar"] is None + hda2 = Ecu.adas in [fw.ecu for fw in car_fw] + CAN = CanBus(None, hda2, fingerprint) + # These cars have been put into dashcam only due to both a lack of users and test coverage. # These cars likely still work fine. Once a user confirms each car works and a test route is # added to opendbc/car/tests/routes.py, we can remove it from this list. # FIXME: the Optima Hybrid 2017 uses a different SCC12 checksum - ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, } + ret.dashcamOnly = candidate in {CAR.KIA_OPTIMA_H, } or (candidate in (CAR.HYUNDAI_PALISADE_2023, ) and not hda2) - hda2 = Ecu.adas in [fw.ecu for fw in car_fw] - CAN = CanBus(None, hda2, fingerprint) + pure_canfd_car = CANFD_CAR - CAN_CANFD_HYBRID_CAR + + # detect HDA2 with ADAS Driving ECU + if hda2: + ret.flags |= HyundaiFlags.CANFD_HDA2.value - if candidate in CANFD_CAR: + if candidate in pure_canfd_car: # detect if car is hybrid if 0x105 in fingerprint[CAN.ECAN]: ret.flags |= HyundaiFlags.HYBRID.value elif candidate in EV_CAR: ret.flags |= HyundaiFlags.EV.value - # detect HDA2 with ADAS Driving ECU if hda2: - ret.flags |= HyundaiFlags.CANFD_HDA2.value if 0x110 in fingerprint[CAN.CAM]: ret.flags |= HyundaiFlags.CANFD_HDA2_ALT_STEERING.value else: @@ -75,7 +79,7 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.steerActuatorDelay = 0.2 # *** longitudinal control *** - if candidate in CANFD_CAR: + if candidate in pure_canfd_car: ret.experimentalLongitudinalAvailable = candidate not in (CANFD_UNSUPPORTED_LONGITUDINAL_CAR | CANFD_RADAR_SCC_CAR) else: ret.experimentalLongitudinalAvailable = candidate not in (UNSUPPORTED_LONGITUDINAL_CAR | CAMERA_SCC_CAR) @@ -89,20 +93,20 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.longitudinalActuatorDelay = 0.5 # *** feature detection *** - if candidate in CANFD_CAR: + if candidate in pure_canfd_car: ret.enableBsm = 0x1e5 in fingerprint[CAN.ECAN] else: - ret.enableBsm = 0x58b in fingerprint[0] + bus = CAN.ECAN if ret.flags & HyundaiFlags.CAN_CANFD_HYBRID else 0 + ret.enableBsm = 0x58b in fingerprint[bus] # *** panda safety config *** - if candidate in CANFD_CAR: + if candidate in pure_canfd_car: cfgs = [get_safety_config(structs.CarParams.SafetyModel.hyundaiCanfd), ] if CAN.ECAN >= 4: cfgs.insert(0, get_safety_config(structs.CarParams.SafetyModel.noOutput)) ret.safetyConfigs = cfgs if ret.flags & HyundaiFlags.CANFD_HDA2: - ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_HDA2 if ret.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING: ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_HDA2_ALT_STEERING if ret.flags & HyundaiFlags.CANFD_ALT_BUTTONS: @@ -114,11 +118,19 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime # these cars require a special panda safety mode due to missing counters and checksums in the messages ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.hyundaiLegacy)] else: - ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.hyundai, 0)] + cfgs = [get_safety_config(structs.CarParams.SafetyModel.hyundai), ] + if CAN.ECAN >= 4: + cfgs.insert(0, get_safety_config(structs.CarParams.SafetyModel.noOutput)) + ret.safetyConfigs = cfgs if candidate in CAMERA_SCC_CAR: ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_CAMERA_SCC + if candidate in CAN_CANFD_HYBRID_CAR: + ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CAN_CANFD_HYBRID + + if ret.flags & HyundaiFlags.CANFD_HDA2: + ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_HDA2 if ret.openpilotLongitudinalControl: ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_LONG if ret.flags & HyundaiFlags.HYBRID: diff --git a/opendbc/car/hyundai/values.py b/opendbc/car/hyundai/values.py index cbf3688f5e..5c319fcebc 100644 --- a/opendbc/car/hyundai/values.py +++ b/opendbc/car/hyundai/values.py @@ -33,6 +33,10 @@ def __init__(self, CP): self.STEER_DELTA_UP = 2 self.STEER_DELTA_DOWN = 3 + if CP.carFingerprint in CAN_CANFD_HYBRID_CAR: + self.STEER_MAX = 384 + self.STEER_DRIVER_ALLOWANCE = 250 + # To determine the limit for your car, find the maximum value that the stock LKAS will request. # If the max stock LKAS request is <384, add your car to this list. elif CP.carFingerprint in (CAR.GENESIS_G80, CAR.GENESIS_G90, CAR.HYUNDAI_ELANTRA, CAR.HYUNDAI_ELANTRA_GT_I30, CAR.HYUNDAI_IONIQ, @@ -95,6 +99,8 @@ class HyundaiFlags(IntFlag): MIN_STEER_32_MPH = 2 ** 23 + CAN_CANFD_HYBRID = 2 ** 24 + class Footnote(Enum): CANFD = CarFootnote( @@ -126,11 +132,14 @@ def init(self): @dataclass class HyundaiCanFDPlatformConfig(PlatformConfig): - dbc_dict: DbcDict = field(default_factory=lambda: dbc_dict("hyundai_canfd", None)) + dbc_dict: DbcDict = field(default_factory=lambda: dbc_dict("hyundai_canfd_generated", None)) def init(self): self.flags |= HyundaiFlags.CANFD + if self.flags & HyundaiFlags.CAN_CANFD_HYBRID: + self.dbc_dict = dbc_dict('hyundai_palisade_2023_generated', None) + class CAR(Platforms): # Hyundai @@ -294,6 +303,14 @@ class CAR(Platforms): CarSpecs(mass=1999, wheelbase=2.9, steerRatio=15.6 * 1.15, tireStiffnessFactor=0.63), flags=HyundaiFlags.MANDO_RADAR | HyundaiFlags.CHECKSUM_CRC8, ) + HYUNDAI_PALISADE_2023 = HyundaiCanFDPlatformConfig( + [ + HyundaiCarDocs("Hyundai Palisade (with HDA II) 2023-24", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_r])), + HyundaiCarDocs("Kia Telluride (with HDA II) 2023-24", "Highway Driving Assist II", car_parts=CarParts.common([CarHarness.hyundai_p])), + ], + HYUNDAI_PALISADE.specs, + flags=HyundaiFlags.CHECKSUM_CRC8 | HyundaiFlags.CAN_CANFD_HYBRID | HyundaiFlags.UNSUPPORTED_LONGITUDINAL, + ) HYUNDAI_VELOSTER = HyundaiPlatformConfig( [HyundaiCarDocs("Hyundai Veloster 2019-20", min_enable_speed=5. * CV.MPH_TO_MS, car_parts=CarParts.common([CarHarness.hyundai_e]))], CarSpecs(mass=2917 * CV.LB_TO_KG, wheelbase=2.8, steerRatio=13.75 * 1.15, tireStiffnessFactor=0.5), @@ -574,7 +591,7 @@ def match_fw_to_car_fuzzy(live_fw_versions, vin, offline_fw_versions) -> set[str # Non-electric CAN FD platforms often do not have platform code specifiers needed # to distinguish between hybrid and ICE. All EVs so far are either exclusively # electric or specify electric in the platform code. - fuzzy_platform_blacklist = {str(c) for c in (CANFD_CAR - EV_CAR - CANFD_FUZZY_WHITELIST)} + fuzzy_platform_blacklist = {str(c) for c in (CANFD_CAR - CAN_CANFD_HYBRID_CAR - EV_CAR - CANFD_FUZZY_WHITELIST)} candidates: set[str] = set() for candidate, fws in offline_fw_versions.items(): @@ -733,6 +750,7 @@ def match_fw_to_car_fuzzy(live_fw_versions, vin, offline_fw_versions) -> set[str CANFD_CAR = CAR.with_flags(HyundaiFlags.CANFD) CANFD_RADAR_SCC_CAR = CAR.with_flags(HyundaiFlags.RADAR_SCC) +CAN_CANFD_HYBRID_CAR = CAR.with_flags(HyundaiFlags.CAN_CANFD_HYBRID) # These CAN FD cars do not accept communication control to disable the ADAS ECU, # responds with 0x7F2822 - 'conditions not correct' diff --git a/opendbc/car/tests/routes.py b/opendbc/car/tests/routes.py index 8b6ea9dfaf..12902513cb 100644 --- a/opendbc/car/tests/routes.py +++ b/opendbc/car/tests/routes.py @@ -133,6 +133,7 @@ class CarTestRoute(NamedTuple): CarTestRoute("fc19648042eb6896|2023-08-16--11-43-27", HYUNDAI.KIA_SORENTO_HEV_4TH_GEN, segment=14), CarTestRoute("628935d7d3e5f4f7|2022-11-30--01-12-46", HYUNDAI.KIA_SORENTO_HEV_4TH_GEN), # plug-in hybrid CarTestRoute("9c917ba0d42ffe78|2020-04-17--12-43-19", HYUNDAI.HYUNDAI_PALISADE), + CarTestRoute("696748e0ac8082fb|2023-08-31--14-25-28", HYUNDAI.HYUNDAI_PALISADE_2023), # HDA2 CarTestRoute("05a8f0197fdac372|2022-10-19--14-14-09", HYUNDAI.HYUNDAI_IONIQ_5), # HDA2 CarTestRoute("eb4eae1476647463|2023-08-26--18-07-04", HYUNDAI.HYUNDAI_IONIQ_6, segment=6), # HDA2 CarTestRoute("3f29334d6134fcd4|2022-03-30--22-00-50", HYUNDAI.HYUNDAI_IONIQ_PHEV_2019), diff --git a/opendbc/car/torque_data/override.toml b/opendbc/car/torque_data/override.toml index 3f881cac34..c6f09be87e 100644 --- a/opendbc/car/torque_data/override.toml +++ b/opendbc/car/torque_data/override.toml @@ -65,6 +65,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "HYUNDAI_CUSTIN_1ST_GEN" = [2.5, 2.5, 0.1] "LEXUS_GS_F" = [2.5, 2.5, 0.08] "HYUNDAI_STARIA_4TH_GEN" = [1.8, 2.0, 0.15] +"HYUNDAI_PALISADE_2023" = [2.32, 2.32, 0.05] # Dashcam or fallback configured as ideal car "MOCK" = [10.0, 10, 0.0]