alerts: make soft disables an orange alert (#22925)

old-commit-hash: 833399e9418db26df70169d37c2dff90051d89c7
This commit is contained in:
Adeeb Shihadeh
2021-11-16 13:11:32 -08:00
committed by GitHub
parent 23dca7ffae
commit d1eacc4619
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -404,7 +404,7 @@ class Controls:
elif self.CP.pcmCruise and CS.cruiseState.enabled:
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
# decrease the soft disable timer at every step, as it's reset on
# decrement the soft disable timer at every step, as it's reset on
# entrance in SOFT_DISABLING state
self.soft_disable_timer = max(0, self.soft_disable_timer - 1)
@@ -426,7 +426,7 @@ class Controls:
if self.state == State.enabled:
if self.events.any(ET.SOFT_DISABLE):
self.state = State.softDisabling
self.soft_disable_timer = 300 # 3s
self.soft_disable_timer = int(3 / DT_CTRL)
self.current_alert_types.append(ET.SOFT_DISABLE)
# SOFT DISABLING
+1 -1
View File
@@ -149,7 +149,7 @@ class NoEntryAlert(Alert):
class SoftDisableAlert(Alert):
def __init__(self, alert_text_2):
super().__init__("TAKE CONTROL IMMEDIATELY", alert_text_2,
AlertStatus.critical, AlertSize.full,
AlertStatus.userPrompt, AlertSize.full,
Priority.MID, VisualAlert.steerRequired,
AudibleAlert.chimeWarningRepeatInfinite, 2.),