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:
whoisdomi
2026-04-25 08:09:58 -05:00
committed by firestar5683
parent f074dcc3b5
commit e8d0d7bc3a
2 changed files with 6 additions and 2 deletions
@@ -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
+3
View File
@@ -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