fix camera malfunction alert on startup

This commit is contained in:
Adeeb Shihadeh 2020-10-26 19:20:14 -07:00
parent 2065c026db
commit 159e5d40ea

View file

@ -237,7 +237,7 @@ class Controls:
self.events.add(EventName.fcw)
if self.sm['model'].frameDropPerc > 1 and not SIMULATION:
self.events.add(EventName.modeldLagging)
if not self.sm.alive['frontFrame'] and not SIMULATION:
if not self.sm.alive['frontFrame'] and (self.sm.frame > 5 / DT_CTRL) and not SIMULATION:
self.events.add(EventName.cameraMalfunction)
# Only allow engagement with brake pressed when stopped behind another stopped car