From 6cfbf1deb80d853fa7ef23a39d09e64d7d5791d4 Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 10 Oct 2026 18:32:29 -0700 Subject: [PATCH] Add stopped timer to Android Auto and layout previews Render the stopped timer in projected driving views and preview scenes, with layout migration and runtime coverage. Include the matching prebuilt receipt. --- .../galaxy/tests/test_layout_preview.mjs | 2 +- .../starpilot/galaxy/web/js/layout-preview.js | 1 + .../starpilot/galaxy/web/js/onroad-layout.js | 5 ++-- .../system/android_auto/projection_layout.py | 12 ++++++--- .../system/android_auto/projection_onroad.py | 3 ++- .../tests/test_projection_layout.py | 25 +++++++++++++++++- .../tests/test_projection_layout_runtime.py | 22 ++++++++++++++++ .../starpilot/ui/layout_preview_renderer.py | 8 +++--- .../starpilot/ui/layout_preview_transport.py | 2 +- openpilot/starpilot/ui/onroad.py | 20 +++++++++----- .../starpilot/ui/onroad_stopped_timer.py | 7 ++++- openpilot/starpilot/ui/runtime_snapshot.py | 5 ++-- .../ui/tests/test_layout_preview_renderer.py | 26 +++++++++++++++++++ .../ui/tests/test_onroad_customization.py | 24 +++++++++++++++++ .../ui/tests/test_onroad_stopped_timer.py | 19 ++++++++++++++ .../starpilot/ui/tests/test_widget_layers.py | 4 ++- 16 files changed, 163 insertions(+), 22 deletions(-) diff --git a/openpilot/starpilot/galaxy/tests/test_layout_preview.mjs b/openpilot/starpilot/galaxy/tests/test_layout_preview.mjs index b36b18a723..4facb035fa 100644 --- a/openpilot/starpilot/galaxy/tests/test_layout_preview.mjs +++ b/openpilot/starpilot/galaxy/tests/test_layout_preview.mjs @@ -19,7 +19,7 @@ function fixture() { return { feed, requests, updates, timers, revoked, tick, reply, get unauthorized() { return unauthorized } } } -assert.deepEqual(PREVIEW_SCENES.map(({ id }) => id), ["engaged", "aol", "long_only", "experimental", "braking", +assert.deepEqual(PREVIEW_SCENES.map(({ id }) => id), ["engaged", "aol", "long_only", "experimental", "braking", "stopped", "cem_stop_light", "cem_lead", "cem_curve", "slc_pending", "slc_max", "slc_equal", "slc_pedal", "slc_retained", "slc_disengaged", "slc_unavailable", "slc_display"]) assert.equal(PREVIEW_SCENES.find(({ id }) => id === "experimental").label, "Manual experimental") diff --git a/openpilot/starpilot/galaxy/web/js/layout-preview.js b/openpilot/starpilot/galaxy/web/js/layout-preview.js index 993a0c7910..02e32eb762 100644 --- a/openpilot/starpilot/galaxy/web/js/layout-preview.js +++ b/openpilot/starpilot/galaxy/web/js/layout-preview.js @@ -4,6 +4,7 @@ export const PREVIEW_SCENES = [ { id: "long_only", label: "Longitudinal only" }, { id: "experimental", label: "Manual experimental" }, { id: "braking", label: "Braking" }, + { id: "stopped", label: "Stopped timer" }, { id: "cem_stop_light", label: "CEM · Traffic light" }, { id: "cem_lead", label: "CEM · Stopped lead" }, { id: "cem_curve", label: "CEM · Curve" }, diff --git a/openpilot/starpilot/galaxy/web/js/onroad-layout.js b/openpilot/starpilot/galaxy/web/js/onroad-layout.js index 1922cec7b4..bebf4e283d 100644 --- a/openpilot/starpilot/galaxy/web/js/onroad-layout.js +++ b/openpilot/starpilot/galaxy/web/js/onroad-layout.js @@ -339,9 +339,9 @@ export const LayoutWidgetPreview = {