FrogPilot features - Disable below steer speed event after it's been shown
This commit is contained in:
parent
0bd8bf7e43
commit
3cfe243970
@ -322,8 +322,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)
|
||||
|
@ -102,6 +102,9 @@ class CarInterfaceBase(ABC):
|
||||
self.params = Params()
|
||||
self.params_memory = Params("/dev/shm/params")
|
||||
|
||||
self.belowSteerSpeed_shown = False
|
||||
self.disable_belowSteerSpeed = False
|
||||
|
||||
@staticmethod
|
||||
def get_pid_accel_limits(CP, current_speed, cruise_speed):
|
||||
return ACCEL_MIN, ACCEL_MAX
|
||||
|
Loading…
x
Reference in New Issue
Block a user