Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EV6: supress LFA #25094

Merged
merged 2 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opendbc
Submodule opendbc updated 1 files
+25 −0 kia_ev6.dbc
2 changes: 1 addition & 1 deletion panda
3 changes: 3 additions & 0 deletions selfdrive/car/hyundai/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def update(self, CC, CS):
# steering control
can_sends.append(hda2can.create_lkas(self.packer, CC.enabled, self.frame, CC.latActive, apply_steer))

if self.frame % 5 == 0:
can_sends.append(hda2can.create_cam_0x2a4(self.packer, self.frame, CS.cam_0x2a4))

# cruise cancel
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
if CC.cruiseControl.cancel:
Expand Down
5 changes: 4 additions & 1 deletion selfdrive/car/hyundai/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def update_hda2(self, cp, cp_cam):
ret.cruiseState.speed = cp.vl["CRUISE_INFO"]["SET_SPEED"] * speed_factor

self.buttons_counter = cp.vl["CRUISE_BUTTONS"]["_COUNTER"]
self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"])

return ret

Expand Down Expand Up @@ -313,7 +314,9 @@ def get_can_parser(CP):
@staticmethod
def get_cam_can_parser(CP):
if CP.carFingerprint in HDA2_CAR:
return None
signals = [(f"BYTE{i}", "CAM_0x2a4") for i in range(3, 24)]
checks = [("CAM_0x2a4", 20)]
return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 6)

signals = [
# signal_name, signal_address
Expand Down
5 changes: 5 additions & 0 deletions selfdrive/car/hyundai/hda2can.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ def create_lkas(packer, enabled, frame, lat_active, apply_steer):
}
return packer.make_can_msg("LKAS", 4, values, frame % 255)

def create_cam_0x2a4(packer, frame, camera_values):
camera_values.update({
"BYTE7": 0,
})
return packer.make_can_msg("CAM_0x2a4", 4, camera_values, frame % 255)

def create_buttons(packer, cnt, cancel, resume):
values = {
Expand Down