Disable below steer speed event after it's been shown

This commit is contained in:
FrogAi
2024-04-08 15:21:18 -07:00
parent 3fa74b1987
commit 64674d7f21
2 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -295,8 +295,13 @@ class CarInterface(CarInterfaceBase):
events.add(EventName.belowEngageSpeed)
if ret.cruiseState.standstill:
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)
+3
View File
@@ -105,6 +105,9 @@ class CarInterfaceBase(ABC):
lateral_tune = self.params.get_bool("LateralTune")
self.belowSteerSpeed_shown = False
self.disable_belowSteerSpeed = False
@staticmethod
def get_pid_accel_limits(CP, current_speed, cruise_speed, frogpilot_variables):
if frogpilot_variables.sport_plus: