Quiet steer temp unavailable alert at standstill (#22680)

* only sound critical alert when not at standstill

* need to flip

* just change the one line
This commit is contained in:
sshane
2021-10-25 16:28:05 -05:00
committed by GitHub
parent b950bc2c17
commit 82ad6642e2
+2 -1
View File
@@ -144,7 +144,8 @@ class CarInterfaceBase():
elif cs_out.steerWarning:
# only escalate to the harsher alert after the condition has
# persisted for 0.5s and we're certain that the user isn't overriding
if self.steering_unpressed > int(0.5/DT_CTRL) and self.steer_warning > int(0.5/DT_CTRL):
if not cs_out.standstill and self.steering_unpressed > int(0.5 / DT_CTRL) and \
self.steer_warning > int(0.5 / DT_CTRL):
events.add(EventName.steerTempUnavailable)
else:
events.add(EventName.steerTempUnavailableSilent)