mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-26 01:02:06 +08:00
Try 0x364
This commit is contained in:
+1
-1
Submodule opendbc updated: d6d0540ba2...aa8a3c432c
+1
-1
Submodule panda updated: 586ac91629...601881ef10
@@ -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):
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user