add cameraFrameRate alert (#24152)

* add cameraFrameRate alert

* bump cereal
old-commit-hash: 1848050fd980a04dfc70454547ab7b52affe2917
This commit is contained in:
Willem Melching
2022-04-06 17:11:39 -07:00
committed by GitHub
parent 871ecc451b
commit a47666d1fd
3 changed files with 7 additions and 4 deletions
+1 -1
Submodule cereal updated: 1620ce54ee...24c34d7bc0
+1 -2
View File
@@ -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)
+5 -1
View File
@@ -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: {