add cameraFrameRate alert (#24152)

* add cameraFrameRate alert

* bump cereal
old-commit-hash: 1848050fd9
taco
Willem Melching 3 years ago committed by GitHub
parent 871ecc451b
commit a47666d1fd
  1. 2
      cereal
  2. 3
      selfdrive/controls/controlsd.py
  3. 6
      selfdrive/controls/lib/events.py

@ -1 +1 @@
Subproject commit 1620ce54ee878069f68a023ee12c6a9a7d7e29c7
Subproject commit 24c34d7bc037d01da254a9b423f246a950bec317

@ -356,11 +356,10 @@ class Controls:
# Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes
self.events.add(EventName.noGps)
# TODO: split into separate alerts
if not self.sm.all_alive(self.camera_packets):
self.events.add(EventName.cameraMalfunction)
elif not self.sm.all_freq_ok(self.camera_packets):
self.events.add(EventName.cameraMalfunction)
self.events.add(EventName.cameraFrameRate)
if self.sm['modelV2'].frameDropPerc > 20:
self.events.add(EventName.modeldLagging)

@ -491,10 +491,14 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = {
ET.PERMANENT: NormalPermanentAlert("Fan Malfunction", "Likely Hardware Issue"),
},
# Camera is not outputting frames at a constant framerate
# Camera is not outputting frames
EventName.cameraMalfunction: {
ET.PERMANENT: NormalPermanentAlert("Camera Malfunction", "Likely Hardware Issue"),
},
# Camera framerate too low
EventName.cameraFrameRate: {
ET.PERMANENT: NormalPermanentAlert("Camera Frame Rate Low", "Reboot your Device"),
},
# Unused
EventName.gpsMalfunction: {

Loading…
Cancel
Save