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 6549c085ab.

* preserve behavior

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/29699/head
Jason Wen 2 years ago committed by GitHub
parent 97865d751f
commit 67177b2ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      opendbc
  2. 2
      selfdrive/car/hyundai/carcontroller.py
  3. 9
      selfdrive/car/hyundai/hyundaicanfd.py

@ -1 +1 @@
Subproject commit 25dd2b50fc93ff6a25b99b72c664b9c37413097d
Subproject commit 814763889df3d1f19112a9628dfb4d1f17c0c533

@ -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):

Loading…
Cancel
Save