mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 07:03:44 +08:00
ui: big model failed alert (#38629)
* big model failed + supply voltage check * remove ltssm and supply voltage stuff for seperate PR
This commit is contained in:
@@ -409,7 +409,8 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
||||
},
|
||||
|
||||
EventName.bigModelFailed: {
|
||||
ET.PERMANENT: NormalPermanentAlert("Big Model Failed ", "Restart the car to retry,\nnow driving on small model", duration=20.),
|
||||
ET.SOFT_DISABLE: soft_disable_alert("Big Model Failed"),
|
||||
ET.PERMANENT: NormalPermanentAlert("Big Model Failed ", "Restart the car to retry,\nsmall model is still available", duration=20.),
|
||||
},
|
||||
|
||||
EventName.lateralManeuver: {
|
||||
|
||||
@@ -343,6 +343,9 @@ class SelfdriveD:
|
||||
# All events here should at least have NO_ENTRY and SOFT_DISABLE.
|
||||
num_events = len(self.events)
|
||||
|
||||
if self.big_model_active and big_failed:
|
||||
self.events.add(EventName.bigModelFailed)
|
||||
|
||||
not_running = {p.name for p in self.sm['managerState'].processes if not p.running and p.shouldBeRunning}
|
||||
if self.sm.recv_frame['managerState'] and len(not_running):
|
||||
if not_running != self.not_running_prev:
|
||||
|
||||
Reference in New Issue
Block a user