diff --git a/opendbc_repo/opendbc/car/hyundai/carcontroller.py b/opendbc_repo/opendbc/car/hyundai/carcontroller.py index 5fd126118..660ec5fc1 100644 --- a/opendbc_repo/opendbc/car/hyundai/carcontroller.py +++ b/opendbc_repo/opendbc/car/hyundai/carcontroller.py @@ -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 diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index b6f7707c9..54275c608 100644 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -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