mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
model lag warning (#2608)
old-commit-hash: 2d7a194f9fd5e5b26b55e3aa9e33efc95c97be6e
This commit is contained in:
+1
-1
Submodule cereal updated: 3d09a7508f...f1a9b228c6
@@ -232,10 +232,13 @@ class Controls:
|
||||
self.events.add(EventName.relayMalfunction)
|
||||
if self.sm['plan'].fcw:
|
||||
self.events.add(EventName.fcw)
|
||||
if self.sm['model'].frameDropPerc > 2 and not SIMULATION:
|
||||
self.events.add(EventName.modeldLagging)
|
||||
if not self.sm.alive['frontFrame'] and (self.sm.frame > 5 / DT_CTRL) and not SIMULATION:
|
||||
self.events.add(EventName.cameraMalfunction)
|
||||
self.events.add(EventName.cameraMalfunction)
|
||||
|
||||
if self.sm['model'].frameDropPerc > 20 and not SIMULATION:
|
||||
self.events.add(EventName.modeldLagging)
|
||||
elif self.sm['model'].frameDropPerc > 2 and not SIMULATION:
|
||||
self.events.add(EventName.modelLagWarning)
|
||||
|
||||
# Only allow engagement with brake pressed when stopped behind another stopped car
|
||||
if CS.brakePressed and self.sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED \
|
||||
|
||||
@@ -451,6 +451,14 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 1., 1.),
|
||||
},
|
||||
|
||||
EventName.modelLagWarning: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Driving Model Lagging",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 1., 1.),
|
||||
},
|
||||
|
||||
EventName.fanMalfunction: {
|
||||
ET.PERMANENT: NormalPermanentAlert("Fan Malfunction", "Contact Support"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user