High speed alert (#1295)

* add speed to high alerts

* Add permanent alert

* Two lines

* No permanent alerts

* Less bad alert

* Typo
old-commit-hash: 3cb1568a546426eb36c0e206db9dea23aa7a886a
This commit is contained in:
Willem Melching
2020-03-30 18:41:56 -07:00
committed by GitHub
parent 7ca8cb85e9
commit aa8ca1819d
2 changed files with 18 additions and 0 deletions

View File

@@ -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.

View File

@@ -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",