mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 09:13:46 +08:00
@@ -129,6 +129,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
|
||||
userBookmark @95;
|
||||
excessiveActuation @96;
|
||||
bigModelLoading @100;
|
||||
bigModelReady @101;
|
||||
|
||||
lowBatteryDEPRECATED @40;
|
||||
soundsUnavailableDEPRECATED @47;
|
||||
|
||||
@@ -413,6 +413,10 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
||||
ET.NO_ENTRY: NoEntryAlert("Big Model Loading"),
|
||||
},
|
||||
|
||||
EventName.bigModelReady: {
|
||||
ET.PERMANENT: EngagementAlert(AudibleAlert.complete),
|
||||
},
|
||||
|
||||
EventName.lateralManeuver: {
|
||||
ET.WARNING: longitudinal_maneuver_alert,
|
||||
ET.PERMANENT: NormalPermanentAlert("Lateral Maneuver Mode"),
|
||||
|
||||
@@ -160,6 +160,8 @@ class SelfdriveD:
|
||||
loading = self.params.get_bool("UsbGpuLoading")
|
||||
if self.big_model_loading and not loading:
|
||||
self.big_model_ready_t = time.monotonic()
|
||||
if self.params.get_bool("UsbGpuActive"):
|
||||
self.events.add(EventName.bigModelReady)
|
||||
self.big_model_loading = loading
|
||||
if self.big_model_loading:
|
||||
self.events.add(EventName.bigModelLoading)
|
||||
|
||||
Reference in New Issue
Block a user