From 0de7fbf33d65b052efec8d5d1e2d810c3e5b48b2 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 23 Aug 2026 15:06:53 -0400 Subject: [PATCH 1/3] new --- openpilot/sunnypilot/models/default_model.py | 2 +- openpilot/sunnypilot/sunnylink/athena/sunnylinkd.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openpilot/sunnypilot/models/default_model.py b/openpilot/sunnypilot/models/default_model.py index 128426979..a8e55f8e6 100755 --- a/openpilot/sunnypilot/models/default_model.py +++ b/openpilot/sunnypilot/models/default_model.py @@ -9,7 +9,7 @@ from openpilot.sunnypilot.models.model_name import DEFAULT_MODEL, DEFAULT_BIG_MO def get_default_model() -> str: - show_big_model = (ui_state.usbgpu and ui_state.usbgpu_compiled + show_big_model = (ui_state.usbgpu and (ui_state.usbgpu_active or ui_state.usbgpu_loading or ui_state.is_offroad())) return DEFAULT_BIG_MODEL if show_big_model else DEFAULT_MODEL diff --git a/openpilot/sunnypilot/sunnylink/athena/sunnylinkd.py b/openpilot/sunnypilot/sunnylink/athena/sunnylinkd.py index 27be6e24e..3425a8562 100755 --- a/openpilot/sunnypilot/sunnylink/athena/sunnylinkd.py +++ b/openpilot/sunnypilot/sunnylink/athena/sunnylinkd.py @@ -28,7 +28,7 @@ from websocket import (ABNF, WebSocket, WebSocketException, WebSocketTimeoutExce create_connection, WebSocketConnectionClosedException) import openpilot.cereal.messaging as messaging -from openpilot.selfdrive.modeld.helpers import usbgpu_present, usbgpu_compiled +from openpilot.selfdrive.modeld.helpers import usbgpu_present from openpilot.sunnypilot.models.model_name import DEFAULT_MODEL, DEFAULT_BIG_MODEL from openpilot.sunnypilot.selfdrive.car.sync_sunnylink_params import update_car_list_param from openpilot.sunnypilot.sunnylink.api import SunnylinkApi @@ -183,9 +183,10 @@ def getParamsMetadata() -> str: schema["capabilities"] = generate_capabilities() schema["capability_labels"] = CAPABILITY_LABELS # mirrors get_default_model() — ui_state unavailable in sunnylinkd process - show_big = (usbgpu_present() and usbgpu_compiled() + show_big = (usbgpu_present() and (params.get_bool("UsbGpuActive") or params.get_bool("UsbGpuLoading") or params.get_bool("IsOffroad"))) schema["default_model"] = DEFAULT_BIG_MODEL if show_big else DEFAULT_MODEL + schema["usbgpu_active"] = params.get_bool("UsbGpuActive") raw = json.dumps(schema, separators=(",", ":")).encode("utf-8") return base64.b64encode(gzip.compress(raw)).decode("utf-8") except Exception: From 699eaf79575754bb6c3cf8360f5c1e9d7026e669 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 23 Aug 2026 19:16:15 -0400 Subject: [PATCH 2/3] include them! --- .../selfdrive/ui/sunnypilot/mici/layouts/home.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py index d29e579c5..623002e8c 100644 --- a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py +++ b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py @@ -5,11 +5,22 @@ This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ from openpilot.selfdrive.ui.mici.layouts.home import MiciHomeLayout +from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import FontWeight from openpilot.system.ui.widgets.label import UnifiedLabel +RUNNER_TINYGRAD = 1 + class MiciHomeLayoutSP(MiciHomeLayout): def __init__(self): super().__init__() self._openpilot_label = UnifiedLabel("sunnypilot", font_size=88, font_weight=FontWeight.AUDIOWIDE, max_width=480, wrap_text=False) + + def _render(self, rect): + super()._render(rect) + chestnut = ui_state.sm["deviceState"].chestnutPresent + if chestnut: + gpu_ready = ui_state.usbgpu_compiled or (ui_state.params.get("ModelRunnerTypeCache") == RUNNER_TINYGRAD) + self._egpu_icon.set_visible(gpu_ready) + self._egpu_icon_gray.set_visible(not gpu_ready) From dcddb2a0bdf4ca202f5925ff01a6acd0443c67a4 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 23 Aug 2026 19:53:46 -0400 Subject: [PATCH 3/3] models: revert icon override from this branch scope --- .../selfdrive/ui/sunnypilot/mici/layouts/home.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py index 623002e8c..d29e579c5 100644 --- a/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py +++ b/openpilot/selfdrive/ui/sunnypilot/mici/layouts/home.py @@ -5,22 +5,11 @@ This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ from openpilot.selfdrive.ui.mici.layouts.home import MiciHomeLayout -from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import FontWeight from openpilot.system.ui.widgets.label import UnifiedLabel -RUNNER_TINYGRAD = 1 - class MiciHomeLayoutSP(MiciHomeLayout): def __init__(self): super().__init__() self._openpilot_label = UnifiedLabel("sunnypilot", font_size=88, font_weight=FontWeight.AUDIOWIDE, max_width=480, wrap_text=False) - - def _render(self, rect): - super()._render(rect) - chestnut = ui_state.sm["deviceState"].chestnutPresent - if chestnut: - gpu_ready = ui_state.usbgpu_compiled or (ui_state.params.get("ModelRunnerTypeCache") == RUNNER_TINYGRAD) - self._egpu_icon.set_visible(gpu_ready) - self._egpu_icon_gray.set_visible(not gpu_ready)