Lowercase to match DBC

This commit is contained in:
Jason Wen
2023-08-25 01:07:58 -04:00
parent c0a60ec45f
commit 7b92cebe5e
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -232,9 +232,9 @@ class CarState(CarStateBase):
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"])
for i in range(0x235, 0x248 + 1):
setattr(self, f"cam_0x{i:03X}", copy.copy(cp_cam.vl[f"CAM_0x{i:03X}"]))
setattr(self, f"cam_0x{i:03x}", copy.copy(cp_cam.vl[f"CAM_0x{i:03x}"]))
for i in range(0x360, 0x366 + 1):
setattr(self, f"cam_0x{i:03X}", copy.copy(cp_cam.vl[f"CAM_0x{i:03X}"]))
setattr(self, f"cam_0x{i:03x}", copy.copy(cp_cam.vl[f"CAM_0x{i:03x}"]))
return ret
@@ -341,9 +341,9 @@ class CarState(CarStateBase):
elif CP.flags & HyundaiFlags.CANFD_HDA2 and CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING:
messages += [("CAM_0x230", 33)]
for i in range(0x235, 0x248 + 1):
messages.append((f"CAM_0x{i:03X}", 33))
messages.append((f"CAM_0x{i:03x}", 33))
for i in range(0x360, 0x366 + 1):
messages.append((f"CAM_0x{i:03X}", 20))
messages.append((f"CAM_0x{i:03x}", 20))
elif CP.flags & HyundaiFlags.CANFD_CAMERA_SCC:
messages += [
("SCC_CONTROL", 50),
+4 -4
View File
@@ -74,12 +74,12 @@ def create_block_lfa(packer, CAN, CS):
ret.append(packer.make_can_msg("CAM_0x230", CAN.ACAN, cam_0x230_values))
for i in range(0x235, 0x248 + 1):
cam_1_values = {s: CS[f"cam_0x{i:03X}"][s] for s in ["COUNTER"]}
ret.append(packer.make_can_msg(f"CAM_0x{i:03X}", CAN.ACAN, cam_1_values))
cam_1_values = {s: CS[f"cam_0x{i:03x}"][s] for s in ["COUNTER"]}
ret.append(packer.make_can_msg(f"CAM_0x{i:03x}", CAN.ACAN, cam_1_values))
for i in range(0x360, 0x366 + 1):
cam_2_values = {s: CS[f"cam_0x{i:03X}"][s] for s in ["COUNTER"]}
ret.append(packer.make_can_msg(f"CAM_0x{i:03X}", CAN.ACAN, cam_2_values))
cam_2_values = {s: CS[f"cam_0x{i:03x}"][s] for s in ["COUNTER"]}
ret.append(packer.make_can_msg(f"CAM_0x{i:03x}", CAN.ACAN, cam_2_values))
return ret