diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index f166c033e..131102d92 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -330,8 +330,13 @@ class CarInterface(CarInterfaceBase): events.add(EventName.belowEngageSpeed) if ret.cruiseState.standstill and not self.CP.autoResumeSng: events.add(EventName.resumeRequired) - if ret.vEgo < self.CP.minSteerSpeed: + if ret.vEgo < self.CP.minSteerSpeed and not self.disable_belowSteerSpeed: events.add(EventName.belowSteerSpeed) + self.belowSteerSpeed_shown = True + + # Disable the "belowSteerSpeed" event after it's been shown once to not annoy the driver + if self.belowSteerSpeed_shown and ret.vEgo >= self.CP.minSteerSpeed: + self.disable_belowSteerSpeed = True if (self.CP.flags & GMFlags.CC_LONG.value) and ret.vEgo < self.CP.minEnableSpeed and ret.cruiseState.enabled: events.add(EventName.speedTooLow) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index b5ca203ec..76e023e39 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -115,6 +115,9 @@ class CarInterfaceBase(ABC): self.params = Params() self.params_memory = Params("/dev/shm/params") + self.belowSteerSpeed_shown = False + self.disable_belowSteerSpeed = False + def apply(self, c: car.CarControl, now_nanos: int, frogpilot_toggles) -> tuple[car.CarControl.Actuators, list[tuple[int, int, bytes, int]]]: return self.CC.update(c, self.CS, now_nanos, frogpilot_toggles)