mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 11:02:19 +08:00
EV6: supress LFA (#25094)
* EV6: supress LFA * bump panda old-commit-hash: f261b8a8c29fb2c9c5fee3b382e12e7887d50269
This commit is contained in:
+1
-1
Submodule opendbc updated: 1e9693ce09...9fc90a9f58
+1
-1
Submodule panda updated: 53466f0934...ca927fe931
@@ -75,6 +75,9 @@ class CarController:
|
||||
# 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:
|
||||
|
||||
@@ -172,6 +172,7 @@ class CarState(CarStateBase):
|
||||
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
|
||||
|
||||
@@ -313,7 +314,9 @@ class CarState(CarStateBase):
|
||||
@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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user