EV6: supress LFA (#25094)

* EV6: supress LFA

* bump panda
old-commit-hash: f261b8a8c2
taco
Adeeb Shihadeh 3 years ago committed by GitHub
parent 314166f5fd
commit 4e8a036dfc
  1. 2
      opendbc
  2. 2
      panda
  3. 3
      selfdrive/car/hyundai/carcontroller.py
  4. 5
      selfdrive/car/hyundai/carstate.py
  5. 5
      selfdrive/car/hyundai/hda2can.py

@ -1 +1 @@
Subproject commit 1e9693ce0916b896568dcd5558a670e67843c299 Subproject commit 9fc90a9f5816ed82e0f25f2eaf7ad4af3d45733e

@ -1 +1 @@
Subproject commit 53466f09344c8ff6cdce3b19df76b5bca79e1327 Subproject commit ca927fe9312651a16f13aaddca8b46af5315ede6

@ -75,6 +75,9 @@ class CarController:
# steering control # steering control
can_sends.append(hda2can.create_lkas(self.packer, CC.enabled, self.frame, CC.latActive, apply_steer)) 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 # cruise cancel
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25: if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
if CC.cruiseControl.cancel: if CC.cruiseControl.cancel:

@ -172,6 +172,7 @@ class CarState(CarStateBase):
ret.cruiseState.speed = cp.vl["CRUISE_INFO"]["SET_SPEED"] * speed_factor ret.cruiseState.speed = cp.vl["CRUISE_INFO"]["SET_SPEED"] * speed_factor
self.buttons_counter = cp.vl["CRUISE_BUTTONS"]["_COUNTER"] self.buttons_counter = cp.vl["CRUISE_BUTTONS"]["_COUNTER"]
self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"])
return ret return ret
@ -313,7 +314,9 @@ class CarState(CarStateBase):
@staticmethod @staticmethod
def get_cam_can_parser(CP): def get_cam_can_parser(CP):
if CP.carFingerprint in HDA2_CAR: 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 = [ signals = [
# signal_name, signal_address # signal_name, signal_address

@ -12,6 +12,11 @@ def create_lkas(packer, enabled, frame, lat_active, apply_steer):
} }
return packer.make_can_msg("LKAS", 4, values, frame % 255) 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): def create_buttons(packer, cnt, cancel, resume):
values = { values = {

Loading…
Cancel
Save