mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-17 00:43:53 +08:00
big model failed alert (#38479)
This commit is contained in:
@@ -130,6 +130,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
|
||||
excessiveActuation @96;
|
||||
bigModelLoading @100;
|
||||
bigModelReady @101;
|
||||
bigModelFailed @102;
|
||||
|
||||
lowBatteryDEPRECATED @40;
|
||||
soundsUnavailableDEPRECATED @47;
|
||||
|
||||
@@ -418,6 +418,10 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
||||
ET.PERMANENT: EngagementAlert(AudibleAlert.complete),
|
||||
},
|
||||
|
||||
EventName.bigModelFailed: {
|
||||
ET.PERMANENT: NormalPermanentAlert("Big Model Failed ", "Restart the car to retry,\nnow driving on small model", duration=30.),
|
||||
},
|
||||
|
||||
EventName.lateralManeuver: {
|
||||
ET.WARNING: longitudinal_maneuver_alert,
|
||||
ET.PERMANENT: NormalPermanentAlert("Lateral Maneuver Mode"),
|
||||
|
||||
@@ -162,6 +162,8 @@ class SelfdriveD:
|
||||
self.big_model_ready_t = time.monotonic()
|
||||
if self.params.get_bool("UsbGpuActive"):
|
||||
self.events.add(EventName.bigModelReady)
|
||||
else:
|
||||
self.events.add(EventName.bigModelFailed)
|
||||
self.big_model_loading = loading
|
||||
if self.big_model_loading:
|
||||
self.events.add(EventName.bigModelLoading)
|
||||
|
||||
Reference in New Issue
Block a user