diff --git a/openpilot/selfdrive/ui/translations/app.pot b/openpilot/selfdrive/ui/translations/app.pot index 98b3a880f6..d3fc9bd324 100644 --- a/openpilot/selfdrive/ui/translations/app.pot +++ b/openpilot/selfdrive/ui/translations/app.pot @@ -23470,3 +23470,39 @@ msgstr "" #: openpilot/starpilot/ui/sounds_owner.py msgid "Warns when signaling toward a detected blind-spot vehicle with steering assistance off or paused. Independent of Loud Blindspot Alert. Hazards do not trigger it." msgstr "" + +#: openpilot/starpilot/galaxy/web/js/pip.js openpilot/starpilot/galaxy/web/js/settings.js openpilot/starpilot/ui/pip_owner.py +msgid "Blind Spot Camera & Preview" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/pip.js +msgid "Blind Spot Camera & Preview saved settings" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/spotify.js +msgid "Setup & Settings" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/favorites.js +msgid "Show onroad · Big & Small UI" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/driving.js +msgid "Speed & longitudinal" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/spotify.js openpilot/starpilot/galaxy/web/js/starport.js +msgid "Spotify & Phone Audio" +msgstr "" + +#: openpilot/starpilot/ui/feature_settings_owner.py +msgid "Steering & Torque" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/driving.js +msgid "Steering & buttons" +msgstr "" + +#: openpilot/starpilot/galaxy/web/js/spotify.js +msgid "Storage & Account" +msgstr "" diff --git a/openpilot/selfdrive/ui/translations/app_de.po b/openpilot/selfdrive/ui/translations/app_de.po index 23cbe5464a..2e676086e3 100644 --- a/openpilot/selfdrive/ui/translations/app_de.po +++ b/openpilot/selfdrive/ui/translations/app_de.po @@ -23490,3 +23490,30 @@ msgstr "Verbessert das Anhalten an Ampeln und ermöglicht automatisches Anhalten msgid "Enhanced Stops" msgstr "Verbessertes Anhalten" +msgid "Blind Spot Camera & Preview" +msgstr "Totwinkelkamera und Vorschau" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "Gespeicherte Einstellungen für Totwinkelkamera und Vorschau" + +msgid "Setup & Settings" +msgstr "Einrichtung und Einstellungen" + +msgid "Show onroad · Big & Small UI" +msgstr "Während der Fahrt anzeigen · Große und kleine Oberfläche" + +msgid "Speed & longitudinal" +msgstr "Geschwindigkeit und Längsregelung" + +msgid "Spotify & Phone Audio" +msgstr "Spotify und Telefonaudio" + +msgid "Steering & Torque" +msgstr "Lenkung und Drehmoment" + +msgid "Steering & buttons" +msgstr "Lenkung und Tasten" + +msgid "Storage & Account" +msgstr "Speicher und Konto" + diff --git a/openpilot/selfdrive/ui/translations/app_es.po b/openpilot/selfdrive/ui/translations/app_es.po index 27938dda48..bcbd12d3cd 100644 --- a/openpilot/selfdrive/ui/translations/app_es.po +++ b/openpilot/selfdrive/ui/translations/app_es.po @@ -23490,3 +23490,30 @@ msgstr "Mejora la detención en los semáforos y permite detenerse automáticame msgid "Enhanced Stops" msgstr "Paradas mejoradas" +msgid "Blind Spot Camera & Preview" +msgstr "Cámara de punto ciego y vista previa" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "Ajustes guardados de la cámara de punto ciego y la vista previa" + +msgid "Setup & Settings" +msgstr "Configuración y ajustes" + +msgid "Show onroad · Big & Small UI" +msgstr "Mostrar durante la conducción · Interfaz grande y pequeña" + +msgid "Speed & longitudinal" +msgstr "Velocidad y control longitudinal" + +msgid "Spotify & Phone Audio" +msgstr "Spotify y audio del teléfono" + +msgid "Steering & Torque" +msgstr "Dirección y par" + +msgid "Steering & buttons" +msgstr "Dirección y botones" + +msgid "Storage & Account" +msgstr "Almacenamiento y cuenta" + diff --git a/openpilot/selfdrive/ui/translations/app_fr.po b/openpilot/selfdrive/ui/translations/app_fr.po index 3a328d9878..0322153547 100644 --- a/openpilot/selfdrive/ui/translations/app_fr.po +++ b/openpilot/selfdrive/ui/translations/app_fr.po @@ -23490,3 +23490,30 @@ msgstr "Améliore les arrêts aux feux et permet l’arrêt automatique aux pann msgid "Enhanced Stops" msgstr "Arrêts améliorés" +msgid "Blind Spot Camera & Preview" +msgstr "Caméra d’angle mort et aperçu" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "Réglages enregistrés de la caméra d’angle mort et de l’aperçu" + +msgid "Setup & Settings" +msgstr "Configuration et réglages" + +msgid "Show onroad · Big & Small UI" +msgstr "Afficher en conduite · Grande et petite interface" + +msgid "Speed & longitudinal" +msgstr "Vitesse et contrôle longitudinal" + +msgid "Spotify & Phone Audio" +msgstr "Spotify et audio du téléphone" + +msgid "Steering & Torque" +msgstr "Direction et couple" + +msgid "Steering & buttons" +msgstr "Direction et boutons" + +msgid "Storage & Account" +msgstr "Stockage et compte" + diff --git a/openpilot/selfdrive/ui/translations/app_ja.po b/openpilot/selfdrive/ui/translations/app_ja.po index 93432c42c3..90d5491b79 100644 --- a/openpilot/selfdrive/ui/translations/app_ja.po +++ b/openpilot/selfdrive/ui/translations/app_ja.po @@ -23486,3 +23486,30 @@ msgstr "信号での停止動作を改善し、検出した一時停止標識で msgid "Enhanced Stops" msgstr "停止機能の強化" +msgid "Blind Spot Camera & Preview" +msgstr "死角カメラとプレビュー" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "死角カメラとプレビューの保存済み設定" + +msgid "Setup & Settings" +msgstr "セットアップと設定" + +msgid "Show onroad · Big & Small UI" +msgstr "走行中に表示 · 大画面・小画面UI" + +msgid "Speed & longitudinal" +msgstr "速度と加減速制御" + +msgid "Spotify & Phone Audio" +msgstr "Spotifyとスマートフォンの音声" + +msgid "Steering & Torque" +msgstr "ステアリングとトルク" + +msgid "Steering & buttons" +msgstr "ステアリングとボタン" + +msgid "Storage & Account" +msgstr "ストレージとアカウント" + diff --git a/openpilot/selfdrive/ui/translations/app_ko.po b/openpilot/selfdrive/ui/translations/app_ko.po index 9ef7de1c79..3240a37347 100644 --- a/openpilot/selfdrive/ui/translations/app_ko.po +++ b/openpilot/selfdrive/ui/translations/app_ko.po @@ -23486,3 +23486,30 @@ msgstr "신호등에서의 정차 동작을 개선하고 감지된 정지 표지 msgid "Enhanced Stops" msgstr "향상된 정차" +msgid "Blind Spot Camera & Preview" +msgstr "사각지대 카메라 및 미리보기" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "사각지대 카메라 및 미리보기의 저장된 설정" + +msgid "Setup & Settings" +msgstr "설치 및 설정" + +msgid "Show onroad · Big & Small UI" +msgstr "주행 중 표시 · 대형 및 소형 UI" + +msgid "Speed & longitudinal" +msgstr "속도 및 종방향 제어" + +msgid "Spotify & Phone Audio" +msgstr "Spotify 및 휴대폰 오디오" + +msgid "Steering & Torque" +msgstr "조향 및 토크" + +msgid "Steering & buttons" +msgstr "조향 및 버튼" + +msgid "Storage & Account" +msgstr "저장 공간 및 계정" + diff --git a/openpilot/selfdrive/ui/translations/app_vi.po b/openpilot/selfdrive/ui/translations/app_vi.po index 0ebdcc2b34..2254565ec8 100644 --- a/openpilot/selfdrive/ui/translations/app_vi.po +++ b/openpilot/selfdrive/ui/translations/app_vi.po @@ -23486,3 +23486,30 @@ msgstr "Cải thiện cách dừng xe tại đèn giao thông và cho phép tự msgid "Enhanced Stops" msgstr "Dừng xe nâng cao" +msgid "Blind Spot Camera & Preview" +msgstr "Camera điểm mù và xem trước" + +msgid "Blind Spot Camera & Preview saved settings" +msgstr "Cài đặt đã lưu của camera điểm mù và xem trước" + +msgid "Setup & Settings" +msgstr "Thiết lập và cài đặt" + +msgid "Show onroad · Big & Small UI" +msgstr "Hiển thị khi lái xe · Giao diện lớn và nhỏ" + +msgid "Speed & longitudinal" +msgstr "Tốc độ và điều khiển dọc" + +msgid "Spotify & Phone Audio" +msgstr "Spotify và âm thanh điện thoại" + +msgid "Steering & Torque" +msgstr "Đánh lái và mô-men xoắn" + +msgid "Steering & buttons" +msgstr "Đánh lái và nút bấm" + +msgid "Storage & Account" +msgstr "Bộ nhớ và tài khoản" + diff --git a/openpilot/starpilot/galaxy/tests/test_device_settings.py b/openpilot/starpilot/galaxy/tests/test_device_settings.py index 648b1e84fc..ebd96f2f07 100644 --- a/openpilot/starpilot/galaxy/tests/test_device_settings.py +++ b/openpilot/starpilot/galaxy/tests/test_device_settings.py @@ -6,7 +6,7 @@ from types import SimpleNamespace from typing import cast import tempfile import unittest -from unittest.mock import patch +from unittest.mock import Mock, patch from openpilot.starpilot.galaxy.device_settings import (CALIBRATION_RESET, DRIVER_MONITORING_RESET, STARPORT_EXPERIMENT_PREFIX, STARPORT_EXPERIMENTS_KEY, @@ -92,7 +92,7 @@ class DeviceSettingsTest(unittest.TestCase): def test_pages_separate_driving_controls_services_and_resets(self): from openpilot.starpilot.longitudinal.enhanced_stop_hold import KEY as HOLD_KEY - service = SimpleNamespace(call=unittest.mock.Mock(side_effect=RuntimeError("off"))) + service = SimpleNamespace(call=Mock(side_effect=RuntimeError("off"))) owner = DeviceSettingsOwner(self.params, lambda: self.parked, starport=lambda: service) self.assertEqual([row.key for row in owner.snapshot("driving_options").rows], [KEY, HOLD_KEY]) self.assertEqual([row.key for row in owner.snapshot("resets").rows], [DRIVER_MONITORING_RESET, CALIBRATION_RESET]) diff --git a/openpilot/starpilot/ui/runtime_snapshot.py b/openpilot/starpilot/ui/runtime_snapshot.py index 27c0f8fbe8..9bd139568c 100644 --- a/openpilot/starpilot/ui/runtime_snapshot.py +++ b/openpilot/starpilot/ui/runtime_snapshot.py @@ -706,12 +706,12 @@ class RuntimeSnapshotAdapter: weather_location = None if (started and getattr(ui, 'replay_clock', None) is None and any(layout.get('weather', {}).get('enabled', False) for layout in self._customization_value['layouts'].values())): - from openpilot.starpilot.gps.source import GPS_SOURCES, SOURCE_SERVICES, observation + from openpilot.starpilot.gps.source import GPS_SOURCES, SOURCE_SERVICES, observation as gps_observation # Weather needs a recent location, not the high-frequency driving-message age gate. # Include car/phone fixes when this device has no native GNSS receiver. for service in GPS_SOURCES: carrier = SOURCE_SERVICES.get(service, service) - fix = observation(sm, service, now_ns) + fix = gps_observation(sm, service, now_ns) if fix is not None and int(sm.recv_frame.get(carrier, 0)) > after: weather_location = (fix[1].latitude, fix[1].longitude) break diff --git a/openpilot/starpilot/ui/tests/test_runtime_snapshot.py b/openpilot/starpilot/ui/tests/test_runtime_snapshot.py index f83a4ba9d0..d353bfcd96 100644 --- a/openpilot/starpilot/ui/tests/test_runtime_snapshot.py +++ b/openpilot/starpilot/ui/tests/test_runtime_snapshot.py @@ -154,6 +154,20 @@ def test_slc_offset_schedule_uses_cached_validated_settings(tmp_path): class TestRuntimeSnapshot(unittest.TestCase): + def test_weather_gps_does_not_replace_speed_limit_observation(self): + ui = ui_fake() + baseline = RuntimeSnapshotAdapter(ui).build(ShellMode.ONROAD, now_ns=NOW).onroad.speed_limit + document = default_document() + document['layouts']['compact']['weather']['enabled'] = True + ui.sm.recv_frame['gpsLocationExternal'] = 3 + with patch('openpilot.starpilot.ui.runtime_snapshot.read_customization', return_value=document): + for fix, location in ((None, None), ((NOW, NS(latitude=41.0, longitude=-87.0)), (41.0, -87.0))): + with self.subTest(location=location), patch('openpilot.starpilot.gps.source.observation', return_value=fix) as gps: + onroad = RuntimeSnapshotAdapter(ui).build(ShellMode.ONROAD, now_ns=NOW).onroad + gps.assert_called() + self.assertEqual(onroad.speed_limit, baseline) + self.assertEqual(onroad.weather_location, location) + def vehicle_ui(self, **car_params): return vehicle_ui(self.enterContext(TemporaryDirectory()), **car_params)