Add permanent CAN error alert (#1549)

* Add permanent CAN error alert

* canValid needs some time to initialize

* update ref
pull/1551/head
Willem Melching 2020-05-21 16:08:05 -07:00 committed by GitHub
parent ab5af232b2
commit fcf879d783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -210,8 +210,8 @@ class Controls:
self.events.add(EventName.radarFault)
if self.sm['plan'].radarCanError:
self.events.add(EventName.radarCanError)
if not CS.canValid:
self.events.add(EventName.canError)
if not CS.canValid and self.sm.frame > 5 / DT_CTRL:
self.events.add(EventName.canError)
if log.HealthData.FaultType.relayMalfunction in self.sm['health'].faults:
self.events.add(EventName.relayMalfunction)
if self.sm['plan'].fcw:

View File

@ -607,6 +607,11 @@ EVENTS = {
EventName.canError: {
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN Error: Check Connections"),
ET.NO_ENTRY: NoEntryAlert("CAN Error: Check Connections"),
ET.PERMANENT: Alert(
"CAN Error: Check Connections",
"",
AlertStatus.normal, AlertSize.small,
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
},
EventName.steerUnavailable: {

View File

@ -1 +1 @@
59bd32350139796784708f51c233d37c18f33e6e
dadb4f96017c4f6b36fd829c41315b0a7f31c8e5