From ce36b82444db06cd0be1dcd171d198bfa8f643d8 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Thu, 24 Aug 2023 04:15:50 -0400 Subject: [PATCH] Try 0x364 --- opendbc | 2 +- panda | 2 +- selfdrive/car/hyundai/carcontroller.py | 2 +- selfdrive/car/hyundai/carstate.py | 4 ++-- selfdrive/car/hyundai/hyundaicanfd.py | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/opendbc b/opendbc index d6d0540ba2..aa8a3c432c 160000 --- a/opendbc +++ b/opendbc @@ -1 +1 @@ -Subproject commit d6d0540ba24523b46a506b15bf55d573bd65c65d +Subproject commit aa8a3c432cba45b366f528fab4ecf66a68e645f4 diff --git a/panda b/panda index 586ac91629..601881ef10 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit 586ac91629b364a285a2b844d953ff0c3673b705 +Subproject commit 601881ef1005061b83a0195777178ca975ced376 diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index ff50a83308..cfd805b900 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -116,7 +116,7 @@ class CarController: if not hda2_alt_steering: can_sends.append(hyundaicanfd.create_cam_0x2a4(self.packer, self.CAN, CS.cam_0x2a4)) elif hda2_alt_steering: - can_sends.append(hyundaicanfd.create_cam_0x230(self.packer, self.CAN, CS.cam_0x230)) + can_sends.append(hyundaicanfd.create_cam_0x364(self.packer, self.CAN, CS.cam_0x364)) # LFA and HDA icons if self.frame % 5 == 0 and (not hda2 or hda2_long): diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 5f6328f4fe..7313597abd 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -230,7 +230,7 @@ class CarState(CarStateBase): if self.CP.flags & HyundaiFlags.CANFD_HDA2 and not self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING: self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"]) if self.CP.flags & HyundaiFlags.CANFD_HDA2 and self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING: - self.cam_0x230 = copy.copy(cp_cam.vl["CAM_0x230"]) + self.cam_0x364 = copy.copy(cp_cam.vl["CAM_0x364"]) return ret @@ -335,7 +335,7 @@ class CarState(CarStateBase): if CP.flags & HyundaiFlags.CANFD_HDA2 and not CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING: messages += [("CAM_0x2a4", 20)] elif CP.flags & HyundaiFlags.CANFD_HDA2 and CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING: - messages += [("CAM_0x230", 33)] + messages += [("CAM_0x364", 33)] elif CP.flags & HyundaiFlags.CANFD_CAMERA_SCC: messages += [ ("SCC_CONTROL", 50), diff --git a/selfdrive/car/hyundai/hyundaicanfd.py b/selfdrive/car/hyundai/hyundaicanfd.py index fb63a54069..0df207f0d5 100644 --- a/selfdrive/car/hyundai/hyundaicanfd.py +++ b/selfdrive/car/hyundai/hyundaicanfd.py @@ -67,11 +67,11 @@ def create_cam_0x2a4(packer, CAN, cam_0x2a4): values["BYTE7"] = 0 return packer.make_can_msg("CAM_0x2a4", CAN.ACAN, values) -def create_cam_0x230(packer, CAN, cam_0x230): - values = {f"BYTE{i}": cam_0x230[f"BYTE{i}"] for i in range(3, 16)} - values['COUNTER'] = cam_0x230['COUNTER'] - values["BYTE4"] = 0 - return packer.make_can_msg("CAM_0x230", CAN.ACAN, values) +def create_cam_0x364(packer, CAN, cam_0x364): + values = {f"BYTE{i}": cam_0x364[f"BYTE{i}"] for i in range(3, 32)} + values['COUNTER'] = cam_0x364['COUNTER'] + values["BYTE6"] = 0 + return packer.make_can_msg("CAM_0x364", CAN.ACAN, values) def create_buttons(packer, CP, CAN, cnt, btn): values = {