Hyundai CAN-FD HDA2: specify signals to suppress LFA (#29658)
* Hyundai CAN-FD HDA2: specify signals to suppress LFA * bump opendbc * Fix * Update comment * fix * closer to original * preserve behavior * Revert "preserve behavior" This reverts commit 6549c085ab6bdd093f7668e7df79cd85350bc028. * preserve behavior --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: 67177b2ca393f51a45a97fcdac14be454b224c8c
This commit is contained in:
2
opendbc
2
opendbc
Submodule opendbc updated: 25dd2b50fc...814763889d
@@ -110,7 +110,7 @@ class CarController:
|
||||
# steering control
|
||||
can_sends.extend(hyundaicanfd.create_steering_messages(self.packer, self.CP, self.CAN, CC.enabled, apply_steer_req, apply_steer))
|
||||
|
||||
# disable LFA on HDA2
|
||||
# prevent LFA from activating on HDA2 by sending "no lane lines detected" to ADAS ECU
|
||||
if self.frame % 5 == 0 and hda2:
|
||||
can_sends.append(hyundaicanfd.create_cam_0x2a4(self.packer, self.CAN, CS.cam_0x2a4))
|
||||
|
||||
|
||||
@@ -61,9 +61,12 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):
|
||||
return ret
|
||||
|
||||
def create_cam_0x2a4(packer, CAN, cam_0x2a4):
|
||||
values = {f"BYTE{i}": cam_0x2a4[f"BYTE{i}"] for i in range(3, 24)}
|
||||
values['COUNTER'] = cam_0x2a4['COUNTER']
|
||||
values["BYTE7"] = 0
|
||||
values = {f"BYTE{i}": cam_0x2a4[f"BYTE{i}"] for i in range(3, 24) if i != 7}
|
||||
values["COUNTER"] = cam_0x2a4["COUNTER"]
|
||||
values["SET_ME_0"] = 0
|
||||
values["SET_ME_0_2"] = 0
|
||||
values["LEFT_LANE_LINE"] = 0
|
||||
values["RIGHT_LANE_LINE"] = 0
|
||||
return packer.make_can_msg("CAM_0x2a4", CAN.ACAN, values)
|
||||
|
||||
def create_buttons(packer, CP, CAN, cnt, btn):
|
||||
|
||||
Reference in New Issue
Block a user