diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 7d272fb8ce..a92744cc21 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -116,6 +116,9 @@ def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter else: events.append(create_event('calibrationInvalid', [ET.NO_ENTRY, ET.SOFT_DISABLE])) + if CS.vEgo > 92 * CV.MPH_TO_MS: + events.append(create_event('speedTooHigh', [ET.NO_ENTRY, ET.SOFT_DISABLE])) + # When the panda and controlsd do not agree on controls_allowed # we want to disengage openpilot. However the status from the panda goes through # another socket other than the CAN messages and one can arrive earlier than the other. diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index d548480a5a..7ddb9f86c6 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -503,6 +503,7 @@ ALERTS = [ AlertStatus.critical, AlertSize.full, Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.), + # not loud cancellations (user is in control) Alert( "noTarget", @@ -518,6 +519,13 @@ ALERTS = [ AlertStatus.normal, AlertSize.mid, Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + Alert( + "speedTooHigh", + "Speed Too High", + "Slow down to resume operation", + AlertStatus.normal, AlertSize.mid, + Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + # Cancellation alerts causing non-entry Alert( "overheatNoEntry", @@ -687,6 +695,13 @@ ALERTS = [ AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + Alert( + "speedTooHighNoEntry", + "Speed Too High", + "Slow down to engage", + AlertStatus.normal, AlertSize.mid, + Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.), + # permanent alerts Alert( "steerUnavailablePermanent",