From 75b4e61913d89c968e9d6cbd88ea4acd44f0abb5 Mon Sep 17 00:00:00 2001 From: royjr Date: Sat, 22 Aug 2026 17:22:29 -0400 Subject: [PATCH] spinner --- openpilot/selfdrive/modeld/load_progress.py | 4 +++- openpilot/selfdrive/ui/mici/onroad/hud_renderer.py | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/openpilot/selfdrive/modeld/load_progress.py b/openpilot/selfdrive/modeld/load_progress.py index 8c861f38ea..51c2a0a967 100644 --- a/openpilot/selfdrive/modeld/load_progress.py +++ b/openpilot/selfdrive/modeld/load_progress.py @@ -40,5 +40,7 @@ class ProgressReader: def open_with_progress(pkl_path): - total = sum(os.path.getsize(p) for p in get_existing_chunks(pkl_path)) + # only the data chunks are read, not the tiny .chunkmanifest — counting it caps progress at 99% + chunks = [p for p in get_existing_chunks(pkl_path) if not p.endswith(".chunkmanifest")] + total = sum(os.path.getsize(p) for p in chunks) return ProgressReader(open_file_chunked(pkl_path), total) diff --git a/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py b/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py index 83d49e4024..76d7812cf0 100644 --- a/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py +++ b/openpilot/selfdrive/ui/mici/onroad/hud_renderer.py @@ -231,7 +231,7 @@ class HudRenderer(Widget): rect.y + rect.height - 14 - (self._txt_wheel.height + icon.height) / 2) rl.draw_texture_ex(icon, pos, 0.0, 1.0, rl.Color(255, 255, 255, int(255 * opacity * alpha))) - if loading: + if loading and ui_state.usbgpu_load_progress < 100: pct_text = f"{ui_state.usbgpu_load_progress}%" size = FONT_SIZES.max_speed cell = measure_text_cached(self._font_bold, "0", size) # fixed digit cell so the number doesn't shift @@ -242,6 +242,12 @@ class HudRenderer(Widget): glyph = measure_text_cached(self._font_bold, c, size).x rl.draw_text_ex(self._font_bold, c, rl.Vector2(x + (w - glyph) / 2, y), size, 0, rl.WHITE) x += w + elif loading: + # bytes loaded, eGPU still warming up (no progress signal) — spinning arc instead of a frozen 100% + r = 14.0 + center = rl.Vector2(pos.x - 8 - r, pos.y + icon.height / 2) + start = (rl.get_time() * 360) % 360 + rl.draw_ring(center, r - 4, r, start, start + 270, 32, rl.WHITE) def _draw_steering_wheel(self, rect: rl.Rectangle) -> None: wheel_txt = self._txt_wheel_critical if self._show_wheel_critical else self._txt_wheel