From fa0fd7b57eeda08b31d276d844a42a034d5bc2d6 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Thu, 5 Nov 2026 14:12:15 -0600 Subject: [PATCH] Add optional onroad weather widget --- .../galaxy/web/js/onroad-layout-template.js | 1 + .../starpilot/galaxy/web/js/onroad-layout.js | 13 ++ .../starpilot/ui/layout_preview_renderer.py | 3 +- openpilot/starpilot/ui/onroad.py | 13 ++ .../starpilot/ui/onroad_customization.py | 23 ++- openpilot/starpilot/ui/onroad_state.py | 3 + openpilot/starpilot/ui/onroad_weather.py | 73 +++++++ openpilot/starpilot/ui/runtime_snapshot.py | 11 +- openpilot/starpilot/ui/tests/test_weather.py | 185 ++++++++++++++++++ openpilot/starpilot/ui/weather.py | 97 +++++++++ 10 files changed, 414 insertions(+), 8 deletions(-) create mode 100644 openpilot/starpilot/ui/onroad_weather.py create mode 100644 openpilot/starpilot/ui/tests/test_weather.py create mode 100644 openpilot/starpilot/ui/weather.py diff --git a/openpilot/starpilot/galaxy/web/js/onroad-layout-template.js b/openpilot/starpilot/galaxy/web/js/onroad-layout-template.js index 6e4a25b6fc..517ed330df 100644 --- a/openpilot/starpilot/galaxy/web/js/onroad-layout-template.js +++ b/openpilot/starpilot/galaxy/web/js/onroad-layout-template.js @@ -168,6 +168,7 @@ export const ONROAD_LAYOUT_TEMPLATE = `

Drag widgets to place them. Behind them is the comma's own screen for the chosen scene, including its border, road and alerts. Readings are samples.

Widgets snap to the screen edges, the center and other widgets. Turn snapping off with the magnet button, or hold Option (Alt) while dragging.

General edit shows samples of all enabled widgets together. Driving scenes hide widgets that would be absent, and the eyes follow the scene. Eye changes stay with that scene; your General edit eyes are remembered.

+

Weather data by Open-Meteo. Uses your GPS area when enabled; updates in the background about every 10 minutes.

The stopped timer appears in General edit and Stopped timer. Turn off editing aids to see the screen without outlines and guides.

The steering wheel and driver monitoring icon can be resized in each layout.{{ profile.widgets.nav_map ? ' The map overlay has adjustable size and opacity.' : '' }} Existing display preferences and driving state still control when widgets appear.

Small speed-limit signs can overlap confirmation actions. Live confirmations hide an overlapping sign until the decision ends. Select either widget in the list to edit it.

diff --git a/openpilot/starpilot/galaxy/web/js/onroad-layout.js b/openpilot/starpilot/galaxy/web/js/onroad-layout.js index c8a9a6e5de..77d2e7818e 100644 --- a/openpilot/starpilot/galaxy/web/js/onroad-layout.js +++ b/openpilot/starpilot/galaxy/web/js/onroad-layout.js @@ -192,6 +192,19 @@ export const LayoutWidgetPreview = { 14 seconds + + + + + + + + + + 70°F + Open-Meteo +