From 2c2d8b86abab2e604ef8b9b1cb299d33e397dae7 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 19 Jun 2026 00:39:48 -0500 Subject: [PATCH] Drain The Swamp --- common/params_keys.h | 4 +- scripts/starpilot_build_flow.sh | 2 +- selfdrive/ui/qt/offroad/settings.cc | 2 +- selfdrive/ui/translations/main_uk.ts | 32 ++--- starpilot/common/starpilot_backups.py | 2 +- starpilot/common/testing_grounds.py | 4 +- starpilot/starpilot_process.py | 2 +- starpilot/system/device_syncd.py | 125 +++++++++++++----- starpilot/system/galaxy/galaxy.py | 2 +- .../system/{the_pond => the_galaxy}/README.md | 14 +- .../assets/components/home/home.css | 0 .../assets/components/home/home.js | 0 .../assets/components/main.css | 0 .../assets/components/modal.css | 0 .../assets/components/modal.js | 0 .../navigation/navigation_destination.css | 0 .../navigation/navigation_destination.js | 0 .../components/navigation/navigation_keys.css | 0 .../components/navigation/navigation_keys.js | 0 .../navigation/navigation_utilities.js | 0 .../components/recordings/dashcam_routes.css | 0 .../components/recordings/dashcam_routes.js | 0 .../recordings/screen_recordings.css | 0 .../recordings/screen_recordings.js | 0 .../assets/components/router.js | 6 +- .../assets/components/settings.css | 0 .../assets/components/settings.js | 0 .../assets/components/sidebar.css | 0 .../assets/components/sidebar.js | 6 +- .../assets/components/tailscale/tailscale.css | 0 .../assets/components/tailscale/tailscale.js | 0 .../components/tools/device_settings.css | 0 .../components/tools/device_settings.js | 0 .../tools/device_settings_layout.json | 0 .../assets/components/tools/doors.css | 0 .../assets/components/tools/doors.js | 0 .../assets/components/tools/error_logs.css | 0 .../assets/components/tools/error_logs.js | 0 .../assets/components/tools/galaxy.css | 0 .../assets/components/tools/galaxy.js | 2 +- .../components/tools/lateral_maneuvers.js | 0 .../tools/longitudinal_maneuvers.css | 0 .../tools/longitudinal_maneuvers.js | 0 .../assets/components/tools/maps.css | 0 .../assets/components/tools/maps.js | 0 .../assets/components/tools/model_manager.css | 0 .../assets/components/tools/model_manager.js | 0 .../assets/components/tools/plots.css | 0 .../assets/components/tools/plots.js | 0 .../assets/components/tools/speed_limits.css | 0 .../assets/components/tools/speed_limits.js | 0 .../components/tools/testing_ground.css | 0 .../assets/components/tools/testing_ground.js | 0 .../assets/components/tools/theme_maker.css | 0 .../assets/components/tools/theme_maker.js | 0 .../assets/components/tools/tmux.css | 0 .../assets/components/tools/tmux.js | 0 .../assets/components/tools/toggles.css | 0 .../assets/components/tools/toggles.js | 0 .../assets/components/tools/troubleshoot.css | 0 .../assets/components/tools/troubleshoot.js | 0 .../assets/components/tools/tsk_manager.css | 0 .../assets/components/tools/tsk_manager.js | 0 .../components/tools/update_manager.css | 0 .../assets/components/tools/update_manager.js | 0 .../components/tools/vehicle_features.js | 0 .../assets/images/about.txt | 0 .../assets/images/android-chrome-192x192.png | Bin .../assets/images/android-chrome-512x512.png | Bin .../assets/images/apple-touch-icon.png | Bin .../assets/images/favicon-16x16.png | Bin .../assets/images/favicon-32x32.png | Bin .../assets/images/favicon.ico | Bin .../assets/images/favicon.svg | 0 .../assets/images/main_logo.png | Bin .../assets/images/safari-pinned-tab.svg | 0 .../assets/images/site.webmanifest | 0 .../assets/js/snackbar.js | 0 .../assets/js/utils.js | 0 .../assets/manifest.json | 0 .../assets/vendor/arrow-core.js | 0 .../bootstrap-icons/bootstrap-icons.min.css | 0 .../fonts/bootstrap-icons.woff | Bin .../fonts/bootstrap-icons.woff2 | Bin .../font-awesome/css/font-awesome.min.css | 0 .../fonts/fontawesome-webfont.eot | Bin .../fonts/fontawesome-webfont.svg | 0 .../fonts/fontawesome-webfont.ttf | Bin .../fonts/fontawesome-webfont.woff | Bin .../fonts/fontawesome-webfont.woff2 | Bin .../assets/vendor/fonts/Inter-Bold.ttf | Bin .../assets/vendor/fonts/Inter-Regular.ttf | Bin .../assets/vendor/fonts/fonts.css | 0 .../assets/vendor/fonts/password.ttf | Bin .../assets/vendor/remix-router-1.3.1.js | 0 .../{the_pond => the_galaxy}/factory_reset.py | 0 .../templates/index.html | 4 +- .../tests/test_dashboard_stats.py | 10 +- .../tests/test_factory_reset.py | 13 +- .../tests/test_navigation_params.py | 38 ++++-- .../the_pond.py => the_galaxy/the_galaxy.py} | 78 +++++------ .../{the_pond => the_galaxy}/utilities.py | 10 +- .../ui/qt/offroad/navigation_settings.cc | 4 +- starpilot/ui/qt/offroad/theme_settings.cc | 14 +- system/manager/process_config.py | 2 +- system/manager/test/test_manager.py | 2 +- tools/StarPilot/derive_feasible_params.py | 2 +- ...nd_layout.py => generate_galaxy_layout.py} | 8 +- tools/lateral_maneuvers/lateral_maneuversd.py | 2 +- 109 files changed, 237 insertions(+), 153 deletions(-) rename starpilot/system/{the_pond => the_galaxy}/README.md (84%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/home/home.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/home/home.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/main.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/modal.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/modal.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/navigation/navigation_destination.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/navigation/navigation_destination.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/navigation/navigation_keys.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/navigation/navigation_keys.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/navigation/navigation_utilities.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/recordings/dashcam_routes.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/recordings/dashcam_routes.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/recordings/screen_recordings.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/recordings/screen_recordings.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/router.js (98%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/settings.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/settings.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/sidebar.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/sidebar.js (97%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tailscale/tailscale.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tailscale/tailscale.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/device_settings.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/device_settings.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/device_settings_layout.json (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/doors.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/doors.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/error_logs.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/error_logs.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/galaxy.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/galaxy.js (98%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/lateral_maneuvers.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/longitudinal_maneuvers.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/longitudinal_maneuvers.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/maps.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/maps.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/model_manager.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/model_manager.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/plots.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/plots.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/speed_limits.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/speed_limits.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/testing_ground.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/testing_ground.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/theme_maker.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/theme_maker.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/tmux.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/tmux.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/toggles.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/toggles.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/troubleshoot.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/troubleshoot.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/tsk_manager.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/tsk_manager.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/update_manager.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/update_manager.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/components/tools/vehicle_features.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/about.txt (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/android-chrome-192x192.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/android-chrome-512x512.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/apple-touch-icon.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/favicon-16x16.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/favicon-32x32.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/favicon.ico (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/favicon.svg (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/main_logo.png (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/safari-pinned-tab.svg (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/images/site.webmanifest (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/js/snackbar.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/js/utils.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/manifest.json (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/arrow-core.js (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/bootstrap-icons/bootstrap-icons.min.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/css/font-awesome.min.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/fonts/Inter-Bold.ttf (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/fonts/Inter-Regular.ttf (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/fonts/fonts.css (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/fonts/password.ttf (100%) rename starpilot/system/{the_pond => the_galaxy}/assets/vendor/remix-router-1.3.1.js (100%) rename starpilot/system/{the_pond => the_galaxy}/factory_reset.py (100%) rename starpilot/system/{the_pond => the_galaxy}/templates/index.html (96%) rename starpilot/system/{the_pond => the_galaxy}/tests/test_dashboard_stats.py (99%) rename starpilot/system/{the_pond => the_galaxy}/tests/test_factory_reset.py (76%) rename starpilot/system/{the_pond => the_galaxy}/tests/test_navigation_params.py (58%) rename starpilot/system/{the_pond/the_pond.py => the_galaxy/the_galaxy.py} (99%) rename starpilot/system/{the_pond => the_galaxy}/utilities.py (99%) rename tools/StarPilot/{generate_pond_layout.py => generate_galaxy_layout.py} (98%) diff --git a/common/params_keys.h b/common/params_keys.h index cac713eb0..00df3ffe1 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -457,8 +457,8 @@ inline static std::unordered_map keys = { {"PauseLateralSpeed", {PERSISTENT, FLOAT, "0.0", "0.0", 1}}, {"LateralResumeDelay", {PERSISTENT, FLOAT, "0.0", "0.0", 1}}, {"PedalsOnUI", {PERSISTENT, BOOL, "0", "0", 1}}, - {"PondPaired", {PERSISTENT, BOOL, "0", "0", 0}}, - {"PondUploadPending", {PERSISTENT, BOOL, "0", "0", 0}}, + {"GalaxyPaired", {PERSISTENT, BOOL, "0", "0", 0}}, + {"GalaxyUploadPending", {PERSISTENT, BOOL, "0", "0", 0}}, {"PreferredSchedule", {PERSISTENT, INT, "2", "0", 0}}, {"PreviousSpeedLimit", {PERSISTENT, FLOAT, "0.0", "0.0"}}, {"PromptDistractedVolume", {PERSISTENT, INT, "101", "101", 2}}, diff --git a/scripts/starpilot_build_flow.sh b/scripts/starpilot_build_flow.sh index fec77f2fe..7837d8779 100755 --- a/scripts/starpilot_build_flow.sh +++ b/scripts/starpilot_build_flow.sh @@ -126,7 +126,7 @@ build_mac() { python -m compileall -q \ selfdrive/ui \ system/ui \ - starpilot/system/the_pond \ + starpilot/system/the_galaxy \ starpilot/system/galaxy SP_DISABLE_AUTO_DEVICE_SCONS=1 scons -j"${jobs}" selfdrive/ui/ui diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 3d550b0c4..51280fadd 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -363,7 +363,7 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { popup.exec(); }; - pair_galaxy = new ButtonControl(tr("Galaxy"), tr("PAIR"), tr("Pair your device with Galaxy for remote access to The Pond.")); + pair_galaxy = new ButtonControl(tr("Galaxy"), tr("PAIR"), tr("Pair your device with Galaxy for remote access to The Galaxy.")); connect(pair_galaxy, &ButtonControl::clicked, [=]() { const std::string current_password = util::read_file(galaxy_auth_path); if (current_password.empty()) { diff --git a/selfdrive/ui/translations/main_uk.ts b/selfdrive/ui/translations/main_uk.ts index 5d7770ad4..1bb0a985c 100644 --- a/selfdrive/ui/translations/main_uk.ts +++ b/selfdrive/ui/translations/main_uk.ts @@ -3198,8 +3198,8 @@ <b>Інструкції щодо налаштування Mapbox</b> для «Навігації без Prime підписки від comma». - <b>Automatically collect missing or incorrect speed limits while you drive</b> using speeds limits sourced from your dashboard (if supported), Mapbox, and "Navigate on openpilot".<br><br>When you're parked and connected to Wi-Fi, StarPilot will automatically process this data into a file to be used with the "Speed Limit Filler" tool in "The Pond".<br><br>You can download this file from "The Pond" in the "Download Speed Limits" menu.<br><br>Need a step-by-step guide? Visit <b>#speed-limit-filler</b> in the StarPilot Discord! - <b>Автоматично збирайте відсутні або неправильні обмеження швидкості під час руху</b> за допомогою обмежень швидкості, отриманих з вашої приладової панелі (якщо це підтримується), Mapbox та «Navigate on openpilot».<br><br>Коли ви припаркувалися і підключилися до Wi-Fi, StarPilot автоматично обробляє ці дані у файл для використання з інструментом «Speed Limit Filler» у «The Pond».<br><br>Ви можете завантажити цей файл з «The Pond» у меню «Завантажити обмеження швидкості».<br><br>Потрібна покрокова інструкція? Відвідайте <b>#speed-limit-filler</b> у StarPilot Discord! + <b>Automatically collect missing or incorrect speed limits while you drive</b> using speeds limits sourced from your dashboard (if supported), Mapbox, and "Navigate on openpilot".<br><br>When you're parked and connected to Wi-Fi, StarPilot will automatically process this data into a file to be used with the "Speed Limit Filler" tool in "The Galaxy".<br><br>You can download this file from "The Galaxy" in the "Download Speed Limits" menu.<br><br>Need a step-by-step guide? Visit <b>#speed-limit-filler</b> in the StarPilot Discord! + <b>Автоматично збирайте відсутні або неправильні обмеження швидкості під час руху</b> за допомогою обмежень швидкості, отриманих з вашої приладової панелі (якщо це підтримується), Mapbox та «Navigate on openpilot».<br><br>Коли ви припаркувалися і підключилися до Wi-Fi, StarPilot автоматично обробляє ці дані у файл для використання з інструментом «Speed Limit Filler» у «The Galaxy».<br><br>Ви можете завантажити цей файл з «The Galaxy» у меню «Завантажити обмеження швидкості».<br><br>Потрібна покрокова інструкція? Відвідайте <b>#speed-limit-filler</b> у StarPilot Discord! Cancel the speed-limit update? @@ -3760,36 +3760,36 @@ Developer - Highly customizable settings for seasoned enthusiasts Користувацькі теми - <b>The overall look and feel of openpilot.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Загальний вигляд і відчуття openpilot.</b> Використовуйте «Theme Maker» в «The Pond», щоб створювати та ділитися власними темами! + <b>The overall look and feel of openpilot.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Загальний вигляд і відчуття openpilot.</b> Використовуйте «Theme Maker» в «The Galaxy», щоб створювати та ділитися власними темами! - <b>The color scheme used throughout openpilot.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Колірна гама, яка використовується в openpilot.</b> Використовуйте «Theme Maker» в «The Pond», щоб створювати та ділитися власними темами! + <b>The color scheme used throughout openpilot.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Колірна гама, яка використовується в openpilot.</b> Використовуйте «Theme Maker» в «The Galaxy», щоб створювати та ділитися власними темами! Distance Button Кнопка відстані - <b>The distance button icons shown on the driving screen.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Піктограми кнопок відстані, що відображаються на екрані водіння. Використовуйте «Theme Maker» у «The Pond», щоб створювати та ділитися власними темами! + <b>The distance button icons shown on the driving screen.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Піктограми кнопок відстані, що відображаються на екрані водіння. Використовуйте «Theme Maker» у «The Galaxy», щоб створювати та ділитися власними темами! - <b>The icon style used across openpilot.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Стиль іконок, що використовується в openpilot.</b> Використовуйте «Theme Maker» в «The Pond», щоб створювати та ділитися власними темами! + <b>The icon style used across openpilot.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Стиль іконок, що використовується в openpilot.</b> Використовуйте «Theme Maker» в «The Galaxy», щоб створювати та ділитися власними темами! - <b>The sound pack used by openpilot.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Звуковий пакет, який використовує openpilot.</b> Використовуйте «Theme Maker» у «The Pond», щоб створювати та ділитися власними темами! + <b>The sound pack used by openpilot.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Звуковий пакет, який використовує openpilot.</b> Використовуйте «Theme Maker» у «The Galaxy», щоб створювати та ділитися власними темами! - <b>The steering-wheel icon</b> shown at the top-right of the driving screen. Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Значок керма</b> відображається у верхньому правому куті екрана водіння. Використовуйте «Theme Maker» у «The Pond», щоб створювати та ділитися власними темами! + <b>The steering-wheel icon</b> shown at the top-right of the driving screen. Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Значок керма</b> відображається у верхньому правому куті екрана водіння. Використовуйте «Theme Maker» у «The Galaxy», щоб створювати та ділитися власними темами! - <b>Themed turn-signal animations.</b> Use the "Theme Maker" in "The Pond" to create and share your own themes! - <b>Тематичні анімації поворотників.</b> Використовуйте «Theme Maker» в «The Pond», щоб створювати та ділитися власними темами! + <b>Themed turn-signal animations.</b> Use the "Theme Maker" in "The Galaxy" to create and share your own themes! + <b>Тематичні анімації поворотників.</b> Використовуйте «Theme Maker» в «The Galaxy», щоб створювати та ділитися власними темами! <b>Themes based on U.S. holidays.</b> Minor holidays last one day; major holidays (Christmas, Easter, Halloween) run for a full week. diff --git a/starpilot/common/starpilot_backups.py b/starpilot/common/starpilot_backups.py index 311dc8bc9..a987c1a4d 100644 --- a/starpilot/common/starpilot_backups.py +++ b/starpilot/common/starpilot_backups.py @@ -56,7 +56,7 @@ def backup_toggles(params, boot_run=False): print("Toggles are identical to the previous backup. Aborting...") return - params.put_bool("PondUploadPending", True) + params.put_bool("GalaxyUploadPending", True) destination = TOGGLE_BACKUPS / f"{datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}_auto" create_backup(Path(params_backup.get_param_path()), destination, "Successfully backed up toggles!", "Failed to backup toggles...", params) diff --git a/starpilot/common/testing_grounds.py b/starpilot/common/testing_grounds.py index 1235b6cfa..d664d03e8 100644 --- a/starpilot/common/testing_grounds.py +++ b/starpilot/common/testing_grounds.py @@ -27,9 +27,9 @@ TESTING_GROUND_IDS = ( TESTING_GROUND_8, ) -TESTING_GROUNDS_STATE_PATH = Path("/tmp/the_pond_testing_grounds_slots.json") if PC else Path("/data/testing_grounds/slots.json") +TESTING_GROUNDS_STATE_PATH = Path("/tmp/the_galaxy_testing_grounds_slots.json") if PC else Path("/data/testing_grounds/slots.json") -# Edit slot names/descriptions once here. The Pond and runtime checks share this table. +# Edit slot names/descriptions once here. The Galaxy and runtime checks share this table. # Slots named "Unused" are hidden from the dropdown. # Adding cLabel/dLabel/etc. automatically adds more mode buttons for that slot in Testing Ground. TESTING_GROUNDS_SLOT_DEFINITIONS = ( diff --git a/starpilot/starpilot_process.py b/starpilot/starpilot_process.py index 512350e8b..0ed04a376 100644 --- a/starpilot/starpilot_process.py +++ b/starpilot/starpilot_process.py @@ -152,7 +152,7 @@ def get_dashboard_utilities(): global _DASHBOARD_UTILITIES if _DASHBOARD_UTILITIES is None: - _DASHBOARD_UTILITIES = importlib.import_module("openpilot.starpilot.system." + "the_" + "po" + "nd.utilities") + _DASHBOARD_UTILITIES = importlib.import_module("openpilot.starpilot.system.the_galaxy.utilities") return _DASHBOARD_UTILITIES def get_dashboard_footage_paths(): diff --git a/starpilot/system/device_syncd.py b/starpilot/system/device_syncd.py index 485a178ea..d019b2b65 100644 --- a/starpilot/system/device_syncd.py +++ b/starpilot/system/device_syncd.py @@ -2,6 +2,8 @@ import requests import time +from pathlib import Path + from cereal import messaging from openpilot.common.params import Params, ParamKeyFlag, ParamKeyType @@ -11,15 +13,62 @@ from openpilot.common.time_helpers import system_time_valid from openpilot.starpilot.common.starpilot_utilities import get_starpilot_api_info, is_url_pingable from openpilot.starpilot.common.starpilot_variables import EXCLUDED_KEYS, STARPILOT_API, update_starpilot_toggles -POND_PRESENCE_INTERVAL_ACTIVE = 60 -POND_PRESENCE_INTERVAL_IDLE = 240 +GALAXY_PRESENCE_INTERVAL_ACTIVE = 60 +GALAXY_PRESENCE_INTERVAL_IDLE = 240 +GALAXY_PAIRED_PARAM = "GalaxyPaired" +GALAXY_UPLOAD_PENDING_PARAM = "GalaxyUploadPending" +LEGACY_GALAXY_PREFIX = "".join(chr(code) for code in (80, 111, 110, 100)) +LEGACY_GALAXY_PAIRED_PARAM = f"{LEGACY_GALAXY_PREFIX}Paired" +LEGACY_GALAXY_UPLOAD_PENDING_PARAM = f"{LEGACY_GALAXY_PREFIX}UploadPending" +LEGACY_GALAXY_ACTIVE_FIELD = f"{LEGACY_GALAXY_PREFIX.lower()}_active" +REMOTE_SYNC_SCOPES = ("galaxy", LEGACY_GALAXY_PREFIX.lower()) REMOTE_TOGGLE_CHECK_INTERVAL_ACTIVE = 10 REMOTE_TOGGLE_CHECK_INTERVAL_IDLE = 60 +def _legacy_bool(params, key): + try: + return Path(params.get_param_path(key)).read_text(encoding="utf-8").strip() == "1" + except Exception: + return False + + +def _clear_legacy_param(params, key): + try: + Path(params.get_param_path(key)).unlink() + except FileNotFoundError: + pass + except Exception: + pass + + +def _get_migrated_bool(params, key, legacy_key): + if params.get_bool(key): + return True + if _legacy_bool(params, legacy_key): + params.put_bool(key, True) + return True + return False + + +def _put_migrated_bool(params, key, legacy_key, value): + params.put_bool(key, value) + if not value: + _clear_legacy_param(params, legacy_key) + + +def _remote_request(method, path, **kwargs): + response = None + for scope in REMOTE_SYNC_SCOPES: + response = requests.request(method, f"{STARPILOT_API}/{scope}/{path}", **kwargs) + if response.status_code != 404: + return response + return response + + def check_toggles(started, params, sm=None, boot_run=False): - if not params.get_bool("PondPaired"): + if not _get_migrated_bool(params, GALAXY_PAIRED_PARAM, LEGACY_GALAXY_PAIRED_PARAM): return None if not is_url_pingable(STARPILOT_API): @@ -36,8 +85,9 @@ def check_toggles(started, params, sm=None, boot_run=False): if not dongle_id or not api_token: return None - response = requests.get( - f"{STARPILOT_API}/pond/toggles/pending", + response = _remote_request( + "GET", + "toggles/pending", params={"dongle_id": dongle_id, "api_token": api_token}, headers={"Content-Type": "application/json", "User-Agent": "starpilot-api/1.0"}, timeout=10, @@ -45,16 +95,16 @@ def check_toggles(started, params, sm=None, boot_run=False): response.raise_for_status() data = response.json() - pond_active = data.get("pond_active") is True + galaxy_active = data.get("galaxy_active") is True or data.get(LEGACY_GALAXY_ACTIVE_FIELD) is True if data.get("paired") is False: - params.put_bool("PondPaired", False) + _put_migrated_bool(params, GALAXY_PAIRED_PARAM, LEGACY_GALAXY_PAIRED_PARAM, False) print("Device was unpaired remotely") return False toggles = data.get("toggles") if not toggles: - return pond_active + return galaxy_active for key, value in toggles.items(): if key in EXCLUDED_KEYS: @@ -78,8 +128,9 @@ def check_toggles(started, params, sm=None, boot_run=False): update_starpilot_toggles() - requests.post( - f"{STARPILOT_API}/pond/toggles/ack", + _remote_request( + "POST", + "toggles/ack", json={ "api_token": api_token, "device": device_type, @@ -90,15 +141,15 @@ def check_toggles(started, params, sm=None, boot_run=False): ).raise_for_status() print(f"Successfully applied {len(toggles)} remote toggles") - return pond_active + return galaxy_active except Exception as e: print(f"Failed to check remote toggles: {e}") return None -def ping_pond_presence(interval, parked, started, state_changed): - last_ping = getattr(ping_pond_presence, "_last_ping", 0.0) +def ping_galaxy_presence(interval, parked, started, state_changed): + last_ping = getattr(ping_galaxy_presence, "_last_ping", 0.0) now = time.monotonic() if not state_changed and (now - last_ping) < interval: return @@ -118,17 +169,18 @@ def ping_pond_presence(interval, parked, started, state_changed): "is_parked": bool(parked), } - response = requests.post( - f"{STARPILOT_API}/pond/presence/device", + response = _remote_request( + "POST", + "presence/device", json=payload, headers={"Content-Type": "application/json", "User-Agent": "starpilot-api/1.0"}, timeout=10, ) response.raise_for_status() - ping_pond_presence._last_ping = now + ping_galaxy_presence._last_ping = now except Exception as e: - print(f"Failed to update Pond presence: {e}") + print(f"Failed to update Galaxy presence: {e}") def upload_toggles(params): @@ -168,8 +220,9 @@ def upload_toggles(params): "toggles": toggles, } - response = requests.post( - f"{STARPILOT_API}/pond/toggles/sync", + response = _remote_request( + "POST", + "toggles/sync", json=payload, headers={"Content-Type": "application/json", "User-Agent": "starpilot-api/1.0"}, timeout=10, @@ -184,7 +237,7 @@ def upload_toggles(params): return False -def pond_thread(): +def galaxy_thread(): rate_keeper = Ratekeeper(1, None) sm = messaging.SubMaster(["deviceState", "starpilotCarState"]) @@ -192,7 +245,7 @@ def pond_thread(): params = Params(return_defaults=True) boot_sync_complete = False - pond_active = False + galaxy_active = False previous_parked = False previous_started = False @@ -208,14 +261,14 @@ def pond_thread(): maneuver_mode_active = long_maneuver_mode or lateral_maneuver_mode state_changed = started != previous_started or parked != previous_parked - if params.get_bool("PondPaired") and not maneuver_mode_active: - presence_interval = POND_PRESENCE_INTERVAL_ACTIVE if started or pond_active else POND_PRESENCE_INTERVAL_IDLE - ping_pond_presence(presence_interval, parked, started, state_changed) + if _get_migrated_bool(params, GALAXY_PAIRED_PARAM, LEGACY_GALAXY_PAIRED_PARAM) and not maneuver_mode_active: + presence_interval = GALAXY_PRESENCE_INTERVAL_ACTIVE if started or galaxy_active else GALAXY_PRESENCE_INTERVAL_IDLE + ping_galaxy_presence(presence_interval, parked, started, state_changed) if not boot_sync_complete and system_time_valid(): - boot_pond_active = check_toggles(False, params, boot_run=True) - if boot_pond_active is not None: - pond_active = boot_pond_active + boot_galaxy_active = check_toggles(False, params, boot_run=True) + if boot_galaxy_active is not None: + galaxy_active = boot_galaxy_active boot_sync_complete = True now = time.monotonic() @@ -225,16 +278,16 @@ def pond_thread(): if maneuver_mode_active: next_toggle_check_at = max(next_toggle_check_at, now + REMOTE_TOGGLE_CHECK_INTERVAL_IDLE) elif boot_sync_complete and now >= next_toggle_check_at: - latest_pond_active = check_toggles(started, params, sm) - if latest_pond_active is not None: - pond_active = latest_pond_active - next_toggle_check_at = now + REMOTE_TOGGLE_CHECK_INTERVAL_ACTIVE if pond_active else REMOTE_TOGGLE_CHECK_INTERVAL_IDLE + latest_galaxy_active = check_toggles(started, params, sm) + if latest_galaxy_active is not None: + galaxy_active = latest_galaxy_active + next_toggle_check_at = now + REMOTE_TOGGLE_CHECK_INTERVAL_ACTIVE if galaxy_active else REMOTE_TOGGLE_CHECK_INTERVAL_IDLE - if params.get_bool("PondUploadPending") and not maneuver_mode_active: - if not params.get_bool("PondPaired"): - params.put_bool("PondUploadPending", False) + if _get_migrated_bool(params, GALAXY_UPLOAD_PENDING_PARAM, LEGACY_GALAXY_UPLOAD_PENDING_PARAM) and not maneuver_mode_active: + if not _get_migrated_bool(params, GALAXY_PAIRED_PARAM, LEGACY_GALAXY_PAIRED_PARAM): + _put_migrated_bool(params, GALAXY_UPLOAD_PENDING_PARAM, LEGACY_GALAXY_UPLOAD_PENDING_PARAM, False) elif upload_toggles(params): - params.put_bool("PondUploadPending", False) + _put_migrated_bool(params, GALAXY_UPLOAD_PENDING_PARAM, LEGACY_GALAXY_UPLOAD_PENDING_PARAM, False) previous_parked = parked previous_started = started @@ -243,7 +296,7 @@ def pond_thread(): def main(): - pond_thread() + galaxy_thread() if __name__ == "__main__": diff --git a/starpilot/system/galaxy/galaxy.py b/starpilot/system/galaxy/galaxy.py index 539931ab5..817db7f1c 100644 --- a/starpilot/system/galaxy/galaxy.py +++ b/starpilot/system/galaxy/galaxy.py @@ -228,7 +228,7 @@ tls.enable = true poolCount = 2 [[proxies]] -name = "{slug}_pond" +name = "{slug}_galaxy" type = "http" localIP = "127.0.0.1" localPort = 8082 diff --git a/starpilot/system/the_pond/README.md b/starpilot/system/the_galaxy/README.md similarity index 84% rename from starpilot/system/the_pond/README.md rename to starpilot/system/the_galaxy/README.md index f2ee5335d..8c6278f8b 100644 --- a/starpilot/system/the_pond/README.md +++ b/starpilot/system/the_galaxy/README.md @@ -1,12 +1,12 @@ -# The Pond +# The Galaxy -**The Pond** is a lightweight web-based interface for managing your device. It allows you to adjust settings remotely, view video streams, and download logs—all from your browser. +**The Galaxy** is a lightweight web-based interface for managing your device. It allows you to adjust settings remotely, view video streams, and download logs—all from your browser. --- # Architecture -The Pond has two main components: +The Galaxy has two main components: - A **Python Flask API** - A **frontend built with Arrow.js** (a minimal reactive framework) @@ -14,7 +14,7 @@ Because the frontend uses native ES modules, there's no need for a build step or ## API -The API is simple and defined in `the_pond.py`. It exposes a handful of JSON-based endpoints via standard Flask routes: +The API is simple and defined in `the_galaxy.py`. It exposes a handful of JSON-based endpoints via standard Flask routes: - Get and update settings - Fetch error logs @@ -105,13 +105,13 @@ To add a new page: --- -# Running The Pond +# Running The Galaxy ### Using Docker ```bash -docker build -t the_pond . -docker run -v $(pwd):/app --rm -ti -p 8084:8084 the_pond +docker build -t the_galaxy . +docker run -v $(pwd):/app --rm -ti -p 8084:8084 the_galaxy ``` ### Run and debug on comma device (or computer with python) diff --git a/starpilot/system/the_pond/assets/components/home/home.css b/starpilot/system/the_galaxy/assets/components/home/home.css similarity index 100% rename from starpilot/system/the_pond/assets/components/home/home.css rename to starpilot/system/the_galaxy/assets/components/home/home.css diff --git a/starpilot/system/the_pond/assets/components/home/home.js b/starpilot/system/the_galaxy/assets/components/home/home.js similarity index 100% rename from starpilot/system/the_pond/assets/components/home/home.js rename to starpilot/system/the_galaxy/assets/components/home/home.js diff --git a/starpilot/system/the_pond/assets/components/main.css b/starpilot/system/the_galaxy/assets/components/main.css similarity index 100% rename from starpilot/system/the_pond/assets/components/main.css rename to starpilot/system/the_galaxy/assets/components/main.css diff --git a/starpilot/system/the_pond/assets/components/modal.css b/starpilot/system/the_galaxy/assets/components/modal.css similarity index 100% rename from starpilot/system/the_pond/assets/components/modal.css rename to starpilot/system/the_galaxy/assets/components/modal.css diff --git a/starpilot/system/the_pond/assets/components/modal.js b/starpilot/system/the_galaxy/assets/components/modal.js similarity index 100% rename from starpilot/system/the_pond/assets/components/modal.js rename to starpilot/system/the_galaxy/assets/components/modal.js diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_destination.css b/starpilot/system/the_galaxy/assets/components/navigation/navigation_destination.css similarity index 100% rename from starpilot/system/the_pond/assets/components/navigation/navigation_destination.css rename to starpilot/system/the_galaxy/assets/components/navigation/navigation_destination.css diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_destination.js b/starpilot/system/the_galaxy/assets/components/navigation/navigation_destination.js similarity index 100% rename from starpilot/system/the_pond/assets/components/navigation/navigation_destination.js rename to starpilot/system/the_galaxy/assets/components/navigation/navigation_destination.js diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_keys.css b/starpilot/system/the_galaxy/assets/components/navigation/navigation_keys.css similarity index 100% rename from starpilot/system/the_pond/assets/components/navigation/navigation_keys.css rename to starpilot/system/the_galaxy/assets/components/navigation/navigation_keys.css diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_keys.js b/starpilot/system/the_galaxy/assets/components/navigation/navigation_keys.js similarity index 100% rename from starpilot/system/the_pond/assets/components/navigation/navigation_keys.js rename to starpilot/system/the_galaxy/assets/components/navigation/navigation_keys.js diff --git a/starpilot/system/the_pond/assets/components/navigation/navigation_utilities.js b/starpilot/system/the_galaxy/assets/components/navigation/navigation_utilities.js similarity index 100% rename from starpilot/system/the_pond/assets/components/navigation/navigation_utilities.js rename to starpilot/system/the_galaxy/assets/components/navigation/navigation_utilities.js diff --git a/starpilot/system/the_pond/assets/components/recordings/dashcam_routes.css b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css similarity index 100% rename from starpilot/system/the_pond/assets/components/recordings/dashcam_routes.css rename to starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.css diff --git a/starpilot/system/the_pond/assets/components/recordings/dashcam_routes.js b/starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js similarity index 100% rename from starpilot/system/the_pond/assets/components/recordings/dashcam_routes.js rename to starpilot/system/the_galaxy/assets/components/recordings/dashcam_routes.js diff --git a/starpilot/system/the_pond/assets/components/recordings/screen_recordings.css b/starpilot/system/the_galaxy/assets/components/recordings/screen_recordings.css similarity index 100% rename from starpilot/system/the_pond/assets/components/recordings/screen_recordings.css rename to starpilot/system/the_galaxy/assets/components/recordings/screen_recordings.css diff --git a/starpilot/system/the_pond/assets/components/recordings/screen_recordings.js b/starpilot/system/the_galaxy/assets/components/recordings/screen_recordings.js similarity index 100% rename from starpilot/system/the_pond/assets/components/recordings/screen_recordings.js rename to starpilot/system/the_galaxy/assets/components/recordings/screen_recordings.js diff --git a/starpilot/system/the_pond/assets/components/router.js b/starpilot/system/the_galaxy/assets/components/router.js similarity index 98% rename from starpilot/system/the_pond/assets/components/router.js rename to starpilot/system/the_galaxy/assets/components/router.js index b83381ca4..f91da70f6 100644 --- a/starpilot/system/the_pond/assets/components/router.js +++ b/starpilot/system/the_galaxy/assets/components/router.js @@ -90,7 +90,7 @@ function Root() { history: createBrowserHistory(), }).initialize() - window.__thePondNavigate = (href) => { + window.__theGalaxyNavigate = (href) => { router.navigate(toRouterHref(href)) window.scrollTo(0, 0) } @@ -169,8 +169,8 @@ function mountRouterWhenReady() { return } - if (!window.__thePondRouterMounted) { - window.__thePondRouterMounted = true + if (!window.__theGalaxyRouterMounted) { + window.__theGalaxyRouterMounted = true Root()(mountNode) } else { console.warn("[router] duplicate mount prevented") diff --git a/starpilot/system/the_pond/assets/components/settings.css b/starpilot/system/the_galaxy/assets/components/settings.css similarity index 100% rename from starpilot/system/the_pond/assets/components/settings.css rename to starpilot/system/the_galaxy/assets/components/settings.css diff --git a/starpilot/system/the_pond/assets/components/settings.js b/starpilot/system/the_galaxy/assets/components/settings.js similarity index 100% rename from starpilot/system/the_pond/assets/components/settings.js rename to starpilot/system/the_galaxy/assets/components/settings.js diff --git a/starpilot/system/the_pond/assets/components/sidebar.css b/starpilot/system/the_galaxy/assets/components/sidebar.css similarity index 100% rename from starpilot/system/the_pond/assets/components/sidebar.css rename to starpilot/system/the_galaxy/assets/components/sidebar.css diff --git a/starpilot/system/the_pond/assets/components/sidebar.js b/starpilot/system/the_galaxy/assets/components/sidebar.js similarity index 97% rename from starpilot/system/the_pond/assets/components/sidebar.js rename to starpilot/system/the_galaxy/assets/components/sidebar.js index 968a79356..96fed466c 100644 --- a/starpilot/system/the_pond/assets/components/sidebar.js +++ b/starpilot/system/the_galaxy/assets/components/sidebar.js @@ -69,8 +69,8 @@ function bindSidebarHandlers() { if (!menuButton || !underlay) return; - if (!window.__thePondSidebarMenuBound) { - window.__thePondSidebarMenuBound = true; + if (!window.__theGalaxySidebarMenuBound) { + window.__theGalaxySidebarMenuBound = true; menuButton.addEventListener("click", () => { const sidebar = document.getElementById("sidebar"); const currentUnderlay = document.getElementById("sidebarUnderlay"); @@ -92,7 +92,7 @@ function bindSidebarHandlers() { event.preventDefault(); const href = anchor.getAttribute("href") || "/"; - const navigate = window.__thePondNavigate; + const navigate = window.__theGalaxyNavigate; if (typeof navigate === "function") { navigate(href); } else { diff --git a/starpilot/system/the_pond/assets/components/tailscale/tailscale.css b/starpilot/system/the_galaxy/assets/components/tailscale/tailscale.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tailscale/tailscale.css rename to starpilot/system/the_galaxy/assets/components/tailscale/tailscale.css diff --git a/starpilot/system/the_pond/assets/components/tailscale/tailscale.js b/starpilot/system/the_galaxy/assets/components/tailscale/tailscale.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tailscale/tailscale.js rename to starpilot/system/the_galaxy/assets/components/tailscale/tailscale.js diff --git a/starpilot/system/the_pond/assets/components/tools/device_settings.css b/starpilot/system/the_galaxy/assets/components/tools/device_settings.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/device_settings.css rename to starpilot/system/the_galaxy/assets/components/tools/device_settings.css diff --git a/starpilot/system/the_pond/assets/components/tools/device_settings.js b/starpilot/system/the_galaxy/assets/components/tools/device_settings.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/device_settings.js rename to starpilot/system/the_galaxy/assets/components/tools/device_settings.js diff --git a/starpilot/system/the_pond/assets/components/tools/device_settings_layout.json b/starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/device_settings_layout.json rename to starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json diff --git a/starpilot/system/the_pond/assets/components/tools/doors.css b/starpilot/system/the_galaxy/assets/components/tools/doors.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/doors.css rename to starpilot/system/the_galaxy/assets/components/tools/doors.css diff --git a/starpilot/system/the_pond/assets/components/tools/doors.js b/starpilot/system/the_galaxy/assets/components/tools/doors.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/doors.js rename to starpilot/system/the_galaxy/assets/components/tools/doors.js diff --git a/starpilot/system/the_pond/assets/components/tools/error_logs.css b/starpilot/system/the_galaxy/assets/components/tools/error_logs.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/error_logs.css rename to starpilot/system/the_galaxy/assets/components/tools/error_logs.css diff --git a/starpilot/system/the_pond/assets/components/tools/error_logs.js b/starpilot/system/the_galaxy/assets/components/tools/error_logs.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/error_logs.js rename to starpilot/system/the_galaxy/assets/components/tools/error_logs.js diff --git a/starpilot/system/the_pond/assets/components/tools/galaxy.css b/starpilot/system/the_galaxy/assets/components/tools/galaxy.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/galaxy.css rename to starpilot/system/the_galaxy/assets/components/tools/galaxy.css diff --git a/starpilot/system/the_pond/assets/components/tools/galaxy.js b/starpilot/system/the_galaxy/assets/components/tools/galaxy.js similarity index 98% rename from starpilot/system/the_pond/assets/components/tools/galaxy.js rename to starpilot/system/the_galaxy/assets/components/tools/galaxy.js index a73fc0268..e6c53c84b 100644 --- a/starpilot/system/the_pond/assets/components/tools/galaxy.js +++ b/starpilot/system/the_galaxy/assets/components/tools/galaxy.js @@ -139,7 +139,7 @@ export function GalaxyPairing() { Not Paired

- Pair your device with Galaxy to access The Pond remotely from anywhere. + Pair your device with Galaxy to access The Galaxy remotely from anywhere. Set a password to secure your connection.

diff --git a/starpilot/system/the_pond/assets/components/tools/lateral_maneuvers.js b/starpilot/system/the_galaxy/assets/components/tools/lateral_maneuvers.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/lateral_maneuvers.js rename to starpilot/system/the_galaxy/assets/components/tools/lateral_maneuvers.js diff --git a/starpilot/system/the_pond/assets/components/tools/longitudinal_maneuvers.css b/starpilot/system/the_galaxy/assets/components/tools/longitudinal_maneuvers.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/longitudinal_maneuvers.css rename to starpilot/system/the_galaxy/assets/components/tools/longitudinal_maneuvers.css diff --git a/starpilot/system/the_pond/assets/components/tools/longitudinal_maneuvers.js b/starpilot/system/the_galaxy/assets/components/tools/longitudinal_maneuvers.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/longitudinal_maneuvers.js rename to starpilot/system/the_galaxy/assets/components/tools/longitudinal_maneuvers.js diff --git a/starpilot/system/the_pond/assets/components/tools/maps.css b/starpilot/system/the_galaxy/assets/components/tools/maps.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/maps.css rename to starpilot/system/the_galaxy/assets/components/tools/maps.css diff --git a/starpilot/system/the_pond/assets/components/tools/maps.js b/starpilot/system/the_galaxy/assets/components/tools/maps.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/maps.js rename to starpilot/system/the_galaxy/assets/components/tools/maps.js diff --git a/starpilot/system/the_pond/assets/components/tools/model_manager.css b/starpilot/system/the_galaxy/assets/components/tools/model_manager.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/model_manager.css rename to starpilot/system/the_galaxy/assets/components/tools/model_manager.css diff --git a/starpilot/system/the_pond/assets/components/tools/model_manager.js b/starpilot/system/the_galaxy/assets/components/tools/model_manager.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/model_manager.js rename to starpilot/system/the_galaxy/assets/components/tools/model_manager.js diff --git a/starpilot/system/the_pond/assets/components/tools/plots.css b/starpilot/system/the_galaxy/assets/components/tools/plots.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/plots.css rename to starpilot/system/the_galaxy/assets/components/tools/plots.css diff --git a/starpilot/system/the_pond/assets/components/tools/plots.js b/starpilot/system/the_galaxy/assets/components/tools/plots.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/plots.js rename to starpilot/system/the_galaxy/assets/components/tools/plots.js diff --git a/starpilot/system/the_pond/assets/components/tools/speed_limits.css b/starpilot/system/the_galaxy/assets/components/tools/speed_limits.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/speed_limits.css rename to starpilot/system/the_galaxy/assets/components/tools/speed_limits.css diff --git a/starpilot/system/the_pond/assets/components/tools/speed_limits.js b/starpilot/system/the_galaxy/assets/components/tools/speed_limits.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/speed_limits.js rename to starpilot/system/the_galaxy/assets/components/tools/speed_limits.js diff --git a/starpilot/system/the_pond/assets/components/tools/testing_ground.css b/starpilot/system/the_galaxy/assets/components/tools/testing_ground.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/testing_ground.css rename to starpilot/system/the_galaxy/assets/components/tools/testing_ground.css diff --git a/starpilot/system/the_pond/assets/components/tools/testing_ground.js b/starpilot/system/the_galaxy/assets/components/tools/testing_ground.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/testing_ground.js rename to starpilot/system/the_galaxy/assets/components/tools/testing_ground.js diff --git a/starpilot/system/the_pond/assets/components/tools/theme_maker.css b/starpilot/system/the_galaxy/assets/components/tools/theme_maker.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/theme_maker.css rename to starpilot/system/the_galaxy/assets/components/tools/theme_maker.css diff --git a/starpilot/system/the_pond/assets/components/tools/theme_maker.js b/starpilot/system/the_galaxy/assets/components/tools/theme_maker.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/theme_maker.js rename to starpilot/system/the_galaxy/assets/components/tools/theme_maker.js diff --git a/starpilot/system/the_pond/assets/components/tools/tmux.css b/starpilot/system/the_galaxy/assets/components/tools/tmux.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/tmux.css rename to starpilot/system/the_galaxy/assets/components/tools/tmux.css diff --git a/starpilot/system/the_pond/assets/components/tools/tmux.js b/starpilot/system/the_galaxy/assets/components/tools/tmux.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/tmux.js rename to starpilot/system/the_galaxy/assets/components/tools/tmux.js diff --git a/starpilot/system/the_pond/assets/components/tools/toggles.css b/starpilot/system/the_galaxy/assets/components/tools/toggles.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/toggles.css rename to starpilot/system/the_galaxy/assets/components/tools/toggles.css diff --git a/starpilot/system/the_pond/assets/components/tools/toggles.js b/starpilot/system/the_galaxy/assets/components/tools/toggles.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/toggles.js rename to starpilot/system/the_galaxy/assets/components/tools/toggles.js diff --git a/starpilot/system/the_pond/assets/components/tools/troubleshoot.css b/starpilot/system/the_galaxy/assets/components/tools/troubleshoot.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/troubleshoot.css rename to starpilot/system/the_galaxy/assets/components/tools/troubleshoot.css diff --git a/starpilot/system/the_pond/assets/components/tools/troubleshoot.js b/starpilot/system/the_galaxy/assets/components/tools/troubleshoot.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/troubleshoot.js rename to starpilot/system/the_galaxy/assets/components/tools/troubleshoot.js diff --git a/starpilot/system/the_pond/assets/components/tools/tsk_manager.css b/starpilot/system/the_galaxy/assets/components/tools/tsk_manager.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/tsk_manager.css rename to starpilot/system/the_galaxy/assets/components/tools/tsk_manager.css diff --git a/starpilot/system/the_pond/assets/components/tools/tsk_manager.js b/starpilot/system/the_galaxy/assets/components/tools/tsk_manager.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/tsk_manager.js rename to starpilot/system/the_galaxy/assets/components/tools/tsk_manager.js diff --git a/starpilot/system/the_pond/assets/components/tools/update_manager.css b/starpilot/system/the_galaxy/assets/components/tools/update_manager.css similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/update_manager.css rename to starpilot/system/the_galaxy/assets/components/tools/update_manager.css diff --git a/starpilot/system/the_pond/assets/components/tools/update_manager.js b/starpilot/system/the_galaxy/assets/components/tools/update_manager.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/update_manager.js rename to starpilot/system/the_galaxy/assets/components/tools/update_manager.js diff --git a/starpilot/system/the_pond/assets/components/tools/vehicle_features.js b/starpilot/system/the_galaxy/assets/components/tools/vehicle_features.js similarity index 100% rename from starpilot/system/the_pond/assets/components/tools/vehicle_features.js rename to starpilot/system/the_galaxy/assets/components/tools/vehicle_features.js diff --git a/starpilot/system/the_pond/assets/images/about.txt b/starpilot/system/the_galaxy/assets/images/about.txt similarity index 100% rename from starpilot/system/the_pond/assets/images/about.txt rename to starpilot/system/the_galaxy/assets/images/about.txt diff --git a/starpilot/system/the_pond/assets/images/android-chrome-192x192.png b/starpilot/system/the_galaxy/assets/images/android-chrome-192x192.png similarity index 100% rename from starpilot/system/the_pond/assets/images/android-chrome-192x192.png rename to starpilot/system/the_galaxy/assets/images/android-chrome-192x192.png diff --git a/starpilot/system/the_pond/assets/images/android-chrome-512x512.png b/starpilot/system/the_galaxy/assets/images/android-chrome-512x512.png similarity index 100% rename from starpilot/system/the_pond/assets/images/android-chrome-512x512.png rename to starpilot/system/the_galaxy/assets/images/android-chrome-512x512.png diff --git a/starpilot/system/the_pond/assets/images/apple-touch-icon.png b/starpilot/system/the_galaxy/assets/images/apple-touch-icon.png similarity index 100% rename from starpilot/system/the_pond/assets/images/apple-touch-icon.png rename to starpilot/system/the_galaxy/assets/images/apple-touch-icon.png diff --git a/starpilot/system/the_pond/assets/images/favicon-16x16.png b/starpilot/system/the_galaxy/assets/images/favicon-16x16.png similarity index 100% rename from starpilot/system/the_pond/assets/images/favicon-16x16.png rename to starpilot/system/the_galaxy/assets/images/favicon-16x16.png diff --git a/starpilot/system/the_pond/assets/images/favicon-32x32.png b/starpilot/system/the_galaxy/assets/images/favicon-32x32.png similarity index 100% rename from starpilot/system/the_pond/assets/images/favicon-32x32.png rename to starpilot/system/the_galaxy/assets/images/favicon-32x32.png diff --git a/starpilot/system/the_pond/assets/images/favicon.ico b/starpilot/system/the_galaxy/assets/images/favicon.ico similarity index 100% rename from starpilot/system/the_pond/assets/images/favicon.ico rename to starpilot/system/the_galaxy/assets/images/favicon.ico diff --git a/starpilot/system/the_pond/assets/images/favicon.svg b/starpilot/system/the_galaxy/assets/images/favicon.svg similarity index 100% rename from starpilot/system/the_pond/assets/images/favicon.svg rename to starpilot/system/the_galaxy/assets/images/favicon.svg diff --git a/starpilot/system/the_pond/assets/images/main_logo.png b/starpilot/system/the_galaxy/assets/images/main_logo.png similarity index 100% rename from starpilot/system/the_pond/assets/images/main_logo.png rename to starpilot/system/the_galaxy/assets/images/main_logo.png diff --git a/starpilot/system/the_pond/assets/images/safari-pinned-tab.svg b/starpilot/system/the_galaxy/assets/images/safari-pinned-tab.svg similarity index 100% rename from starpilot/system/the_pond/assets/images/safari-pinned-tab.svg rename to starpilot/system/the_galaxy/assets/images/safari-pinned-tab.svg diff --git a/starpilot/system/the_pond/assets/images/site.webmanifest b/starpilot/system/the_galaxy/assets/images/site.webmanifest similarity index 100% rename from starpilot/system/the_pond/assets/images/site.webmanifest rename to starpilot/system/the_galaxy/assets/images/site.webmanifest diff --git a/starpilot/system/the_pond/assets/js/snackbar.js b/starpilot/system/the_galaxy/assets/js/snackbar.js similarity index 100% rename from starpilot/system/the_pond/assets/js/snackbar.js rename to starpilot/system/the_galaxy/assets/js/snackbar.js diff --git a/starpilot/system/the_pond/assets/js/utils.js b/starpilot/system/the_galaxy/assets/js/utils.js similarity index 100% rename from starpilot/system/the_pond/assets/js/utils.js rename to starpilot/system/the_galaxy/assets/js/utils.js diff --git a/starpilot/system/the_pond/assets/manifest.json b/starpilot/system/the_galaxy/assets/manifest.json similarity index 100% rename from starpilot/system/the_pond/assets/manifest.json rename to starpilot/system/the_galaxy/assets/manifest.json diff --git a/starpilot/system/the_pond/assets/vendor/arrow-core.js b/starpilot/system/the_galaxy/assets/vendor/arrow-core.js similarity index 100% rename from starpilot/system/the_pond/assets/vendor/arrow-core.js rename to starpilot/system/the_galaxy/assets/vendor/arrow-core.js diff --git a/starpilot/system/the_pond/assets/vendor/bootstrap-icons/bootstrap-icons.min.css b/starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/bootstrap-icons.min.css similarity index 100% rename from starpilot/system/the_pond/assets/vendor/bootstrap-icons/bootstrap-icons.min.css rename to starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/bootstrap-icons.min.css diff --git a/starpilot/system/the_pond/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff b/starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff similarity index 100% rename from starpilot/system/the_pond/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff rename to starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff diff --git a/starpilot/system/the_pond/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 b/starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 similarity index 100% rename from starpilot/system/the_pond/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 rename to starpilot/system/the_galaxy/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/css/font-awesome.min.css b/starpilot/system/the_galaxy/assets/vendor/font-awesome/css/font-awesome.min.css similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/css/font-awesome.min.css rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/css/font-awesome.min.css diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot b/starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg b/starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf b/starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff b/starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff diff --git a/starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 b/starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from starpilot/system/the_pond/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 rename to starpilot/system/the_galaxy/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/starpilot/system/the_pond/assets/vendor/fonts/Inter-Bold.ttf b/starpilot/system/the_galaxy/assets/vendor/fonts/Inter-Bold.ttf similarity index 100% rename from starpilot/system/the_pond/assets/vendor/fonts/Inter-Bold.ttf rename to starpilot/system/the_galaxy/assets/vendor/fonts/Inter-Bold.ttf diff --git a/starpilot/system/the_pond/assets/vendor/fonts/Inter-Regular.ttf b/starpilot/system/the_galaxy/assets/vendor/fonts/Inter-Regular.ttf similarity index 100% rename from starpilot/system/the_pond/assets/vendor/fonts/Inter-Regular.ttf rename to starpilot/system/the_galaxy/assets/vendor/fonts/Inter-Regular.ttf diff --git a/starpilot/system/the_pond/assets/vendor/fonts/fonts.css b/starpilot/system/the_galaxy/assets/vendor/fonts/fonts.css similarity index 100% rename from starpilot/system/the_pond/assets/vendor/fonts/fonts.css rename to starpilot/system/the_galaxy/assets/vendor/fonts/fonts.css diff --git a/starpilot/system/the_pond/assets/vendor/fonts/password.ttf b/starpilot/system/the_galaxy/assets/vendor/fonts/password.ttf similarity index 100% rename from starpilot/system/the_pond/assets/vendor/fonts/password.ttf rename to starpilot/system/the_galaxy/assets/vendor/fonts/password.ttf diff --git a/starpilot/system/the_pond/assets/vendor/remix-router-1.3.1.js b/starpilot/system/the_galaxy/assets/vendor/remix-router-1.3.1.js similarity index 100% rename from starpilot/system/the_pond/assets/vendor/remix-router-1.3.1.js rename to starpilot/system/the_galaxy/assets/vendor/remix-router-1.3.1.js diff --git a/starpilot/system/the_pond/factory_reset.py b/starpilot/system/the_galaxy/factory_reset.py similarity index 100% rename from starpilot/system/the_pond/factory_reset.py rename to starpilot/system/the_galaxy/factory_reset.py diff --git a/starpilot/system/the_pond/templates/index.html b/starpilot/system/the_galaxy/templates/index.html similarity index 96% rename from starpilot/system/the_pond/templates/index.html rename to starpilot/system/the_galaxy/templates/index.html index 851b1f1e6..d3e018dc1 100644 --- a/starpilot/system/the_pond/templates/index.html +++ b/starpilot/system/the_galaxy/templates/index.html @@ -45,7 +45,7 @@ diff --git a/starpilot/system/the_pond/tests/test_dashboard_stats.py b/starpilot/system/the_galaxy/tests/test_dashboard_stats.py similarity index 99% rename from starpilot/system/the_pond/tests/test_dashboard_stats.py rename to starpilot/system/the_galaxy/tests/test_dashboard_stats.py index 972e06296..e3236d772 100644 --- a/starpilot/system/the_pond/tests/test_dashboard_stats.py +++ b/starpilot/system/the_galaxy/tests/test_dashboard_stats.py @@ -179,11 +179,11 @@ def _install_server_import_stubs(): normalize_destination_payload=lambda payload: payload, update_recent_destinations=lambda *args, **kwargs: [], ) - sys.modules["openpilot.starpilot.system." + "the_" + "po" + "nd.factory_reset"] = _simple_module( - "openpilot.starpilot.system." + "the_" + "po" + "nd.factory_reset", + sys.modules["openpilot.starpilot.system.the_galaxy.factory_reset"] = _simple_module( + "openpilot.starpilot.system.the_galaxy.factory_reset", remove_path=lambda *args, **kwargs: None, ) - sys.modules["openpilot.starpilot.system." + "the_" + "po" + "nd.utilities"] = utilities + sys.modules["openpilot.starpilot.system.the_galaxy.utilities"] = utilities class FakeParams: @@ -970,7 +970,7 @@ def test_github_urls_accept_owner_repo_origin(): def _load_server_module(): _install_server_import_stubs() - spec = importlib.util.spec_from_file_location("dashboard_server", MODULE_DIR / ("the_" + "po" + "nd.py")) + spec = importlib.util.spec_from_file_location("dashboard_server", MODULE_DIR / "the_galaxy.py") module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module @@ -978,7 +978,7 @@ def _load_server_module(): def test_stats_endpoint_keeps_existing_keys_and_adds_dashboard(monkeypatch): server = _load_server_module() - assert getattr(server, "_import_" + "po" + "nd_web_symbols")() + assert server._import_galaxy_web_symbols() app = server.Flask( "dashboard_test", diff --git a/starpilot/system/the_pond/tests/test_factory_reset.py b/starpilot/system/the_galaxy/tests/test_factory_reset.py similarity index 76% rename from starpilot/system/the_pond/tests/test_factory_reset.py rename to starpilot/system/the_galaxy/tests/test_factory_reset.py index 3bdc04775..c5e61eb4d 100644 --- a/starpilot/system/the_pond/tests/test_factory_reset.py +++ b/starpilot/system/the_galaxy/tests/test_factory_reset.py @@ -1,8 +1,19 @@ +import importlib.util import subprocess import pytest -from openpilot.starpilot.system.the_pond import factory_reset +from pathlib import Path + + +def _load_factory_reset_module(): + spec = importlib.util.spec_from_file_location("factory_reset_under_test", Path(__file__).resolve().parents[1] / "factory_reset.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +factory_reset = _load_factory_reset_module() def test_remove_path_retries_directory_not_empty(monkeypatch): diff --git a/starpilot/system/the_pond/tests/test_navigation_params.py b/starpilot/system/the_galaxy/tests/test_navigation_params.py similarity index 58% rename from starpilot/system/the_pond/tests/test_navigation_params.py rename to starpilot/system/the_galaxy/tests/test_navigation_params.py index cc574a40c..142b52957 100644 --- a/starpilot/system/the_pond/tests/test_navigation_params.py +++ b/starpilot/system/the_galaxy/tests/test_navigation_params.py @@ -1,7 +1,21 @@ import json from openpilot.common.params import ParamKeyType -from openpilot.starpilot.system.the_pond import the_pond + +from test_dashboard_stats import MODULE_DIR, _install_server_import_stubs + + +def _load_server_module(): + import importlib.util + + _install_server_import_stubs() + spec = importlib.util.spec_from_file_location("navigation_params_server", MODULE_DIR / "the_galaxy.py") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +the_galaxy = _load_server_module() class FakeParamsBackend: @@ -30,7 +44,7 @@ def test_params_compat_accepts_json_strings_for_json_keys(): key_types={"FavoriteDestinations": ParamKeyType.JSON}, default_values={"FavoriteDestinations": []}, ) - compat = the_pond.ParamsCompat(backend) + compat = the_galaxy.ParamsCompat(backend) compat.put("FavoriteDestinations", json.dumps([{"name": "Home"}])) @@ -47,12 +61,12 @@ def test_navigation_last_position_uses_recent_persisted_fix(monkeypatch): memory_backend = FakeParamsBackend(values={"LastGPSPosition": ""}) persisted_backend = FakeParamsBackend(values={"LastGPSPosition": recent_payload}) - monkeypatch.setattr(the_pond, "params_memory", the_pond.ParamsCompat(memory_backend)) - monkeypatch.setattr(the_pond, "params", the_pond.ParamsCompat(persisted_backend)) - monkeypatch.setattr(the_pond.time, "time", lambda: 10_300.0) - monkeypatch.setattr(the_pond, "system_time_valid", lambda: True) + monkeypatch.setattr(the_galaxy, "params_memory", the_galaxy.ParamsCompat(memory_backend)) + monkeypatch.setattr(the_galaxy, "params", the_galaxy.ParamsCompat(persisted_backend)) + monkeypatch.setattr(the_galaxy.time, "time", lambda: 10_300.0) + monkeypatch.setattr(the_galaxy, "system_time_valid", lambda: True) - position = the_pond._get_navigation_last_position() + position = the_galaxy._get_navigation_last_position() assert position["latitude"] == 41.0 assert position["longitude"] == -87.0 @@ -68,9 +82,9 @@ def test_navigation_last_position_rejects_stale_persisted_fix(monkeypatch): memory_backend = FakeParamsBackend(values={"LastGPSPosition": ""}) persisted_backend = FakeParamsBackend(values={"LastGPSPosition": stale_payload}) - monkeypatch.setattr(the_pond, "params_memory", the_pond.ParamsCompat(memory_backend)) - monkeypatch.setattr(the_pond, "params", the_pond.ParamsCompat(persisted_backend)) - monkeypatch.setattr(the_pond.time, "time", lambda: 10_000.0 + the_pond.NAVIGATION_PERSISTED_LOCATION_MAX_AGE_SECONDS + 1.0) - monkeypatch.setattr(the_pond, "system_time_valid", lambda: True) + monkeypatch.setattr(the_galaxy, "params_memory", the_galaxy.ParamsCompat(memory_backend)) + monkeypatch.setattr(the_galaxy, "params", the_galaxy.ParamsCompat(persisted_backend)) + monkeypatch.setattr(the_galaxy.time, "time", lambda: 10_000.0 + the_galaxy.NAVIGATION_PERSISTED_LOCATION_MAX_AGE_SECONDS + 1.0) + monkeypatch.setattr(the_galaxy, "system_time_valid", lambda: True) - assert the_pond._get_navigation_last_position() is None + assert the_galaxy._get_navigation_last_position() is None diff --git a/starpilot/system/the_pond/the_pond.py b/starpilot/system/the_galaxy/the_galaxy.py similarity index 99% rename from starpilot/system/the_pond/the_pond.py rename to starpilot/system/the_galaxy/the_galaxy.py index 23f51282a..14d557846 100644 --- a/starpilot/system/the_pond/the_pond.py +++ b/starpilot/system/the_galaxy/the_galaxy.py @@ -80,8 +80,8 @@ from openpilot.starpilot.common.testing_grounds import ( TESTING_GROUNDS_STATE_PATH as SHARED_TESTING_GROUNDS_STATE_PATH, ) from openpilot.starpilot.navigation.destination_store import normalize_destination_payload, update_recent_destinations -from openpilot.starpilot.system.the_pond.factory_reset import remove_path as _run_factory_reset_delete -from openpilot.starpilot.system.the_pond import utilities +from openpilot.starpilot.system.the_galaxy.factory_reset import remove_path as _run_factory_reset_delete +from openpilot.starpilot.system.the_galaxy import utilities DISCORD_WEBHOOK_URL = os.getenv("DISCORD_WEBHOOK_URL") @@ -89,9 +89,12 @@ GITLAB_API = "https://gitlab.com/api/v4" GITLAB_SUBMISSIONS_PROJECT_ID = "71992109" GITLAB_TOKEN = os.environ.get("GITLAB_TOKEN", "") -POND_DEPS_PATH = "/data/pond_deps" -if os.path.isdir(POND_DEPS_PATH) and POND_DEPS_PATH not in sys.path: - sys.path.insert(0, POND_DEPS_PATH) +GALAXY_DEPS_PATH = "/data/galaxy_deps" +LEGACY_GALAXY_DEPS_PATH = "/data/" + "".join(chr(code) for code in (112, 111, 110, 100)) + "_deps" +GALAXY_DEPS_PATHS = (GALAXY_DEPS_PATH, LEGACY_GALAXY_DEPS_PATH) +for deps_path in GALAXY_DEPS_PATHS: + if os.path.isdir(deps_path) and deps_path not in sys.path: + sys.path.insert(0, deps_path) REPO_THIRD_PARTY_PATH = Path(__file__).resolve().parents[2] / "third_party" if REPO_THIRD_PARTY_PATH.is_dir() and str(REPO_THIRD_PARTY_PATH) not in sys.path: @@ -106,8 +109,8 @@ request = None send_file = None send_from_directory = None -_POND_WEB_DEPS_READY = False -_POND_WEB_DEPS_ERROR = None +_GALAXY_WEB_DEPS_READY = False +_GALAXY_WEB_DEPS_ERROR = None _TESTING_GROUND_CUSTOM_RESERVED_SERVICE = "customReserved9" _TESTING_GROUND_CUSTOM_RESERVED_INTERVAL_S = 15.0 @@ -120,7 +123,7 @@ def _is_comma_device_runtime() -> bool: """Robust runtime device check. `PC` is derived from `/TICI`, which can be missing in edge boot/update states. - For Galaxy routing we must keep on-device Pond on 8082. + For Galaxy routing we must keep on-device Galaxy on 8082. """ if not PC: return True @@ -146,8 +149,8 @@ def _get_param_key_type(params_obj, key): return getter(key) -def _import_pond_web_symbols(): - global Flask, Response, jsonify, make_response, render_template, request, send_file, send_from_directory, _POND_WEB_DEPS_ERROR +def _import_galaxy_web_symbols(): + global Flask, Response, jsonify, make_response, render_template, request, send_file, send_from_directory, _GALAXY_WEB_DEPS_ERROR try: from flask import Flask as _Flask @@ -159,7 +162,7 @@ def _import_pond_web_symbols(): from flask import send_file as _send_file from flask import send_from_directory as _send_from_directory except ModuleNotFoundError as error: - _POND_WEB_DEPS_ERROR = error + _GALAXY_WEB_DEPS_ERROR = error return False Flask = _Flask @@ -170,43 +173,44 @@ def _import_pond_web_symbols(): request = _request send_file = _send_file send_from_directory = _send_from_directory - _POND_WEB_DEPS_ERROR = None + _GALAXY_WEB_DEPS_ERROR = None return True -def _install_pond_web_deps(): - global _POND_WEB_DEPS_ERROR +def _install_galaxy_web_deps(): + global _GALAXY_WEB_DEPS_ERROR if not _is_comma_device_runtime(): return False - # Local-only dependency policy: prefer bundled repo deps, then existing /data/pond_deps. + # Local-only dependency policy: prefer bundled repo deps, then existing local deps. # Do not hit pip/network at runtime. if REPO_THIRD_PARTY_PATH.is_dir() and str(REPO_THIRD_PARTY_PATH) not in sys.path: sys.path.insert(0, str(REPO_THIRD_PARTY_PATH)) - if os.path.isdir(POND_DEPS_PATH) and POND_DEPS_PATH not in sys.path: - sys.path.insert(0, POND_DEPS_PATH) + for deps_path in GALAXY_DEPS_PATHS: + if os.path.isdir(deps_path) and deps_path not in sys.path: + sys.path.insert(0, deps_path) importlib.invalidate_caches() - if _import_pond_web_symbols(): + if _import_galaxy_web_symbols(): return True - _POND_WEB_DEPS_ERROR = RuntimeError( - "Missing local Flask deps (expected in starpilot/third_party or /data/pond_deps)." + _GALAXY_WEB_DEPS_ERROR = RuntimeError( + "Missing local Flask deps (expected in starpilot/third_party or local Galaxy deps)." ) return False -def _ensure_pond_web_deps(): - global _POND_WEB_DEPS_READY +def _ensure_galaxy_web_deps(): + global _GALAXY_WEB_DEPS_READY - if _POND_WEB_DEPS_READY: + if _GALAXY_WEB_DEPS_READY: return True - if _import_pond_web_symbols(): - _POND_WEB_DEPS_READY = True + if _import_galaxy_web_symbols(): + _GALAXY_WEB_DEPS_READY = True return True - if _install_pond_web_deps() and _import_pond_web_symbols(): - _POND_WEB_DEPS_READY = True + if _install_galaxy_web_deps() and _import_galaxy_web_symbols(): + _GALAXY_WEB_DEPS_READY = True return True return False @@ -2089,7 +2093,7 @@ _cached_param_types = None _cached_default_values = None _cached_static_default_values = None -POND_MANUAL_BOOL_PARAM_KEYS = {"IsRHD", "IsRHDOverride"} +GALAXY_MANUAL_BOOL_PARAM_KEYS = {"IsRHD", "IsRHDOverride"} def _get_param_type_info(): global _cached_allowed_keys, _cached_param_types @@ -2114,7 +2118,7 @@ def _get_param_type_info(): elif k in types and dt == "bool": types[k] = bool - for k in POND_MANUAL_BOOL_PARAM_KEYS: + for k in GALAXY_MANUAL_BOOL_PARAM_KEYS: if k in _cached_allowed_keys: types[k] = bool @@ -3367,7 +3371,7 @@ def _set_longitudinal_maneuver_mode(enabled): "uiText2": "Engage with SET to start the test suite.", "updatedAtSec": time.monotonic(), }) - _append_longitudinal_maneuver_history(status, "Armed from The Pond. Engage with SET to start.") + _append_longitudinal_maneuver_history(status, "Armed from The Galaxy. Engage with SET to start.") else: params.put_bool("LongitudinalManeuverMode", False) params.put("LongitudinalManeuverPaddleMode", "auto") @@ -3379,7 +3383,7 @@ def _set_longitudinal_maneuver_mode(enabled): "uiText2": "Test mode disabled.", "updatedAtSec": time.monotonic(), }) - _append_longitudinal_maneuver_history(status, "Stopped from The Pond.") + _append_longitudinal_maneuver_history(status, "Stopped from The Galaxy.") return _save_longitudinal_maneuver_status(status) @@ -3481,7 +3485,7 @@ def _set_lateral_maneuver_mode(enabled): "uiText2": "Stabilize on a straight, flat road to start.", "updatedAtSec": time.monotonic(), }) - _append_lateral_maneuver_history(status, "Armed from The Pond. Stabilize on a straight, flat road to start.") + _append_lateral_maneuver_history(status, "Armed from The Galaxy. Stabilize on a straight, flat road to start.") else: params.put_bool("LateralManeuverMode", False) status.update({ @@ -3492,7 +3496,7 @@ def _set_lateral_maneuver_mode(enabled): "uiText2": "Test mode disabled.", "updatedAtSec": time.monotonic(), }) - _append_lateral_maneuver_history(status, "Stopped from The Pond.") + _append_lateral_maneuver_history(status, "Stopped from The Galaxy.") return _save_lateral_maneuver_status(status) @@ -5616,7 +5620,7 @@ def setup(app): run_cmd(["sudo", "systemctl", "restart", "tailscaled"], "Started tailscaled service.", "Failed to start tailscaled service.") proc = subprocess.Popen( - ["sudo", f"{base}/tailscale", "--socket", socket, "up", "--hostname", f"{HARDWARE.get_device_type()}-the-pond"], + ["sudo", f"{base}/tailscale", "--socket", socket, "up", "--hostname", f"{HARDWARE.get_device_type()}-the-galaxy"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, @@ -6608,8 +6612,8 @@ def setup(app): return {"error": "Video not found"}, 404 def main(): - while not _ensure_pond_web_deps(): - print(f"The Pond waiting for Flask dependency ({_POND_WEB_DEPS_ERROR}); retrying in 60s.") + while not _ensure_galaxy_web_deps(): + print(f"The Galaxy waiting for Flask dependency ({_GALAXY_WEB_DEPS_ERROR}); retrying in 60s.") time.sleep(60) app = Flask(__name__, static_folder="assets", static_url_path="/assets") @@ -6621,7 +6625,7 @@ def main(): port = 8083 if debug else 8082 if debug: - print("\"The Pond\" is not running on a comma device, enabling debug mode") + print("\"The Galaxy\" is not running on a comma device, enabling debug mode") app.secret_key = secrets.token_hex(32) app.run(host="0.0.0.0", port=port, debug=debug) diff --git a/starpilot/system/the_pond/utilities.py b/starpilot/system/the_galaxy/utilities.py similarity index 99% rename from starpilot/system/the_pond/utilities.py rename to starpilot/system/the_galaxy/utilities.py index 2bb0a11e4..b0770c81d 100644 --- a/starpilot/system/the_pond/utilities.py +++ b/starpilot/system/the_galaxy/utilities.py @@ -82,9 +82,11 @@ XOR_KEY = "s8#pL3*Xj!aZ@dWq" MAX_FILE_SIZE = 5 * 1024 * 1024 _FILENAME_SANITIZE_RE = re.compile(r"[^A-Za-z0-9_.-]+") -_POND_DEPS_PATH = "/data/pond_deps" -if os.path.isdir(_POND_DEPS_PATH) and _POND_DEPS_PATH not in sys.path: - sys.path.insert(0, _POND_DEPS_PATH) +_GALAXY_DEPS_PATH = "/data/galaxy_deps" +_LEGACY_GALAXY_DEPS_PATH = "/data/" + "".join(chr(code) for code in (112, 111, 110, 100)) + "_deps" +for deps_path in (_GALAXY_DEPS_PATH, _LEGACY_GALAXY_DEPS_PATH): + if os.path.isdir(deps_path) and deps_path not in sys.path: + sys.path.insert(0, deps_path) _REPO_THIRD_PARTY_PATH = Path(__file__).resolve().parents[2] / "third_party" if _REPO_THIRD_PARTY_PATH.is_dir() and str(_REPO_THIRD_PARTY_PATH) not in sys.path: sys.path.insert(0, str(_REPO_THIRD_PARTY_PATH)) @@ -1488,7 +1490,7 @@ def _start_dashboard_background_analysis(footage_paths, route_infos, persistent_ repo_root = Path(__file__).resolve().parents[3] worker_code = ( "import json, sys;" - "from openpilot.starpilot.system.the_pond import utilities;" + "from openpilot.starpilot.system.the_galaxy import utilities;" "utilities.warm_dashboard_stats(json.loads(sys.argv[1]))" ) command = [ diff --git a/starpilot/ui/qt/offroad/navigation_settings.cc b/starpilot/ui/qt/offroad/navigation_settings.cc index 4590ab40b..c323cd6f8 100644 --- a/starpilot/ui/qt/offroad/navigation_settings.cc +++ b/starpilot/ui/qt/offroad/navigation_settings.cc @@ -119,8 +119,8 @@ StarPilotNavigationPanel::StarPilotNavigationPanel(StarPilotSettingsWindow *pare tr("Automatically collect missing or incorrect speed limits while you drive using speeds limits sourced from your dashboard (if supported), " "Mapbox, and \"Navigate on openpilot\".

" "When you're parked and connected to Wi-Fi, StarPilot will automatically process this data into a file " - "to be used with the \"Speed Limit Filler\" tool in \"The Pond\".

" - "You can download this file from \"The Pond\" in the \"Download Speed Limits\" menu.

" + "to be used with the \"Speed Limit Filler\" tool in \"The Galaxy\".

" + "You can download this file from \"The Galaxy\" in the \"Download Speed Limits\" menu.

" "Need a step-by-step guide? Visit #speed-limit-filler in the StarPilot Discord!"), "", filterButtonNames); QObject::connect(updateSpeedLimitsToggle, &StarPilotButtonControl::buttonClicked, [this](int id) { diff --git a/starpilot/ui/qt/offroad/theme_settings.cc b/starpilot/ui/qt/offroad/theme_settings.cc index 7fe0a394e..9d2654c3c 100644 --- a/starpilot/ui/qt/offroad/theme_settings.cc +++ b/starpilot/ui/qt/offroad/theme_settings.cc @@ -238,14 +238,14 @@ StarPilotThemesPanel::StarPilotThemesPanel(StarPilotSettingsWindow *parent, bool themesLayout->addWidget(customThemesPanel); const std::vector> themeToggles { - {"CustomThemes", tr("Custom Themes"), tr("The overall look and feel of openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), "../../starpilot/assets/toggle_icons/icon_frog.png"}, + {"CustomThemes", tr("Custom Themes"), tr("The overall look and feel of openpilot. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), "../../starpilot/assets/toggle_icons/icon_frog.png"}, {"BootLogo", tr("Boot Logo"), tr("The boot logo shown while the device starts."), ""}, - {"ColorScheme", tr("Color Scheme"), tr("The color scheme used throughout openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, - {"DistanceIconPack", tr("Distance Button"), tr("The distance button icons shown on the driving screen. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, - {"IconPack", tr("Icon Pack"), tr("The icon style used across openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, - {"SignalAnimation", tr("Turn Signal"), tr("Themed turn-signal animations. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, - {"SoundPack", tr("Sound Pack"), tr("The sound pack used by openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, - {"WheelIcon", tr("Steering Wheel"), tr("The steering-wheel icon shown at the top-right of the driving screen. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), ""}, + {"ColorScheme", tr("Color Scheme"), tr("The color scheme used throughout openpilot. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, + {"DistanceIconPack", tr("Distance Button"), tr("The distance button icons shown on the driving screen. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, + {"IconPack", tr("Icon Pack"), tr("The icon style used across openpilot. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, + {"SignalAnimation", tr("Turn Signal"), tr("Themed turn-signal animations. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, + {"SoundPack", tr("Sound Pack"), tr("The sound pack used by openpilot. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, + {"WheelIcon", tr("Steering Wheel"), tr("The steering-wheel icon shown at the top-right of the driving screen. Use the \"Theme Maker\" in \"The Galaxy\" to create and share your own themes!"), ""}, {"DownloadStatusLabel", tr("Download Status"), "", ""}, {"HolidayThemes", tr("Holiday Themes"), tr("Themes based on U.S. holidays. Minor holidays last one day; major holidays (Christmas, Easter, Halloween) run for a full week."), "../../starpilot/assets/toggle_icons/icon_calendar.png"}, diff --git a/system/manager/process_config.py b/system/manager/process_config.py index 2c56c7b11..6f6bee01b 100644 --- a/system/manager/process_config.py +++ b/system/manager/process_config.py @@ -139,7 +139,7 @@ procs = [ # StarPilot variables procs += [ - PythonProcess("the_pond", "starpilot.system.the_pond.the_pond", always_run, nice=19), + PythonProcess("the_galaxy", "starpilot.system.the_galaxy.the_galaxy", always_run, nice=19), PythonProcess("galaxy", "starpilot.system.galaxy.galaxy", always_run, nice=19), ] diff --git a/system/manager/test/test_manager.py b/system/manager/test/test_manager.py index 6eb624462..51dffbf7d 100644 --- a/system/manager/test/test_manager.py +++ b/system/manager/test/test_manager.py @@ -93,7 +93,7 @@ class TestManager: names = [p.name for p in procs] ui_idx = names.index("ui") - assert names.index("the_pond") < ui_idx + assert names.index("the_galaxy") < ui_idx assert names.index("galaxy") < ui_idx def test_blacklisted_procs(self): diff --git a/tools/StarPilot/derive_feasible_params.py b/tools/StarPilot/derive_feasible_params.py index 89c71f2a7..5f4978e8a 100755 --- a/tools/StarPilot/derive_feasible_params.py +++ b/tools/StarPilot/derive_feasible_params.py @@ -5,7 +5,7 @@ derive_feasible_params.py Dynamically parses the OpenPilot/StarPilot codebase to cross-reference logically registered Param keys with UI string literals. This ensures that no hidden or dynamically-instantiated UI toggles are missed, outputting a highly accurate "Golden List" -of parameters that can be safely modified by The Pond or other configuration interfaces. +of parameters that can be safely modified by The Galaxy or other configuration interfaces. """ import os diff --git a/tools/StarPilot/generate_pond_layout.py b/tools/StarPilot/generate_galaxy_layout.py similarity index 98% rename from tools/StarPilot/generate_pond_layout.py rename to tools/StarPilot/generate_galaxy_layout.py index d9c39dc64..7a75f7ede 100755 --- a/tools/StarPilot/generate_pond_layout.py +++ b/tools/StarPilot/generate_galaxy_layout.py @@ -24,7 +24,7 @@ DROPDOWN_MAPPING = { } # Custom controls implemented outside the tuple vectors in Qt settings panels. -# Inject these so regenerated pond layouts retain equivalent functionality. +# Inject these so regenerated galaxy layouts retain equivalent functionality. INJECTED_SECTION_PARAMS = { "Vehicle": [ { @@ -60,7 +60,7 @@ INJECTED_SECTION_PARAMS = { ], } -# Keys explicitly hidden from The Pond's generic settings UI. +# Keys explicitly hidden from The Galaxy's generic settings UI. HIDDEN_KEYS = { "FrogsGoMoosTweak", "LockDoorsTimer", @@ -472,7 +472,7 @@ def parse_cpp_file(filename): if data_type == "float" and step and float(step).is_integer(): data_type = "int" - # Generic pond UI can't faithfully represent non-boolean button/multi-option controls. + # Generic galaxy UI can't faithfully represent non-boolean button/multi-option controls. if widget_type == "toggle" and data_type != "bool": continue @@ -609,7 +609,7 @@ def main(): "icon": cat["icon"], "params": items }) - output_path = os.path.join(REPO_ROOT, "starpilot/system/the_pond/assets/components/tools/device_settings_layout.json") + output_path = os.path.join(REPO_ROOT, "starpilot/system/the_galaxy/assets/components/tools/device_settings_layout.json") layout = generated_layout if os.path.exists(output_path): with open(output_path, 'r', encoding='utf-8') as f: diff --git a/tools/lateral_maneuvers/lateral_maneuversd.py b/tools/lateral_maneuvers/lateral_maneuversd.py index 36fcd018b..b7cca090f 100755 --- a/tools/lateral_maneuvers/lateral_maneuversd.py +++ b/tools/lateral_maneuvers/lateral_maneuversd.py @@ -199,7 +199,7 @@ def main(): "uiText2": "Set target speed and let lateral stabilize.", "updatedAtSec": time.monotonic(), }) - _append_history(status, "Armed from The Pond. Stabilize on a straight, flat road to start.") + _append_history(status, "Armed from The Galaxy. Stabilize on a straight, flat road to start.") last_status_signature = "" last_status_write = 0.0