mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 11:32:21 +08:00
ECU disable fallback stock HDA2 fix
When car is started in "ready" mode now stock acc will work as intended
This commit is contained in:
@@ -238,8 +238,9 @@ class CarController(CarControllerBase):
|
||||
else:
|
||||
# button presses
|
||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
||||
# cruise cancel
|
||||
if CC.cruiseControl.cancel:
|
||||
# cruise cancel - suppress when stock ACC is the fallback (ECU disable failed),
|
||||
# so openpilot doesn't fight/cancel the user's stock cruise
|
||||
if CC.cruiseControl.cancel and not self.ecu_disable_failed:
|
||||
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
can_sends.append(hyundaicanfd.create_acc_cancel(self.packer, self.CP, self.CAN, CS.cruise_info))
|
||||
self.last_button_frame = self.frame
|
||||
|
||||
@@ -301,7 +301,10 @@ class Car:
|
||||
for cfg in self.FPCP.safetyConfigs:
|
||||
cfg.safetyParam &= ~LONG_FLAG
|
||||
# Let stock ACC manage cruise (prevents "controls mismatch" error)
|
||||
# Clear openpilotLongitudinalControl so controlsd doesn't set
|
||||
# cruiseControl.override=True (which fights stock ACC and causes engage flicker)
|
||||
self.CP.pcmCruise = True
|
||||
self.CP.openpilotLongitudinalControl = False
|
||||
self.params.put("CarParams", self.CP.to_bytes())
|
||||
self.params.put("StarPilotCarParams", self.FPCP.to_bytes())
|
||||
# signal pandad to switch to car safety mode
|
||||
|
||||
Reference in New Issue
Block a user