From 1c1437579638939f2741dbd89ba84240c1c6f051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Thu, 19 Mar 2026 19:35:10 -0700 Subject: [PATCH 01/33] locationd: cam odo delay compensation (#37543) * Delay compensation for camera odomtry * Frame skip definition * CAM_ODO_POSE_DELAY const * Remove import * Use timestampEof * CAM_ODO_STD_MULT * locationd processing_time=0.01 * Update angular velocity Q * Try 075 * Acc obs std 0.75 * Adjust Cam odo std mults * More tweaking * Smoothing in lld tests * Comment * Remove import * Revert gyro bias P update * Tweak to 0.75 --- selfdrive/locationd/locationd.py | 9 +++++++-- selfdrive/locationd/models/pose_kf.py | 4 ++-- selfdrive/locationd/test/test_locationd_scenarios.py | 12 +++++++++--- selfdrive/test/process_replay/process_replay.py | 1 + 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/selfdrive/locationd/locationd.py b/selfdrive/locationd/locationd.py index f6a0935ed9..a34a584ff3 100755 --- a/selfdrive/locationd/locationd.py +++ b/selfdrive/locationd/locationd.py @@ -28,6 +28,9 @@ INPUT_INVALID_LIMIT = 2.0 # 1 (camodo) / 9 (sensor) bad input[s] ignored INPUT_INVALID_RECOVERY = 10.0 # ~10 secs to resume after exceeding allowed bad inputs by one POSENET_STD_INITIAL_VALUE = 10.0 POSENET_STD_HIST_HALF = 20 +CAM_ODO_POSE_DELAY = 0.1 # dependent on the vision model context frames and temporal frequency (current model is 5 fps with 2 context frames) +CAM_ODO_ROT_STD_MULT = 10 +CAM_ODO_TRANS_STD_MULT = 4 def calculate_invalid_input_decay(invalid_limit, recovery_time, frequency): @@ -155,6 +158,8 @@ class LocationEstimator: self.device_from_calib = rot_from_euler(calib) elif which == "cameraOdometry": + # camera odometry is delayed depending on the model context frames and temporal frequency + t = msg.timestampEof * 1e-9 - CAM_ODO_POSE_DELAY if not self._validate_timestamp(t): return HandleLogResult.TIMING_INVALID @@ -177,8 +182,8 @@ class LocationEstimator: self.posenet_stds[-1] = trans_calib_std[0] # Multiply by N to avoid to high certainty in kalman filter because of temporally correlated noise - rot_calib_std *= 10 - trans_calib_std *= 2 + rot_calib_std *= CAM_ODO_ROT_STD_MULT + trans_calib_std *= CAM_ODO_TRANS_STD_MULT rot_device_std = rotate_std(self.device_from_calib, rot_calib_std) trans_device_std = rotate_std(self.device_from_calib, trans_calib_std) diff --git a/selfdrive/locationd/models/pose_kf.py b/selfdrive/locationd/models/pose_kf.py index 020e51ad6e..a8ff80c713 100755 --- a/selfdrive/locationd/models/pose_kf.py +++ b/selfdrive/locationd/models/pose_kf.py @@ -47,13 +47,13 @@ class PoseKalman(KalmanFilter): # process noise Q = np.diag([0.001**2, 0.001**2, 0.001**2, 0.01**2, 0.01**2, 0.01**2, - 0.1**2, 0.1**2, 0.1**2, + 0.085**2, 0.085**2, 0.085**2, (0.005 / 100)**2, (0.005 / 100)**2, (0.005 / 100)**2, 3**2, 3**2, 3**2, 0.005**2, 0.005**2, 0.005**2]) obs_noise = {ObservationKind.PHONE_GYRO: np.diag([0.025**2, 0.025**2, 0.025**2]), - ObservationKind.PHONE_ACCEL: np.diag([.5**2, .5**2, .5**2]), + ObservationKind.PHONE_ACCEL: np.diag([0.75**2, 0.75**2, 0.75**2]), ObservationKind.CAMERA_ODO_TRANSLATION: np.diag([0.5**2, 0.5**2, 0.5**2]), ObservationKind.CAMERA_ODO_ROTATION: np.diag([0.05**2, 0.05**2, 0.05**2])} diff --git a/selfdrive/locationd/test/test_locationd_scenarios.py b/selfdrive/locationd/test/test_locationd_scenarios.py index 0ea7ac183f..69f2ca2821 100644 --- a/selfdrive/locationd/test/test_locationd_scenarios.py +++ b/selfdrive/locationd/test/test_locationd_scenarios.py @@ -3,6 +3,7 @@ from collections import defaultdict from enum import Enum from openpilot.tools.lib.logreader import LogReader +from openpilot.selfdrive.locationd.lagd import masked_symmetric_moving_average from openpilot.selfdrive.test.process_replay.migration import migrate_all from openpilot.selfdrive.test.process_replay.process_replay import replay_process_with_name @@ -15,6 +16,7 @@ SELECT_COMPARE_FIELDS = { 'inputs_flag': ['inputsOK'], 'sensors_flag': ['sensorsOK'], } +SMOOTH_FIELDS = ['yaw_rate', 'roll'] JUNK_IDX = 100 CONSISTENT_SPIKES_COUNT = 10 @@ -32,6 +34,8 @@ class Scenario(Enum): def get_select_fields_data(logs): + def sig_smooth(signal): + return masked_symmetric_moving_average(signal, np.ones_like(signal), 5, 1.0) def get_nested_keys(msg, keys): val = None for key in keys: @@ -44,6 +48,8 @@ def get_select_fields_data(logs): data[key].append(get_nested_keys(msg, fields)) for key in data: data[key] = np.array(data[key][JUNK_IDX:], dtype=float) + if key in SMOOTH_FIELDS: + data[key] = sig_smooth(data[key]) return data @@ -110,7 +116,7 @@ class TestLocationdScenarios: """ orig_data, replayed_data = run_scenarios(Scenario.BASE, self.logs) assert np.allclose(orig_data['yaw_rate'], replayed_data['yaw_rate'], atol=np.radians(0.35)) - assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.55)) + assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.35)) def test_gyro_off(self): """ @@ -135,7 +141,7 @@ class TestLocationdScenarios: """ orig_data, replayed_data = run_scenarios(Scenario.GYRO_SPIKE_MIDWAY, self.logs) assert np.allclose(orig_data['yaw_rate'], replayed_data['yaw_rate'], atol=np.radians(0.35)) - assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.55)) + assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.35)) assert np.all(replayed_data['inputs_flag'] == orig_data['inputs_flag']) assert np.all(replayed_data['sensors_flag'] == orig_data['sensors_flag']) @@ -169,7 +175,7 @@ class TestLocationdScenarios: """ orig_data, replayed_data = run_scenarios(Scenario.ACCEL_SPIKE_MIDWAY, self.logs) assert np.allclose(orig_data['yaw_rate'], replayed_data['yaw_rate'], atol=np.radians(0.35)) - assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.55)) + assert np.allclose(orig_data['roll'], replayed_data['roll'], atol=np.radians(0.35)) def test_single_timing_spike(self): """ diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index d168a7e800..5e9b2e742c 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -509,6 +509,7 @@ CONFIGS = [ ignore=["logMonoTime"], should_recv_callback=MessageBasedRcvCallback("cameraOdometry"), tolerance=NUMPY_TOLERANCE, + processing_time=0.01, ), ProcessConfig( proc_name="paramsd", From f95959afdb98138ead2bb5e640b3526a5c286942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Thu, 19 Mar 2026 19:44:14 -0700 Subject: [PATCH 02/33] Bump rednose (#37698) --- rednose_repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rednose_repo b/rednose_repo index 6ccb8d0556..7ffefa3d88 160000 --- a/rednose_repo +++ b/rednose_repo @@ -1 +1 @@ -Subproject commit 6ccb8d055652cd9769b5e418edf116272fde4e09 +Subproject commit 7ffefa3d8811a842f8ec97d311103ce3a45dfae0 From 78b15773c95d368c75c4cfa48c2fe4d51b16fe70 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 20 Mar 2026 14:07:33 -0700 Subject: [PATCH 03/33] pj: update stale layouts --- .../layouts/controls_mismatch_debug.xml | 3 +-- tools/plotjuggler/layouts/gps_vs_llk.xml | 9 +++---- .../plotjuggler/layouts/system_lag_debug.xml | 3 +-- tools/plotjuggler/layouts/tuning.xml | 27 ++++++++++++------- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/tools/plotjuggler/layouts/controls_mismatch_debug.xml b/tools/plotjuggler/layouts/controls_mismatch_debug.xml index 646e12a281..cf337aa7df 100644 --- a/tools/plotjuggler/layouts/controls_mismatch_debug.xml +++ b/tools/plotjuggler/layouts/controls_mismatch_debug.xml @@ -16,7 +16,7 @@ - + @@ -58,4 +58,3 @@ - diff --git a/tools/plotjuggler/layouts/gps_vs_llk.xml b/tools/plotjuggler/layouts/gps_vs_llk.xml index 69b8f20058..2051c2bef2 100644 --- a/tools/plotjuggler/layouts/gps_vs_llk.xml +++ b/tools/plotjuggler/layouts/gps_vs_llk.xml @@ -24,8 +24,8 @@ - - + + @@ -72,12 +72,11 @@ return distance /gpsLocationExternal/latitude /gpsLocationExternal/longitude - /liveLocationKalman/positionGeodetic/value/0 - /liveLocationKalman/positionGeodetic/value/1 + /liveLocationKalmanDEPRECATED/positionGeodetic/value/0 + /liveLocationKalmanDEPRECATED/positionGeodetic/value/1 - diff --git a/tools/plotjuggler/layouts/system_lag_debug.xml b/tools/plotjuggler/layouts/system_lag_debug.xml index a90bba0e27..88511ffe09 100644 --- a/tools/plotjuggler/layouts/system_lag_debug.xml +++ b/tools/plotjuggler/layouts/system_lag_debug.xml @@ -45,7 +45,7 @@ - + @@ -64,4 +64,3 @@ - diff --git a/tools/plotjuggler/layouts/tuning.xml b/tools/plotjuggler/layouts/tuning.xml index 503e726caf..699f6ff683 100644 --- a/tools/plotjuggler/layouts/tuning.xml +++ b/tools/plotjuggler/layouts/tuning.xml @@ -24,14 +24,14 @@ - + - + @@ -39,7 +39,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -161,11 +161,11 @@ if (time > last_bad_time + engage_delay) then else return 0 end - /liveLocationKalman/angularVelocityCalibrated/value/2 + /carControl/angularVelocity/2 /carState/steeringPressed /carControl/enabled - /liveLocationKalman/velocityCalibrated/value/0 + /carState/vEgo @@ -206,7 +206,7 @@ if (time > last_bad_time + engage_delay) then else return 0 end - /lateralPlan/curvatures/0 + /modelV2/action/desiredCurvature /carState/steeringPressed /carControl/enabled @@ -284,8 +284,17 @@ end /carControl/enabled + + + return (math.abs(value - v1) > 0.001 or math.abs(v2 - v3) > 0.05) and 1 or 0 + /carControl/actuators/torque + + /carOutput/actuatorsOutput/torque + /carControl/actuators/steeringAngleDeg + /carOutput/actuatorsOutput/steeringAngleDeg + + - From d0382e2d48999176bf0d7b802a719aaa77eb3875 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 20 Mar 2026 15:02:47 -0700 Subject: [PATCH 04/33] just remove this, actions is so broken --- .github/workflows/auto_pr_review.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/auto_pr_review.yaml b/.github/workflows/auto_pr_review.yaml index 6052ec0712..99c3a258c6 100644 --- a/.github/workflows/auto_pr_review.yaml +++ b/.github/workflows/auto_pr_review.yaml @@ -33,20 +33,3 @@ jobs: change-to: ${{ github.base_ref }} already-exists-action: close_this already-exists-comment: "Your PR should be made against the `master` branch" - - # Welcome comment - - name: "First timers PR" - uses: actions/first-interaction@v1 - if: github.event.pull_request.head.repo.full_name != 'commaai/openpilot' - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: | - - Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following: - * Convert your PR to a draft unless it's ready to review - * Read the [contributing docs](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md) - * Before marking as "ready for review", ensure: - * the goal is clearly stated in the description - * all the tests are passing - * the change is [something we merge](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md#what-gets-merged) - * include a route or your device' dongle ID if relevant From e53cc41b470624bc92089eb09fa15ea29a80756d Mon Sep 17 00:00:00 2001 From: Thomas Burgess Date: Fri, 20 Mar 2026 17:23:02 -0500 Subject: [PATCH 05/33] docs: rename comma 3X references to comma four (#37701) * docs: rename comma 3X references to comma four * docs: update comma four links and labels --- README.md | 8 ++++---- docs/CONTRIBUTING.md | 2 +- docs/concepts/glossary.md | 2 +- docs/getting-started/what-is-openpilot.md | 2 +- docs/how-to/connect-to-comma.md | 12 ++++++------ docs/how-to/replay-a-drive.md | 2 +- docs/how-to/turn-the-speed-blue.md | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a77a80935d..a1f494c33c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ · Community · - Try it on a comma 3X + Try it on a comma four Quick start: `bash <(curl -fsSL openpilot.comma.ai)` @@ -42,10 +42,10 @@ Using openpilot in a car ------ To use openpilot in a car, you need four things: -1. **Supported Device:** a comma 3X, available at [comma.ai/shop](https://comma.ai/shop/comma-3x). -2. **Software:** The setup procedure for the comma 3X allows users to enter a URL for custom software. Use the URL `openpilot.comma.ai` to install the release version. +1. **Supported Device:** a comma four, available at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four). +2. **Software:** The setup procedure for the comma four allows users to enter a URL for custom software. Use the URL `openpilot.comma.ai` to install the release version. 3. **Supported Car:** Ensure that you have one of [the 275+ supported cars](docs/CARS.md). -4. **Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma 3X to your car. +4. **Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma four to your car. We have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup). Note that it's possible to run openpilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 62468c7448..3d39420c01 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -39,7 +39,7 @@ All of these are examples of good PRs: ### First contribution [Projects / openpilot bounties](https://github.com/orgs/commaai/projects/26/views/1?pane=info) is the best place to get started and goes in-depth on what's expected when working on a bounty. -There are a lot of bounties that don't require a comma 3X or a car. +There are a lot of bounties that don't require a comma four or a car. ## Pull Requests diff --git a/docs/concepts/glossary.md b/docs/concepts/glossary.md index a09b0f0785..3bfe71bcb4 100644 --- a/docs/concepts/glossary.md +++ b/docs/concepts/glossary.md @@ -6,4 +6,4 @@ * **segment**: routes are split into one minute chunks called segments. * **comma connect**: the web viewer for all your routes; check it out at [connect.comma.ai](https://connect.comma.ai). * **panda**: this is the secondary processor on the device that implements the functional safety and directly talks to the car over CAN. See the [panda repo](https://github.com/commaai/panda). -* **comma 3X**: the latest hardware by comma.ai for running openpilot. more info at [comma.ai/shop](https://comma.ai/shop). +* **comma four**: the latest hardware by comma.ai for running openpilot. more info at [comma.ai/shop/comma-four](https://www.comma.ai/shop/comma-four). diff --git a/docs/getting-started/what-is-openpilot.md b/docs/getting-started/what-is-openpilot.md index b3c56c8410..6fab2b979b 100644 --- a/docs/getting-started/what-is-openpilot.md +++ b/docs/getting-started/what-is-openpilot.md @@ -5,7 +5,7 @@ ## How do I use it? -openpilot is designed to be used on the comma 3X. +openpilot is designed to be used on the comma four. ## How does it work? diff --git a/docs/how-to/connect-to-comma.md b/docs/how-to/connect-to-comma.md index 5f02e11599..58d4f91bb2 100644 --- a/docs/how-to/connect-to-comma.md +++ b/docs/how-to/connect-to-comma.md @@ -1,15 +1,15 @@ -# connect to a comma 3X +# connect to a comma four -A comma 3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console). +A comma four is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console). ## Serial Console -On both the comma three and 3X, the serial console is accessible from the main OBD-C port. -Connect the comma 3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power. +On both the comma three and comma four, the serial console is accessible from the main OBD-C port. +Connect the comma four to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power. On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/scripts/serial.sh` can be used to connect. -On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script. +On the comma four, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script. * Username: `comma` * Password: `comma` @@ -45,7 +45,7 @@ In order to use ADB on your device, you'll need to perform the following steps u * Here's an example command for connecting to your device using its tethered connection: `adb connect 192.168.43.1:5555` > [!NOTE] -> The default port for ADB is 5555 on the comma 3X. +> The default port for ADB is 5555 on the comma four. For more info on ADB, see the [Android Debug Bridge (ADB) documentation](https://developer.android.com/tools/adb). diff --git a/docs/how-to/replay-a-drive.md b/docs/how-to/replay-a-drive.md index b0db36a46f..a11b29dcc4 100644 --- a/docs/how-to/replay-a-drive.md +++ b/docs/how-to/replay-a-drive.md @@ -8,7 +8,7 @@ Replaying is a critical tool for openpilot development and debugging. Just run `tools/replay/replay --demo`. ## Replaying CAN data -*Hardware required: jungle and comma 3X* +*Hardware required: jungle and comma four* 1. Connect your PC to a jungle. 2. diff --git a/docs/how-to/turn-the-speed-blue.md b/docs/how-to/turn-the-speed-blue.md index 644c35e0ab..bc1d634012 100644 --- a/docs/how-to/turn-the-speed-blue.md +++ b/docs/how-to/turn-the-speed-blue.md @@ -3,7 +3,7 @@ In 30 minutes, we'll get an openpilot development environment set up on your computer and make some changes to openpilot's UI. -And if you have a comma 3X, we'll deploy the change to your device for testing. +And if you have a comma four, we'll deploy the change to your device for testing. ## 1. Set up your development environment From d5e75dd0afafac5e449f647e92320646831ff35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 20 Mar 2026 15:29:58 -0700 Subject: [PATCH 06/33] locationd: publish filter time (#37697) * Include filter time in the message * Move the line up * Use nantonum --- cereal/log.capnp | 2 ++ selfdrive/locationd/locationd.py | 1 + selfdrive/test/process_replay/migration.py | 1 + 3 files changed, 4 insertions(+) diff --git a/cereal/log.capnp b/cereal/log.capnp index d1f85d325c..c26c1f9d3a 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -1426,6 +1426,8 @@ struct LivePose { posenetOK @5 :Bool = false; sensorsOK @6 :Bool = false; + timestamp @8 :UInt64; + debugFilterState @7 :FilterState; struct XYZMeasurement { diff --git a/selfdrive/locationd/locationd.py b/selfdrive/locationd/locationd.py index a34a584ff3..57aecb22e7 100755 --- a/selfdrive/locationd/locationd.py +++ b/selfdrive/locationd/locationd.py @@ -239,6 +239,7 @@ class LocationEstimator: livePose.inputsOK = inputs_valid livePose.posenetOK = not std_spike or self.car_speed <= 5.0 livePose.sensorsOK = sensors_valid + livePose.timestamp = int(np.nan_to_num(self.kf.t) * 1e9) return msg diff --git a/selfdrive/test/process_replay/migration.py b/selfdrive/test/process_replay/migration.py index 232722d1b1..2a2633c34b 100644 --- a/selfdrive/test/process_replay/migration.py +++ b/selfdrive/test/process_replay/migration.py @@ -175,6 +175,7 @@ def migrate_liveLocationKalman(msgs): m = messaging.new_message('livePose') m.valid = msg.valid m.logMonoTime = msg.logMonoTime + m.livePose.timestamp = msg.logMonoTime for field in ["orientationNED", "velocityDevice", "accelerationDevice", "angularVelocityDevice"]: lp_field, llk_field = getattr(m.livePose, field), getattr(msg.liveLocationKalmanDEPRECATED, field) lp_field.x, lp_field.y, lp_field.z = llk_field.value or nans From 240e0036d257cef2bb9d7291ee64b5f076555db1 Mon Sep 17 00:00:00 2001 From: royjr Date: Fri, 20 Mar 2026 18:52:01 -0400 Subject: [PATCH 07/33] macOS: fix build (#37686) * Update SConscript * do we need this? * fix that --------- Co-authored-by: Adeeb Shihadeh --- tools/cabana/SConscript | 2 +- tools/cabana/cabana | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cabana/SConscript b/tools/cabana/SConscript index dbe4dbc659..7c5581f526 100644 --- a/tools/cabana/SConscript +++ b/tools/cabana/SConscript @@ -69,7 +69,7 @@ base_frameworks = qt_env['FRAMEWORKS'] base_libs = [common, messaging, cereal, visionipc, 'm', 'pthread'] + qt_env["LIBS"] if arch == "Darwin": - base_frameworks.append('QtCharts') + base_frameworks += ['QtCharts', 'CoreFoundation', 'IOKit', 'Security'] else: base_libs.append('Qt5Charts') diff --git a/tools/cabana/cabana b/tools/cabana/cabana index 00709734a5..128e49400e 100755 --- a/tools/cabana/cabana +++ b/tools/cabana/cabana @@ -33,6 +33,6 @@ fi # Build _cabana cd "$ROOT" -scons -j"$(nproc)" tools/cabana/_cabana +scons -j4 tools/cabana/_cabana exec "$DIR/_cabana" "$@" From 08d8bb9975a3b42fdd2d2fecb81e2a015c98bcab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 20 Mar 2026 18:19:47 -0700 Subject: [PATCH 08/33] livePose timestamp migration (#37705) * Add livePose migraiton * Fix --- selfdrive/test/process_replay/migration.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/selfdrive/test/process_replay/migration.py b/selfdrive/test/process_replay/migration.py index 2a2633c34b..14b38e0481 100644 --- a/selfdrive/test/process_replay/migration.py +++ b/selfdrive/test/process_replay/migration.py @@ -39,6 +39,7 @@ def migrate_all(lr: LogIterable, manager_states: bool = False, panda_states: boo migrate_controlsState, migrate_carState, migrate_liveLocationKalman, + migrate_livePose, migrate_liveTracks, migrate_driverAssistance, migrate_drivingModelData, @@ -187,6 +188,21 @@ def migrate_liveLocationKalman(msgs): return ops, [], [] +@migration(inputs=["livePose"]) +def migrate_livePose(msgs): + ops = [] + needs_migration = all(msg.livePose.timestamp == 0 for _, msg in msgs if msg.which() == 'livePose') + if not needs_migration: + return [], [], [] + + for index, msg in msgs: + if msg.which() == "livePose": + new_msg = msg.as_builder() + new_msg.livePose.timestamp = msg.logMonoTime + ops.append((index, new_msg.as_reader())) + return ops, [], [] + + @migration(inputs=["controlsState"], product="selfdriveState") def migrate_controlsState(msgs): add_ops = [] From 7fae59167e6c156fb4a378501b1e0a20cf1e8b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 20 Mar 2026 19:10:59 -0700 Subject: [PATCH 09/33] paramsd/torqued: use the correct livePose timestamp (#37704) * Use the correct filter time in torqued/paramsd * Fix * Check if lp valid * Update tests fake data with new required fields --- selfdrive/controls/tests/test_torqued_lat_accel_offset.py | 6 ++++-- selfdrive/locationd/paramsd.py | 1 + selfdrive/locationd/torqued.py | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/selfdrive/controls/tests/test_torqued_lat_accel_offset.py b/selfdrive/controls/tests/test_torqued_lat_accel_offset.py index 84389856b6..2f95d7c14f 100644 --- a/selfdrive/controls/tests/test_torqued_lat_accel_offset.py +++ b/selfdrive/controls/tests/test_torqued_lat_accel_offset.py @@ -50,8 +50,10 @@ def simulate_straight_road_msgs(est): lat_accels = TORQUE_TUNE.latAccelFactor * steer_torques for t, steer_torque, lat_accel in zip(ts, steer_torques, lat_accels, strict=True): carOutput.actuatorsOutput.torque = float(-steer_torque) - livePose.orientationNED.x = float(np.deg2rad(ROLL_BIAS_DEG)) - livePose.angularVelocityDevice.z = float(lat_accel / V_EGO) + livePose.orientationNED = {'x': float(np.deg2rad(ROLL_BIAS_DEG)), 'valid': True} + livePose.angularVelocityDevice = {'z': float(lat_accel / V_EGO), 'valid': True} + livePose.inputsOK, livePose.sensorsOK, livePose.posenetOK = True, True, True + livePose.timestamp = int(t * 1e9) for which, msg in (('carControl', carControl), ('carOutput', carOutput), ('carState', carState), ('livePose', livePose)): est.handle_log(t, which, msg) diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index fd03d3d093..0489ae4174 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -65,6 +65,7 @@ class VehicleParamsLearner: def handle_log(self, t: float, which: str, msg: capnp._DynamicStructReader): if which == 'livePose': + t = msg.timestamp * 1e-9 device_pose = Pose.from_live_pose(msg) calibrated_pose = self.calibrator.build_calibrated_pose(device_pose) diff --git a/selfdrive/locationd/torqued.py b/selfdrive/locationd/torqued.py index f4dc5a1471..9a2b6c17b1 100755 --- a/selfdrive/locationd/torqued.py +++ b/selfdrive/locationd/torqued.py @@ -180,7 +180,9 @@ class TorqueEstimator(ParameterEstimator): self.lag = msg.lateralDelay # calculate lateral accel from past steering torque elif which == "livePose": - if len(self.raw_points['steer_torque']) == self.hist_len: + is_valid = msg.angularVelocityDevice.valid and msg.orientationNED.valid and msg.inputsOK and msg.sensorsOK and msg.posenetOK + if len(self.raw_points['steer_torque']) == self.hist_len and is_valid: + t = msg.timestamp * 1e-9 device_pose = Pose.from_live_pose(msg) calibrated_pose = self.calibrator.build_calibrated_pose(device_pose) angular_velocity_calibrated = calibrated_pose.angular_velocity From af09b7a45b9aafd111cb89192f7432dc6b96b013 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 21 Mar 2026 09:47:15 -0700 Subject: [PATCH 10/33] add imgui package (#37711) --- pyproject.toml | 1 + uv.lock | 309 ++++++++++++++++++++++++++----------------------- 2 files changed, 162 insertions(+), 148 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a754f580bd..a112323400 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,6 +107,7 @@ dev = [ ] tools = [ + "imgui @ git+https://github.com/commaai/dependencies.git@release-imgui#subdirectory=imgui", "metadrive-simulator @ git+https://github.com/commaai/metadrive.git@minimal ; (platform_machine != 'aarch64')", ] diff --git a/uv.lock b/uv.lock index 8e597db6ef..2e7a0f0ac9 100644 --- a/uv.lock +++ b/uv.lock @@ -91,11 +91,11 @@ wheels = [ [[package]] name = "attrs" -version = "25.4.0" +version = "26.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11", size = 934251, upload-time = "2025-10-06T13:54:44.725Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" }, + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, ] [[package]] @@ -116,12 +116,12 @@ wheels = [ [[package]] name = "bzip2" version = "1.0.8" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#4808f76c45cb797e697ab21e5e37d68a0ab3b2d4" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#347ac440220660253b244526e6e0ed96bea63595" } [[package]] name = "capnproto" version = "1.0.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#f735fd22c66029b92019019d0596da6a4445b931" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#8883c2a61e7056212e9b541a954cc96e5dfd4fdf" } [[package]] name = "casadi" @@ -174,27 +174,27 @@ wheels = [ [[package]] name = "charset-normalizer" -version = "3.4.4" +version = "3.4.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7b/60/e3bec1881450851b087e301bedc3daa9377a4d45f1c26aa90b0b235e38aa/charset_normalizer-3.4.6.tar.gz", hash = "sha256:1ae6b62897110aa7c79ea2f5dd38d1abca6db663687c0b1ad9aed6f6bae3d9d6", size = 143363, upload-time = "2026-03-15T18:53:25.478Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" }, - { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" }, - { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" }, - { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" }, - { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" }, - { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" }, - { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" }, - { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" }, - { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" }, - { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" }, - { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" }, - { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" }, - { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" }, - { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, + { url = "https://files.pythonhosted.org/packages/e5/62/c0815c992c9545347aeea7859b50dc9044d147e2e7278329c6e02ac9a616/charset_normalizer-3.4.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ef7fedc7a6ecbe99969cd09632516738a97eeb8bd7258bf8a0f23114c057dab", size = 295154, upload-time = "2026-03-15T18:50:50.88Z" }, + { url = "https://files.pythonhosted.org/packages/a8/37/bdca6613c2e3c58c7421891d80cc3efa1d32e882f7c4a7ee6039c3fc951a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a4ea868bc28109052790eb2b52a9ab33f3aa7adc02f96673526ff47419490e21", size = 199191, upload-time = "2026-03-15T18:50:52.658Z" }, + { url = "https://files.pythonhosted.org/packages/6c/92/9934d1bbd69f7f398b38c5dae1cbf9cc672e7c34a4adf7b17c0a9c17d15d/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:836ab36280f21fc1a03c99cd05c6b7af70d2697e374c7af0b61ed271401a72a2", size = 218674, upload-time = "2026-03-15T18:50:54.102Z" }, + { url = "https://files.pythonhosted.org/packages/af/90/25f6ab406659286be929fd89ab0e78e38aa183fc374e03aa3c12d730af8a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f1ce721c8a7dfec21fcbdfe04e8f68174183cf4e8188e0645e92aa23985c57ff", size = 215259, upload-time = "2026-03-15T18:50:55.616Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ef/79a463eb0fff7f96afa04c1d4c51f8fc85426f918db467854bfb6a569ce3/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e28d62a8fc7a1fa411c43bd65e346f3bce9716dc51b897fbe930c5987b402d5", size = 207276, upload-time = "2026-03-15T18:50:57.054Z" }, + { url = "https://files.pythonhosted.org/packages/f7/72/d0426afec4b71dc159fa6b4e68f868cd5a3ecd918fec5813a15d292a7d10/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:530d548084c4a9f7a16ed4a294d459b4f229db50df689bfe92027452452943a0", size = 195161, upload-time = "2026-03-15T18:50:58.686Z" }, + { url = "https://files.pythonhosted.org/packages/bf/18/c82b06a68bfcb6ce55e508225d210c7e6a4ea122bfc0748892f3dc4e8e11/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:30f445ae60aad5e1f8bdbb3108e39f6fbc09f4ea16c815c66578878325f8f15a", size = 203452, upload-time = "2026-03-15T18:51:00.196Z" }, + { url = "https://files.pythonhosted.org/packages/44/d6/0c25979b92f8adafdbb946160348d8d44aa60ce99afdc27df524379875cb/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ac2393c73378fea4e52aa56285a3d64be50f1a12395afef9cce47772f60334c2", size = 202272, upload-time = "2026-03-15T18:51:01.703Z" }, + { url = "https://files.pythonhosted.org/packages/2e/3d/7fea3e8fe84136bebbac715dd1221cc25c173c57a699c030ab9b8900cbb7/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:90ca27cd8da8118b18a52d5f547859cc1f8354a00cd1e8e5120df3e30d6279e5", size = 195622, upload-time = "2026-03-15T18:51:03.526Z" }, + { url = "https://files.pythonhosted.org/packages/57/8a/d6f7fd5cb96c58ef2f681424fbca01264461336d2a7fc875e4446b1f1346/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e5a94886bedca0f9b78fecd6afb6629142fd2605aa70a125d49f4edc6037ee6", size = 220056, upload-time = "2026-03-15T18:51:05.269Z" }, + { url = "https://files.pythonhosted.org/packages/16/50/478cdda782c8c9c3fb5da3cc72dd7f331f031e7f1363a893cdd6ca0f8de0/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:695f5c2823691a25f17bc5d5ffe79fa90972cc34b002ac6c843bb8a1720e950d", size = 203751, upload-time = "2026-03-15T18:51:06.858Z" }, + { url = "https://files.pythonhosted.org/packages/75/fc/cc2fcac943939c8e4d8791abfa139f685e5150cae9f94b60f12520feaa9b/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:231d4da14bcd9301310faf492051bee27df11f2bc7549bc0bb41fef11b82daa2", size = 216563, upload-time = "2026-03-15T18:51:08.564Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b7/a4add1d9a5f68f3d037261aecca83abdb0ab15960a3591d340e829b37298/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a056d1ad2633548ca18ffa2f85c202cfb48b68615129143915b8dc72a806a923", size = 209265, upload-time = "2026-03-15T18:51:10.312Z" }, + { url = "https://files.pythonhosted.org/packages/6c/18/c094561b5d64a24277707698e54b7f67bd17a4f857bbfbb1072bba07c8bf/charset_normalizer-3.4.6-cp312-cp312-win32.whl", hash = "sha256:c2274ca724536f173122f36c98ce188fd24ce3dad886ec2b7af859518ce008a4", size = 144229, upload-time = "2026-03-15T18:51:11.694Z" }, + { url = "https://files.pythonhosted.org/packages/ab/20/0567efb3a8fd481b8f34f739ebddc098ed062a59fed41a8d193a61939e8f/charset_normalizer-3.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:c8ae56368f8cc97c7e40a7ee18e1cedaf8e780cd8bc5ed5ac8b81f238614facb", size = 154277, upload-time = "2026-03-15T18:51:13.004Z" }, + { url = "https://files.pythonhosted.org/packages/15/57/28d79b44b51933119e21f65479d0864a8d5893e494cf5daab15df0247c17/charset_normalizer-3.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:899d28f422116b08be5118ef350c292b36fc15ec2daeb9ea987c89281c7bb5c4", size = 142817, upload-time = "2026-03-15T18:51:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/2a/68/687187c7e26cb24ccbd88e5069f5ef00eba804d36dde11d99aad0838ab45/charset_normalizer-3.4.6-py3-none-any.whl", hash = "sha256:947cf925bc916d90adba35a64c82aace04fa39b46b52d4630ece166655905a69", size = 61455, upload-time = "2026-03-15T18:53:23.833Z" }, ] [[package]] @@ -211,11 +211,11 @@ wheels = [ [[package]] name = "codespell" -version = "2.4.1" +version = "2.4.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/e0/709453393c0ea77d007d907dd436b3ee262e28b30995ea1aa36c6ffbccaf/codespell-2.4.1.tar.gz", hash = "sha256:299fcdcb09d23e81e35a671bbe746d5ad7e8385972e65dbb833a2eaac33c01e5", size = 344740, upload-time = "2025-01-28T18:52:39.411Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/9d/1d0903dff693160f893ca6abcabad545088e7a2ee0a6deae7c24e958be69/codespell-2.4.2.tar.gz", hash = "sha256:3c33be9ae34543807f088aeb4832dfad8cb2dae38da61cac0a7045dd376cfdf3", size = 352058, upload-time = "2026-03-05T18:10:42.936Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/20/01/b394922252051e97aab231d416c86da3d8a6d781eeadcdca1082867de64e/codespell-2.4.1-py3-none-any.whl", hash = "sha256:3dadafa67df7e4a3dbf51e0d7315061b80d265f9552ebd699b3dd6834b47e425", size = 344501, upload-time = "2025-01-28T18:52:37.057Z" }, + { url = "https://files.pythonhosted.org/packages/42/a1/52fa05533e95fe45bcc09bcf8a503874b1c08f221a4e35608017e0938f55/codespell-2.4.2-py3-none-any.whl", hash = "sha256:97e0c1060cf46bd1d5db89a936c98db8c2b804e1fdd4b5c645e82a1ec6b1f886", size = 353715, upload-time = "2026-03-05T18:10:41.398Z" }, ] [[package]] @@ -251,26 +251,26 @@ wheels = [ [[package]] name = "coverage" -version = "7.13.4" +version = "7.13.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/24/56/95b7e30fa389756cb56630faa728da46a27b8c6eb46f9d557c68fff12b65/coverage-7.13.4.tar.gz", hash = "sha256:e5c8f6ed1e61a8b2dcdf31eb0b9bbf0130750ca79c1c49eb898e2ad86f5ccc91", size = 827239, upload-time = "2026-02-09T12:59:03.86Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/e0/70553e3000e345daff267cec284ce4cbf3fc141b6da229ac52775b5428f1/coverage-7.13.5.tar.gz", hash = "sha256:c81f6515c4c40141f83f502b07bbfa5c240ba25bbe73da7b33f1e5b6120ff179", size = 915967, upload-time = "2026-03-17T10:33:18.341Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/81/4ce2fdd909c5a0ed1f6dedb88aa57ab79b6d1fbd9b588c1ac7ef45659566/coverage-7.13.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:02231499b08dabbe2b96612993e5fc34217cdae907a51b906ac7fca8027a4459", size = 219449, upload-time = "2026-02-09T12:56:54.889Z" }, - { url = "https://files.pythonhosted.org/packages/5d/96/5238b1efc5922ddbdc9b0db9243152c09777804fb7c02ad1741eb18a11c0/coverage-7.13.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40aa8808140e55dc022b15d8aa7f651b6b3d68b365ea0398f1441e0b04d859c3", size = 219810, upload-time = "2026-02-09T12:56:56.33Z" }, - { url = "https://files.pythonhosted.org/packages/78/72/2f372b726d433c9c35e56377cf1d513b4c16fe51841060d826b95caacec1/coverage-7.13.4-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5b856a8ccf749480024ff3bd7310adaef57bf31fd17e1bfc404b7940b6986634", size = 251308, upload-time = "2026-02-09T12:56:57.858Z" }, - { url = "https://files.pythonhosted.org/packages/5d/a0/2ea570925524ef4e00bb6c82649f5682a77fac5ab910a65c9284de422600/coverage-7.13.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2c048ea43875fbf8b45d476ad79f179809c590ec7b79e2035c662e7afa3192e3", size = 254052, upload-time = "2026-02-09T12:56:59.754Z" }, - { url = "https://files.pythonhosted.org/packages/e8/ac/45dc2e19a1939098d783c846e130b8f862fbb50d09e0af663988f2f21973/coverage-7.13.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b7b38448866e83176e28086674fe7368ab8590e4610fb662b44e345b86d63ffa", size = 255165, upload-time = "2026-02-09T12:57:01.287Z" }, - { url = "https://files.pythonhosted.org/packages/2d/4d/26d236ff35abc3b5e63540d3386e4c3b192168c1d96da5cb2f43c640970f/coverage-7.13.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:de6defc1c9badbf8b9e67ae90fd00519186d6ab64e5cc5f3d21359c2a9b2c1d3", size = 257432, upload-time = "2026-02-09T12:57:02.637Z" }, - { url = "https://files.pythonhosted.org/packages/ec/55/14a966c757d1348b2e19caf699415a2a4c4f7feaa4bbc6326a51f5c7dd1b/coverage-7.13.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7eda778067ad7ffccd23ecffce537dface96212576a07924cbf0d8799d2ded5a", size = 251716, upload-time = "2026-02-09T12:57:04.056Z" }, - { url = "https://files.pythonhosted.org/packages/77/33/50116647905837c66d28b2af1321b845d5f5d19be9655cb84d4a0ea806b4/coverage-7.13.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e87f6c587c3f34356c3759f0420693e35e7eb0e2e41e4c011cb6ec6ecbbf1db7", size = 253089, upload-time = "2026-02-09T12:57:05.503Z" }, - { url = "https://files.pythonhosted.org/packages/c2/b4/8efb11a46e3665d92635a56e4f2d4529de6d33f2cb38afd47d779d15fc99/coverage-7.13.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:8248977c2e33aecb2ced42fef99f2d319e9904a36e55a8a68b69207fb7e43edc", size = 251232, upload-time = "2026-02-09T12:57:06.879Z" }, - { url = "https://files.pythonhosted.org/packages/51/24/8cd73dd399b812cc76bb0ac260e671c4163093441847ffe058ac9fda1e32/coverage-7.13.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:25381386e80ae727608e662474db537d4df1ecd42379b5ba33c84633a2b36d47", size = 255299, upload-time = "2026-02-09T12:57:08.245Z" }, - { url = "https://files.pythonhosted.org/packages/03/94/0a4b12f1d0e029ce1ccc1c800944a9984cbe7d678e470bb6d3c6bc38a0da/coverage-7.13.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:ee756f00726693e5ba94d6df2bdfd64d4852d23b09bb0bc700e3b30e6f333985", size = 250796, upload-time = "2026-02-09T12:57:10.142Z" }, - { url = "https://files.pythonhosted.org/packages/73/44/6002fbf88f6698ca034360ce474c406be6d5a985b3fdb3401128031eef6b/coverage-7.13.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fdfc1e28e7c7cdce44985b3043bc13bbd9c747520f94a4d7164af8260b3d91f0", size = 252673, upload-time = "2026-02-09T12:57:12.197Z" }, - { url = "https://files.pythonhosted.org/packages/de/c6/a0279f7c00e786be75a749a5674e6fa267bcbd8209cd10c9a450c655dfa7/coverage-7.13.4-cp312-cp312-win32.whl", hash = "sha256:01d4cbc3c283a17fc1e42d614a119f7f438eabb593391283adca8dc86eff1246", size = 221990, upload-time = "2026-02-09T12:57:14.085Z" }, - { url = "https://files.pythonhosted.org/packages/77/4e/c0a25a425fcf5557d9abd18419c95b63922e897bc86c1f327f155ef234a9/coverage-7.13.4-cp312-cp312-win_amd64.whl", hash = "sha256:9401ebc7ef522f01d01d45532c68c5ac40fb27113019b6b7d8b208f6e9baa126", size = 222800, upload-time = "2026-02-09T12:57:15.944Z" }, - { url = "https://files.pythonhosted.org/packages/47/ac/92da44ad9a6f4e3a7debd178949d6f3769bedca33830ce9b1dcdab589a37/coverage-7.13.4-cp312-cp312-win_arm64.whl", hash = "sha256:b1ec7b6b6e93255f952e27ab58fbc68dcc468844b16ecbee881aeb29b6ab4d8d", size = 221415, upload-time = "2026-02-09T12:57:17.497Z" }, - { url = "https://files.pythonhosted.org/packages/0d/4a/331fe2caf6799d591109bb9c08083080f6de90a823695d412a935622abb2/coverage-7.13.4-py3-none-any.whl", hash = "sha256:1af1641e57cf7ba1bd67d677c9abdbcd6cc2ab7da3bca7fa1e2b7e50e65f2ad0", size = 211242, upload-time = "2026-02-09T12:59:02.032Z" }, + { url = "https://files.pythonhosted.org/packages/a0/c3/a396306ba7db865bf96fc1fb3b7fd29bcbf3d829df642e77b13555163cd6/coverage-7.13.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:460cf0114c5016fa841214ff5564aa4864f11948da9440bc97e21ad1f4ba1e01", size = 219554, upload-time = "2026-03-17T10:30:42.208Z" }, + { url = "https://files.pythonhosted.org/packages/a6/16/a68a19e5384e93f811dccc51034b1fd0b865841c390e3c931dcc4699e035/coverage-7.13.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0e223ce4b4ed47f065bfb123687686512e37629be25cc63728557ae7db261422", size = 219908, upload-time = "2026-03-17T10:30:43.906Z" }, + { url = "https://files.pythonhosted.org/packages/29/72/20b917c6793af3a5ceb7fb9c50033f3ec7865f2911a1416b34a7cfa0813b/coverage-7.13.5-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6e3370441f4513c6252bf042b9c36d22491142385049243253c7e48398a15a9f", size = 251419, upload-time = "2026-03-17T10:30:45.545Z" }, + { url = "https://files.pythonhosted.org/packages/8c/49/cd14b789536ac6a4778c453c6a2338bc0a2fb60c5a5a41b4008328b9acc1/coverage-7.13.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:03ccc709a17a1de074fb1d11f217342fb0d2b1582ed544f554fc9fc3f07e95f5", size = 254159, upload-time = "2026-03-17T10:30:47.204Z" }, + { url = "https://files.pythonhosted.org/packages/9d/00/7b0edcfe64e2ed4c0340dac14a52ad0f4c9bd0b8b5e531af7d55b703db7c/coverage-7.13.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3f4818d065964db3c1c66dc0fbdac5ac692ecbc875555e13374fdbe7eedb4376", size = 255270, upload-time = "2026-03-17T10:30:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/93/89/7ffc4ba0f5d0a55c1e84ea7cee39c9fc06af7b170513d83fbf3bbefce280/coverage-7.13.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:012d5319e66e9d5a218834642d6c35d265515a62f01157a45bcc036ecf947256", size = 257538, upload-time = "2026-03-17T10:30:50.77Z" }, + { url = "https://files.pythonhosted.org/packages/81/bd/73ddf85f93f7e6fa83e77ccecb6162d9415c79007b4bc124008a4995e4a7/coverage-7.13.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8dd02af98971bdb956363e4827d34425cb3df19ee550ef92855b0acb9c7ce51c", size = 251821, upload-time = "2026-03-17T10:30:52.5Z" }, + { url = "https://files.pythonhosted.org/packages/a0/81/278aff4e8dec4926a0bcb9486320752811f543a3ce5b602cc7a29978d073/coverage-7.13.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f08fd75c50a760c7eb068ae823777268daaf16a80b918fa58eea888f8e3919f5", size = 253191, upload-time = "2026-03-17T10:30:54.543Z" }, + { url = "https://files.pythonhosted.org/packages/70/ee/fe1621488e2e0a58d7e94c4800f0d96f79671553488d401a612bebae324b/coverage-7.13.5-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:843ea8643cf967d1ac7e8ecd4bb00c99135adf4816c0c0593fdcc47b597fcf09", size = 251337, upload-time = "2026-03-17T10:30:56.663Z" }, + { url = "https://files.pythonhosted.org/packages/37/a6/f79fb37aa104b562207cc23cb5711ab6793608e246cae1e93f26b2236ed9/coverage-7.13.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:9d44d7aa963820b1b971dbecd90bfe5fe8f81cff79787eb6cca15750bd2f79b9", size = 255404, upload-time = "2026-03-17T10:30:58.427Z" }, + { url = "https://files.pythonhosted.org/packages/75/f0/ed15262a58ec81ce457ceb717b7f78752a1713556b19081b76e90896e8d4/coverage-7.13.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:7132bed4bd7b836200c591410ae7d97bf7ae8be6fc87d160b2bd881df929e7bf", size = 250903, upload-time = "2026-03-17T10:31:00.093Z" }, + { url = "https://files.pythonhosted.org/packages/0f/e9/9129958f20e7e9d4d56d51d42ccf708d15cac355ff4ac6e736e97a9393d2/coverage-7.13.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a698e363641b98843c517817db75373c83254781426e94ada3197cabbc2c919c", size = 252780, upload-time = "2026-03-17T10:31:01.916Z" }, + { url = "https://files.pythonhosted.org/packages/a4/d7/0ad9b15812d81272db94379fe4c6df8fd17781cc7671fdfa30c76ba5ff7b/coverage-7.13.5-cp312-cp312-win32.whl", hash = "sha256:bdba0a6b8812e8c7df002d908a9a2ea3c36e92611b5708633c50869e6d922fdf", size = 222093, upload-time = "2026-03-17T10:31:03.642Z" }, + { url = "https://files.pythonhosted.org/packages/29/3d/821a9a5799fac2556bcf0bd37a70d1d11fa9e49784b6d22e92e8b2f85f18/coverage-7.13.5-cp312-cp312-win_amd64.whl", hash = "sha256:d2c87e0c473a10bffe991502eac389220533024c8082ec1ce849f4218dded810", size = 222900, upload-time = "2026-03-17T10:31:05.651Z" }, + { url = "https://files.pythonhosted.org/packages/d4/fa/2238c2ad08e35cf4f020ea721f717e09ec3152aea75d191a7faf3ef009a8/coverage-7.13.5-cp312-cp312-win_arm64.whl", hash = "sha256:bf69236a9a81bdca3bff53796237aab096cdbf8d78a66ad61e992d9dac7eb2de", size = 221515, upload-time = "2026-03-17T10:31:07.293Z" }, + { url = "https://files.pythonhosted.org/packages/9e/ee/a4cf96b8ce1e566ed238f0659ac2d3f007ed1d14b181bcb684e19561a69a/coverage-7.13.5-py3-none-any.whl", hash = "sha256:34b02417cf070e173989b3db962f7ed56d2f644307b2cf9d5a0f258e13084a61", size = 211346, upload-time = "2026-03-17T10:33:15.691Z" }, ] [[package]] @@ -371,7 +371,7 @@ wheels = [ [[package]] name = "eigen" version = "3.4.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#fc9915c3a81d6488eafcdbbdc428f15d8123e540" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#42ca1061f8bfff9b0d8836781e4222bd6dd28a31" } [[package]] name = "execnet" @@ -385,23 +385,23 @@ wheels = [ [[package]] name = "ffmpeg" version = "7.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#8d693da088e5905d4479550e07484961765df45b" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#f33e25f6fd36f3c581add7bb3740f659aab002c1" } [[package]] name = "fonttools" -version = "4.61.1" +version = "4.62.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ec/ca/cf17b88a8df95691275a3d77dc0a5ad9907f328ae53acbe6795da1b2f5ed/fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69", size = 3565756, upload-time = "2025-12-12T17:31:24.246Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/08/7012b00a9a5874311b639c3920270c36ee0c445b69d9989a85e5c92ebcb0/fonttools-4.62.1.tar.gz", hash = "sha256:e54c75fd6041f1122476776880f7c3c3295ffa31962dc6ebe2543c00dca58b5d", size = 3580737, upload-time = "2026-03-13T13:54:25.52Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6f/16/7decaa24a1bd3a70c607b2e29f0adc6159f36a7e40eaba59846414765fd4/fonttools-4.61.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f3cb4a569029b9f291f88aafc927dd53683757e640081ca8c412781ea144565e", size = 2851593, upload-time = "2025-12-12T17:30:04.225Z" }, - { url = "https://files.pythonhosted.org/packages/94/98/3c4cb97c64713a8cf499b3245c3bf9a2b8fd16a3e375feff2aed78f96259/fonttools-4.61.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41a7170d042e8c0024703ed13b71893519a1a6d6e18e933e3ec7507a2c26a4b2", size = 2400231, upload-time = "2025-12-12T17:30:06.47Z" }, - { url = "https://files.pythonhosted.org/packages/b7/37/82dbef0f6342eb01f54bca073ac1498433d6ce71e50c3c3282b655733b31/fonttools-4.61.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10d88e55330e092940584774ee5e8a6971b01fc2f4d3466a1d6c158230880796", size = 4954103, upload-time = "2025-12-12T17:30:08.432Z" }, - { url = "https://files.pythonhosted.org/packages/6c/44/f3aeac0fa98e7ad527f479e161aca6c3a1e47bb6996b053d45226fe37bf2/fonttools-4.61.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15acc09befd16a0fb8a8f62bc147e1a82817542d72184acca9ce6e0aeda9fa6d", size = 5004295, upload-time = "2025-12-12T17:30:10.56Z" }, - { url = "https://files.pythonhosted.org/packages/14/e8/7424ced75473983b964d09f6747fa09f054a6d656f60e9ac9324cf40c743/fonttools-4.61.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e6bcdf33aec38d16508ce61fd81838f24c83c90a1d1b8c68982857038673d6b8", size = 4944109, upload-time = "2025-12-12T17:30:12.874Z" }, - { url = "https://files.pythonhosted.org/packages/c8/8b/6391b257fa3d0b553d73e778f953a2f0154292a7a7a085e2374b111e5410/fonttools-4.61.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5fade934607a523614726119164ff621e8c30e8fa1ffffbbd358662056ba69f0", size = 5093598, upload-time = "2025-12-12T17:30:15.79Z" }, - { url = "https://files.pythonhosted.org/packages/d9/71/fd2ea96cdc512d92da5678a1c98c267ddd4d8c5130b76d0f7a80f9a9fde8/fonttools-4.61.1-cp312-cp312-win32.whl", hash = "sha256:75da8f28eff26defba42c52986de97b22106cb8f26515b7c22443ebc9c2d3261", size = 2269060, upload-time = "2025-12-12T17:30:18.058Z" }, - { url = "https://files.pythonhosted.org/packages/80/3b/a3e81b71aed5a688e89dfe0e2694b26b78c7d7f39a5ffd8a7d75f54a12a8/fonttools-4.61.1-cp312-cp312-win_amd64.whl", hash = "sha256:497c31ce314219888c0e2fce5ad9178ca83fe5230b01a5006726cdf3ac9f24d9", size = 2319078, upload-time = "2025-12-12T17:30:22.862Z" }, - { url = "https://files.pythonhosted.org/packages/c7/4e/ce75a57ff3aebf6fc1f4e9d508b8e5810618a33d900ad6c19eb30b290b97/fonttools-4.61.1-py3-none-any.whl", hash = "sha256:17d2bf5d541add43822bcf0c43d7d847b160c9bb01d15d5007d84e2217aaa371", size = 1148996, upload-time = "2025-12-12T17:31:21.03Z" }, + { url = "https://files.pythonhosted.org/packages/47/d4/dbacced3953544b9a93088cc10ef2b596d348c983d5c67a404fa41ec51ba/fonttools-4.62.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:90365821debbd7db678809c7491ca4acd1e0779b9624cdc6ddaf1f31992bf974", size = 2870219, upload-time = "2026-03-13T13:52:53.664Z" }, + { url = "https://files.pythonhosted.org/packages/66/9e/a769c8e99b81e5a87ab7e5e7236684de4e96246aae17274e5347d11ebd78/fonttools-4.62.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:12859ff0b47dd20f110804c3e0d0970f7b832f561630cd879969011541a464a9", size = 2414891, upload-time = "2026-03-13T13:52:56.493Z" }, + { url = "https://files.pythonhosted.org/packages/69/64/f19a9e3911968c37e1e620e14dfc5778299e1474f72f4e57c5ec771d9489/fonttools-4.62.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c125ffa00c3d9003cdaaf7f2c79e6e535628093e14b5de1dccb08859b680936", size = 5033197, upload-time = "2026-03-13T13:52:59.179Z" }, + { url = "https://files.pythonhosted.org/packages/9b/8a/99c8b3c3888c5c474c08dbfd7c8899786de9604b727fcefb055b42c84bba/fonttools-4.62.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:149f7d84afca659d1a97e39a4778794a2f83bf344c5ee5134e09995086cc2392", size = 4988768, upload-time = "2026-03-13T13:53:02.761Z" }, + { url = "https://files.pythonhosted.org/packages/d1/c6/0f904540d3e6ab463c1243a0d803504826a11604c72dd58c2949796a1762/fonttools-4.62.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0aa72c43a601cfa9273bb1ae0518f1acadc01ee181a6fc60cd758d7fdadffc04", size = 4971512, upload-time = "2026-03-13T13:53:05.678Z" }, + { url = "https://files.pythonhosted.org/packages/29/0b/5cbef6588dc9bd6b5c9ad6a4d5a8ca384d0cea089da31711bbeb4f9654a6/fonttools-4.62.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:19177c8d96c7c36359266e571c5173bcee9157b59cfc8cb0153c5673dc5a3a7d", size = 5122723, upload-time = "2026-03-13T13:53:08.662Z" }, + { url = "https://files.pythonhosted.org/packages/4a/47/b3a5342d381595ef439adec67848bed561ab7fdb1019fa522e82101b7d9c/fonttools-4.62.1-cp312-cp312-win32.whl", hash = "sha256:a24decd24d60744ee8b4679d38e88b8303d86772053afc29b19d23bb8207803c", size = 2281278, upload-time = "2026-03-13T13:53:10.998Z" }, + { url = "https://files.pythonhosted.org/packages/28/b1/0c2ab56a16f409c6c8a68816e6af707827ad5d629634691ff60a52879792/fonttools-4.62.1-cp312-cp312-win_amd64.whl", hash = "sha256:9e7863e10b3de72376280b515d35b14f5eeed639d1aa7824f4cf06779ec65e42", size = 2331414, upload-time = "2026-03-13T13:53:13.992Z" }, + { url = "https://files.pythonhosted.org/packages/fd/ba/56147c165442cc5ba7e82ecf301c9a68353cede498185869e6e02b4c264f/fonttools-4.62.1-py3-none-any.whl", hash = "sha256:7487782e2113861f4ddcc07c3436450659e3caa5e470b27dc2177cade2d8e7fd", size = 1152647, upload-time = "2026-03-13T13:54:22.735Z" }, ] [[package]] @@ -432,7 +432,7 @@ wheels = [ [[package]] name = "gcc-arm-none-eabi" version = "13.2.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#e101138b29023effc932df7a58fb76a26c4e443a" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#770e647fd6e1db963c8d8168a223bebb8696c8b1" } [[package]] name = "ghp-import" @@ -449,7 +449,7 @@ wheels = [ [[package]] name = "git-lfs" version = "3.6.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#5407b1d37b7a8a9ae3747cc20cb6e7a7b01f5059" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#75aa1619f3a1d283979aa404fec7b0c777c237bf" } [[package]] name = "google-crc32c" @@ -495,6 +495,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9c/1f/19ebc343cc71a7ffa78f17018535adc5cbdd87afb31d7c34874680148b32/ifaddr-0.2.0-py3-none-any.whl", hash = "sha256:085e0305cfe6f16ab12d72e2024030f5d52674afad6911bb1eee207177b8a748", size = 12314, upload-time = "2022-06-15T21:40:25.756Z" }, ] +[[package]] +name = "imgui" +version = "1.92.7" +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#013161b390b962778878a1d42cbe7cc738e5537f" } + [[package]] name = "iniconfig" version = "2.3.0" @@ -545,29 +550,35 @@ wheels = [ [[package]] name = "kiwisolver" -version = "1.4.9" +version = "1.5.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz", hash = "sha256:c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d", size = 97564, upload-time = "2025-08-10T21:27:49.279Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/67/9c61eccb13f0bdca9307614e782fec49ffdde0f7a2314935d489fa93cd9c/kiwisolver-1.5.0.tar.gz", hash = "sha256:d4193f3d9dc3f6f79aaed0e5637f45d98850ebf01f7ca20e69457f3e8946b66a", size = 103482, upload-time = "2026-03-09T13:15:53.382Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/86/c9/13573a747838aeb1c76e3267620daa054f4152444d1f3d1a2324b78255b5/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ac5a486ac389dddcc5bef4f365b6ae3ffff2c433324fb38dd35e3fab7c957999", size = 123686, upload-time = "2025-08-10T21:26:10.034Z" }, - { url = "https://files.pythonhosted.org/packages/51/ea/2ecf727927f103ffd1739271ca19c424d0e65ea473fbaeea1c014aea93f6/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f2ba92255faa7309d06fe44c3a4a97efe1c8d640c2a79a5ef728b685762a6fd2", size = 66460, upload-time = "2025-08-10T21:26:11.083Z" }, - { url = "https://files.pythonhosted.org/packages/5b/5a/51f5464373ce2aeb5194508298a508b6f21d3867f499556263c64c621914/kiwisolver-1.4.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a2899935e724dd1074cb568ce7ac0dce28b2cd6ab539c8e001a8578eb106d14", size = 64952, upload-time = "2025-08-10T21:26:12.058Z" }, - { url = "https://files.pythonhosted.org/packages/70/90/6d240beb0f24b74371762873e9b7f499f1e02166a2d9c5801f4dbf8fa12e/kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f6008a4919fdbc0b0097089f67a1eb55d950ed7e90ce2cc3e640abadd2757a04", size = 1474756, upload-time = "2025-08-10T21:26:13.096Z" }, - { url = "https://files.pythonhosted.org/packages/12/42/f36816eaf465220f683fb711efdd1bbf7a7005a2473d0e4ed421389bd26c/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:67bb8b474b4181770f926f7b7d2f8c0248cbcb78b660fdd41a47054b28d2a752", size = 1276404, upload-time = "2025-08-10T21:26:14.457Z" }, - { url = "https://files.pythonhosted.org/packages/2e/64/bc2de94800adc830c476dce44e9b40fd0809cddeef1fde9fcf0f73da301f/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2327a4a30d3ee07d2fbe2e7933e8a37c591663b96ce42a00bc67461a87d7df77", size = 1294410, upload-time = "2025-08-10T21:26:15.73Z" }, - { url = "https://files.pythonhosted.org/packages/5f/42/2dc82330a70aa8e55b6d395b11018045e58d0bb00834502bf11509f79091/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a08b491ec91b1d5053ac177afe5290adacf1f0f6307d771ccac5de30592d198", size = 1343631, upload-time = "2025-08-10T21:26:17.045Z" }, - { url = "https://files.pythonhosted.org/packages/22/fd/f4c67a6ed1aab149ec5a8a401c323cee7a1cbe364381bb6c9c0d564e0e20/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8fc5c867c22b828001b6a38d2eaeb88160bf5783c6cb4a5e440efc981ce286d", size = 2224963, upload-time = "2025-08-10T21:26:18.737Z" }, - { url = "https://files.pythonhosted.org/packages/45/aa/76720bd4cb3713314677d9ec94dcc21ced3f1baf4830adde5bb9b2430a5f/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3b3115b2581ea35bb6d1f24a4c90af37e5d9b49dcff267eeed14c3893c5b86ab", size = 2321295, upload-time = "2025-08-10T21:26:20.11Z" }, - { url = "https://files.pythonhosted.org/packages/80/19/d3ec0d9ab711242f56ae0dc2fc5d70e298bb4a1f9dfab44c027668c673a1/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:858e4c22fb075920b96a291928cb7dea5644e94c0ee4fcd5af7e865655e4ccf2", size = 2487987, upload-time = "2025-08-10T21:26:21.49Z" }, - { url = "https://files.pythonhosted.org/packages/39/e9/61e4813b2c97e86b6fdbd4dd824bf72d28bcd8d4849b8084a357bc0dd64d/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed0fecd28cc62c54b262e3736f8bb2512d8dcfdc2bcf08be5f47f96bf405b145", size = 2291817, upload-time = "2025-08-10T21:26:22.812Z" }, - { url = "https://files.pythonhosted.org/packages/a0/41/85d82b0291db7504da3c2defe35c9a8a5c9803a730f297bd823d11d5fb77/kiwisolver-1.4.9-cp312-cp312-win_amd64.whl", hash = "sha256:f68208a520c3d86ea51acf688a3e3002615a7f0238002cccc17affecc86a8a54", size = 73895, upload-time = "2025-08-10T21:26:24.37Z" }, - { url = "https://files.pythonhosted.org/packages/e2/92/5f3068cf15ee5cb624a0c7596e67e2a0bb2adee33f71c379054a491d07da/kiwisolver-1.4.9-cp312-cp312-win_arm64.whl", hash = "sha256:2c1a4f57df73965f3f14df20b80ee29e6a7930a57d2d9e8491a25f676e197c60", size = 64992, upload-time = "2025-08-10T21:26:25.732Z" }, + { url = "https://files.pythonhosted.org/packages/4d/b2/818b74ebea34dabe6d0c51cb1c572e046730e64844da6ed646d5298c40ce/kiwisolver-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:4e9750bc21b886308024f8a54ccb9a2cc38ac9fa813bf4348434e3d54f337ff9", size = 123158, upload-time = "2026-03-09T13:13:23.127Z" }, + { url = "https://files.pythonhosted.org/packages/bf/d9/405320f8077e8e1c5c4bd6adc45e1e6edf6d727b6da7f2e2533cf58bff71/kiwisolver-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:72ec46b7eba5b395e0a7b63025490d3214c11013f4aacb4f5e8d6c3041829588", size = 66388, upload-time = "2026-03-09T13:13:24.765Z" }, + { url = "https://files.pythonhosted.org/packages/99/9f/795fedf35634f746151ca8839d05681ceb6287fbed6cc1c9bf235f7887c2/kiwisolver-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ed3a984b31da7481b103f68776f7128a89ef26ed40f4dc41a2223cda7fb24819", size = 64068, upload-time = "2026-03-09T13:13:25.878Z" }, + { url = "https://files.pythonhosted.org/packages/c4/13/680c54afe3e65767bed7ec1a15571e1a2f1257128733851ade24abcefbcc/kiwisolver-1.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bb5136fb5352d3f422df33f0c879a1b0c204004324150cc3b5e3c4f310c9049f", size = 1477934, upload-time = "2026-03-09T13:13:27.166Z" }, + { url = "https://files.pythonhosted.org/packages/c8/2f/cebfcdb60fd6a9b0f6b47a9337198bcbad6fbe15e68189b7011fd914911f/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b2af221f268f5af85e776a73d62b0845fc8baf8ef0abfae79d29c77d0e776aaf", size = 1278537, upload-time = "2026-03-09T13:13:28.707Z" }, + { url = "https://files.pythonhosted.org/packages/f2/0d/9b782923aada3fafb1d6b84e13121954515c669b18af0c26e7d21f579855/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b0f172dc8ffaccb8522d7c5d899de00133f2f1ca7b0a49b7da98e901de87bf2d", size = 1296685, upload-time = "2026-03-09T13:13:30.528Z" }, + { url = "https://files.pythonhosted.org/packages/27/70/83241b6634b04fe44e892688d5208332bde130f38e610c0418f9ede47ded/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6ab8ba9152203feec73758dad83af9a0bbe05001eb4639e547207c40cfb52083", size = 1346024, upload-time = "2026-03-09T13:13:32.818Z" }, + { url = "https://files.pythonhosted.org/packages/e4/db/30ed226fb271ae1a6431fc0fe0edffb2efe23cadb01e798caeb9f2ceae8f/kiwisolver-1.5.0-cp312-cp312-manylinux_2_39_riscv64.whl", hash = "sha256:cdee07c4d7f6d72008d3f73b9bf027f4e11550224c7c50d8df1ae4a37c1402a6", size = 987241, upload-time = "2026-03-09T13:13:34.435Z" }, + { url = "https://files.pythonhosted.org/packages/ec/bd/c314595208e4c9587652d50959ead9e461995389664e490f4dce7ff0f782/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7c60d3c9b06fb23bd9c6139281ccbdc384297579ae037f08ae90c69f6845c0b1", size = 2227742, upload-time = "2026-03-09T13:13:36.4Z" }, + { url = "https://files.pythonhosted.org/packages/c1/43/0499cec932d935229b5543d073c2b87c9c22846aab48881e9d8d6e742a2d/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e315e5ec90d88e140f57696ff85b484ff68bb311e36f2c414aa4286293e6dee0", size = 2323966, upload-time = "2026-03-09T13:13:38.204Z" }, + { url = "https://files.pythonhosted.org/packages/3d/6f/79b0d760907965acfd9d61826a3d41f8f093c538f55cd2633d3f0db269f6/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:1465387ac63576c3e125e5337a6892b9e99e0627d52317f3ca79e6930d889d15", size = 1977417, upload-time = "2026-03-09T13:13:39.966Z" }, + { url = "https://files.pythonhosted.org/packages/ab/31/01d0537c41cb75a551a438c3c7a80d0c60d60b81f694dac83dd436aec0d0/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:530a3fd64c87cffa844d4b6b9768774763d9caa299e9b75d8eca6a4423b31314", size = 2491238, upload-time = "2026-03-09T13:13:41.698Z" }, + { url = "https://files.pythonhosted.org/packages/e4/34/8aefdd0be9cfd00a44509251ba864f5caf2991e36772e61c408007e7f417/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1d9daea4ea6b9be74fe2f01f7fbade8d6ffab263e781274cffca0dba9be9eec9", size = 2294947, upload-time = "2026-03-09T13:13:43.343Z" }, + { url = "https://files.pythonhosted.org/packages/ad/cf/0348374369ca588f8fe9c338fae49fa4e16eeb10ffb3d012f23a54578a9e/kiwisolver-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:f18c2d9782259a6dc132fdc7a63c168cbc74b35284b6d75c673958982a378384", size = 73569, upload-time = "2026-03-09T13:13:45.792Z" }, + { url = "https://files.pythonhosted.org/packages/28/26/192b26196e2316e2bd29deef67e37cdf9870d9af8e085e521afff0fed526/kiwisolver-1.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:f7c7553b13f69c1b29a5bde08ddc6d9d0c8bfb84f9ed01c30db25944aeb852a7", size = 64997, upload-time = "2026-03-09T13:13:46.878Z" }, + { url = "https://files.pythonhosted.org/packages/1c/fa/2910df836372d8761bb6eff7d8bdcb1613b5c2e03f260efe7abe34d388a7/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-macosx_10_13_x86_64.whl", hash = "sha256:5ae8e62c147495b01a0f4765c878e9bfdf843412446a247e28df59936e99e797", size = 130262, upload-time = "2026-03-09T13:15:35.629Z" }, + { url = "https://files.pythonhosted.org/packages/0f/41/c5f71f9f00aabcc71fee8b7475e3f64747282580c2fe748961ba29b18385/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:f6764a4ccab3078db14a632420930f6186058750df066b8ea2a7106df91d3203", size = 138036, upload-time = "2026-03-09T13:15:36.894Z" }, + { url = "https://files.pythonhosted.org/packages/fa/06/7399a607f434119c6e1fdc8ec89a8d51ccccadf3341dee4ead6bd14caaf5/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c31c13da98624f957b0fb1b5bae5383b2333c2c3f6793d9825dd5ce79b525cb7", size = 194295, upload-time = "2026-03-09T13:15:38.22Z" }, + { url = "https://files.pythonhosted.org/packages/b5/91/53255615acd2a1eaca307ede3c90eb550bae9c94581f8c00081b6b1c8f44/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-win_amd64.whl", hash = "sha256:1f1489f769582498610e015a8ef2d36f28f505ab3096d0e16b4858a9ec214f57", size = 75987, upload-time = "2026-03-09T13:15:39.65Z" }, ] [[package]] name = "libjpeg" version = "3.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#83fa530843e5109c51aef14327b6fde5dcb4507b" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#8ca1f9de9dc7a31e65454f7f987bbf8aa673e908" } [[package]] name = "libusb" @@ -588,7 +599,7 @@ wheels = [ [[package]] name = "libyuv" version = "1922.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#600cdd08cb77cbcc001daeb031abcb5c6008c7c2" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#4d09f32d9de02c74adc3c0cbbd0e59ae2193217a" } [[package]] name = "markdown" @@ -689,16 +700,16 @@ wheels = [ [[package]] name = "mkdocs-get-deps" -version = "0.2.0" +version = "0.2.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mergedeep" }, { name = "platformdirs" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c", size = 10239, upload-time = "2023-11-20T17:51:09.981Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ce/25/b3cccb187655b9393572bde9b09261d267c3bf2f2cdabe347673be5976a6/mkdocs_get_deps-0.2.2.tar.gz", hash = "sha256:8ee8d5f316cdbbb2834bc1df6e69c08fe769a83e040060de26d3c19fad3599a1", size = 11047, upload-time = "2026-03-10T02:46:33.632Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/d4/029f984e8d3f3b6b726bd33cafc473b75e9e44c0f7e80a5b29abc466bdea/mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134", size = 9521, upload-time = "2023-11-20T17:51:08.587Z" }, + { url = "https://files.pythonhosted.org/packages/88/29/744136411e785c4b0b744d5413e56555265939ab3a104c6a4b719dad33fd/mkdocs_get_deps-0.2.2-py3-none-any.whl", hash = "sha256:e7878cbeac04860b8b5e0ca31d3abad3df9411a75a32cde82f8e44b6c16ff650", size = 9555, upload-time = "2026-03-10T02:46:32.256Z" }, ] [[package]] @@ -740,25 +751,25 @@ wheels = [ [[package]] name = "ncurses" version = "6.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#0503ac0d54799b58c84f900dba75abcad17e780f" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#a1f3891afb2143ae34d80b6ecd502bda30fb1e28" } [[package]] name = "numpy" -version = "2.4.2" +version = "2.4.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/fd/0005efbd0af48e55eb3c7208af93f2862d4b1a56cd78e84309a2d959208d/numpy-2.4.2.tar.gz", hash = "sha256:659a6107e31a83c4e33f763942275fd278b21d095094044eb35569e86a21ddae", size = 20723651, upload-time = "2026-01-31T23:13:10.135Z" } +sdist = { url = "https://files.pythonhosted.org/packages/10/8b/c265f4823726ab832de836cdd184d0986dcf94480f81e8739692a7ac7af2/numpy-2.4.3.tar.gz", hash = "sha256:483a201202b73495f00dbc83796c6ae63137a9bdade074f7648b3e32613412dd", size = 20727743, upload-time = "2026-03-09T07:58:53.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/51/6e/6f394c9c77668153e14d4da83bcc247beb5952f6ead7699a1a2992613bea/numpy-2.4.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:21982668592194c609de53ba4933a7471880ccbaadcc52352694a59ecc860b3a", size = 16667963, upload-time = "2026-01-31T23:10:52.147Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f8/55483431f2b2fd015ae6ed4fe62288823ce908437ed49db5a03d15151678/numpy-2.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40397bda92382fcec844066efb11f13e1c9a3e2a8e8f318fb72ed8b6db9f60f1", size = 14693571, upload-time = "2026-01-31T23:10:54.789Z" }, - { url = "https://files.pythonhosted.org/packages/2f/20/18026832b1845cdc82248208dd929ca14c9d8f2bac391f67440707fff27c/numpy-2.4.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:b3a24467af63c67829bfaa61eecf18d5432d4f11992688537be59ecd6ad32f5e", size = 5203469, upload-time = "2026-01-31T23:10:57.343Z" }, - { url = "https://files.pythonhosted.org/packages/7d/33/2eb97c8a77daaba34eaa3fa7241a14ac5f51c46a6bd5911361b644c4a1e2/numpy-2.4.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:805cc8de9fd6e7a22da5aed858e0ab16be5a4db6c873dde1d7451c541553aa27", size = 6550820, upload-time = "2026-01-31T23:10:59.429Z" }, - { url = "https://files.pythonhosted.org/packages/b1/91/b97fdfd12dc75b02c44e26c6638241cc004d4079a0321a69c62f51470c4c/numpy-2.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d82351358ffbcdcd7b686b90742a9b86632d6c1c051016484fa0b326a0a1548", size = 15663067, upload-time = "2026-01-31T23:11:01.291Z" }, - { url = "https://files.pythonhosted.org/packages/f5/c6/a18e59f3f0b8071cc85cbc8d80cd02d68aa9710170b2553a117203d46936/numpy-2.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e35d3e0144137d9fdae62912e869136164534d64a169f86438bc9561b6ad49f", size = 16619782, upload-time = "2026-01-31T23:11:03.669Z" }, - { url = "https://files.pythonhosted.org/packages/b7/83/9751502164601a79e18847309f5ceec0b1446d7b6aa12305759b72cf98b2/numpy-2.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adb6ed2ad29b9e15321d167d152ee909ec73395901b70936f029c3bc6d7f4460", size = 17013128, upload-time = "2026-01-31T23:11:05.913Z" }, - { url = "https://files.pythonhosted.org/packages/61/c4/c4066322256ec740acc1c8923a10047818691d2f8aec254798f3dd90f5f2/numpy-2.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8906e71fd8afcb76580404e2a950caef2685df3d2a57fe82a86ac8d33cc007ba", size = 18345324, upload-time = "2026-01-31T23:11:08.248Z" }, - { url = "https://files.pythonhosted.org/packages/ab/af/6157aa6da728fa4525a755bfad486ae7e3f76d4c1864138003eb84328497/numpy-2.4.2-cp312-cp312-win32.whl", hash = "sha256:ec055f6dae239a6299cace477b479cca2fc125c5675482daf1dd886933a1076f", size = 5960282, upload-time = "2026-01-31T23:11:10.497Z" }, - { url = "https://files.pythonhosted.org/packages/92/0f/7ceaaeaacb40567071e94dbf2c9480c0ae453d5bb4f52bea3892c39dc83c/numpy-2.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:209fae046e62d0ce6435fcfe3b1a10537e858249b3d9b05829e2a05218296a85", size = 12314210, upload-time = "2026-01-31T23:11:12.176Z" }, - { url = "https://files.pythonhosted.org/packages/2f/a3/56c5c604fae6dd40fa2ed3040d005fca97e91bd320d232ac9931d77ba13c/numpy-2.4.2-cp312-cp312-win_arm64.whl", hash = "sha256:fbde1b0c6e81d56f5dccd95dd4a711d9b95df1ae4009a60887e56b27e8d903fa", size = 10220171, upload-time = "2026-01-31T23:11:14.684Z" }, + { url = "https://files.pythonhosted.org/packages/a9/ed/6388632536f9788cea23a3a1b629f25b43eaacd7d7377e5d6bc7b9deb69b/numpy-2.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61b0cbabbb6126c8df63b9a3a0c4b1f44ebca5e12ff6997b80fcf267fb3150ef", size = 16669628, upload-time = "2026-03-09T07:56:24.252Z" }, + { url = "https://files.pythonhosted.org/packages/74/1b/ee2abfc68e1ce728b2958b6ba831d65c62e1b13ce3017c13943f8f9b5b2e/numpy-2.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7395e69ff32526710748f92cd8c9849b361830968ea3e24a676f272653e8983e", size = 14696872, upload-time = "2026-03-09T07:56:26.991Z" }, + { url = "https://files.pythonhosted.org/packages/ba/d1/780400e915ff5638166f11ca9dc2c5815189f3d7cf6f8759a1685e586413/numpy-2.4.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:abdce0f71dcb4a00e4e77f3faf05e4616ceccfe72ccaa07f47ee79cda3b7b0f4", size = 5203489, upload-time = "2026-03-09T07:56:29.414Z" }, + { url = "https://files.pythonhosted.org/packages/0b/bb/baffa907e9da4cc34a6e556d6d90e032f6d7a75ea47968ea92b4858826c4/numpy-2.4.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:48da3a4ee1336454b07497ff7ec83903efa5505792c4e6d9bf83d99dc07a1e18", size = 6550814, upload-time = "2026-03-09T07:56:32.225Z" }, + { url = "https://files.pythonhosted.org/packages/7b/12/8c9f0c6c95f76aeb20fc4a699c33e9f827fa0d0f857747c73bb7b17af945/numpy-2.4.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:32e3bef222ad6b052280311d1d60db8e259e4947052c3ae7dd6817451fc8a4c5", size = 15666601, upload-time = "2026-03-09T07:56:34.461Z" }, + { url = "https://files.pythonhosted.org/packages/bd/79/cc665495e4d57d0aa6fbcc0aa57aa82671dfc78fbf95fe733ed86d98f52a/numpy-2.4.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7dd01a46700b1967487141a66ac1a3cf0dd8ebf1f08db37d46389401512ca97", size = 16621358, upload-time = "2026-03-09T07:56:36.852Z" }, + { url = "https://files.pythonhosted.org/packages/a8/40/b4ecb7224af1065c3539f5ecfff879d090de09608ad1008f02c05c770cb3/numpy-2.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:76f0f283506c28b12bba319c0fab98217e9f9b54e6160e9c79e9f7348ba32e9c", size = 17016135, upload-time = "2026-03-09T07:56:39.337Z" }, + { url = "https://files.pythonhosted.org/packages/f7/b1/6a88e888052eed951afed7a142dcdf3b149a030ca59b4c71eef085858e43/numpy-2.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737f630a337364665aba3b5a77e56a68cc42d350edd010c345d65a3efa3addcc", size = 18345816, upload-time = "2026-03-09T07:56:42.31Z" }, + { url = "https://files.pythonhosted.org/packages/f3/8f/103a60c5f8c3d7fc678c19cd7b2476110da689ccb80bc18050efbaeae183/numpy-2.4.3-cp312-cp312-win32.whl", hash = "sha256:26952e18d82a1dbbc2f008d402021baa8d6fc8e84347a2072a25e08b46d698b9", size = 5960132, upload-time = "2026-03-09T07:56:44.851Z" }, + { url = "https://files.pythonhosted.org/packages/d7/7c/f5ee1bf6ed888494978046a809df2882aad35d414b622893322df7286879/numpy-2.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:65f3c2455188f09678355f5cae1f959a06b778bc66d535da07bf2ef20cd319d5", size = 12316144, upload-time = "2026-03-09T07:56:47.057Z" }, + { url = "https://files.pythonhosted.org/packages/71/46/8d1cb3f7a00f2fb6394140e7e6623696e54c6318a9d9691bb4904672cf42/numpy-2.4.3-cp312-cp312-win_arm64.whl", hash = "sha256:2abad5c7fef172b3377502bde47892439bae394a71bc329f31df0fd829b41a9e", size = 10220364, upload-time = "2026-03-09T07:56:49.849Z" }, ] [[package]] @@ -855,6 +866,7 @@ testing = [ { name = "ty" }, ] tools = [ + { name = "imgui" }, { name = "metadrive-simulator", marker = "platform_machine != 'aarch64'" }, ] @@ -876,6 +888,7 @@ requires-dist = [ { name = "gcc-arm-none-eabi", git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi" }, { name = "git-lfs", git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs" }, { name = "hypothesis", marker = "extra == 'testing'", specifier = "==6.47.*" }, + { name = "imgui", marker = "extra == 'tools'", git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui" }, { name = "inputs" }, { name = "jeepney" }, { name = "jinja2", marker = "extra == 'docs'" }, @@ -1003,11 +1016,11 @@ wheels = [ [[package]] name = "platformdirs" -version = "4.9.2" +version = "4.9.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1b/04/fea538adf7dbbd6d186f551d595961e564a3b6715bdf276b477460858672/platformdirs-4.9.2.tar.gz", hash = "sha256:9a33809944b9db043ad67ca0db94b14bf452cc6aeaac46a88ea55b26e2e9d291", size = 28394, upload-time = "2026-02-16T03:56:10.574Z" } +sdist = { url = "https://files.pythonhosted.org/packages/19/56/8d4c30c8a1d07013911a8fdbd8f89440ef9f08d07a1b50ab8ca8be5a20f9/platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934", size = 28737, upload-time = "2026-03-05T18:34:13.271Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/48/31/05e764397056194206169869b50cf2fee4dbbbc71b344705b9c0d878d4d8/platformdirs-4.9.2-py3-none-any.whl", hash = "sha256:9170634f126f8efdae22fb58ae8a0eaa86f38365bc57897a6c4f781d1f5875bd", size = 21168, upload-time = "2026-02-16T03:56:08.891Z" }, + { url = "https://files.pythonhosted.org/packages/63/d7/97f7e3a6abb67d8080dd406fd4df842c2be0efaf712d1c899c32a075027c/platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868", size = 21216, upload-time = "2026-03-05T18:34:12.172Z" }, ] [[package]] @@ -1144,11 +1157,11 @@ wheels = [ [[package]] name = "pyjwt" -version = "2.11.0" +version = "2.12.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5c/5a/b46fa56bf322901eee5b0454a34343cdbdae202cd421775a8ee4e42fd519/pyjwt-2.11.0.tar.gz", hash = "sha256:35f95c1f0fbe5d5ba6e43f00271c275f7a1a4db1dab27bf708073b75318ea623", size = 98019, upload-time = "2026-01-30T19:59:55.694Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/27/a3b6e5bf6ff856d2509292e95c8f57f0df7017cf5394921fc4e4ef40308a/pyjwt-2.12.1.tar.gz", hash = "sha256:c74a7a2adf861c04d002db713dd85f84beb242228e671280bf709d765b03672b", size = 102564, upload-time = "2026-03-13T19:27:37.25Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6f/01/c26ce75ba460d5cd503da9e13b21a33804d38c2165dec7b716d06b13010c/pyjwt-2.11.0-py3-none-any.whl", hash = "sha256:94a6bde30eb5c8e04fee991062b534071fd1439ef58d2adc9ccb823e7bcd0469", size = 28224, upload-time = "2026-01-30T19:59:54.539Z" }, + { url = "https://files.pythonhosted.org/packages/e5/7a/8dd906bd22e79e47397a61742927f6747fe93242ef86645ee9092e610244/pyjwt-2.12.1-py3-none-any.whl", hash = "sha256:28ca37c070cad8ba8cd9790cd940535d40274d22f80ab87f3ac6a713e6e8454c", size = 29726, upload-time = "2026-03-13T19:27:35.677Z" }, ] [[package]] @@ -1175,15 +1188,15 @@ wheels = [ [[package]] name = "pyopenssl" -version = "25.3.0" +version = "26.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cryptography" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/80/be/97b83a464498a79103036bc74d1038df4a7ef0e402cfaf4d5e113fb14759/pyopenssl-25.3.0.tar.gz", hash = "sha256:c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329", size = 184073, upload-time = "2025-09-17T00:32:21.037Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/11/a62e1d33b373da2b2c2cd9eb508147871c80f12b1cacde3c5d314922afdd/pyopenssl-26.0.0.tar.gz", hash = "sha256:f293934e52936f2e3413b89c6ce36df66a0b34ae1ea3a053b8c5020ff2f513fc", size = 185534, upload-time = "2026-03-15T14:28:26.353Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/81/ef2b1dfd1862567d573a4fdbc9f969067621764fbb74338496840a1d2977/pyopenssl-25.3.0-py3-none-any.whl", hash = "sha256:1fda6fc034d5e3d179d39e59c1895c9faeaf40a79de5fc4cbbfbe0d36f4a77b6", size = 57268, upload-time = "2025-09-17T00:32:19.474Z" }, + { url = "https://files.pythonhosted.org/packages/fb/7d/d4f7d908fa8415571771b30669251d57c3cf313b36a856e6d7548ae01619/pyopenssl-26.0.0-py3-none-any.whl", hash = "sha256:df94d28498848b98cc1c0ffb8ef1e71e40210d3b0a8064c9d29571ed2904bf81", size = 57969, upload-time = "2026-03-15T14:28:24.864Z" }, ] [[package]] @@ -1398,27 +1411,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.4" +version = "0.15.7" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/31/d6e536cdebb6568ae75a7f00e4b4819ae0ad2640c3604c305a0428680b0c/ruff-0.15.4.tar.gz", hash = "sha256:3412195319e42d634470cc97aa9803d07e9d5c9223b99bcb1518f0c725f26ae1", size = 4569550, upload-time = "2026-02-26T20:04:14.959Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/22/9e4f66ee588588dc6c9af6a994e12d26e19efbe874d1a909d09a6dac7a59/ruff-0.15.7.tar.gz", hash = "sha256:04f1ae61fc20fe0b148617c324d9d009b5f63412c0b16474f3d5f1a1a665f7ac", size = 4601277, upload-time = "2026-03-19T16:26:22.605Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f2/82/c11a03cfec3a4d26a0ea1e571f0f44be5993b923f905eeddfc397c13d360/ruff-0.15.4-py3-none-linux_armv6l.whl", hash = "sha256:a1810931c41606c686bae8b5b9a8072adac2f611bb433c0ba476acba17a332e0", size = 10453333, upload-time = "2026-02-26T20:04:20.093Z" }, - { url = "https://files.pythonhosted.org/packages/ce/5d/6a1f271f6e31dffb31855996493641edc3eef8077b883eaf007a2f1c2976/ruff-0.15.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5a1632c66672b8b4d3e1d1782859e98d6e0b4e70829530666644286600a33992", size = 10853356, upload-time = "2026-02-26T20:04:05.808Z" }, - { url = "https://files.pythonhosted.org/packages/b1/d8/0fab9f8842b83b1a9c2bf81b85063f65e93fb512e60effa95b0be49bfc54/ruff-0.15.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a4386ba2cd6c0f4ff75252845906acc7c7c8e1ac567b7bc3d373686ac8c222ba", size = 10187434, upload-time = "2026-02-26T20:03:54.656Z" }, - { url = "https://files.pythonhosted.org/packages/85/cc/cc220fd9394eff5db8d94dec199eec56dd6c9f3651d8869d024867a91030/ruff-0.15.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2496488bdfd3732747558b6f95ae427ff066d1fcd054daf75f5a50674411e75", size = 10535456, upload-time = "2026-02-26T20:03:52.738Z" }, - { url = "https://files.pythonhosted.org/packages/fa/0f/bced38fa5cf24373ec767713c8e4cadc90247f3863605fb030e597878661/ruff-0.15.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3f1c4893841ff2d54cbda1b2860fa3260173df5ddd7b95d370186f8a5e66a4ac", size = 10287772, upload-time = "2026-02-26T20:04:08.138Z" }, - { url = "https://files.pythonhosted.org/packages/2b/90/58a1802d84fed15f8f281925b21ab3cecd813bde52a8ca033a4de8ab0e7a/ruff-0.15.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:820b8766bd65503b6c30aaa6331e8ef3a6e564f7999c844e9a547c40179e440a", size = 11049051, upload-time = "2026-02-26T20:04:03.53Z" }, - { url = "https://files.pythonhosted.org/packages/d2/ac/b7ad36703c35f3866584564dc15f12f91cb1a26a897dc2fd13d7cb3ae1af/ruff-0.15.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9fb74bab47139c1751f900f857fa503987253c3ef89129b24ed375e72873e85", size = 11890494, upload-time = "2026-02-26T20:04:10.497Z" }, - { url = "https://files.pythonhosted.org/packages/93/3d/3eb2f47a39a8b0da99faf9c54d3eb24720add1e886a5309d4d1be73a6380/ruff-0.15.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f80c98765949c518142b3a50a5db89343aa90f2c2bf7799de9986498ae6176db", size = 11326221, upload-time = "2026-02-26T20:04:12.84Z" }, - { url = "https://files.pythonhosted.org/packages/ff/90/bf134f4c1e5243e62690e09d63c55df948a74084c8ac3e48a88468314da6/ruff-0.15.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:451a2e224151729b3b6c9ffb36aed9091b2996fe4bdbd11f47e27d8f2e8888ec", size = 11168459, upload-time = "2026-02-26T20:04:00.969Z" }, - { url = "https://files.pythonhosted.org/packages/b5/e5/a64d27688789b06b5d55162aafc32059bb8c989c61a5139a36e1368285eb/ruff-0.15.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a8f157f2e583c513c4f5f896163a93198297371f34c04220daf40d133fdd4f7f", size = 11104366, upload-time = "2026-02-26T20:03:48.099Z" }, - { url = "https://files.pythonhosted.org/packages/f1/f6/32d1dcb66a2559763fc3027bdd65836cad9eb09d90f2ed6a63d8e9252b02/ruff-0.15.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:917cc68503357021f541e69b35361c99387cdbbf99bd0ea4aa6f28ca99ff5338", size = 10510887, upload-time = "2026-02-26T20:03:45.771Z" }, - { url = "https://files.pythonhosted.org/packages/ff/92/22d1ced50971c5b6433aed166fcef8c9343f567a94cf2b9d9089f6aa80fe/ruff-0.15.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e9737c8161da79fd7cfec19f1e35620375bd8b2a50c3e77fa3d2c16f574105cc", size = 10285939, upload-time = "2026-02-26T20:04:22.42Z" }, - { url = "https://files.pythonhosted.org/packages/e6/f4/7c20aec3143837641a02509a4668fb146a642fd1211846634edc17eb5563/ruff-0.15.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:291258c917539e18f6ba40482fe31d6f5ac023994ee11d7bdafd716f2aab8a68", size = 10765471, upload-time = "2026-02-26T20:03:58.924Z" }, - { url = "https://files.pythonhosted.org/packages/d0/09/6d2f7586f09a16120aebdff8f64d962d7c4348313c77ebb29c566cefc357/ruff-0.15.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3f83c45911da6f2cd5936c436cf86b9f09f09165f033a99dcf7477e34041cbc3", size = 11263382, upload-time = "2026-02-26T20:04:24.424Z" }, - { url = "https://files.pythonhosted.org/packages/1b/fa/2ef715a1cd329ef47c1a050e10dee91a9054b7ce2fcfdd6a06d139afb7ec/ruff-0.15.4-py3-none-win32.whl", hash = "sha256:65594a2d557d4ee9f02834fcdf0a28daa8b3b9f6cb2cb93846025a36db47ef22", size = 10506664, upload-time = "2026-02-26T20:03:50.56Z" }, - { url = "https://files.pythonhosted.org/packages/d0/a8/c688ef7e29983976820d18710f955751d9f4d4eb69df658af3d006e2ba3e/ruff-0.15.4-py3-none-win_amd64.whl", hash = "sha256:04196ad44f0df220c2ece5b0e959c2f37c777375ec744397d21d15b50a75264f", size = 11651048, upload-time = "2026-02-26T20:04:17.191Z" }, - { url = "https://files.pythonhosted.org/packages/3e/0a/9e1be9035b37448ce2e68c978f0591da94389ade5a5abafa4cf99985d1b2/ruff-0.15.4-py3-none-win_arm64.whl", hash = "sha256:60d5177e8cfc70e51b9c5fad936c634872a74209f934c1e79107d11787ad5453", size = 10966776, upload-time = "2026-02-26T20:03:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/41/2f/0b08ced94412af091807b6119ca03755d651d3d93a242682bf020189db94/ruff-0.15.7-py3-none-linux_armv6l.whl", hash = "sha256:a81cc5b6910fb7dfc7c32d20652e50fa05963f6e13ead3c5915c41ac5d16668e", size = 10489037, upload-time = "2026-03-19T16:26:32.47Z" }, + { url = "https://files.pythonhosted.org/packages/91/4a/82e0fa632e5c8b1eba5ee86ecd929e8ff327bbdbfb3c6ac5d81631bef605/ruff-0.15.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:722d165bd52403f3bdabc0ce9e41fc47070ac56d7a91b4e0d097b516a53a3477", size = 10955433, upload-time = "2026-03-19T16:27:00.205Z" }, + { url = "https://files.pythonhosted.org/packages/ab/10/12586735d0ff42526ad78c049bf51d7428618c8b5c467e72508c694119df/ruff-0.15.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7fbc2448094262552146cbe1b9643a92f66559d3761f1ad0656d4991491af49e", size = 10269302, upload-time = "2026-03-19T16:26:26.183Z" }, + { url = "https://files.pythonhosted.org/packages/eb/5d/32b5c44ccf149a26623671df49cbfbd0a0ae511ff3df9d9d2426966a8d57/ruff-0.15.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b39329b60eba44156d138275323cc726bbfbddcec3063da57caa8a8b1d50adf", size = 10607625, upload-time = "2026-03-19T16:27:03.263Z" }, + { url = "https://files.pythonhosted.org/packages/5d/f1/f0001cabe86173aaacb6eb9bb734aa0605f9a6aa6fa7d43cb49cbc4af9c9/ruff-0.15.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:87768c151808505f2bfc93ae44e5f9e7c8518943e5074f76ac21558ef5627c85", size = 10324743, upload-time = "2026-03-19T16:27:09.791Z" }, + { url = "https://files.pythonhosted.org/packages/7a/87/b8a8f3d56b8d848008559e7c9d8bf367934d5367f6d932ba779456e2f73b/ruff-0.15.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb0511670002c6c529ec66c0e30641c976c8963de26a113f3a30456b702468b0", size = 11138536, upload-time = "2026-03-19T16:27:06.101Z" }, + { url = "https://files.pythonhosted.org/packages/e4/f2/4fd0d05aab0c5934b2e1464784f85ba2eab9d54bffc53fb5430d1ed8b829/ruff-0.15.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0d19644f801849229db8345180a71bee5407b429dd217f853ec515e968a6912", size = 11994292, upload-time = "2026-03-19T16:26:48.718Z" }, + { url = "https://files.pythonhosted.org/packages/64/22/fc4483871e767e5e95d1622ad83dad5ebb830f762ed0420fde7dfa9d9b08/ruff-0.15.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4806d8e09ef5e84eb19ba833d0442f7e300b23fe3f0981cae159a248a10f0036", size = 11398981, upload-time = "2026-03-19T16:26:54.513Z" }, + { url = "https://files.pythonhosted.org/packages/b0/99/66f0343176d5eab02c3f7fcd2de7a8e0dd7a41f0d982bee56cd1c24db62b/ruff-0.15.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dce0896488562f09a27b9c91b1f58a097457143931f3c4d519690dea54e624c5", size = 11242422, upload-time = "2026-03-19T16:26:29.277Z" }, + { url = "https://files.pythonhosted.org/packages/5d/3a/a7060f145bfdcce4c987ea27788b30c60e2c81d6e9a65157ca8afe646328/ruff-0.15.7-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:1852ce241d2bc89e5dc823e03cff4ce73d816b5c6cdadd27dbfe7b03217d2a12", size = 11232158, upload-time = "2026-03-19T16:26:42.321Z" }, + { url = "https://files.pythonhosted.org/packages/a7/53/90fbb9e08b29c048c403558d3cdd0adf2668b02ce9d50602452e187cd4af/ruff-0.15.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5f3e4b221fb4bd293f79912fc5e93a9063ebd6d0dcbd528f91b89172a9b8436c", size = 10577861, upload-time = "2026-03-19T16:26:57.459Z" }, + { url = "https://files.pythonhosted.org/packages/2f/aa/5f486226538fe4d0f0439e2da1716e1acf895e2a232b26f2459c55f8ddad/ruff-0.15.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b15e48602c9c1d9bdc504b472e90b90c97dc7d46c7028011ae67f3861ceba7b4", size = 10327310, upload-time = "2026-03-19T16:26:35.909Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/271afdffb81fe7bfc8c43ba079e9d96238f674380099457a74ccb3863857/ruff-0.15.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1b4705e0e85cedc74b0a23cf6a179dbb3df184cb227761979cc76c0440b5ab0d", size = 10840752, upload-time = "2026-03-19T16:26:45.723Z" }, + { url = "https://files.pythonhosted.org/packages/bf/29/a4ae78394f76c7759953c47884eb44de271b03a66634148d9f7d11e721bd/ruff-0.15.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:112c1fa316a558bb34319282c1200a8bf0495f1b735aeb78bfcb2991e6087580", size = 11336961, upload-time = "2026-03-19T16:26:39.076Z" }, + { url = "https://files.pythonhosted.org/packages/26/6b/8786ba5736562220d588a2f6653e6c17e90c59ced34a2d7b512ef8956103/ruff-0.15.7-py3-none-win32.whl", hash = "sha256:6d39e2d3505b082323352f733599f28169d12e891f7dd407f2d4f54b4c2886de", size = 10582538, upload-time = "2026-03-19T16:26:15.992Z" }, + { url = "https://files.pythonhosted.org/packages/2b/e9/346d4d3fffc6871125e877dae8d9a1966b254fbd92a50f8561078b88b099/ruff-0.15.7-py3-none-win_amd64.whl", hash = "sha256:4d53d712ddebcd7dace1bc395367aec12c057aacfe9adbb6d832302575f4d3a1", size = 11755839, upload-time = "2026-03-19T16:26:19.897Z" }, + { url = "https://files.pythonhosted.org/packages/8f/e8/726643a3ea68c727da31570bde48c7a10f1aa60eddd628d94078fec586ff/ruff-0.15.7-py3-none-win_arm64.whl", hash = "sha256:18e8d73f1c3fdf27931497972250340f92e8c861722161a9caeb89a58ead6ed2", size = 11023304, upload-time = "2026-03-19T16:26:51.669Z" }, ] [[package]] @@ -1432,15 +1445,15 @@ wheels = [ [[package]] name = "sentry-sdk" -version = "2.54.0" +version = "2.55.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c8/e9/2e3a46c304e7fa21eaa70612f60354e32699c7102eb961f67448e222ad7c/sentry_sdk-2.54.0.tar.gz", hash = "sha256:2620c2575128d009b11b20f7feb81e4e4e8ae08ec1d36cbc845705060b45cc1b", size = 413813, upload-time = "2026-03-02T15:12:41.355Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e9/b8/285293dc60fc198fffc3fcdbc7c6d4e646e0f74e61461c355d40faa64ceb/sentry_sdk-2.55.0.tar.gz", hash = "sha256:3774c4d8820720ca4101548131b9c162f4c9426eb7f4d24aca453012a7470f69", size = 424505, upload-time = "2026-03-17T14:15:51.707Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/53/39/be412cc86bc6247b8f69e9383d7950711bd86f8d0a4a4b0fe8fad685bc21/sentry_sdk-2.54.0-py2.py3-none-any.whl", hash = "sha256:fd74e0e281dcda63afff095d23ebcd6e97006102cdc8e78a29f19ecdf796a0de", size = 439198, upload-time = "2026-03-02T15:12:39.546Z" }, + { url = "https://files.pythonhosted.org/packages/9a/66/20465097782d7e1e742d846407ea7262d338c6e876ddddad38ca8907b38f/sentry_sdk-2.55.0-py2.py3-none-any.whl", hash = "sha256:97026981cb15699394474a196b88503a393cbc58d182ece0d3abe12b9bd978d4", size = 449284, upload-time = "2026-03-17T14:15:49.604Z" }, ] [[package]] @@ -1463,11 +1476,11 @@ wheels = [ [[package]] name = "setuptools" -version = "82.0.0" +version = "82.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/82/f3/748f4d6f65d1756b9ae577f329c951cda23fb900e4de9f70900ced962085/setuptools-82.0.0.tar.gz", hash = "sha256:22e0a2d69474c6ae4feb01951cb69d515ed23728cf96d05513d36e42b62b37cb", size = 1144893, upload-time = "2026-02-08T15:08:40.206Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz", hash = "sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9", size = 1152316, upload-time = "2026-03-09T12:47:17.221Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e1/c6/76dc613121b793286a3f91621d7b75a2b493e0390ddca50f11993eadf192/setuptools-82.0.0-py3-none-any.whl", hash = "sha256:70b18734b607bd1da571d097d236cfcfacaf01de45717d59e6e04b96877532e0", size = 1003468, upload-time = "2026-02-08T15:08:38.723Z" }, + { url = "https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl", hash = "sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb", size = 1006223, upload-time = "2026-03-09T12:47:15.026Z" }, ] [[package]] @@ -1536,26 +1549,26 @@ wheels = [ [[package]] name = "ty" -version = "0.0.20" +version = "0.0.24" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/56/95/8de69bb98417227b01f1b1d743c819d6456c9fd140255b6124b05b17dfd6/ty-0.0.20.tar.gz", hash = "sha256:ebba6be7974c14efbb2a9adda6ac59848f880d7259f089dfa72a093039f1dcc6", size = 5262529, upload-time = "2026-03-02T15:51:36.587Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7a/96/652a425030f95dc2c9548d9019e52502e17079e1daeefbc4036f1c0905b4/ty-0.0.24.tar.gz", hash = "sha256:9fe42f6b98207bdaef51f71487d6d087f2cb02555ee3939884d779b2b3cc8bfc", size = 5354286, upload-time = "2026-03-19T16:55:57.035Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/2c/718abe48393e521bf852cd6b0f984766869b09c258d6e38a118768a91731/ty-0.0.20-py3-none-linux_armv6l.whl", hash = "sha256:7cc12769c169c9709a829c2248ee2826b7aae82e92caeac813d856f07c021eae", size = 10333656, upload-time = "2026-03-02T15:51:56.461Z" }, - { url = "https://files.pythonhosted.org/packages/41/0e/eb1c4cc4a12862e2327b72657bcebb10b7d9f17046f1bdcd6457a0211615/ty-0.0.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3b777c1bf13bc0a95985ebb8a324b8668a4a9b2e514dde5ccf09e4d55d2ff232", size = 10168505, upload-time = "2026-03-02T15:51:51.895Z" }, - { url = "https://files.pythonhosted.org/packages/89/7f/10230798e673f0dd3094dfd16e43bfd90e9494e7af6e8e7db516fb431ddf/ty-0.0.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b2a4a7db48bf8cba30365001bc2cad7fd13c1a5aacdd704cc4b7925de8ca5eb3", size = 9678510, upload-time = "2026-03-02T15:51:48.451Z" }, - { url = "https://files.pythonhosted.org/packages/7a/3d/59d9159577494edd1728f7db77b51bb07884bd21384f517963114e3ab5f6/ty-0.0.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6846427b8b353a43483e9c19936dc6a25612573b44c8f7d983dfa317e7f00d4c", size = 10162926, upload-time = "2026-03-02T15:51:40.558Z" }, - { url = "https://files.pythonhosted.org/packages/9c/a8/b7273eec3e802f78eb913fbe0ce0c16ef263723173e06a5776a8359b2c66/ty-0.0.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:245ceef5bd88df366869385cf96411cb14696334f8daa75597cf7e41c3012eb8", size = 10171702, upload-time = "2026-03-02T15:51:44.069Z" }, - { url = "https://files.pythonhosted.org/packages/9f/32/5f1144f2f04a275109db06e3498450c4721554215b80ae73652ef412eeab/ty-0.0.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c4d21d1cdf67a444d3c37583c17291ddba9382a9871021f3f5d5735e09e85efe", size = 10682552, upload-time = "2026-03-02T15:51:33.102Z" }, - { url = "https://files.pythonhosted.org/packages/6a/db/9f1f637310792f12bd6ed37d5fc8ab39ba1a9b0c6c55a33865e9f1cad840/ty-0.0.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bd4ffd907d1bd70e46af9e9a2f88622f215e1bf44658ea43b32c2c0b357299e4", size = 11242605, upload-time = "2026-03-02T15:51:34.895Z" }, - { url = "https://files.pythonhosted.org/packages/1a/68/cc9cae2e732fcfd20ccdffc508407905a023fc8493b8771c392d915528dc/ty-0.0.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b6594b58d8b0e9d16a22b3045fc1305db4b132c8d70c17784ab8c7a7cc986807", size = 10974655, upload-time = "2026-03-02T15:51:46.011Z" }, - { url = "https://files.pythonhosted.org/packages/1c/c1/b9e3e3f28fe63486331e653f6aeb4184af8b1fe80542fcf74d2dda40a93d/ty-0.0.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3662f890518ce6cf4d7568f57d03906912d2afbf948a01089a28e325b1ef198c", size = 10761325, upload-time = "2026-03-02T15:51:26.818Z" }, - { url = "https://files.pythonhosted.org/packages/39/9e/67db935bdedf219a00fb69ec5437ba24dab66e0f2e706dd54a4eca234b84/ty-0.0.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0e3ffbae58f9f0d17cdc4ac6d175ceae560b7ed7d54f9ddfb1c9f31054bcdc2c", size = 10145793, upload-time = "2026-03-02T15:51:38.562Z" }, - { url = "https://files.pythonhosted.org/packages/c7/de/b0eb815d4dc5a819c7e4faddc2a79058611169f7eef07ccc006531ce228c/ty-0.0.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:176e52bc8bb00b0e84efd34583962878a447a3a0e34ecc45fd7097a37554261b", size = 10189640, upload-time = "2026-03-02T15:51:50.202Z" }, - { url = "https://files.pythonhosted.org/packages/b8/71/63734923965cbb70df1da3e93e4b8875434e326b89e9f850611122f279bf/ty-0.0.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:b2bc73025418e976ca4143dde71fb9025a90754a08ac03e6aa9b80d4bed1294b", size = 10370568, upload-time = "2026-03-02T15:51:42.295Z" }, - { url = "https://files.pythonhosted.org/packages/32/a0/a532c2048533347dff48e9ca98bd86d2c224356e101688a8edaf8d6973fb/ty-0.0.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d52f7c9ec6e363e094b3c389c344d5a140401f14a77f0625e3f28c21918552f5", size = 10853999, upload-time = "2026-03-02T15:51:58.963Z" }, - { url = "https://files.pythonhosted.org/packages/48/88/36c652c658fe96658043e4abc8ea97801de6fb6e63ab50aaa82807bff1d8/ty-0.0.20-py3-none-win32.whl", hash = "sha256:c7d32bfe93f8fcaa52b6eef3f1b930fd7da410c2c94e96f7412c30cfbabf1d17", size = 9744206, upload-time = "2026-03-02T15:51:54.183Z" }, - { url = "https://files.pythonhosted.org/packages/ff/a7/a4a13bed1d7fd9d97aaa3c5bb5e6d3e9a689e6984806cbca2ab4c9233cac/ty-0.0.20-py3-none-win_amd64.whl", hash = "sha256:a5e10f40fc4a0a1cbcb740a4aad5c7ce35d79f030836ea3183b7a28f43170248", size = 10711999, upload-time = "2026-03-02T15:51:29.212Z" }, - { url = "https://files.pythonhosted.org/packages/8d/7e/6bfd748a9f4ff9267ed3329b86a0f02cdf6ab49f87bc36c8a164852f99fc/ty-0.0.20-py3-none-win_arm64.whl", hash = "sha256:53f7a5c12c960e71f160b734f328eff9a35d578af4b67a36b0bb5990ac5cdc27", size = 10150143, upload-time = "2026-03-02T15:51:31.283Z" }, + { url = "https://files.pythonhosted.org/packages/da/e5/34457ee11708e734ba81ad65723af83030e484f961e281d57d1eecf08951/ty-0.0.24-py3-none-linux_armv6l.whl", hash = "sha256:1ab4f1f61334d533a3fdf5d9772b51b1300ac5da4f3cdb0be9657a3ccb2ce3e7", size = 10394877, upload-time = "2026-03-19T16:55:54.246Z" }, + { url = "https://files.pythonhosted.org/packages/44/81/bc9a1b1a87f43db15ab64ad781a4f999734ec3b470ad042624fa875b20e6/ty-0.0.24-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:facbf2c4aaa6985229e08f8f9bf152215eb078212f22b5c2411f35386688ab42", size = 10211109, upload-time = "2026-03-19T16:55:28.554Z" }, + { url = "https://files.pythonhosted.org/packages/e4/63/cfc805adeaa61d63ba3ea71127efa7d97c40ba36d97ee7bd957341d05107/ty-0.0.24-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b6d2a3b6d4470c483552a31e9b368c86f154dcc964bccb5406159dc9cd362246", size = 9694769, upload-time = "2026-03-19T16:55:34.309Z" }, + { url = "https://files.pythonhosted.org/packages/33/09/edc220726b6ec44a58900401f6b27140997ef15026b791e26b69a6e69eb5/ty-0.0.24-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c94c25d0500939fd5f8f16ce41cbed5b20528702c1d649bf80300253813f0a2", size = 10176287, upload-time = "2026-03-19T16:55:37.17Z" }, + { url = "https://files.pythonhosted.org/packages/f8/bf/cbe2227be711e65017655d8ee4d050f4c92b113fb4dc4c3bd6a19d3a86d8/ty-0.0.24-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:89cbe7bc7df0fab02dbd8cda79b737df83f1ef7fb573b08c0ee043dc68cffb08", size = 10214832, upload-time = "2026-03-19T16:56:08.518Z" }, + { url = "https://files.pythonhosted.org/packages/af/1d/d15803ee47e9143d10e10bd81ccc14761d08758082bda402950685f0ddfe/ty-0.0.24-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:db2c5d269bcc9b764850c99f457b5018a79b3ef40ecfbc03344e65effd6cf743", size = 10709892, upload-time = "2026-03-19T16:56:05.727Z" }, + { url = "https://files.pythonhosted.org/packages/36/12/6db0d86c477147f67b9052de209421d76c3e855197b000c25fcbbe86b3a2/ty-0.0.24-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba44512db5b97c3bbd59d93e11296e8548d0c9a3bdd1280de36d7ff22d351896", size = 11280872, upload-time = "2026-03-19T16:56:02.899Z" }, + { url = "https://files.pythonhosted.org/packages/1b/fc/155fe83a97c06d33ccc9e0f428258b32df2e08a428300c715d34757f0111/ty-0.0.24-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a52b7f589c3205512a9c50ba5b2b1e8c0698b72e51b8b9285c90420c06f1cae8", size = 11060520, upload-time = "2026-03-19T16:55:59.956Z" }, + { url = "https://files.pythonhosted.org/packages/ac/f1/32c05a1c4c3c2a95c5b7361dee03a9bf1231d4ad096b161c838b45bce5a0/ty-0.0.24-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7981df5c709c054da4ac5d7c93f8feb8f45e69e829e4461df4d5f0988fe67d04", size = 10791455, upload-time = "2026-03-19T16:55:25.728Z" }, + { url = "https://files.pythonhosted.org/packages/17/2c/53c1ea6bedfa4d4ab64d4de262d8f5e405ecbffefd364459c628c0310d33/ty-0.0.24-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2860151ad95a00d0f0280b8fef79900d08dcd63276b57e6e5774f2c055979c5", size = 10156708, upload-time = "2026-03-19T16:55:45.563Z" }, + { url = "https://files.pythonhosted.org/packages/45/39/7d2919cf194707169474d80720a5f3d793e983416f25e7ffcf80504c9df2/ty-0.0.24-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5674a1146d927ab77ff198a88e0c4505134ced342a0e7d1beb4a076a728b7496", size = 10236263, upload-time = "2026-03-19T16:55:31.474Z" }, + { url = "https://files.pythonhosted.org/packages/cf/7f/48eac722f2fd12a5b7aae0effdcb75c46053f94b783d989e3ef0d7380082/ty-0.0.24-py3-none-musllinux_1_2_i686.whl", hash = "sha256:438ecbf1608a9b16dd84502f3f1b23ef2ef32bbd0ab3e0ca5a82f0e0d1cd41ea", size = 10402559, upload-time = "2026-03-19T16:55:39.602Z" }, + { url = "https://files.pythonhosted.org/packages/75/e0/8cf868b9749ce1e5166462759545964e95b02353243594062b927d8bff2a/ty-0.0.24-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ddeed3098dd92a83964e7aa7b41e509ba3530eb539fc4cd8322ff64a09daf1f5", size = 10893684, upload-time = "2026-03-19T16:55:51.439Z" }, + { url = "https://files.pythonhosted.org/packages/17/9f/f54bf3be01d2c2ed731d10a5afa3324dc66f987a6ae0a4a6cbfa2323d080/ty-0.0.24-py3-none-win32.whl", hash = "sha256:83013fb3a4764a8f8bcc6ca11ff8bdfd8c5f719fc249241cb2b8916e80778eb1", size = 9781542, upload-time = "2026-03-19T16:56:11.588Z" }, + { url = "https://files.pythonhosted.org/packages/fb/49/c004c5cc258b10b3a145666e9a9c28ae7678bc958c8926e8078d5d769081/ty-0.0.24-py3-none-win_amd64.whl", hash = "sha256:748a60eb6912d1cf27aaab105ffadb6f4d2e458a3fcadfbd3cf26db0d8062eeb", size = 10764801, upload-time = "2026-03-19T16:55:42.752Z" }, + { url = "https://files.pythonhosted.org/packages/e2/59/006a074e185bfccf5e4c026015245ab4fcd2362b13a8d24cf37a277909a9/ty-0.0.24-py3-none-win_arm64.whl", hash = "sha256:280a3d31e86d0721947238f17030c33f0911cae851d108ea9f4e3ab12a5ed01f", size = 10194093, upload-time = "2026-03-19T16:55:48.303Z" }, ] [[package]] @@ -1659,7 +1672,7 @@ wheels = [ [[package]] name = "zeromq" version = "4.3.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#768bd6d6d67acc7b4e919993967187532af0d410" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#1bfcfd916e94f0b8ef94c9e6e783f765b07850bf" } [[package]] name = "zstandard" @@ -1689,4 +1702,4 @@ wheels = [ [[package]] name = "zstd" version = "1.5.6" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#4d4dd0b74dfc52bdeec36706fd1a3a27754679ec" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#3c54d941828579c8fc5956eb71b69df85d3b7f07" } From 470c3f4a92c99333ec293995dafd677f3c44833c Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 21 Mar 2026 12:08:10 -0700 Subject: [PATCH 11/33] pandad: remove best case startup time test case --- selfdrive/pandad/tests/test_pandad.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/selfdrive/pandad/tests/test_pandad.py b/selfdrive/pandad/tests/test_pandad.py index 88d3939a6a..6a5840d487 100644 --- a/selfdrive/pandad/tests/test_pandad.py +++ b/selfdrive/pandad/tests/test_pandad.py @@ -78,22 +78,6 @@ class TestPandad: assert any(Panda(s).is_internal() for s in Panda.list()) - def test_best_case_startup_time(self): - # run once so we're up to date - self._run_test(60) - - ts = [] - for _ in range(10): - # should be nearly instant this time - dt = self._run_test(5) - ts.append(dt) - - # 5s for USB (due to enumeration) - # - 0.2s pandad -> pandad - # - plus some buffer - print("startup times", ts, sum(ts) / len(ts)) - assert 0.1 < (sum(ts)/len(ts)) < 0.7 - def test_old_spi_protocol(self): # flash firmware with old SPI protocol self._flash_bootstub(os.path.join(HERE, "bootstub.panda_h7_spiv0.bin")) From a8b5c7450789f685774791e6fd6bb85bb006ba5f Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 21 Mar 2026 16:49:57 -0700 Subject: [PATCH 12/33] prep for imgui tools (#37712) * prep for imgui tools * build cleanups --- SConstruct | 13 ++++++++---- third_party/bootstrap/bootstrap-icons.ttf | 3 +++ third_party/bootstrap/pull.sh | 10 +++++++++ tools/cabana/SConscript | 5 +---- uv.lock | 26 +++++++++++------------ 5 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 third_party/bootstrap/bootstrap-icons.ttf diff --git a/SConstruct b/SConstruct index feaadd5a41..792a48eb7d 100644 --- a/SConstruct +++ b/SConstruct @@ -47,8 +47,9 @@ pkgs = [importlib.import_module(name) for name in pkg_names] # be distributed with all Linux distros and macOS, or # vendored in commaai/dependencies. allowed_system_libs = { - "EGL", "GLESv2", "GL", "Qt5Charts", "Qt5Core", "Qt5Gui", "Qt5Widgets", - "dl", "drm", "gbm", "m", "pthread", + "EGL", "GLESv2", "GL", + "Qt5Charts", "Qt5Core", "Qt5Gui", "Qt5Widgets", + "dl", "drm", "gbm", "m", "pthread", } def _resolve_lib(env, name): @@ -253,8 +254,12 @@ SConscript([ 'selfdrive/ui/SConscript', ]) -if Dir('#tools/cabana/').exists() and arch != "larch64": - SConscript(['tools/cabana/SConscript']) +# Build tools +if arch != "larch64": + SConscript([ + 'tools/replay/SConscript', + 'tools/cabana/SConscript', + ]) env.CompilationDatabase('compile_commands.json') diff --git a/third_party/bootstrap/bootstrap-icons.ttf b/third_party/bootstrap/bootstrap-icons.ttf new file mode 100644 index 0000000000..49c8ea699a --- /dev/null +++ b/third_party/bootstrap/bootstrap-icons.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57e798d421bb56bb058ed9b0c83dd97fe1e411cde3a2bd6eb4a8705234f69027 +size 453096 diff --git a/third_party/bootstrap/pull.sh b/third_party/bootstrap/pull.sh index 0b03b4db9e..5c4c955c04 100755 --- a/third_party/bootstrap/pull.sh +++ b/third_party/bootstrap/pull.sh @@ -12,3 +12,13 @@ cd icons git fetch --all git checkout d5aa187483a1b0b186f87adcfa8576350d970d98 cp bootstrap-icons.svg ../ + +# Convert WOFF → TTF for imgui (imgui only reads TTF/OTF) +python3 -c " +from fontTools.ttLib import TTFont +import io +f = TTFont('font/fonts/bootstrap-icons.woff') +f.flavor = None +f.save('../bootstrap-icons.ttf') +print('bootstrap-icons.ttf written') +" diff --git a/tools/cabana/SConscript b/tools/cabana/SConscript index 7c5581f526..cc688ba679 100644 --- a/tools/cabana/SConscript +++ b/tools/cabana/SConscript @@ -4,7 +4,7 @@ import shutil import libusb -Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal') +Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal', 'replay_lib') # Detect Qt - skip build if not available if arch == "Darwin": @@ -18,9 +18,6 @@ else: if not has_qt: Return() -SConscript(['#tools/replay/SConscript']) -Import('replay_lib') - qt_env = env.Clone() qt_modules = ["Widgets", "Gui", "Core"] diff --git a/uv.lock b/uv.lock index 2e7a0f0ac9..795c85bd52 100644 --- a/uv.lock +++ b/uv.lock @@ -116,12 +116,12 @@ wheels = [ [[package]] name = "bzip2" version = "1.0.8" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#347ac440220660253b244526e6e0ed96bea63595" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#fa14088a2deba2f4d511d4008e3a867dd8227867" } [[package]] name = "capnproto" version = "1.0.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#8883c2a61e7056212e9b541a954cc96e5dfd4fdf" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#022412ed0d8f0ca3d566d6b9442a6867756194b9" } [[package]] name = "casadi" @@ -371,7 +371,7 @@ wheels = [ [[package]] name = "eigen" version = "3.4.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#42ca1061f8bfff9b0d8836781e4222bd6dd28a31" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#79b2584590b24652c930dac2669fb8cd44624743" } [[package]] name = "execnet" @@ -385,7 +385,7 @@ wheels = [ [[package]] name = "ffmpeg" version = "7.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#f33e25f6fd36f3c581add7bb3740f659aab002c1" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#da4537d3bf8132e4a715ebe8f10efa956123c394" } [[package]] name = "fonttools" @@ -432,7 +432,7 @@ wheels = [ [[package]] name = "gcc-arm-none-eabi" version = "13.2.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#770e647fd6e1db963c8d8168a223bebb8696c8b1" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#11b0bc7decdb804608c7192e69edac3d3f08bedf" } [[package]] name = "ghp-import" @@ -449,7 +449,7 @@ wheels = [ [[package]] name = "git-lfs" version = "3.6.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#75aa1619f3a1d283979aa404fec7b0c777c237bf" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#8afe53e9efe0ab4fd6b32ef2fa1408eb872806bc" } [[package]] name = "google-crc32c" @@ -498,7 +498,7 @@ wheels = [ [[package]] name = "imgui" version = "1.92.7" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#013161b390b962778878a1d42cbe7cc738e5537f" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#23fe87ea4bfee37224134bfc8c8c26a832ea054e" } [[package]] name = "iniconfig" @@ -578,12 +578,12 @@ wheels = [ [[package]] name = "libjpeg" version = "3.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#8ca1f9de9dc7a31e65454f7f987bbf8aa673e908" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#24abc422ee0fd9d5485873ca673658bde791b061" } [[package]] name = "libusb" version = "1.0.29" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libusb&rev=release-libusb#5f188080524c3c6d098ab6cb8d206ceef0394e8e" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libusb&rev=release-libusb#9443bd2571f772a8538b8cf69e293519822ad354" } [[package]] name = "libusb1" @@ -599,7 +599,7 @@ wheels = [ [[package]] name = "libyuv" version = "1922.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#4d09f32d9de02c74adc3c0cbbd0e59ae2193217a" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#01e4405ee8c1ed8a73024b6cee27294c306a288f" } [[package]] name = "markdown" @@ -751,7 +751,7 @@ wheels = [ [[package]] name = "ncurses" version = "6.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#a1f3891afb2143ae34d80b6ecd502bda30fb1e28" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#c4d49b4c8a9c804f708236f95933b857e98d50b5" } [[package]] name = "numpy" @@ -1672,7 +1672,7 @@ wheels = [ [[package]] name = "zeromq" version = "4.3.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#1bfcfd916e94f0b8ef94c9e6e783f765b07850bf" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#8852c13c0ba3788704c0f0eb0d1b5586e7846510" } [[package]] name = "zstandard" @@ -1702,4 +1702,4 @@ wheels = [ [[package]] name = "zstd" version = "1.5.6" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#3c54d941828579c8fc5956eb71b69df85d3b7f07" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#70ffdccbe7bcf49f2d186c54a255eadf946b32f3" } From 31e4fe55ac666da16be0ade30d1f950731d309e5 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 22 Mar 2026 17:36:35 -0700 Subject: [PATCH 13/33] tools: setup ffmpeg hwaccel (#37718) --- system/loggerd/SConscript | 11 ++++++++--- tools/cabana/SConscript | 4 +++- tools/replay/SConscript | 4 +++- uv.lock | 26 +++++++++++++------------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/system/loggerd/SConscript b/system/loggerd/SConscript index b02c409240..45e8b25d20 100644 --- a/system/loggerd/SConscript +++ b/system/loggerd/SConscript @@ -3,11 +3,16 @@ Import('env', 'arch', 'messaging', 'common', 'visionipc') libs = [common, messaging, visionipc, 'avformat', 'avcodec', 'swresample', 'avutil', 'x264', 'pthread', 'z', 'm', 'zstd'] +frameworks = [] src = ['logger.cc', 'zstd_writer.cc', 'video_writer.cc', 'encoder/encoder.cc', 'encoder/v4l_encoder.cc', 'encoder/jpeg_encoder.cc'] if arch != "larch64": src += ['encoder/ffmpeg_encoder.cc'] libs += ['yuv'] + if arch == "Darwin": + frameworks += ['VideoToolbox', 'CoreMedia', 'CoreFoundation', 'CoreVideo'] + else: + libs += ['va', 'va-drm', 'drm'] if arch == "Darwin": # exclude v4l @@ -16,9 +21,9 @@ if arch == "Darwin": logger_lib = env.Library('logger', src) libs.insert(0, logger_lib) -env.Program('loggerd', ['loggerd.cc'], LIBS=libs) -env.Program('encoderd', ['encoderd.cc'], LIBS=libs + ["jpeg"]) -env.Program('bootlog.cc', LIBS=libs) +env.Program('loggerd', ['loggerd.cc'], LIBS=libs, FRAMEWORKS=frameworks) +env.Program('encoderd', ['encoderd.cc'], LIBS=libs + ["jpeg"], FRAMEWORKS=frameworks) +env.Program('bootlog.cc', LIBS=libs, FRAMEWORKS=frameworks) if GetOption('extras'): env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_logger.cc', 'tests/test_zstd_writer.cc'], LIBS=libs) diff --git a/tools/cabana/SConscript b/tools/cabana/SConscript index cc688ba679..f5ef0f4393 100644 --- a/tools/cabana/SConscript +++ b/tools/cabana/SConscript @@ -66,7 +66,7 @@ base_frameworks = qt_env['FRAMEWORKS'] base_libs = [common, messaging, cereal, visionipc, 'm', 'pthread'] + qt_env["LIBS"] if arch == "Darwin": - base_frameworks += ['QtCharts', 'CoreFoundation', 'IOKit', 'Security'] + base_frameworks += ['QtCharts', 'CoreFoundation', 'CoreVideo', 'CoreMedia', 'IOKit', 'Security', 'VideoToolbox'] else: base_libs.append('Qt5Charts') @@ -75,6 +75,8 @@ cabana_env['CPPPATH'] += [libusb.INCLUDE_DIR] cabana_env['LIBPATH'] += [libusb.LIB_DIR] cabana_libs = [cereal, messaging, visionipc, replay_lib, 'avformat', 'avcodec', 'swresample', 'avutil', 'x264', 'z', 'bz2', 'zstd', 'yuv', 'usb-1.0'] + base_libs +if arch != "Darwin": + cabana_libs += ['va', 'va-drm', 'drm'] opendbc_path = '-DOPENDBC_FILE_PATH=\'"%s"\'' % (cabana_env.Dir("../../opendbc/dbc").abspath) cabana_env['CXXFLAGS'] += [opendbc_path] diff --git a/tools/replay/SConscript b/tools/replay/SConscript index 757f3fec4e..d047415f58 100644 --- a/tools/replay/SConscript +++ b/tools/replay/SConscript @@ -3,7 +3,7 @@ Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal') replay_env = env.Clone() replay_env['CCFLAGS'] += ['-Wno-deprecated-declarations'] -base_frameworks = [] +base_frameworks = ['VideoToolbox', 'CoreMedia', 'CoreFoundation', 'CoreVideo'] if arch == "Darwin" else [] base_libs = [common, messaging, cereal, visionipc, 'm', 'pthread'] replay_lib_src = ["replay.cc", "consoleui.cc", "camera.cc", "filereader.cc", "logreader.cc", "framereader.cc", @@ -13,6 +13,8 @@ if arch != "Darwin": replay_lib = replay_env.Library("replay", replay_lib_src, LIBS=base_libs, FRAMEWORKS=base_frameworks) Export('replay_lib') replay_libs = [replay_lib, 'avformat', 'avcodec', 'swresample', 'avutil', 'x264', 'z', 'bz2', 'zstd', 'yuv', 'ncurses'] + base_libs +if arch != "Darwin": + replay_libs += ['va', 'va-drm', 'drm'] replay_env.Program("replay", ["main.cc"], LIBS=replay_libs, FRAMEWORKS=base_frameworks) if GetOption('extras'): diff --git a/uv.lock b/uv.lock index 795c85bd52..272421934c 100644 --- a/uv.lock +++ b/uv.lock @@ -116,12 +116,12 @@ wheels = [ [[package]] name = "bzip2" version = "1.0.8" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#fa14088a2deba2f4d511d4008e3a867dd8227867" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=bzip2&rev=release-bzip2#90b7fefbe37fc2ca26597e6e9e0035dd386effa1" } [[package]] name = "capnproto" version = "1.0.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#022412ed0d8f0ca3d566d6b9442a6867756194b9" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=capnproto&rev=release-capnproto#05582563f2fdf6638a550fef61b129a2fb288d05" } [[package]] name = "casadi" @@ -371,7 +371,7 @@ wheels = [ [[package]] name = "eigen" version = "3.4.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#79b2584590b24652c930dac2669fb8cd44624743" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=eigen&rev=release-eigen#40e5d76de1b33a86c5181b63db6782d8f06da1da" } [[package]] name = "execnet" @@ -385,7 +385,7 @@ wheels = [ [[package]] name = "ffmpeg" version = "7.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#da4537d3bf8132e4a715ebe8f10efa956123c394" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ffmpeg&rev=release-ffmpeg#b9732165bcf5a3fab83b05994187802a0d115b6e" } [[package]] name = "fonttools" @@ -432,7 +432,7 @@ wheels = [ [[package]] name = "gcc-arm-none-eabi" version = "13.2.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#11b0bc7decdb804608c7192e69edac3d3f08bedf" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=gcc-arm-none-eabi&rev=release-gcc-arm-none-eabi#15a616d4f08f6b8ecaa9b2390c75d2fe0c0fffb8" } [[package]] name = "ghp-import" @@ -449,7 +449,7 @@ wheels = [ [[package]] name = "git-lfs" version = "3.6.1" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#8afe53e9efe0ab4fd6b32ef2fa1408eb872806bc" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=git-lfs&rev=release-git-lfs#f77417aad13a05b03bb2696a0b5a124f339d117b" } [[package]] name = "google-crc32c" @@ -498,7 +498,7 @@ wheels = [ [[package]] name = "imgui" version = "1.92.7" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#23fe87ea4bfee37224134bfc8c8c26a832ea054e" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=imgui&rev=release-imgui#c5c108b23a2e0346480d7f4c4981bf6ec7ba9054" } [[package]] name = "iniconfig" @@ -578,12 +578,12 @@ wheels = [ [[package]] name = "libjpeg" version = "3.1.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#24abc422ee0fd9d5485873ca673658bde791b061" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libjpeg&rev=release-libjpeg#2d69723fe445dadc68ceb9072510a505111b64a7" } [[package]] name = "libusb" version = "1.0.29" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libusb&rev=release-libusb#9443bd2571f772a8538b8cf69e293519822ad354" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libusb&rev=release-libusb#8daf8079f98809ef4674177bca915a0a81eac52f" } [[package]] name = "libusb1" @@ -599,7 +599,7 @@ wheels = [ [[package]] name = "libyuv" version = "1922.0" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#01e4405ee8c1ed8a73024b6cee27294c306a288f" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=libyuv&rev=release-libyuv#28c3c2a2444232aeeaf989c33fd333ce74e6fc90" } [[package]] name = "markdown" @@ -751,7 +751,7 @@ wheels = [ [[package]] name = "ncurses" version = "6.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#c4d49b4c8a9c804f708236f95933b857e98d50b5" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=ncurses&rev=release-ncurses#e33e7f648009ad97638b1a0a373a06a05526c040" } [[package]] name = "numpy" @@ -1672,7 +1672,7 @@ wheels = [ [[package]] name = "zeromq" version = "4.3.5" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#8852c13c0ba3788704c0f0eb0d1b5586e7846510" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zeromq&rev=release-zeromq#0f7d2b9121cc30c0e377717fc1db52205a8e4c80" } [[package]] name = "zstandard" @@ -1702,4 +1702,4 @@ wheels = [ [[package]] name = "zstd" version = "1.5.6" -source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#70ffdccbe7bcf49f2d186c54a255eadf946b32f3" } +source = { git = "https://github.com/commaai/dependencies.git?subdirectory=zstd&rev=release-zstd#b2b10636beba0384eada30979651b4ca7cf919ff" } From 54db569c2cd30deb75f1fbfac5bc80afbced247c Mon Sep 17 00:00:00 2001 From: Ethan Reish Date: Sun, 22 Mar 2026 21:03:40 -0500 Subject: [PATCH 14/33] Do not map tici to tizi release (#37719) * Do not map tici to tizi release * tici --------- Co-authored-by: Adeeb Shihadeh --- selfdrive/ui/installer/installer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/installer/installer.cc b/selfdrive/ui/installer/installer.cc index 7599454194..fb661b966d 100644 --- a/selfdrive/ui/installer/installer.cc +++ b/selfdrive/ui/installer/installer.cc @@ -48,7 +48,7 @@ Font font_display; const bool tici_device = Hardware::get_device_type() == cereal::InitData::DeviceType::TICI || Hardware::get_device_type() == cereal::InitData::DeviceType::TIZI; -std::vector tici_prebuilt_branches = {"release3", "release-tizi", "release3-staging", "nightly", "nightly-dev"}; +std::vector tici_prebuilt_branches = {"release3", "release-tici", "release3-staging", "nightly", "nightly-dev"}; std::string migrated_branch; void branchMigration() { From 1d48cbdffa6392aaf20f4e5c8883fd6644317591 Mon Sep 17 00:00:00 2001 From: royjr Date: Mon, 23 Mar 2026 04:00:28 -0400 Subject: [PATCH 15/33] ui: fix BIG ui with scale (#37690) * Update application.py * Apply suggestions from code review --------- Co-authored-by: Shane Smiskol --- system/ui/lib/application.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/ui/lib/application.py b/system/ui/lib/application.py index 1d518309d3..980410b022 100644 --- a/system/ui/lib/application.py +++ b/system/ui/lib/application.py @@ -452,6 +452,11 @@ class GuiApplication: def texture(self, asset_path: str, width: int | None = None, height: int | None = None, alpha_premultiply=False, keep_aspect_ratio=True, flip_x: bool = False) -> rl.Texture: + if width is not None: + width = round(width) + if height is not None: + height = round(height) + cache_key = f"{asset_path}_{width}_{height}_{alpha_premultiply}_{keep_aspect_ratio}_{flip_x}" if cache_key in self._textures: return self._textures[cache_key] From 6871203c450ed9264d4b2aae1253ee3105e40ae6 Mon Sep 17 00:00:00 2001 From: commaci-public <60409688+commaci-public@users.noreply.github.com> Date: Mon, 23 Mar 2026 08:36:14 -0700 Subject: [PATCH 16/33] [bot] Update Python packages (#37529) * Update Python packages * revert tg --------- Co-authored-by: Vehicle Researcher Co-authored-by: Adeeb Shihadeh --- docs/CARS.md | 4 ++-- msgq_repo | 2 +- opendbc_repo | 2 +- panda | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/CARS.md b/docs/CARS.md index 5487ef1ee1..097f45e34f 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -171,7 +171,7 @@ A supported vehicle is one that just works when you install a comma device. All |Kia|Niro EV 2020|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai F connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro EV 2021|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro EV 2022|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai H connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|Kia|Niro EV (with HDA II) 2025|Highway Driving Assist II|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai R connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| +|Kia|Niro EV (with HDA II) 2024-25|Highway Driving Assist II|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai R connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro EV (without HDA II) 2023-25|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Hybrid 2018|Smart Cruise Control (SCC)|Stock|10 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 Hyundai C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Hybrid 2021|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai D connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| @@ -339,7 +339,7 @@ A supported vehicle is one that just works when you install a comma device. All |Volkswagen|Touran 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| ### Footnotes -1openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `devel` or `nightly-dev`.
+1openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `nightly-dev`.
2Refers only to the Focus Mk4 (C519) available in Europe/China/Taiwan/Australasia, not the Focus Mk3 (C346) in North and South America/Southeast Asia.
3See more setup details for GM.
42019 Honda Civic 1.6L Diesel Sedan does not have ALC below 12mph.
diff --git a/msgq_repo b/msgq_repo index ed2777747d..b7688b9bd7 160000 --- a/msgq_repo +++ b/msgq_repo @@ -1 +1 @@ -Subproject commit ed2777747d60de5a399b74ef1d4be4c1fb406ae1 +Subproject commit b7688b9bd731dea4520adf248bf1eb49b6dde776 diff --git a/opendbc_repo b/opendbc_repo index ddeba888a3..e27af8c188 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit ddeba888a3d03b32269f0c780490ad8578917527 +Subproject commit e27af8c188cec1ad7ef6c39ad57f6338f8b02281 diff --git a/panda b/panda index c10b82f8ff..d079b0958b 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit c10b82f8ff03c7d677a9420c21c0c50126a5071e +Subproject commit d079b0958b51ce33fc313def95317ef52b54b2ec From 576620276350291c19c768711d7fe3de5af6d24d Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 23 Mar 2026 08:59:37 -0700 Subject: [PATCH 17/33] translations: auto-generate with codex (#37462) --- .github/workflows/repo-maintenance.yaml | 22 - selfdrive/ui/tests/test_translations.py | 180 ++- selfdrive/ui/translations/README.md | 3 - selfdrive/ui/translations/app.pot | 1098 +++++++---------- selfdrive/ui/translations/app_de.po | 671 ++++------ selfdrive/ui/translations/app_en.po | 643 ++++------ selfdrive/ui/translations/app_es.po | 721 ++++------- selfdrive/ui/translations/app_fr.po | 644 ++++------ selfdrive/ui/translations/app_ja.po | 639 ++++------ selfdrive/ui/translations/app_ko.po | 637 ++++------ selfdrive/ui/translations/app_pt-BR.po | 667 ++++------ selfdrive/ui/translations/app_th.po | 1034 ++++++---------- selfdrive/ui/translations/app_tr.po | 717 ++++------- selfdrive/ui/translations/app_uk.po | 638 ++++------ selfdrive/ui/translations/app_zh-CHS.po | 643 ++++------ selfdrive/ui/translations/app_zh-CHT.po | 643 ++++------ selfdrive/ui/translations/auto_translate.py | 138 --- selfdrive/ui/translations/auto_translate.sh | 26 + selfdrive/ui/translations/create_badges.py | 108 -- selfdrive/ui/translations/potools.py | 79 +- .../{ => translations}/update_translations.py | 0 21 files changed, 3465 insertions(+), 6486 deletions(-) delete mode 100644 selfdrive/ui/translations/README.md delete mode 100755 selfdrive/ui/translations/auto_translate.py create mode 100755 selfdrive/ui/translations/auto_translate.sh delete mode 100755 selfdrive/ui/translations/create_badges.py rename selfdrive/ui/{ => translations}/update_translations.py (100%) diff --git a/.github/workflows/repo-maintenance.yaml b/.github/workflows/repo-maintenance.yaml index 1ac6efb4f0..f829415f4e 100644 --- a/.github/workflows/repo-maintenance.yaml +++ b/.github/workflows/repo-maintenance.yaml @@ -9,28 +9,6 @@ env: PYTHONPATH: ${{ github.workspace }} jobs: - update_translations: - runs-on: ubuntu-latest - if: github.repository == 'commaai/openpilot' - steps: - - uses: actions/checkout@v6 - with: - submodules: true - - run: ./tools/op.sh setup - - name: Update translations - run: python3 selfdrive/ui/update_translations.py --vanish - - name: Create Pull Request - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 - with: - author: Vehicle Researcher - commit-message: "Update translations" - title: "[bot] Update translations" - body: "Automatic PR from repo-maintenance -> update_translations" - branch: "update-translations" - base: "master" - delete-branch: true - labels: bot - package_updates: name: package_updates runs-on: ubuntu-latest diff --git a/selfdrive/ui/tests/test_translations.py b/selfdrive/ui/tests/test_translations.py index 599c99013c..fba595acad 100644 --- a/selfdrive/ui/tests/test_translations.py +++ b/selfdrive/ui/tests/test_translations.py @@ -1,124 +1,106 @@ -import pytest import json -import os import re -import xml.etree.ElementTree as ET import string -import requests -from openpilot.common.parameterized import parameterized_class -from openpilot.system.ui.lib.multilang import TRANSLATIONS_DIR, LANGUAGES_FILE +from pathlib import Path -with open(str(LANGUAGES_FILE)) as f: - translation_files = json.load(f) +import pytest -UNFINISHED_TRANSLATION_TAG = " list[str]: + placeholders = PERCENT_PLACEHOLDER_RE.findall(text) - @staticmethod - def _read_translation_file(path, file): - tr_file = os.path.join(path, f"{file}.ts") - with open(tr_file) as f: - return f.read() + try: + parsed = list(FORMATTER.parse(text)) + except ValueError as e: + raise AssertionError(f"invalid brace formatting in {text!r}: {e}") from e - def test_missing_translation_files(self): - assert os.path.exists(os.path.join(str(TRANSLATIONS_DIR), f"{self.file}.ts")), \ - f"{self.name} has no XML translation file, run selfdrive/ui/update_translations.py" + for _, field_name, format_spec, conversion in parsed: + if field_name is None: + continue - @pytest.mark.skip("Only test unfinished translations before going to release") - def test_unfinished_translations(self): - cur_translations = self._read_translation_file(TRANSLATIONS_DIR, self.file) - assert UNFINISHED_TRANSLATION_TAG not in cur_translations, \ - f"{self.file} ({self.name}) translation file has unfinished translations. Finish translations or mark them as completed in Qt Linguist" + token = "{" + token += field_name + if conversion: + token += f"!{conversion}" + if format_spec: + token += f":{format_spec}" + token += "}" + placeholders.append(token) - def test_vanished_translations(self): - cur_translations = self._read_translation_file(TRANSLATIONS_DIR, self.file) - assert "" not in cur_translations, \ - f"{self.file} ({self.name}) translation file has obsolete translations. Run selfdrive/ui/update_translations.py --vanish to remove them" + return sorted(placeholders) - def test_finished_translations(self): - """ - Tests ran on each translation marked "finished" - Plural: - - that any numerus (plural) translations have all plural forms non-empty - - that the correct format specifier is used (%n) - Non-plural: - - that translation is not empty - - that translation format arguments are consistent - """ - tr_xml = ET.parse(os.path.join(TRANSLATIONS_DIR, f"{self.file}.ts")) - for context in tr_xml.getroot(): - for message in context.iterfind("message"): - translation = message.find("translation") - source_text = message.find("source").text +def load_po_text(po_path: Path) -> str: + return po_path.read_text(encoding='utf-8') - # Do not test unfinished translations - if translation.get("type") == "unfinished": - continue - if message.get("numerus") == "yes": - numerusform = [t.text for t in translation.findall("numerusform")] +@pytest.mark.parametrize("language_code", sorted(TRANSLATION_LANGUAGES.values())) +def test_translation_file_exists(language_code: str): + po_path = PO_DIR / f"app_{language_code}.po" + assert po_path.exists(), f"missing translation file: {po_path}" - for nf in numerusform: - assert nf is not None, f"Ensure all plural translation forms are completed: {source_text}" - assert "%n" in nf, "Ensure numerus argument (%n) exists in translation." - assert FORMAT_ARG.search(nf) is None, f"Plural translations must use %n, not %1, %2, etc.: {numerusform}" - else: - assert translation.text is not None, f"Ensure translation is completed: {source_text}" +@pytest.mark.parametrize("po_path", sorted(PO_DIR.glob("app_*.po")), ids=lambda p: p.name) +def test_translation_placeholders_are_preserved(po_path: Path): + _, entries = parse_po(po_path) + language = po_path.stem.removeprefix("app_") - source_args = FORMAT_ARG.findall(source_text) - translation_args = FORMAT_ARG.findall(translation.text) - assert sorted(source_args) == sorted(translation_args), \ - f"Ensure format arguments are consistent: `{source_text}` vs. `{translation.text}`" + for entry in entries: + source_placeholders = extract_placeholders(entry.msgid) - def test_no_locations(self): - for line in self._read_translation_file(TRANSLATIONS_DIR, self.file).splitlines(): - assert not line.strip().startswith(LOCATION_TAG), \ - f"Line contains location tag: {line.strip()}, remove all line numbers." - - def test_entities_error(self): - cur_translations = self._read_translation_file(TRANSLATIONS_DIR, self.file) - matches = re.findall(r'@(\w+);', cur_translations) - assert len(matches) == 0, f"The string(s) {matches} were found with '@' instead of '&'" - - def test_bad_language(self): - IGNORED_WORDS = {'pédale'} - - match = re.search(r'([a-zA-Z]{2,3})', self.file) - assert match, f"{self.name} - could not parse language" - - try: - response = requests.get( - f"https://raw.githubusercontent.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words/master/{match.group(1)}" + if entry.is_plural: + plural_placeholders = extract_placeholders(entry.msgid_plural) + message = ( + f"{language}: source plural placeholders do not match singular for " + + f"{entry.msgid!r}: {source_placeholders} vs {plural_placeholders}" ) - response.raise_for_status() - except requests.exceptions.HTTPError as e: - if e.response is not None and e.response.status_code == 429: - pytest.skip("word list rate limited") - raise + assert plural_placeholders == source_placeholders, message - banned_words = {line.strip() for line in response.text.splitlines()} - - for context in ET.parse(os.path.join(TRANSLATIONS_DIR, f"{self.file}.ts")).getroot(): - for message in context.iterfind("message"): - translation = message.find("translation") - if translation.get("type") == "unfinished": + for idx, msgstr in sorted(entry.msgstr_plural.items()): + if not msgstr: continue - translation_text = " ".join([t.text for t in translation.findall("numerusform")]) if message.get("numerus") == "yes" else translation.text + translated_placeholders = extract_placeholders(msgstr) + message = ( + f"{language}: plural form {idx} changes placeholders for {entry.msgid!r}: " + + f"expected {source_placeholders}, got {translated_placeholders}" + ) + assert translated_placeholders == source_placeholders, message + else: + if not entry.msgstr: + continue - if not translation_text: - continue + translated_placeholders = extract_placeholders(entry.msgstr) + message = ( + f"{language}: translation changes placeholders for {entry.msgid!r}: " + + f"expected {source_placeholders}, got {translated_placeholders}" + ) + assert translated_placeholders == source_placeholders, message - words = set(translation_text.translate(str.maketrans('', '', string.punctuation + '%n')).lower().split()) - bad_words_found = words & (banned_words - IGNORED_WORDS) - assert not bad_words_found, f"Bad language found in {self.name}: '{translation_text}'. Bad word(s): {', '.join(bad_words_found)}" + +@pytest.mark.parametrize("po_path", sorted(PO_DIR.glob("app_*.po")), ids=lambda p: p.name) +def test_translation_refs_do_not_include_line_numbers(po_path: Path): + for line in load_po_text(po_path).splitlines(): + assert not LINE_NUMBER_REF_RE.match(line), ( + f"{po_path.name}: line-number source reference found: {line}" + ) + + +@pytest.mark.parametrize("po_path", sorted(PO_DIR.glob("app_*.po")), ids=lambda p: p.name) +def test_translation_entities_are_valid(po_path: Path): + matches = BAD_ENTITY_RE.findall(load_po_text(po_path)) + assert not matches, ( + f"{po_path.name}: found '@...;' entity typo(s): {', '.join(sorted(set(matches)))}" + ) diff --git a/selfdrive/ui/translations/README.md b/selfdrive/ui/translations/README.md deleted file mode 100644 index 433eb7d64a..0000000000 --- a/selfdrive/ui/translations/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Multilanguage - -[![languages](https://raw.githubusercontent.com/commaai/openpilot/badges/translation_badge.svg)](#) diff --git a/selfdrive/ui/translations/app.pot b/selfdrive/ui/translations/app.pot index 468ff35fd9..0872ed538e 100644 --- a/selfdrive/ui/translations/app.pot +++ b/selfdrive/ui/translations/app.pot @@ -1,1035 +1,823 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-09 14:21+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format -msgid "Advanced" -msgstr "" - -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format -msgid "Back" -msgstr "" - -#: system/ui/widgets/network.py:201 -#, python-format -msgid "Enter APN" -msgstr "" - -#: system/ui/widgets/network.py:201 -#, python-format -msgid "leave blank for automatic configuration" -msgstr "" - -#: system/ui/widgets/network.py:243 -#, python-format -msgid "Enter SSID" -msgstr "" - -#: system/ui/widgets/network.py:257 -#, python-format -msgid "Enter new tethering password" -msgstr "" - -#: system/ui/widgets/network.py:117 -#, python-format -msgid "Enable Tethering" -msgstr "" - -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format -msgid "EDIT" -msgstr "" - -#: system/ui/widgets/network.py:121 -#, python-format -msgid "Tethering Password" -msgstr "" - -#: system/ui/widgets/network.py:126 -#, python-format -msgid "Enable Roaming" -msgstr "" - -#: system/ui/widgets/network.py:131 -#, python-format -msgid "Cellular Metered" -msgstr "" - -#: system/ui/widgets/network.py:136 -#, python-format -msgid "APN Setting" -msgstr "" - -#: system/ui/widgets/network.py:141 -#, python-format -msgid "Wi-Fi Network Metered" -msgstr "" - -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format -msgid "Enter password" -msgstr "" - -#: system/ui/widgets/network.py:316 -#, python-format -msgid "Scanning Wi-Fi networks..." -msgstr "" - -#: system/ui/widgets/network.py:376 -#, python-format -msgid "CONNECTING..." -msgstr "" - -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format -msgid "Forget" -msgstr "" - -#: system/ui/widgets/network.py:132 -#, python-format -msgid "Prevent large data uploads when on a metered cellular connection" -msgstr "" - -#: system/ui/widgets/network.py:139 -#, python-format -msgid "default" -msgstr "" - -#: system/ui/widgets/network.py:139 -#, python-format -msgid "metered" -msgstr "" - -#: system/ui/widgets/network.py:139 -#, python-format -msgid "unmetered" -msgstr "" - -#: system/ui/widgets/network.py:141 -#, python-format -msgid "Prevent large data uploads when on a metered Wi-Fi connection" -msgstr "" - -#: system/ui/widgets/network.py:147 -#, python-format -msgid "IP Address" -msgstr "" - -#: system/ui/widgets/network.py:152 -#, python-format -msgid "Hidden Network" -msgstr "" - -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format -msgid "CONNECT" -msgstr "" - -#: system/ui/widgets/network.py:320 -#, python-format -msgid "Wrong password" -msgstr "" - -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format -msgid "Cancel" -msgstr "" - -#: system/ui/widgets/network.py:380 -#, python-format -msgid "FORGETTING..." -msgstr "" - -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format -msgid "for \"{}\"" -msgstr "" - -#: system/ui/widgets/network.py:327 -#, python-format -msgid "Forget Wi-Fi Network \"{}\"?" -msgstr "" - -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "" -#: system/ui/widgets/option_dialog.py:37 -#, python-format -msgid "Select" +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py +msgid "Cancel" msgstr "" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/network.py +msgid "Advanced" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py +msgid "Back" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enter APN" +msgstr "" + +#: system/ui/widgets/network.py +msgid "leave blank for automatic configuration" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enter SSID" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enter new tethering password" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enable Tethering" +msgstr "" + +#: system/ui/widgets/network.py +msgid "EDIT" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Tethering Password" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enable Roaming" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Cellular Metered" +msgstr "" + +#: system/ui/widgets/network.py +msgid "APN Setting" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Wi-Fi Network Metered" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Enter password" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Scanning Wi-Fi networks..." +msgstr "" + +#: system/ui/widgets/network.py +msgid "CONNECTING..." +msgstr "" + +#: system/ui/widgets/network.py +msgid "Forget" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Prevent large data uploads when on a metered cellular connection" +msgstr "" + +#: system/ui/widgets/network.py +msgid "default" +msgstr "" + +#: system/ui/widgets/network.py +msgid "metered" +msgstr "" + +#: system/ui/widgets/network.py +msgid "unmetered" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Prevent large data uploads when on a metered Wi-Fi connection" +msgstr "" + +#: system/ui/widgets/network.py +msgid "IP Address" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Hidden Network" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py +msgid "CONNECT" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Wrong password" +msgstr "" + +#: system/ui/widgets/network.py +msgid "FORGETTING..." +msgstr "" + +#: system/ui/widgets/network.py +msgid "for \"{}\"" +msgstr "" + +#: system/ui/widgets/network.py +msgid "Forget Wi-Fi Network \"{}\"?" +msgstr "" + +#: system/ui/widgets/list_view.py msgid "Error" msgstr "" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format -msgid "Pair your device to your comma account" +#: system/ui/widgets/option_dialog.py +msgid "Select" msgstr "" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format -msgid "Go to https://connect.comma.ai on your phone" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format -msgid "Click \"add new device\" and scan the QR code on the right" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format -msgid "Bookmark connect.comma.ai to your home screen to use it like an app" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format -msgid "QR Code Error" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "" -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 -msgid "LOADING" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 -msgid "ADD" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 -msgid "REMOVE" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format -msgid "Enter your GitHub username" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format -msgid "Request timed out" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format -msgid "No SSH keys found for user '{}'" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format -msgid "Upgrade Now" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format -msgid "PRIME FEATURES:" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format -msgid "Remote access" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format -msgid "24/7 LTE connectivity" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format -msgid "1 year of drive storage" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format -msgid "Remote snapshots" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format -msgid "✓ SUBSCRIBED" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format -msgid "comma prime" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format -msgid "Become a comma prime member at connect.comma.ai" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format -msgid "EXPERIMENTAL MODE ON" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format -msgid "CHILL MODE ON" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 -msgid "--" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "LOADING" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 -msgid "Wi-Fi" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "ADD" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 -msgid "ETH" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "REMOVE" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 -msgid "2G" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "Request timed out" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 -msgid "3G" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "Enter your GitHub username" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 -msgid "LTE" +#: openpilot/selfdrive/ui/widgets/ssh_key.py +msgid "No SSH keys found for user '{}'" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 -msgid "5G" +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py +msgid "Pair your device to your comma account" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 -msgid "TEMP" +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py +msgid "Go to https://connect.comma.ai on your phone" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -msgid "GOOD" +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py +msgid "Click \"add new device\" and scan the QR code on the right" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -msgid "VEHICLE" +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py +msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -msgid "ONLINE" +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py +msgid "QR Code Error" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -msgid "OFFLINE" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "Upgrade Now" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 -msgid "Unknown" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "PRIME FEATURES:" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 -msgid "NO" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "Remote access" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 -msgid "PANDA" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "24/7 LTE connectivity" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 -msgid "HIGH" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "1 year of drive storage" msgstr "" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -msgid "ERROR" +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "Remote snapshots" msgstr "" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "✓ SUBSCRIBED" +msgstr "" + +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "comma prime" +msgstr "" + +#: openpilot/selfdrive/ui/widgets/prime.py +msgid "Become a comma prime member at connect.comma.ai" +msgstr "" + +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py +msgid "EXPERIMENTAL MODE ON" +msgstr "" + +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py +msgid "CHILL MODE ON" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "" msgstr[1] "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 -msgid "When enabled, pressing the accelerator pedal will disengage openpilot." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "--" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 -msgid "Enable driver monitoring even when openpilot is not engaged." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "Wi-Fi" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 -msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "ETH" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 -msgid "Display speed in km/h instead of mph." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "2G" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 -msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "3G" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format -msgid "Driving Personality" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "LTE" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format -msgid "Changing this setting will restart openpilot if the car is powered on." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "5G" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format -msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "TEMP" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format -msgid "Enable" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "GOOD" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format -msgid "Enable openpilot" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "VEHICLE" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format -msgid "Experimental Mode" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "ONLINE" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format -msgid "Disengage on Accelerator Pedal" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "OFFLINE" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format -msgid "Enable Lane Departure Warnings" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "Unknown" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format -msgid "Always-On Driver Monitoring" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "NO" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format -msgid "Record and Upload Driver Camera" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "PANDA" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format -msgid "Record and Upload Microphone Audio" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "HIGH" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format -msgid "Use Metric System" +#: openpilot/selfdrive/ui/layouts/sidebar.py +msgid "ERROR" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format -msgid "openpilot longitudinal control may come in a future update." -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format -msgid "Aggressive" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format -msgid "Standard" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format -msgid "Relaxed" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format -msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 -msgid "Device" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 -msgid "Network" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 -msgid "Toggles" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 -msgid "Software" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 -msgid "Firehose" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 -msgid "Developer" -msgstr "" - -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "" msgstr[1] "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "Enable ADB" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "Enable SSH" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "SSH Keys" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "Joystick Debug Mode" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "Longitudinal Maneuver Mode" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "openpilot Longitudinal Control (Alpha)" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +msgid "UI Debug Mode" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Enable" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "" msgstr[1] "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "" msgstr[1] "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "" msgstr[1] "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format -msgid "Enable ADB" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Device" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format -msgid "Enable SSH" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Network" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format -msgid "SSH Keys" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Toggles" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format -msgid "Joystick Debug Mode" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Software" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format -msgid "Longitudinal Maneuver Mode" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Firehose" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format -msgid "openpilot Longitudinal Control (Alpha)" +#: openpilot/selfdrive/ui/layouts/settings/settings.py +msgid "Developer" msgstr "" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format -msgid "UI Debug Mode" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format -msgid "openpilot Unavailable" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format -msgid "Waiting to start" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format -msgid "TAKE CONTROL IMMEDIATELY" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Display speed in km/h instead of mph." msgstr "" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format -msgid "System Unresponsive" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format -msgid "Reboot Device" +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Driving Personality" msgstr "" -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Changing this setting will restart openpilot if the car is powered on." +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Enable openpilot" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Experimental Mode" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Disengage on Accelerator Pedal" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Enable Lane Departure Warnings" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Always-On Driver Monitoring" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Record and Upload Driver Camera" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Record and Upload Microphone Audio" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Use Metric System" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "openpilot longitudinal control may come in a future update." +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Aggressive" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Standard" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Relaxed" +msgstr "" + +#: openpilot/selfdrive/ui/layouts/settings/toggles.py +msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." +msgstr "" + +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "" +#: openpilot/selfdrive/ui/onroad/alert_renderer.py +msgid "openpilot Unavailable" +msgstr "" + +#: openpilot/selfdrive/ui/onroad/alert_renderer.py +msgid "Waiting to start" +msgstr "" + +#: openpilot/selfdrive/ui/onroad/alert_renderer.py +msgid "TAKE CONTROL IMMEDIATELY" +msgstr "" + +#: openpilot/selfdrive/ui/onroad/alert_renderer.py +msgid "System Unresponsive" +msgstr "" + +#: openpilot/selfdrive/ui/onroad/alert_renderer.py +msgid "Reboot Device" +msgstr "" + diff --git a/selfdrive/ui/translations/app_de.po b/selfdrive/ui/translations/app_de.po index 9888bb718e..287ecde1a0 100644 --- a/selfdrive/ui/translations/app_de.po +++ b/selfdrive/ui/translations/app_de.po @@ -1,1034 +1,825 @@ -# German translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-20 16:35-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: de\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " Die Lenkmoment-Reaktionskalibrierung ist abgeschlossen." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " Die Lenkmoment-Reaktionskalibrierung ist zu {}% abgeschlossen." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Ihr Gerät ist um {:.1f}° {} und {:.1f}° {} ausgerichtet." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 Jahr Fahrtdatenspeicherung" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "24/7 LTE‑Verbindung" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

Kalibrierung der Lenkverzögerung abgeschlossen." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

Kalibrierung der Lenkverzögerung zu {}% abgeschlossen." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "HINZUFÜGEN" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN‑Einstellung" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Übermäßige Betätigung bestätigen" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "Erweitert" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Aggressiv" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Zustimmen" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Immer aktive Fahrerüberwachung" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Sind Sie sicher, dass Sie ausschalten möchten?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Sind Sie sicher, dass Sie neu starten möchten?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Sind Sie sicher, dass Sie die Kalibrierung zurücksetzen möchten?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Sind Sie sicher, dass Sie deinstallieren möchten?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Zurück" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Werden Sie comma prime Mitglied auf connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Fügen Sie connect.comma.ai Ihrem Startbildschirm hinzu, um es wie eine App zu verwenden" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "ÄNDERN" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "PRÜFEN" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "CHILL‑MODUS AKTIV" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "VERBINDUNG" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "VERBINDUNG" -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "Abbrechen" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "Getaktete Mobilfunkverbindung" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Sprache ändern" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr " Durch Ändern dieser Einstellung wird openpilot neu gestartet, wenn das Auto eingeschaltet ist." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Klicken Sie auf \"add new device\" und scannen Sie den QR‑Code rechts" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Schließen" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Aktuelle Version" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "HERUNTERLADEN" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Ablehnen" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Ablehnen, openpilot deinstallieren" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Entwickler" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Gerät" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Beim Gaspedal deaktivieren" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Zum Ausschalten deaktivieren" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Zum Neustart deaktivieren" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Zum Zurücksetzen der Kalibrierung deaktivieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Geschwindigkeit in km/h statt mph anzeigen." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "Dongle-ID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Herunterladen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Fahrerkamera" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Fahrstil" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "BEARBEITEN" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "FEHLER" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "EXPERIMENTALMODUS AKTIV" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Aktivieren" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "ADB aktivieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Spurverlassenswarnungen aktivieren" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" -msgstr "openpilot aktivieren" +msgstr "Roaming aktivieren" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "SSH aktivieren" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" -msgstr "Spurverlassenswarnungen aktivieren" +msgstr "Tethering aktivieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Fahrerüberwachung auch aktivieren, wenn openpilot nicht aktiv ist." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "openpilot aktivieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Den Schalter für die openpilot-Längsregelung (Alpha) aktivieren, um den Experimentalmodus zu erlauben." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "APN eingeben" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "SSID eingeben" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "Neues Tethering‑Passwort eingeben" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "Passwort eingeben" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Geben Sie Ihren GitHub‑Benutzernamen ein" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "Fehler" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Experimentalmodus" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "Der Experimentalmodus ist derzeit auf diesem Fahrzeug nicht verfügbar, da der serienmäßige ACC für die Längsregelung verwendet wird." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "WIRD VERGESSEN..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Einrichtung abschließen" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "Datenstrom" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehose‑Modus" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "Vergessen" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "WLAN‑Netz „{}“ vergessen?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "GUT" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Gehen Sie auf Ihrem Telefon zu https://connect.comma.ai" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "HOCH" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" -msgstr "Netzwerk" +msgstr "Verstecktes Netzwerk" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "INSTALLIEREN" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP‑Adresse" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Update installieren" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Joystick‑Debugmodus" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "LADEN" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Längsmanövermodus" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" -msgstr "MAX" +msgstr "MAX." -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Maximieren Sie Ihre Trainingsdaten‑Uploads, um die Fahrmodelle von openpilot zu verbessern." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "k. A." -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "KEIN" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Netzwerk" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "Keine SSH‑Schlüssel gefunden" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" -msgstr "Keine SSH‑Schlüssel für Benutzer '{username}' gefunden" +msgstr "Keine SSH‑Schlüssel für Benutzer '{}' gefunden" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "Keine Versionshinweise verfügbar." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" -msgstr "OFFLINE" +msgstr "GETRENNT" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" -msgstr "ONLINE" +msgstr "VERBUNDEN" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Öffnen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "KOPPELN" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "VORSCHAU" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "PRIME‑FUNKTIONEN:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Gerät koppeln" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Gerät koppeln" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Koppeln Sie Ihr Gerät mit Ihrem comma‑Konto" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Koppeln Sie Ihr Gerät mit comma connect (connect.comma.ai) und lösen Sie Ihr comma‑prime‑Angebot ein." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Bitte mit WLAN verbinden, um das erste Koppeln abzuschließen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Ausschalten" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" -msgstr "" +msgstr "Verhindern Sie das Hochladen großer Datenmengen bei einer getakteten WLAN-Verbindung" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" -msgstr "" +msgstr "Verhindern Sie das Hochladen großer Datenmengen bei einer getakteten Mobilfunkverbindung" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Vorschau der Fahrer‑Kamera, um sicherzustellen, dass die Fahrerüberwachung gute Sicht hat. (Fahrzeug muss ausgeschaltet sein)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QR‑Code‑Fehler" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "ENTFERNEN" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "ZURÜCKSETZEN" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "ANSEHEN" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Neustart" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Gerät neu starten" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Neustarten und aktualisieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Fahrerkamera aufzeichnen und hochladen" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Mikrofonton aufzeichnen und hochladen" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Mikrofonton während der Fahrt aufzeichnen und speichern. Die Audiospur wird im Dashcam‑Video in comma connect enthalten sein." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Vorschriften" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Entspannt" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Fernzugriff" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Remote‑Schnappschüsse" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Zeitüberschreitung bei der Anfrage" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Zurücksetzen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Kalibrierung zurücksetzen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Trainingsanleitung ansehen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Überprüfen Sie die Regeln, Funktionen und Einschränkungen von openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" -msgstr "" +msgstr "WÄHLEN" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH‑Schlüssel" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "WLAN‑Netzwerke werden gesucht..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "Auswählen" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "" +msgstr "Zweig auswählen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Sprache auswählen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Seriennummer" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Update verschieben" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" -msgstr "Software" +msgstr "Softwarebereich" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" -msgstr "Standard" +msgstr "Standardmodus" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "System reagiert nicht" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "SOFORT DIE KONTROLLE ÜBERNEHMEN" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" -msgstr "TEMP" +msgstr "TEMP." -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" -msgstr "" +msgstr "Zielzweig" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "Tethering‑Passwort" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Schalter" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "UI-Debug-Modus" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "DEINSTALLIEREN" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" -msgstr "UPDATE" +msgstr "AKTUALISIEREN" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Deinstallieren" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Unbekannt" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Updates werden nur heruntergeladen, wenn das Auto aus ist." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Jetzt abonnieren" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Daten von der Fahrer‑Kamera hochladen und den Fahrerüberwachungs‑Algorithmus verbessern." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Metersystem verwenden" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "FAHRZEUG" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "ANSEHEN" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Warten auf Start" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Willkommen bei openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Wenn aktiviert, deaktiviert das Drücken des Gaspedals openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "WLAN" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Getaktetes WLAN‑Netzwerk" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "Falsches Passwort" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "Sie müssen die Nutzungsbedingungen akzeptieren, um openpilot zu verwenden." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "Sie müssen die Nutzungsbedingungen akzeptieren, um openpilot zu verwenden. Lesen Sie die aktuellen Bedingungen unter https://comma.ai/terms, bevor Sie fortfahren." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "Kamera startet" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "Überprüfung..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "Standard" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "unten" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "Herunterladen..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "Überprüfung auf Updates fehlgeschlagen" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "Update wird finalisiert..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "für „{}“" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "für automatische Konfiguration leer lassen" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "links" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "getaktet" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "nie" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "jetzt" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot Längsregelung (Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot nicht verfügbar" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "Die openpilot‑Längsregelung könnte in einem zukünftigen Update kommen." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot erfordert, dass das Gerät innerhalb von 4° nach links oder rechts und innerhalb von 5° nach oben oder 9° nach unten montiert ist." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "rechts" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "unbegrenzt" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "oben" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "Aktuell, zuletzt geprüft: nie" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "Aktuell, zuletzt geprüft: {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "Update verfügbar" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} WARNUNG" msgstr[1] "{} WARNUNGEN" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "vor {} Tag" msgstr[1] "vor {} Tagen" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "vor {} Stunde" msgstr[1] "vor {} Stunden" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "vor {} Minute" msgstr[1] "vor {} Minuten" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} Segment Ihrer Fahrten ist bisher im Trainingsdatensatz." msgstr[1] "{} Segmente Ihrer Fahrten sind bisher im Trainingsdatensatz." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ ABONNIERT" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehose‑Modus 🔥" diff --git a/selfdrive/ui/translations/app_en.po b/selfdrive/ui/translations/app_en.po index 3744096226..9f99c42b11 100644 --- a/selfdrive/ui/translations/app_en.po +++ b/selfdrive/ui/translations/app_en.po @@ -1,1034 +1,825 @@ -# English translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-21 18:18-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: en\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " Steering torque response calibration is complete." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " Steering torque response calibration is {}% complete." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Your device is pointed {:.1f}° {} and {:.1f}° {}." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 year of drive storage" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "24/7 LTE connectivity" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

Steering lag calibration is complete." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

Steering lag calibration is {}% complete." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "ADD" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN Setting" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Acknowledge Excessive Actuation" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "Advanced" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Aggressive" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Agree" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Always-On Driver Monitoring" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Are you sure you want to power off?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Are you sure you want to reboot?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Are you sure you want to reset calibration?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Are you sure you want to uninstall?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Back" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Become a comma prime member at connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Bookmark connect.comma.ai to your home screen to use it like an app" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "CHANGE" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "CHECK" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "CHILL MODE ON" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "CONNECT" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "CONNECTING..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "Cancel" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "Cellular Metered" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Change Language" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "Changing this setting will restart openpilot if the car is powered on." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Click \"add new device\" and scan the QR code on the right" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Close" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Current Version" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "DOWNLOAD" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Decline" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Decline, uninstall openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Developer" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Device" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Disengage on Accelerator Pedal" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Disengage to Power Off" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Disengage to Reboot" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Disengage to Reset Calibration" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Display speed in km/h instead of mph." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "Dongle ID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Download" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Driver Camera" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Driving Personality" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "EDIT" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "ERROR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "EXPERIMENTAL MODE ON" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Enable" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "Enable ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Enable Lane Departure Warnings" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "Enable Roaming" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "Enable SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "Enable Tethering" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Enable driver monitoring even when openpilot is not engaged." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "Enable openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "Enter APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "Enter SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "Enter new tethering password" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "Enter password" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Enter your GitHub username" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "Error" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Experimental Mode" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "FORGETTING..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Finish Setup" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" msgstr "Firehose" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehose Mode" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "Forget" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Forget Wi-Fi Network \"{}\"?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "GOOD" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Go to https://connect.comma.ai on your phone" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "HIGH" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "Hidden Network" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "INSTALL" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP Address" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Install Update" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Joystick Debug Mode" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "LOADING" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Longitudinal Maneuver Mode" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "MAX" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Maximize your training data uploads to improve openpilot's driving models." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "N/A" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "NO" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Network" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "No SSH keys found" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "No SSH keys found for user '{}'" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "No release notes available." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "OFFLINE" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "ONLINE" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Open" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "PAIR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "PREVIEW" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "PRIME FEATURES:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Pair Device" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Pair device" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Pair your device to your comma account" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Please connect to Wi-Fi to complete initial pairing" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Power Off" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "Prevent large data uploads when on a metered Wi-Fi connection" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "Prevent large data uploads when on a metered cellular connection" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QR Code Error" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "REMOVE" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "RESET" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "REVIEW" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Reboot" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Reboot Device" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Reboot and Update" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Record and Upload Driver Camera" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Record and Upload Microphone Audio" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Regulatory" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Relaxed" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Remote access" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Remote snapshots" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Request timed out" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Reset" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Reset Calibration" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Review Training Guide" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Review the rules, features, and limitations of openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" -msgstr "" +msgstr "SELECT" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH Keys" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Scanning Wi-Fi networks..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "Select" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "" +msgstr "Select a branch" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Select a language" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Serial" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Snooze Update" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "Software" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "Standard" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "System Unresponsive" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "TAKE CONTROL IMMEDIATELY" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "TEMP" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" -msgstr "" +msgstr "Target Branch" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "Tethering Password" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Toggles" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "UI Debug Mode" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "UNINSTALL" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "UPDATE" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Uninstall" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Unknown" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Updates are only downloaded while the car is off." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Upgrade Now" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Upload data from the driver facing camera and help improve the driver monitoring algorithm." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Use Metric System" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "VEHICLE" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "VIEW" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Waiting to start" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Welcome to openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "When enabled, pressing the accelerator pedal will disengage openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi-Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Wi-Fi Network Metered" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "Wrong password" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "You must accept the Terms and Conditions in order to use openpilot." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "camera starting" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "checking..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "default" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "down" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "downloading..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "failed to check for update" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "finalizing update..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "for \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "leave blank for automatic configuration" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "left" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "metered" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "never" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "now" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot Longitudinal Control (Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot Unavailable" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilot longitudinal control may come in a future update." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "right" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "unmetered" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "up" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "up to date, last checked never" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "up to date, last checked {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "update available" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} ALERT" msgstr[1] "{} ALERTS" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} day ago" msgstr[1] "{} days ago" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} hour ago" msgstr[1] "{} hours ago" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} minute ago" msgstr[1] "{} minutes ago" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} segment of your driving is in the training dataset so far." msgstr[1] "{} segments of your driving is in the training dataset so far." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ SUBSCRIBED" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehose Mode 🔥" diff --git a/selfdrive/ui/translations/app_es.po b/selfdrive/ui/translations/app_es.po index 35188fe2fc..707816bc00 100644 --- a/selfdrive/ui/translations/app_es.po +++ b/selfdrive/ui/translations/app_es.po @@ -1,1034 +1,825 @@ -# Spanish translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-20 16:35-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: es\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " La calibración de respuesta de par de dirección está completa." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " La calibración de respuesta de par de dirección está {}% completa." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Tu dispositivo está orientado {:.1f}° {} y {:.1f}° {}." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 año de almacenamiento de conducción" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "Conectividad LTE 24/7" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." -msgstr "" +msgstr "

La calibración del retraso de dirección está completa." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." -msgstr "" +msgstr "

La calibración del retraso de dirección está completa en un {}%." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "AÑADIR" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" -msgstr "" +msgstr "Configuración de APN" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Reconocer actuación excesiva" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" -msgstr "" +msgstr "Avanzado" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Agresivo" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Aceptar" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Supervisión del conductor siempre activa" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "¿Seguro que quieres apagar?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "¿Seguro que quieres reiniciar?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "¿Seguro que quieres restablecer la calibración?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "¿Seguro que quieres desinstalar?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Atrás" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Hazte miembro de comma prime en connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Añade connect.comma.ai a tu pantalla de inicio para usarlo como una app" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "CAMBIAR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "COMPROBAR" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "MODO CHILL ACTIVADO" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "CONECTAR" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "CONECTAR" -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" -msgstr "" +msgstr "Cancelar" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" -msgstr "" +msgstr "Medición celular" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Cambiar idioma" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr " Cambiar esta configuración reiniciará openpilot si el coche está encendido." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Haz clic en \"añadir nuevo dispositivo\" y escanea el código QR de la derecha" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Cerrar" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Versión actual" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "DESCARGAR" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Rechazar" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Rechazar, desinstalar openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Desarrollador" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Dispositivo" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Desactivar con el pedal del acelerador" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Desactivar para apagar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Desactivar para reiniciar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Desactivar para restablecer la calibración" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Mostrar la velocidad en km/h en lugar de mph." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "ID del dongle" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Descargar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Cámara del conductor" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Estilo de conducción" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" -msgstr "" +msgstr "EDITAR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" -msgstr "ERROR" +msgstr "FALLO" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "MODO EXPERIMENTAL ACTIVADO" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Activar" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "Activar ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Activar advertencias de salida de carril" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" -msgstr "Activar openpilot" +msgstr "Activar roaming" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "Activar SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" -msgstr "Activar advertencias de salida de carril" +msgstr "Activar anclaje" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Activar la supervisión del conductor incluso cuando openpilot no esté activado." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "Activar openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Activa el interruptor de control longitudinal de openpilot (alpha) para permitir el modo Experimental." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" -msgstr "" +msgstr "Introduce APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" -msgstr "" +msgstr "Introduzca SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" -msgstr "" +msgstr "Ingrese una nueva contraseña de anclaje a red" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" -msgstr "" +msgstr "Introduce la contraseña" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Introduce tu nombre de usuario de GitHub" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" -msgstr "" +msgstr "Fallo" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Modo experimental" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "El modo experimental no está disponible actualmente en este coche, ya que se usa el ACC de fábrica para el control longitudinal." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." -msgstr "" +msgstr "OLVIDAR..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Finalizar configuración" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "Flujo masivo" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Modo Firehose" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" -msgstr "" +msgstr "Olvidar" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" -msgstr "" +msgstr "¿Olvidaste la red Wi-Fi \"{}\"?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "BUENO" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Ve a https://connect.comma.ai en tu teléfono" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "ALTO" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" -msgstr "Red" +msgstr "Red oculta" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "INSTALAR" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" -msgstr "" +msgstr "Dirección IP" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Instalar actualización" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Modo de depuración de joystick" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "CARGANDO" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Modo de maniobra longitudinal" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "MÁX" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Maximiza tus cargas de datos de entrenamiento para mejorar los modelos de conducción de openpilot." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" -msgstr "" +msgstr "N / A" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" -msgstr "NO" +msgstr "SIN" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Red" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "No se encontraron claves SSH" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" -msgstr "No se encontraron claves SSH para el usuario '{username}'" +msgstr "No se encontraron claves SSH para el usuario '{}'" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "No hay notas de versión disponibles." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "SIN CONEXIÓN" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "EN LÍNEA" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Abrir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "EMPAREJAR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "VISTA PREVIA" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "FUNCIONES PRIME:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Emparejar dispositivo" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Emparejar dispositivo" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Empareja tu dispositivo con tu cuenta de comma" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Empareja tu dispositivo con comma connect (connect.comma.ai) y reclama tu oferta de comma prime." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Conéctate a Wi‑Fi para completar el emparejamiento inicial" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Apagar" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" -msgstr "" +msgstr "Evite grandes cargas de datos cuando esté en una conexión Wi-Fi medida" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" -msgstr "" +msgstr "Evite grandes cargas de datos cuando esté en una conexión celular medida" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Previsualiza la cámara hacia el conductor para asegurarte de que la supervisión del conductor tenga buena visibilidad. (el vehículo debe estar apagado)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "Error de código QR" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "ELIMINAR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "RESTABLECER" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "REVISAR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Reiniciar" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Reiniciar dispositivo" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Reiniciar y actualizar" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Grabar y subir cámara del conductor" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Grabar y subir audio del micrófono" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Grabar y almacenar audio del micrófono mientras conduces. El audio se incluirá en el video de la dashcam en comma connect." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Reglamentario" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Relajado" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Acceso remoto" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Capturas remotas" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Se agotó el tiempo de espera de la solicitud" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Restablecer" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Restablecer calibración" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Revisar guía de entrenamiento" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Revisa las reglas, funciones y limitaciones de openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" -msgstr "" +msgstr "SELECCIONAR" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" -msgstr "" +msgstr "Claves SSH" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." -msgstr "" +msgstr "Escaneando redes Wi-Fi..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" -msgstr "" +msgstr "Seleccionar" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "" +msgstr "Selecciona una rama" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Selecciona un idioma" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Número de serie" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Posponer actualización" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" -msgstr "Software" +msgstr "Sistema" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "Estándar" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "Sistema sin respuesta" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "TOME EL CONTROL INMEDIATAMENTE" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" -msgstr "TEMP" +msgstr "TEMP." -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" -msgstr "" +msgstr "Rama objetivo" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" -msgstr "" +msgstr "Contraseña de anclaje" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Interruptores" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "Modo de depuración de la interfaz de usuario" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "DESINSTALAR" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "ACTUALIZAR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Desinstalar" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Desconocido" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Las actualizaciones solo se descargan cuando el coche está apagado." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Mejorar ahora" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Sube datos de la cámara orientada al conductor y ayuda a mejorar el algoritmo de supervisión del conductor." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Usar sistema métrico" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "VEHÍCULO" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "VER" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Esperando para iniciar" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Bienvenido a openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Cuando está activado, al presionar el pedal del acelerador se desactivará openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" -msgstr "" +msgstr "Red Wi-Fi medida" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" -msgstr "" +msgstr "Contraseña incorrecta" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "Debes aceptar los Términos y Condiciones para poder usar openpilot." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "Debes aceptar los Términos y Condiciones para usar openpilot. Lee los términos más recientes en https://comma.ai/terms antes de continuar." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "iniciando cámara" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "de cheques..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" -msgstr "" +msgstr "por defecto" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "abajo" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "descargando..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "Error al buscar actualizaciones" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "finalizando actualización..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" -msgstr "" +msgstr "para \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" -msgstr "" +msgstr "dejar en blanco para configuración automática" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "izquierda" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" -msgstr "" +msgstr "medido" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "nunca" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "ahora" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "Control longitudinal de openpilot (Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot no disponible" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "El control longitudinal de openpilot podría llegar en una actualización futura." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot requiere que el dispositivo esté montado dentro de 4° a izquierda o derecha y dentro de 5° hacia arriba o 9° hacia abajo." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "derecha" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" -msgstr "" +msgstr "sin medir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "arriba" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "actualizado, última comprobación: nunca" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "actualizado, última comprobación: {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "actualización disponible" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} ALERTA" msgstr[1] "{} ALERTAS" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "hace {} día" msgstr[1] "hace {} días" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "hace {} hora" msgstr[1] "hace {} horas" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "hace {} minuto" msgstr[1] "hace {} minutos" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} segmento de tu conducción está en el conjunto de entrenamiento hasta ahora." msgstr[1] "{} segmentos de tu conducción están en el conjunto de entrenamiento hasta ahora." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ SUSCRITO" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Modo Firehose 🔥" diff --git a/selfdrive/ui/translations/app_fr.po b/selfdrive/ui/translations/app_fr.po index d3ce386bdc..7c0aecc9ec 100644 --- a/selfdrive/ui/translations/app_fr.po +++ b/selfdrive/ui/translations/app_fr.po @@ -1,1035 +1,825 @@ -# French translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2026-01-24 12:37+0100\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: fr\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 3.8\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " L'étalonnage de la réponse du couple de direction est terminé." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " L'étalonnage de la réponse du couple de direction est terminé à {}%." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Votre appareil est orienté {:.1f}° {} et {:.1f}° {}." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 an de stockage de trajets" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "Connexion LTE 24/7" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

L'étalonnage du délai de réponse de la direction est terminé." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

L'étalonnage du délai de réponse de la direction est terminé à {}%." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "AJOUTER" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "Paramètres APN" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Accuser réception d'actionnement excessif" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "Avancé" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Agressif" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Accepter" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Surveillance continue du conducteur" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Êtes-vous sûr de vouloir éteindre ?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Êtes-vous sûr de vouloir redémarrer ?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Êtes-vous sûr de vouloir réinitialiser la calibration ?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Êtes-vous sûr de vouloir désinstaller ?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Retour" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Devenez membre comma prime sur connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Ajoutez connect.comma.ai à votre écran d'accueil pour l'utiliser comme une application" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "CHANGER" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "VÉRIFIER" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "MODE CHILL ACTIVÉ" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "CONNECTER" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "CONNECTER..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "Annuler" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "Données cellulaire limitées" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Changer la langue" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "La modification de ce réglage redémarrera openpilot si la voiture est sous tension." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Cliquez sur \"add new device\" et scannez le code QR à droite" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Fermer" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Version actuelle" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "TÉLÉCHARGER" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Refuser" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Refuser, désinstaller openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Développeur" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Appareil" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Désengager à l'appui sur l'accélérateur" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Désengager pour éteindre" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Désengager pour redémarrer" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Désengager pour réinitialiser la calibration" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Afficher la vitesse en km/h au lieu de mph." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "ID du dongle" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Télécharger" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Caméra conducteur" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Personnalité de conduite" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "EDITER" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "ERREUR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "MODE EXPÉRIMENTAL ACTIVÉ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Activer" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "Activer ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Activer les alertes de sortie de voie" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "Activer openpilot" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "Activer SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "Activer les alertes de sortie de voie" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Activer la surveillance du conducteur même lorsque openpilot n'est pas engagé." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "Activer openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Activez l'option de contrôle longitudinal openpilot (alpha) pour autoriser le mode expérimental." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "Saisir l'APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "Entrer le SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "Saisir le mot de passe du partage de connexion" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "Saisir le mot de passe" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Entrez votre nom d'utilisateur GitHub" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "Erreur" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Mode expérimental" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "Le mode expérimental est actuellement indisponible sur cette voiture car l'ACC d'origine est utilisé pour le contrôle longitudinal." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "OUBLIER..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Terminer la configuration" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "Flux continu" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Mode Firehose" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "Oublier" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Oublier le réseau Wi-Fi \"{}\" ?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "BON" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Allez sur https://connect.comma.ai sur votre téléphone" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "ÉLEVÉ" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "Réseau" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "INSTALLER" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "Adresse IP" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Installer la mise à jour" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Mode débogage joystick" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "CHARGEMENT" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Mode de manœuvre longitudinale" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" -msgstr "MAX" +msgstr "MAX." -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Maximisez vos envois de données d'entraînement pour améliorer les modèles de conduite d'openpilot." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "NC" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "NON" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Réseau" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "Aucune clé SSH trouvée" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "Aucune clé SSH trouvée pour l'utilisateur '{}'" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "Aucune note de version disponible." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "HORS LIGNE" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "EN LIGNE" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Ouvrir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "ASSOCIER" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "APERÇU" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "FONCTIONNALITÉS PRIME :" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Associer l'appareil" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Associer l'appareil" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Associez votre appareil à votre compte comma" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Associez votre appareil à comma connect (connect.comma.ai) et réclamez votre offre comma prime." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Veuillez vous connecter au Wi‑Fi pour terminer l'association initiale" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Éteindre" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "Eviter les transferts de données volumineux lorsque vous êtes connecté à un réseau Wi-Fi limité" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "Eviter les transferts de données volumineux lors d'une connexion à un réseau cellulaire limité" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Prévisualisez la caméra orientée conducteur pour vous assurer que la surveillance du conducteur a une bonne visibilité. (le véhicule doit être éteint)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "Erreur de code QR" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "SUPPRIMER" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "RÉINITIALISER" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "CONSULTER" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Redémarrer" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Redémarrer l'appareil" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Redémarrer et mettre à jour" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Enregistrer et téléverser la caméra conducteur" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Enregistrer et téléverser l'audio du microphone" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Enregistrer et stocker l'audio du microphone pendant la conduite. L'audio sera inclus dans la vidéo dashcam dans comma connect." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Réglementaire" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Détendu" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Accès à distance" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Captures à distance" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Délai de la requête dépassé" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Réinitialiser" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Réinitialiser la calibration" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Consulter le guide d'entraînement" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Consultez les règles, fonctionnalités et limitations d'openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "SELECTIONNER" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "Clefs SSH" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Analyse des réseaux Wi-Fi..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "Sélectionner" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "Sélectionner une branche" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Sélectionner un langage" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Numéro de série" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Reporter la mise à jour" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "Logiciel" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" -msgstr "Standard" +msgstr "Normal" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "Système non réactif" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "REPRENEZ IMMÉDIATEMENT LE CONTRÔLE" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "TEMPÉRATURE" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "Branche cible" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "Mot de passe du partage de connexion" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Options" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "Mode de débogage de l'interface utilisateur" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "DÉSINSTALLER" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "METTRE À JOUR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Désinstaller" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Inconnu" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Les mises à jour ne sont téléchargées que lorsque la voiture est éteinte." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Mettre à niveau maintenant" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Téléverser les données de la caméra orientée conducteur et aider à améliorer l'algorithme de surveillance du conducteur." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Utiliser le système métrique" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "VÉHICULE" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "VOIR" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "En attente de démarrage" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Bienvenue sur openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Lorsque activé, appuyer sur la pédale d'accélérateur désengagera openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Réseau Wi-Fi limité" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "Mauvais mot de passe" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "Vous devez accepter les conditions générales pour utiliser openpilot." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "Vous devez accepter les conditions générales pour utiliser openpilot. Lisez les dernières conditions sur https://comma.ai/terms avant de continuer." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "démarrage de la caméra" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "vérification..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "défaut" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "bas" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "téléchargement..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "échec de la vérification de mise à jour" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "finalisation de la mise à jour..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "pour \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "ne pas remplir pour une configuration automatique" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "gauche" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "limité" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "jamais" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "maintenant" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "Contrôle longitudinal openpilot (Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot indisponible" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "Le contrôle longitudinal openpilot pourra arriver dans une future mise à jour." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot exige que l'appareil soit monté à moins de 4° à gauche ou à droite et à moins de 5° vers le haut ou 9° vers le bas." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "droite" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "non limité" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "haut" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "à jour, dernière vérification jamais" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "à jour, dernière vérification {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "mise à jour disponible" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} ALERTE" msgstr[1] "{} ALERTES" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "il y a {} jour" msgstr[1] "il y a {} jours" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "il y a {} heure" msgstr[1] "il y a {} heures" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "il y a {} minute" msgstr[1] "il y a {} minutes" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} segment de votre conduite est dans l'ensemble d'entraînement jusqu'à présent." msgstr[1] "{} segments de votre conduite sont dans l'ensemble d'entraînement jusqu'à présent." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ ABONNÉ" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Mode Firehose 🔥" diff --git a/selfdrive/ui/translations/app_ja.po b/selfdrive/ui/translations/app_ja.po index 41eb91dd58..78d3cf17c6 100644 --- a/selfdrive/ui/translations/app_ja.po +++ b/selfdrive/ui/translations/app_ja.po @@ -1,1029 +1,820 @@ -# Japanese translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-22 16:32-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: ja\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " ステアリングトルク応答のキャリブレーションが完了しました。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " ステアリングトルク応答のキャリブレーションは{}%完了しました。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " デバイスは{:.1f}°{}、{:.1f}°{}の向きです。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "走行データを1年間保存" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "24時間365日のLTE接続" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

ステアリング遅延のキャリブレーションが完了しました。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

ステアリング遅延のキャリブレーションは{}%完了しました。" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "追加" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN設定" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "過度な作動を承認" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "詳細設定" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "アグレッシブ" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "同意する" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "常時ドライバーモニタリング" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "本当に電源をオフにしますか?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "本当に再起動しますか?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "本当にキャリブレーションをリセットしますか?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "本当にアンインストールしますか?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "戻る" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "connect.comma.aiで comma prime に加入" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "connect.comma.aiをホーム画面に追加してアプリのように使いましょう" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "変更" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "確認" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "チルモードON" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "接続" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "接続中..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "キャンセル" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "従量課金の携帯回線" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "言語を変更" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "車が起動中の場合、この設定を変更するとopenpilotが再起動します。" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "\"add new device\"を押して右側のQRコードをスキャン" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "閉じる" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "現在のバージョン" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "ダウンロード" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "拒否する" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "拒否してopenpilotをアンインストール" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "開発者" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "デバイス" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "アクセルで解除" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "解除して電源オフ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "解除して再起動" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "解除してキャリブレーションをリセット" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "速度をmphではなくkm/hで表示します。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "ドングルID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "ダウンロード" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "ドライバーカメラ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "走行性格" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "編集" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "エラー" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "実験モードON" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "有効化" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "ADBを有効化" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "車線逸脱警報を有効化" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "ローミングを有効化" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "SSHを有効化" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "テザリングを有効化" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "openpilotが未作動でもドライバーモニタリングを有効にします。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "openpilotを有効化" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "openpilot縦制御(アルファ)のトグルを有効にすると実験モードが使用できます。" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "APNを入力" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "SSIDを入力" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "新しいテザリングのパスワードを入力" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "パスワードを入力" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "GitHubユーザー名を入力" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "エラー" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "実験モード" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "この車では縦制御に純正ACCを使用するため、現在実験モードは利用できません。" -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "削除中..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "セットアップを完了" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "大量配信" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehoseモード" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "削除" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Wi‑Fiネットワーク「{}」を削除しますか?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "良好" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "スマートフォンで https://connect.comma.ai にアクセス" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "高温" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "非公開ネットワーク" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "インストール" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IPアドレス" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "アップデートをインストール" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "ジョイスティックデバッグモード" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "読み込み中" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "縦制御マヌーバーモード" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "最大" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "学習データのアップロードを最大化してopenpilotの運転モデルを改善しましょう。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "該当なし" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "いいえ" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "ネットワーク" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "SSH鍵が見つかりません" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "ユーザー'{}'のSSH鍵が見つかりません" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "リリースノートはありません。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "オフライン" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "オンライン" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "開く" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "ペアリング" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "プレビュー" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "prime の特典:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "デバイスをペアリング" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "デバイスをペアリング" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "デバイスをあなたの comma アカウントにペアリング" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "デバイスを comma connect(connect.comma.ai)とペアリングして、comma prime 特典を受け取りましょう。" -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "初回ペアリングを完了するにはWi‑Fiに接続してください" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "電源オフ" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "従量課金のWi‑Fi接続時は大きなデータのアップロードを抑制" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "従量課金の携帯回線接続時は大きなデータのアップロードを抑制" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "ドライバー向きカメラのプレビューでモニタリングの視界を確認します。(車両は停止状態である必要があります)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QRコードエラー" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "削除" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "リセット" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "確認" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "再起動" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "デバイスを再起動" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "再起動して更新" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "ドライバーカメラを記録してアップロード" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "マイク音声を記録してアップロード" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "走行中にマイク音声を記録・保存します。音声は comma connect のドライブレコーダー動画に含まれます。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "規制情報" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "リラックス" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "リモートアクセス" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "リモートスナップショット" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "リクエストがタイムアウトしました" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "リセット" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "キャリブレーションをリセット" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "トレーニングガイドを確認" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "openpilotのルール、機能、制限を確認" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "選択" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH鍵" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Wi‑Fiネットワークを検索中..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "選択" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "ブランチを選択" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "言語を選択" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "シリアル" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "更新を後で通知" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "ソフトウェア" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "スタンダード" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "システムが応答しません" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "すぐに手動介入してください" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "温度" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "対象ブランチ" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "テザリングのパスワード" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "トグル" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "UIデバッグモード" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "アンインストール" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "更新" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "アンインストール" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "不明" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "アップデートは車両の電源が切れている間のみダウンロードされます。" -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "今すぐアップグレード" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "ドライバー向きカメラのデータをアップロードしてモニタリングアルゴリズムの改善に協力してください。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "メートル法を使用" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "車両" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "表示" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "開始待機中" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "openpilotへようこそ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "有効にすると、アクセルを踏むとopenpilotが解除されます。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Wi‑Fiネットワーク(従量課金)" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "パスワードが違います" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "openpilotを使用するには、利用規約に同意する必要があります。" -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "openpilotを使用するには利用規約に同意する必要があります。続行する前に https://comma.ai/terms の最新の規約をお読みください。" -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "カメラを起動中" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "チェック中..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "既定" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "下" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "ダウンロード中..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "アップデートの確認に失敗しました" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "アップデートを終了しています..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "「{}」向け" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "自動設定の場合は空欄のままにしてください" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "左" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "従量" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "なし" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "今" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot 縦制御(アルファ)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilotは利用できません" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilotの縦制御は将来のアップデートで提供される可能性があります。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilotでは、デバイスの取り付け角度が左右±4°、上方向5°以内、下方向9°以内である必要があります。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "右" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "非従量" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "上" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "最新です。最終確認: なし" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "最新です。最終確認: {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "更新があります" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{}件のアラート" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{}日前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{}時間前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{}分前" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "これまでにあなたの走行の{}セグメントが学習データセットに含まれています。" -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ 登録済み" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehoseモード 🔥" diff --git a/selfdrive/ui/translations/app_ko.po b/selfdrive/ui/translations/app_ko.po index 9b73a22387..24306ae02a 100644 --- a/selfdrive/ui/translations/app_ko.po +++ b/selfdrive/ui/translations/app_ko.po @@ -1,1029 +1,820 @@ -# Korean translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-22 16:32-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: ko\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: ko\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " 스티어링 토크 응답 보정이 완료되었습니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " 스티어링 토크 응답 보정이 {}% 완료되었습니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " 장치는 {:.1f}° {} 및 {:.1f}° {} 방향을 가리키고 있습니다." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "주행 데이터 1년 보관" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "연중무휴 LTE 연결" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

스티어링 지연 보정이 완료되었습니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

스티어링 지연 보정이 {}% 완료되었습니다." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "추가" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN 설정" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "과도한 작동을 확인" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "고급" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "공격적" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "동의" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "운전자 모니터링 항상 켜짐" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "정말 전원을 끄시겠습니까?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "정말 재시작하시겠습니까?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "정말 보정을 재설정하시겠습니까?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "정말 제거하시겠습니까?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "뒤로" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "connect.comma.ai에서 comma prime 회원이 되세요" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "connect.comma.ai를 홈 화면에 추가하여 앱처럼 사용하세요" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "변경" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "확인" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "안정적 모드 켜짐" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "연결" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "연결 중..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "취소" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "종량제 셀룰러" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "언어 변경" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "차량 전원이 켜져 있으면 이 설정을 변경할 때 openpilot이 재시작됩니다." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "\"add new device\"를 눌러 오른쪽의 QR 코드를 스캔하세요" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "닫기" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "현재 버전" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "다운로드" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "거부" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "거부하고 openpilot 제거" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "개발자" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "장치" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "가속 페달로 해제" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "해제 후 전원 끄기" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "해제 후 재시작" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "해제 후 캘리브레이션 재설정" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "속도를 mph 대신 km/h로 표시합니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "동글 ID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "다운로드" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "운전자 카메라" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "주행 성향" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "편집" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "오류" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "실험 모드 켜짐" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "사용" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "ADB 사용" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "차선 이탈 경고 사용" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "로밍 사용" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "SSH 사용" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "테더링 사용" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "openpilot이 작동 중이 아닐 때도 운전자 모니터링을 사용합니다." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "openpilot 사용" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "실험 모드를 사용하려면 openpilot 롱컨 제어(알파) 토글을 켜세요." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "APN 입력" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "SSID 입력" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "새 테더링 비밀번호 입력" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "비밀번호 입력" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "GitHub 사용자 이름 입력" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "오류" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "실험 모드" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "이 차량은 롱컨 제어에 순정 ACC를 사용하므로 현재 실험 모드를 사용할 수 없습니다." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "삭제 중..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "설정 완료" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" msgstr "파이어호스" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "파이어호스 모드" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "삭제" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Wi‑Fi 네트워크 \"{}\"를 삭제하시겠습니까?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "양호" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "휴대폰에서 https://connect.comma.ai 에 접속하세요" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "높음" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "숨겨진 네트워크" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "설치" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP 주소" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "업데이트 설치" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "조이스틱 디버그 모드" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "로딩 중" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "롱컨 기동 모드" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "최대" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "학습 데이터 업로드를 최대화하여 openpilot의 주행 모델을 개선하세요." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "해당 없음" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "아니오" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "네트워크" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "SSH 키를 찾을 수 없습니다" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "사용자 '{}'의 SSH 키를 찾을 수 없습니다" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "릴리스 노트가 없습니다." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "오프라인" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "확인" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "온라인" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "열기" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "페어링" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "미리보기" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "프라임 기능:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "장치 페어링" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "장치 페어링" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "장치를 귀하의 comma 계정에 페어링하세요" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "장치를 comma connect(connect.comma.ai)와 페어링하고 comma 프라임 혜택을 받으세요." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "초기 페어링을 완료하려면 Wi‑Fi에 연결하세요" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "전원 끄기" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "종량제 Wi‑Fi 연결 시 대용량 업로드 방지" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "종량제 셀룰러 연결 시 대용량 업로드 방지" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "운전자 모니터링의 가시성을 확인하기 위해 운전자 카메라를 미리 봅니다. (차량은 꺼져 있어야 합니다)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QR 코드 오류" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "제거" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "재설정" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "검토" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "재시작" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "장치 재시작" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "재시작 및 업데이트" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "운전자 카메라 기록 및 업로드" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "마이크 오디오 기록 및 업로드" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "주행 중 마이크 오디오를 기록하고 저장합니다. 오디오는 comma connect의 대시캠 영상에 포함됩니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "규제 정보" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "편안한" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "원격 액세스" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "원격 스냅샷" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "요청 시간이 초과되었습니다" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "재설정" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "캘리브레이션 재설정" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "학습 가이드 검토" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "openpilot의 규칙, 기능 및 제한을 검토" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "선택" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH 키" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Wi‑Fi 네트워크 검색 중..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "선택" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "브랜치 선택" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "언어 선택" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "시리얼" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "업데이트 나중에 알림" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "소프트웨어" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "표준" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "시스템 응답 없음" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "즉시 수동 조작하세요" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "온도" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "대상 브랜치" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "테더링 비밀번호" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "토글" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "UI 디버그 모드" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "제거" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "업데이트" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "제거" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "알수없음" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "업데이트는 차량 전원이 꺼져 있을 때만 다운로드됩니다." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "지금 업그레이드" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "운전자 방향 카메라 데이터를 업로드하여 운전자 모니터링 알고리즘 개선에 도움을 주세요." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "미터법 사용" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "차량" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "보기" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "시작 대기 중" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "openpilot에 오신 것을 환영합니다" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "이 옵션을 켜면 가속 페달을 밟을 때 openpilot이 해제됩니다." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Wi‑Fi 네트워크 종량제" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "비밀번호가 올바르지 않습니다" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "openpilot을 사용하려면 약관에 동의해야 합니다." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "openpilot을 사용하려면 약관에 동의해야 합니다. 계속하기 전에 https://comma.ai/terms 에서 최신 약관을 읽어주세요." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "카메라 시작 중" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "확인 중..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma 프라임" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "기본값" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "아래" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "다운로드 중..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "업데이트 확인 실패" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "업데이트 마무리 중..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "\"{}\"용" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "자동 구성을 사용하려면 비워 두세요" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "왼쪽" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "종량제" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "없음" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "지금" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot 롱컨 제어(알파)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot 사용 불가" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilot 롱컨 제어는 향후 업데이트에서 제공될 수 있습니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot은 장치를 좌우 4°, 위쪽 5°, 아래쪽 9° 이내로 장착해야 합니다." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "오른쪽" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "비종량제" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "위" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "최신입니다. 마지막 확인: 없음" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "최신입니다. 마지막 확인: {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "업데이트 가능" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{}건의 알림" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{}일 전" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{}시간 전" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{}분 전" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "현재까지 귀하의 주행 {}구간이 학습 데이터셋에 포함되었습니다." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ 구독됨" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 파이어호스 모드 🔥" diff --git a/selfdrive/ui/translations/app_pt-BR.po b/selfdrive/ui/translations/app_pt-BR.po index 1adb797c88..58f2094479 100644 --- a/selfdrive/ui/translations/app_pt-BR.po +++ b/selfdrive/ui/translations/app_pt-BR.po @@ -1,1036 +1,825 @@ -# Language pt-BR translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-21 00:00-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: pt-BR\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: pt-BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Language: pt_BR\n" -"X-Source-Language: C\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " A calibração da resposta de torque da direção foi concluída." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " A calibração da resposta de torque da direção está {}% concluída." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Seu dispositivo está apontado {:.1f}° {} e {:.1f}° {}." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 ano de armazenamento de condução" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "Conectividade LTE 24/7" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

A calibração da latência da direção está concluída." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

A calibração da latência da direção está {}% concluída." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "ADICIONAR" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "Configuração de APN" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Reconhecer Atuação Excessiva" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "Avançado" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Agressivo" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Concordo" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Monitoramento de Motorista Sempre Ativo" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Tem certeza de que deseja desligar?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Tem certeza de que deseja reiniciar?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Tem certeza de que deseja redefinir a calibração?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Tem certeza de que deseja desinstalar?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Voltar" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Torne-se membro comma prime em connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Adicione connect.comma.ai à tela inicial para usá-lo como um app" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "ALTERAR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "VERIFICAR" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "MODO CHILL ATIVO" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "CONECTAR" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "CONECTANDO..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "Cancelar" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "Dados móveis limitados" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Alterar Idioma" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "Alterar esta configuração reiniciará o openpilot se o carro estiver ligado." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Toque em \"adicionar novo dispositivo\" e escaneie o QR code à direita" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Fechar" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Versão Atual" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "BAIXAR" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Recusar" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Recusar, desinstalar o openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Desenvolv" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Dispositivo" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Desativar ao pressionar o acelerador" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Desativar para Desligar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Desativar para Reiniciar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Desativar para Redefinir Calibração" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Exibir velocidade em km/h em vez de mph." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "ID do Dongle" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Baixar" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Câmera do Motorista" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Personalidade" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "EDITAR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "ERRO" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "MODO EXPERIMENTAL ATIVO" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Ativar" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "Ativar ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Ativar alertas de saída de faixa" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" -msgstr "Ativar openpilot" +msgstr "Ativar roaming" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "Ativar SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" -msgstr "Ativar alertas de saída de faixa" +msgstr "Ativar compartilhamento" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Ativar monitoramento do motorista mesmo quando o openpilot não está engajado." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "Ativar openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Ative a opção de controle longitudinal do openpilot (alpha) para permitir o Modo Experimental." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "Digite APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "Digite SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "Digite nova senha tethering" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "Digite a senha" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Digite seu nome de usuário do GitHub" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "Erro" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Modo Experimental" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "O Modo Experimental está indisponível neste carro pois o ACC original do carro é usado para controle longitudinal." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "ESQUECENDO..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Configure" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "Fluxo contínuo" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Modo Firehose" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "Esquecer" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Esquecer rede Wi-Fi \"{}\"?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "BOM" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Acesse https://connect.comma.ai no seu telefone" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "ALTO" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" -msgstr "Rede" +msgstr "Rede oculta" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "INSTALAR" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "Endereço IP" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Instalar Atualização" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Modo de Depuração do Joystick" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "CARREGANDO" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Modo de Manobra Longitudinal" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "MÁX" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Maximize seus envios de dados de treinamento para melhorar os modelos de condução do openpilot." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" -msgstr "N/A" +msgstr "Indisp." -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "NÃO" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Rede" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "Nenhuma chave SSH encontrada" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" -msgstr "Nenhuma chave SSH encontrada para o usuário '{username}'" +msgstr "Nenhuma chave SSH encontrada para o usuário '{}'" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "Sem notas de versão disponíveis." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" -msgstr "OFFLINE" +msgstr "OFF-LINE" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" -msgstr "ONLINE" +msgstr "ON-LINE" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Abrir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "EMPARELHAR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "PRÉVIA" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "RECURSOS PRIME:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Emparelhar Dispositivo" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Emparelhar dispositivo" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Emparelhe seu dispositivo à sua conta comma" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Emparelhe seu dispositivo com o comma connect (connect.comma.ai) e resgate sua oferta comma prime." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Conecte-se ao Wi‑Fi para concluir o emparelhamento inicial" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Desligar" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "Evitar uploads grandes de dados em conexões Wi-Fi limitadas" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "Evitar uploads grandes de dados em conexões móveis limitadas" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Pré-visualize a câmera voltada para o motorista para garantir que o monitoramento do motorista tenha boa visibilidade. (veículo deve estar desligado)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "Erro no QR Code" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "REMOVER" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "REDEFINIR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "REVISAR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Reiniciar" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Reiniciar Dispositivo" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Reiniciar e Atualizar" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Gravar e Enviar Câmera do Motorista" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Gravar e Enviar Áudio do Microfone" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Grave e armazene o áudio do microfone enquanto dirige. O áudio será incluído no vídeo da dashcam no comma connect." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Regulatório" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Relaxado" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Acesso remoto" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Capturas remotas" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Tempo da solicitação esgotado" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Redefinir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Redefinir Calibração" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Revisar Guia de Treinamento" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Revise as regras, recursos e limitações do openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "SELECIONAR" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "Chaves SSH" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Procurando redes Wi-Fi..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "Selecione" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "Selecione uma branch" +msgstr "Selecione uma ramificação" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Selecione um idioma" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" -msgstr "Serial" +msgstr "Número de série" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Adiar Atualização" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" -msgstr "Software" +msgstr "Sistema" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "Padrão" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "Sistema sem resposta" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "ASSUMA O CONTROLE IMEDIATAMENTE" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" -msgstr "TEMP" +msgstr "TEMP." -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "Branch Alvo" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "Senha Tethering" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" -msgstr "Toggles" +msgstr "Alternativas" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "Modo de depuração da interface do usuário" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "DESINSTALAR" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "ATUALIZAR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Desinstalar" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Desconhecido" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Atualizações são baixadas apenas com o carro desligado." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Atualizar Agora" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Envie dados da câmera voltada para o motorista e ajude a melhorar o algoritmo de monitoramento do motorista." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Usar Sistema Métrico" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "VEÍCULO" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "VER" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Aguardando para iniciar" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Bem-vindo ao openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Quando ativado, pressionar o pedal do acelerador desengajará o openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Rede Wi-Fi limitada" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "Senha errada" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "Você deve aceitar os Termos e Condições para usar o openpilot." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "Você deve aceitar os Termos e Condições para usar o openpilot. Leia os termos mais recentes em https://comma.ai/terms antes de continuar." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "câmera iniciando" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "verificando..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" -msgstr "default" +msgstr "padrão" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "para baixo" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "baixando..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "falha ao verificar atualização" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "finalizando atualização..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "para \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "deixe em branco para configuração automática" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "à esquerda" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "limitados" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "nunca" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "agora" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "Controle Longitudinal do openpilot (Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot Indisponível" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "o controle longitudinal do openpilot pode vir em uma atualização futura." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "o openpilot requer que o dispositivo seja montado dentro de 4° para a esquerda ou direita e dentro de 5° para cima ou 9° para baixo." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "à direita" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "ilimitados" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "para cima" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "atualizado, última verificação: nunca" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "atualizado, última verificação: {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "atualização disponível" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} ALERTA" msgstr[1] "{} ALERTAS" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} dia atrás" msgstr[1] "{} dias atrás" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} hora atrás" msgstr[1] "{} horas atrás" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} minuto atrás" msgstr[1] "{} minutos atrás" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} segmento da sua condução está no conjunto de treinamento até agora." msgstr[1] "{} segmentos da sua condução estão no conjunto de treinamento até agora." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ ASSINADO" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Modo Firehose 🔥" diff --git a/selfdrive/ui/translations/app_th.po b/selfdrive/ui/translations/app_th.po index facf52d922..4e45cae14b 100644 --- a/selfdrive/ui/translations/app_th.po +++ b/selfdrive/ui/translations/app_th.po @@ -1,1034 +1,820 @@ -# Thai translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-22 16:32-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: th\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: th\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." -msgstr "" +msgstr "การสอบเทียบการตอบสนองแรงบิดของพวงมาลัยเสร็จสมบูรณ์" -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." -msgstr "" +msgstr "การสอบเทียบการตอบสนองแรงบิดของพวงมาลัยเสร็จสมบูรณ์ {}%" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." -msgstr "" +msgstr "อุปกรณ์ของคุณชี้ไปที่ {:.1f}° {} และ {:.1f}° {}" -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" -msgstr "" +msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" -msgstr "" +msgstr "พื้นที่เก็บข้อมูลไดรฟ์ 1 ปี" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" -msgstr "" +msgstr "การเชื่อมต่อ LTE ตลอด 24 ชั่วโมงทุกวัน" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" -msgstr "" +msgstr "2จี" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" -msgstr "" +msgstr "3จี" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" -msgstr "" +msgstr "5จี" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." -msgstr "" +msgstr "

การปรับเทียบความล่าช้าของพวงมาลัยเสร็จสมบูรณ์" -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." -msgstr "" +msgstr "

การปรับเทียบความล่าช้าของพวงมาลัย {}% เสร็จสมบูรณ์" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" -msgstr "" +msgstr "เพิ่ม" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" -msgstr "" +msgstr "การตั้งค่า APN" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" -msgstr "" +msgstr "รับทราบการดำเนินการที่มากเกินไป" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" -msgstr "" +msgstr "ขั้นสูง" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" -msgstr "" +msgstr "ก้าวร้าว" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" -msgstr "" +msgstr "เห็นด้วย" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" -msgstr "" +msgstr "การตรวจสอบไดรเวอร์ตลอดเวลา" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" -msgstr "" +msgstr "คุณแน่ใจหรือไม่ว่าต้องการปิดเครื่อง?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" -msgstr "" +msgstr "คุณแน่ใจหรือไม่ว่าต้องการรีบูต?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" -msgstr "" +msgstr "คุณแน่ใจหรือไม่ว่าต้องการรีเซ็ตการปรับเทียบ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" -msgstr "" +msgstr "คุณแน่ใจหรือไม่ว่าต้องการถอนการติดตั้ง?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" -msgstr "" +msgstr "กลับ" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" -msgstr "" +msgstr "เป็นสมาชิกจุลภาคไพรม์ที่ Connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" -msgstr "" +msgstr "คั่นหน้า Connect.comma.ai ไปที่หน้าจอหลักของคุณเพื่อใช้เหมือนแอป" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" -msgstr "" +msgstr "เปลี่ยน" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" -msgstr "" +msgstr "ตรวจสอบ" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" -msgstr "" +msgstr "เปิดโหมด Chill" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" -msgstr "" +msgstr "เชื่อมต่อ" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." -msgstr "" +msgstr "กำลังเชื่อมต่อ..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" -msgstr "" +msgstr "ยกเลิก" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" -msgstr "" +msgstr "เซลล์วัดแสง" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" -msgstr "" +msgstr "เปลี่ยนภาษา" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." -msgstr "" +msgstr "การเปลี่ยนการตั้งค่านี้จะรีสตาร์ท Openpilot หากรถเปิดอยู่" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" -msgstr "" +msgstr "คลิก \"เพิ่มอุปกรณ์ใหม่\" และสแกนโค้ด QR ทางด้านขวา" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" -msgstr "" +msgstr "ปิด" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" -msgstr "" +msgstr "เวอร์ชันปัจจุบัน" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" -msgstr "" +msgstr "ดาวน์โหลด" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" -msgstr "" +msgstr "ปฏิเสธ" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" -msgstr "" +msgstr "ปฏิเสธ ถอนการติดตั้ง openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" -msgstr "" +msgstr "นักพัฒนา" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" -msgstr "" +msgstr "อุปกรณ์" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" -msgstr "" +msgstr "ปลดเมื่อเหยียบคันเร่ง" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" -msgstr "" +msgstr "ปลดเพื่อปิดเครื่อง" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" -msgstr "" +msgstr "ยกเลิกการเชื่อมต่อเพื่อรีบูต" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" -msgstr "" +msgstr "ปลดเพื่อรีเซ็ตการปรับเทียบ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." -msgstr "" +msgstr "แสดงความเร็วเป็น km/h แทน mph" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" -msgstr "" +msgstr "รหัสดองเกิล" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" -msgstr "" +msgstr "ดาวน์โหลด" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" -msgstr "" +msgstr "กล้องไดร์เวอร์" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" -msgstr "" +msgstr "บุคลิกภาพในการขับขี่" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" -msgstr "" +msgstr "แก้ไข" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" -msgstr "" +msgstr "ข้อผิดพลาด" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" -msgstr "" +msgstr "ผลประโยชน์ทับซ้อน" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" -msgstr "" +msgstr "โหมดทดลองเปิดอยู่" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" -msgstr "" +msgstr "เปิดใช้งาน" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" -msgstr "" +msgstr "เปิดใช้งาน ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" -msgstr "" +msgstr "เปิดใช้งานคำเตือนการออกนอกเลน" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" -msgstr "" +msgstr "เปิดใช้งานโรมมิ่ง" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" -msgstr "" +msgstr "เปิดใช้งาน SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" -msgstr "" +msgstr "เปิดใช้งานการปล่อยสัญญาณ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." -msgstr "" +msgstr "เปิดใช้งานการตรวจสอบไดรเวอร์แม้ว่าจะไม่ได้ใช้งาน openpilot ก็ตาม" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" -msgstr "" +msgstr "เปิดใช้งานโอเพ่นไพลอต" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." -msgstr "" +msgstr "เปิดใช้งานการสลับการควบคุมตามยาวของ openpilot (อัลฟา) เพื่ออนุญาตโหมดการทดลอง" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" -msgstr "" +msgstr "ป้อน APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" -msgstr "" +msgstr "ป้อน SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" -msgstr "" +msgstr "ป้อนรหัสผ่านการปล่อยสัญญาณใหม่" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" -msgstr "" +msgstr "ใส่รหัสผ่าน" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" -msgstr "" +msgstr "ป้อนชื่อผู้ใช้ GitHub ของคุณ" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" -msgstr "" +msgstr "ข้อผิดพลาด" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" -msgstr "" +msgstr "โหมดทดลอง" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." -msgstr "" +msgstr "ขณะนี้โหมดทดลองไม่สามารถใช้งานได้บนรถคันนี้ เนื่องจาก ACC ในสต็อกของรถใช้สำหรับการควบคุมตามยาว" -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." -msgstr "" +msgstr "กำลังลืม..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" -msgstr "" +msgstr "เสร็จสิ้นการตั้งค่า" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "" +msgstr "สายดับเพลิง" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" -msgstr "" +msgstr "โหมดสายดับเพลิง" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" -msgstr "" +msgstr "ลืม" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" -msgstr "" +msgstr "ลืมเครือข่าย Wi-Fi \"{}\" หรือไม่" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" -msgstr "" +msgstr "ดี" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" -msgstr "" +msgstr "ไปที่ https://connect.comma.ai บนโทรศัพท์ของคุณ" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" -msgstr "" +msgstr "สูง" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" -msgstr "" +msgstr "เครือข่ายที่ซ่อนอยู่" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" -msgstr "" +msgstr "ติดตั้ง" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" -msgstr "" +msgstr "ที่อยู่ IP" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" -msgstr "" +msgstr "ติดตั้งอัปเดต" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" -msgstr "" +msgstr "โหมดดีบักจอยสติ๊ก" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" -msgstr "" +msgstr "กำลังโหลด" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" -msgstr "" +msgstr "แอลทีที" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" -msgstr "" +msgstr "โหมดการซ้อมรบตามยาว" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" -msgstr "" +msgstr "สูงสุด" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." -msgstr "" +msgstr "เพิ่มการอัปโหลดข้อมูลการฝึกของคุณให้สูงสุดเพื่อปรับปรุงโมเดลการขับขี่ของ Openpilot" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" -msgstr "" +msgstr "ไม่มี" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" -msgstr "" +msgstr "เลขที่" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" -msgstr "" +msgstr "เครือข่าย" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" -msgstr "" +msgstr "ไม่พบคีย์ SSH สำหรับผู้ใช้ '{}'" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." -msgstr "" +msgstr "ไม่มีบันทึกประจำรุ่น" -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" -msgstr "" +msgstr "ออฟไลน์" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" -msgstr "" +msgstr "ตกลง" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" -msgstr "" +msgstr "ออนไลน์" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" -msgstr "" +msgstr "เปิด" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" -msgstr "" +msgstr "คู่" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" -msgstr "" +msgstr "แพนด้า" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" -msgstr "" +msgstr "ดูตัวอย่าง" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" -msgstr "" +msgstr "คุณสมบัติเด่น:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" -msgstr "" +msgstr "จับคู่อุปกรณ์" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" -msgstr "" +msgstr "จับคู่อุปกรณ์" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" -msgstr "" +msgstr "จับคู่อุปกรณ์ของคุณกับบัญชีลูกน้ำของคุณ" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." -msgstr "" +msgstr "จับคู่อุปกรณ์ของคุณกับการเชื่อมต่อด้วยเครื่องหมายจุลภาค (connect.comma.ai) และรับข้อเสนอจุลภาคเฉพาะของคุณ" -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" -msgstr "" +msgstr "โปรดเชื่อมต่อ Wi-Fi เพื่อทำการจับคู่ครั้งแรกให้เสร็จสิ้น" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" -msgstr "" +msgstr "ปิดเครื่อง" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" -msgstr "" +msgstr "ป้องกันการอัปโหลดข้อมูลขนาดใหญ่เมื่อใช้การเชื่อมต่อ Wi-Fi แบบมิเตอร์" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" -msgstr "" +msgstr "ป้องกันการอัพโหลดข้อมูลขนาดใหญ่เมื่อใช้การเชื่อมต่อมือถือแบบคิดค่าบริการตามปริมาณข้อมูล" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" -msgstr "" +msgstr "ดูตัวอย่างกล้องที่หันหน้าไปทางคนขับเพื่อให้แน่ใจว่าการตรวจสอบผู้ขับขี่มีทัศนวิสัยที่ดี (รถจะต้องถูกปิด)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" -msgstr "" +msgstr "ข้อผิดพลาดรหัส QR" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" -msgstr "" +msgstr "ลบ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" -msgstr "" +msgstr "รีเซ็ต" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" -msgstr "" +msgstr "ทบทวน" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" -msgstr "" +msgstr "รีบูต" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" -msgstr "" +msgstr "รีบูตอุปกรณ์" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" -msgstr "" +msgstr "รีบูตและอัปเดต" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" -msgstr "" +msgstr "บันทึกและอัพโหลดกล้องไดร์เวอร์" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" -msgstr "" +msgstr "บันทึกและอัปโหลดเสียงไมโครโฟน" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." -msgstr "" +msgstr "บันทึกและจัดเก็บเสียงไมโครโฟนขณะขับรถ เสียงจะรวมอยู่ในวิดีโอ dashcam ด้วยการเชื่อมต่อด้วยเครื่องหมายจุลภาค" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" -msgstr "" +msgstr "กฎระเบียบ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" -msgstr "" +msgstr "ผ่อนคลาย" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" -msgstr "" +msgstr "การเข้าถึงระยะไกล" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" -msgstr "" +msgstr "สแนปชอตระยะไกล" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" -msgstr "" +msgstr "คำขอหมดเวลา" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" -msgstr "" +msgstr "รีเซ็ต" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" -msgstr "" +msgstr "รีเซ็ตการปรับเทียบ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" -msgstr "" +msgstr "ทบทวนคู่มือการฝึกอบรม" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" -msgstr "" +msgstr "ตรวจสอบกฎ คุณสมบัติ และข้อจำกัดของ openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" -msgstr "" +msgstr "เลือก" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" -msgstr "" +msgstr "คีย์ SSH" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." -msgstr "" +msgstr "กำลังสแกนเครือข่าย Wi-Fi..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" -msgstr "" +msgstr "เลือก" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "" +msgstr "เลือกสาขา" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" -msgstr "" +msgstr "เลือกภาษา" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" -msgstr "" +msgstr "อนุกรม" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" -msgstr "" +msgstr "เลื่อนการอัปเดต" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" -msgstr "" +msgstr "ซอฟต์แวร์" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" -msgstr "" +msgstr "มาตรฐาน" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" -msgstr "" +msgstr "ระบบไม่ตอบสนอง" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" -msgstr "" +msgstr "เข้าควบคุมทันที" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" -msgstr "" +msgstr "อุณหภูมิ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" -msgstr "" +msgstr "สาขาเป้าหมาย" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" -msgstr "" +msgstr "รหัสผ่านการแชร์อินเทอร์เน็ต" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" -msgstr "" +msgstr "สลับ" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "โหมดดีบัก UI" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" -msgstr "" +msgstr "ถอนการติดตั้ง" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" -msgstr "" +msgstr "อัปเดต" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" -msgstr "" +msgstr "ถอนการติดตั้ง" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" -msgstr "" +msgstr "ไม่ทราบ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." -msgstr "" +msgstr "การอัพเดตจะถูกดาวน์โหลดในขณะที่รถดับอยู่เท่านั้น" -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" -msgstr "" +msgstr "อัพเกรดทันที" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." -msgstr "" +msgstr "อัปโหลดข้อมูลจากกล้องที่หันเข้าหาคนขับและช่วยปรับปรุงอัลกอริธึมการตรวจสอบผู้ขับขี่" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" -msgstr "" +msgstr "ใช้ระบบเมตริก" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" -msgstr "" +msgstr "ยานพาหนะ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" -msgstr "" +msgstr "ดู" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" -msgstr "" +msgstr "กำลังรอที่จะเริ่ม" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" -msgstr "" +msgstr "ยินดีต้อนรับสู่ openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." -msgstr "" +msgstr "เมื่อเปิดใช้งาน การกดแป้นคันเร่งจะเป็นการปลดโอเพ่นไพลอต" -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" -msgstr "" +msgstr "อินเตอร์เน็ตไร้สาย" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" -msgstr "" +msgstr "เครือข่าย Wi-Fi มีการตรวจวัด" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" -msgstr "" +msgstr "รหัสผ่านผิด" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." -msgstr "" +msgstr "คุณต้องยอมรับข้อกำหนดและเงื่อนไขเพื่อใช้งาน openpilot" -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." -msgstr "" +msgstr "คุณต้องยอมรับข้อกำหนดและเงื่อนไขเพื่อใช้ openpilot อ่านข้อกำหนดล่าสุดได้ที่ https://comma.ai/terms ก่อนดำเนินการต่อ" -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" -msgstr "" +msgstr "กำลังเริ่มกล้อง" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "กำลังตรวจสอบ..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" -msgstr "" +msgstr "เครื่องหมายลูกน้ำเฉพาะ" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" -msgstr "" +msgstr "ค่าเริ่มต้น" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" -msgstr "" +msgstr "ลง" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "กำลังดาวน์โหลด..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" -msgstr "" +msgstr "ไม่สามารถตรวจสอบการอัปเดตได้" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "กำลังสรุปการอัปเดต..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" -msgstr "" +msgstr "สำหรับ \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" -msgstr "" +msgstr "กม./ชม" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" -msgstr "" +msgstr "เว้นว่างไว้เพื่อกำหนดค่าอัตโนมัติ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" -msgstr "" +msgstr "ซ้าย" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" -msgstr "" +msgstr "คิดค่าบริการตามปริมาณ" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" -msgstr "" +msgstr "ไมล์/ชม." -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" -msgstr "" +msgstr "ไม่เคย" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" -msgstr "" +msgstr "ตอนนี้" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" -msgstr "" +msgstr "การควบคุมตามยาวของ openpilot (อัลฟา)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" -msgstr "" +msgstr "openpilot ไม่พร้อมใช้งาน" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." -msgstr "" +msgstr "ระบบควบคุมตามยาวของ openpilot อาจมาในการอัปเดตครั้งถัดไป" -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." -msgstr "" +msgstr "openpilot ต้องติดตั้งอุปกรณ์ให้อยู่ในช่วงเอียงซ้ายหรือขวาไม่เกิน 4° และเอียงขึ้นไม่เกิน 5° หรือเอียงลงไม่เกิน 9°" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" -msgstr "" +msgstr "ขวา" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" -msgstr "" +msgstr "ไม่จำกัดปริมาณ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" -msgstr "" +msgstr "ขึ้น" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" -msgstr "" +msgstr "เป็นเวอร์ชันล่าสุด ตรวจสอบครั้งล่าสุด: ไม่เคย" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" -msgstr "" +msgstr "เป็นเวอร์ชันล่าสุด ตรวจสอบครั้งล่าสุดเมื่อ {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" -msgstr "" +msgstr "มีอัปเดตใหม่" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "การแจ้งเตือน {} รายการ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "{} วันที่แล้ว" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "{} ชั่วโมงที่แล้ว" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "{} นาทีที่แล้ว" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." -msgstr[0] "" -msgstr[1] "" +msgstr[0] "ขณะนี้มีช่วงการขับขี่ของคุณ {} ช่วงอยู่ในชุดข้อมูลฝึกสอนแล้ว" -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" -msgstr "" +msgstr "✓ สมัครแล้ว" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" -msgstr "" +msgstr "🔥 โหมด Firehose 🔥" diff --git a/selfdrive/ui/translations/app_tr.po b/selfdrive/ui/translations/app_tr.po index 137d350c2a..dbb5b325a6 100644 --- a/selfdrive/ui/translations/app_tr.po +++ b/selfdrive/ui/translations/app_tr.po @@ -1,1034 +1,825 @@ -# Turkish translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-20 18:19-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: tr\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: tr\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " Direksiyon tork tepkisi kalibrasyonu tamamlandı." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " Direksiyon tork tepkisi kalibrasyonu {}% tamamlandı." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Cihazınız {:.1f}° {} ve {:.1f}° {} yönünde konumlandırılmış." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 yıl sürüş depolaması" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "7/24 LTE bağlantısı" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." -msgstr "" +msgstr "

Direksiyon gecikmesi kalibrasyonu tamamlandı." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." -msgstr "" +msgstr "

Direksiyon gecikmesi kalibrasyonu %{} tamamlandı." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "EKLE" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" -msgstr "" +msgstr "APN Ayarı" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Aşırı Müdahaleyi Onayla" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" -msgstr "" +msgstr "Gelişmiş" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Agresif" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Kabul et" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Sürekli Sürücü İzleme" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Kapatmak istediğinizden emin misiniz?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Yeniden başlatmak istediğinizden emin misiniz?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Kalibrasyonu sıfırlamak istediğinizden emin misiniz?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Kaldırmak istediğinizden emin misiniz?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Geri" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "connect.comma.ai adresinde comma prime üyesi olun" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "connect.comma.ai'yi ana ekranınıza ekleyerek bir uygulama gibi kullanın" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "DEĞİŞTİR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "KONTROL ET" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "CHILL MODU AÇIK" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" msgstr "BAĞLAN" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "BAĞLAN" -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" -msgstr "" +msgstr "İptal" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" -msgstr "" +msgstr "Ölçülü Hücresel" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Dili Değiştir" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr " Bu ayarı değiştirmek, araç çalışıyorsa openpilot'u yeniden başlatacaktır." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "\"yeni cihaz ekle\"ye tıklayın ve sağdaki QR kodunu tarayın" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Kapat" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Geçerli Sürüm" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "İNDİR" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Reddet" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Reddet, openpilot'u kaldır" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Geliştirici" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Cihaz" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Gaz Pedalında Devreden Çık" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Kapatmak için Devreden Çıkın" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Yeniden Başlatmak için Devreden Çıkın" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Kalibrasyonu Sıfırlamak için Devreden Çıkın" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Hızı mph yerine km/h olarak göster." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" -msgstr "Dongle ID" +msgstr "Dongle kimliği" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "İndir" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Sürücü Kamerası" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Sürüş Kişiliği" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" -msgstr "" +msgstr "DÜZENLE" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "HATA" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "DENEYSEL MOD AÇIK" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Etkinleştir" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "ADB'yi Etkinleştir" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Şerit Terk Uyarılarını Etkinleştir" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" -msgstr "openpilot'u etkinleştir" +msgstr "Dolaşımı Etkinleştir" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "SSH'yi Etkinleştir" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" -msgstr "Şerit Terk Uyarılarını Etkinleştir" +msgstr "İnternet Paylaşımını Etkinleştir" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "openpilot devrede değilken bile sürücü izlemesini etkinleştir." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "openpilot'u etkinleştir" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Deneysel modu etkinleştirmek için openpilot boylamsal kontrolünü (alfa) açın." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" -msgstr "" +msgstr "APN girin" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" -msgstr "" +msgstr "SSID girin" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" -msgstr "" +msgstr "Yeni internet paylaşımı şifresini girin" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" -msgstr "" +msgstr "Şifre girin" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "GitHub kullanıcı adınızı girin" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" -msgstr "" +msgstr "Hata" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Deneysel Mod" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "Bu araçta boylamsal kontrol için stok ACC kullanıldığından şu anda Deneysel mod kullanılamıyor." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." -msgstr "" +msgstr "UNUTULUYOR..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Kurulumu Bitir" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "Yoğun veri akışı" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehose Modu" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" -msgstr "" +msgstr "Unut" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" -msgstr "" +msgstr "\"{}\" Wi‑Fi ağı unutulsun mu?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "İYİ" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Telefonunuzda https://connect.comma.ai adresine gidin" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "YÜKSEK" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" -msgstr "Ağ" +msgstr "Gizli Ağ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "YÜKLE" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" -msgstr "" +msgstr "IP Adresi" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Güncellemeyi Yükle" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Joystick Hata Ayıklama Modu" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "YÜKLENİYOR" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Boylamsal Manevra Modu" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "MAKS" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "openpilot'un sürüş modellerini iyileştirmek için eğitim veri yüklemelerinizi en üst düzeye çıkarın." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" -msgstr "" +msgstr "Yok" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "HAYIR" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Ağ" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "SSH anahtarı bulunamadı" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" -msgstr "'{username}' için SSH anahtarı bulunamadı" +msgstr "'{}' kullanıcısı için SSH anahtarı bulunamadı" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "Sürüm notu mevcut değil." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "ÇEVRİMDIŞI" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "ÇEVRİMİÇİ" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "Aç" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "EŞLE" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "ÖNİZLEME" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "PRIME ÖZELLİKLERİ:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Cihazı Eşle" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Cihazı eşle" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Cihazınızı comma hesabınızla eşleştirin" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Cihazınızı comma connect (connect.comma.ai) ile eşleştirin ve comma prime teklifinizi alın." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "İlk eşleştirmeyi tamamlamak için lütfen Wi‑Fi'a bağlanın" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Kapat" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" -msgstr "" +msgstr "Ölçülü bir Wi‑Fi bağlantısındayken büyük veri yüklemelerini engelle" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" -msgstr "" +msgstr "Ölçülü bir hücresel bağlantıdayken büyük veri yüklemelerini engelle" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Sürücü izleme görünürlüğünün iyi olduğundan emin olmak için sürücüye bakan kamerayı önizleyin. (araç kapalı olmalıdır)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QR Kod Hatası" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "KALDIR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "SIFIRLA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "GÖZDEN GEÇİR" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Yeniden Başlat" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Cihazı Yeniden Başlat" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Yeniden Başlat ve Güncelle" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Sürücü Kamerasını Kaydet ve Yükle" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Mikrofon Sesini Kaydet ve Yükle" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Sürüş sırasında mikrofon sesini kaydedip saklayın. Ses, comma connect'teki ön kamera videosuna dahil edilecektir." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Mevzuat" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Rahat" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Uzaktan erişim" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Uzaktan anlık görüntüler" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "İstek zaman aşımına uğradı" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Sıfırla" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Kalibrasyonu Sıfırla" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Eğitim Kılavuzunu İncele" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "openpilot'un kurallarını, özelliklerini ve sınırlamalarını gözden geçirin" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" -msgstr "" +msgstr "SEÇ" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" -msgstr "" +msgstr "SSH Anahtarları" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." -msgstr "" +msgstr "Wi‑Fi ağları taranıyor..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" -msgstr "" +msgstr "Seç" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" -msgstr "" +msgstr "Bir dal seçin" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Bir dil seçin" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Seri" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Güncellemeyi Ertele" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "Yazılım" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "Standart" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "Sistem Yanıt Vermiyor" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "HEMEN KONTROLÜ DEVRALIN" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" -msgstr "TEMP" +msgstr "SIC." -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" -msgstr "" +msgstr "Hedef Dal" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" -msgstr "" +msgstr "İnternet Paylaşımı Şifresi" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Seçenekler" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "Arayüz Hata Ayıklama Modu" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "KALDIR" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "GÜNCELLE" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Kaldır" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Bilinmiyor" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Güncellemeler yalnızca araç kapalıyken indirilir." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Şimdi Yükselt" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Sürücüye bakan kameradan veri yükleyin ve sürücü izleme algoritmasını geliştirmeye yardımcı olun." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Metrik Sistemi Kullan" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "ARAÇ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "GÖRÜNTÜLE" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Başlatma bekleniyor" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "openpilot'a hoş geldiniz" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Etkinleştirildiğinde, gaz pedalına basmak openpilot'u devreden çıkarır." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" -msgstr "" +msgstr "Ölçülü Wi‑Fi Ağı" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" -msgstr "" +msgstr "Yanlış şifre" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "openpilot'u kullanmak için Şartlar ve Koşulları kabul etmelisiniz." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "openpilot'u kullanmak için Şartlar ve Koşulları kabul etmelisiniz. Devam etmeden önce en güncel şartları https://comma.ai/terms adresinde okuyun." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "kamera başlatılıyor" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "kontrol ediliyor..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" -msgstr "" +msgstr "varsayılan" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "aşağı" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "indiriliyor..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "güncelleme kontrolü başarısız" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "güncelleme tamamlanıyor..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" -msgstr "" +msgstr "\"{}\" için" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" -msgstr "" +msgstr "otomatik yapılandırma için boş bırakın" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "sol" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" -msgstr "" +msgstr "ölçülü" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "asla" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "şimdi" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot Boylamsal Kontrol (Alfa)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot Kullanılamıyor" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilot boylamsal kontrolü gelecekteki bir güncellemede gelebilir." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot, cihazın sağa/sola 4° ve yukarı 5° veya aşağı 9° içinde monte edilmesini gerektirir." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "sağ" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" -msgstr "" +msgstr "ölçüsüz" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "yukarı" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "güncel, son kontrol asla" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "güncel, son kontrol {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "güncelleme mevcut" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} UYARI" msgstr[1] "{} UYARILAR" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} gün önce" msgstr[1] "{} gün önce" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} saat önce" msgstr[1] "{} saat önce" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} dakika önce" msgstr[1] "{} dakika önce" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} segment sürüşünüz eğitim veri setinde." msgstr[1] "{} segment sürüşünüz eğitim veri setinde." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ ABONE" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehose Modu 🔥" diff --git a/selfdrive/ui/translations/app_uk.po b/selfdrive/ui/translations/app_uk.po index e36ceac2ce..3f3d186657 100644 --- a/selfdrive/ui/translations/app_uk.po +++ b/selfdrive/ui/translations/app_uk.po @@ -1,1040 +1,830 @@ -# Ukrainian translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-19 12:21+0200\n" -"PO-Revision-Date: 2025-11-19 13:27+0200\n" -"Last-Translator: KeeFeeRe \n" -"Language-Team: none\n" -"Language: uk\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 3.8\n" +"Language: uk\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " Калібрування реакції крутного моменту керма завершено." -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr "Калібрування реакції крутного моменту керма завершено на {}%." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " Ваш пристрій нахилено на {:.1f}° {} та {:.1f}° {}." -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 рік зберігання поїздок" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "Підключення LTE 24/7" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

Калібрування затримки кермування завершено." -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

Калібрування затримки кермування завершено на {}%." -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "ДОДАТИ" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "Налаштування APN" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "Визнайте надмірне спрацьовування" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "Розширені" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "Агресивн." -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "Погодитися" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "Постійний моніторинг водія" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "Ви впевнені, що хочете вимкнути?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "Ви впевнені, що хочете перезавантажити?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "Ви впевнені, що хочете скинути калібрування?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "Ви впевнені, що хочете видалити?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "Назад" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "Станьте членом comma prime на connect.comma.ai" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "Додайте connect.comma.ai до головного екрану, щоб використовувати його як додаток." -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "ЗМІНИТИ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "ПЕРЕВІРИТИ" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "СПОКІЙНИЙ РЕЖИМ" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" -msgstr "CONNECT" +msgstr "ПІДКЛЮЧИТИ" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "ПІДКЛЮЧА..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "Скасувати" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "Лімітне стільникове з'єднання" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "Змінити мову" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "Зміна цього параметра призведе до перезапуску openpilot, якщо автомобіль увімкнено." -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "Натисніть «додати новий пристрій» і відскануйте QR-код праворуч." -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "Закрити" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "Поточна версія" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "ВАНТАЖ" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "Відхилити" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "Відхилити, видалити openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "Розробник" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "Пристрій" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "Вимкнення при натисканні на педаль газу" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "Вимкніть openpilot, щоб вимкнути пристрій" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "Вимкніть openpilot, щоб перезавантажити" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "Деактивуйте для скидання калібрування" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "Відображати швидкість у км/год замість миль/год." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" msgstr "ID ключа" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "Завантажити" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "Камера водія" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "Стиль водіння" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "РЕДАГ." -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "ПОМИЛКА" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "ЕКСПЕРИМЕНТ. РЕЖИМ" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "Увімкнути" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "Увімкнути ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "Увімкнути попередження про виїзд зі смуги" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "Увімкнути роумінг" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "Увімкнути SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "Увімкнути точку доступу" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "Увімкнути моніторинг водія, навіть коли openpilot не ввімкнено." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "Увімкнути openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "Увімкніть перемикач поздовжнього керування openpilot (альфа), щоб увімкнути експериментальний режим." -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "Введіть APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "Введіть SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "Введіть новий пароль для модему" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "Введіть пароль" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "Введіть ваш логін GitHub" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "Помилка" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "Експериментальний режим" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "Експериментальний режим наразі недоступний для цього автомобіля, оскільки для поздовжнього керування використовується штатний адаптивний круїз-контроль (ACC)." -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "ЗАБУВАЮ..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "Завершити налаштування" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" msgstr "Злива" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Режим зливи" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" -msgstr "Заб-и" +msgstr "Забути" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "Забути мережу Wi-Fi \"{}\"?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "ДОБРА" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "Перейдіть на сайт https://connect.comma.ai на своєму телефоні." -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "ВИСОКА" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "Прихована мережа" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "ВСТАНОВ." -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP-адреса" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "Встановити оновлення" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "Режим зневадження джойстика" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "ЗАВАНТАЖЕННЯ" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "Режим поздовжнього маневрування" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "МАКС" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "Максимізуйте завантаження навчальних даних, щоб поліпшити моделі openpilot." -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "Н/Д" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "НЕМАЄ" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "Мережа" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "Не знайдено ключів SSH" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "Користувач '{}' не має ключів на GitHub" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "Інформація про випуск відсутня." -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "ОФЛАЙН" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "OK" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "ОНЛАЙН" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "ВІДКРИТИ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "ПІДКЛЮЧИТИ" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "ПОКАЖИ" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "XАРАКТЕРИСТИКИ PRIME:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "Підключити пристрій" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "Підключити пристрій" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "Підключіть свій пристрій до обліковки comma connect" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "Підключіть свій пристрій до comma connect (connect.comma.ai) і отримайте свою пропозицію comma prime." -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "Будь ласка, підключіться до Wi-Fi, щоб завершити початкове сполучення." -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "Вимкнути" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "Запобігайте завантаженню великих обсягів даних під час використання Wi-Fi-з'єднання з обмеженим трафіком" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "Запобігати великим завантаженням даних під час лімітного стільникового з'єднання" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "Попередньо перегляньте камеру, спрямовану на водія, щоб переконатися, що система моніторингу водія має добру видимість. (автомобіль повинен бути вимкнений)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "Помилка QR-коду" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "ВИДАЛИТИ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "Скинути" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "ДИВИТИСЬ" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "Перезавантажити" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "Перезавантажте пристрій" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "Перезавантажити та оновити" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "Писати та вантажити відео з камери водія" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "Запис та завантаження аудіо з мікрофона" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "Записуйте та зберігайте аудіо з мікрофона під час руху. Аудіо буде включено до відео з відеореєстратора в comma connect." -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "Нормативні документи" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "Спокійний" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "Віддалений доступ" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "Віддалені знімки" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "Час запиту вичерпано" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "Скинути" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "Скинути калібрування" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "Переглянути посібник з навчання" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "Перегляньте правила, функції та обмеження openpilot" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "ВИБРАТИ" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH ключі" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "Пошук мереж..." -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "Вибрати" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "Виберіть гілку" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "Виберіть мову" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "Серійний номер" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "Відкласти оновлення" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "Програма" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "Стандарт" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "Система не реагує" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "КЕРМУЙТЕ НЕГАЙНО" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "ТЕМП" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "Цільова гілка" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "Пароль для точки доступу" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "Перемикачі" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "Режим налагодження інтерфейсу" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "ВИДАЛИТИ" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "ОНОВИТИ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "Видалити" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "Невідомо" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "Оновлення завантажуються лише тоді, коли автомобіль вимкнено." -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "Оновити зараз" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "Завантажуйте дані з камери, спрямованої на водія, та допоможіть покращити алгоритм моніторингу водія." -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "Використовувати метричну систему" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "АВТО" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "ДИВИСЬ" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "Очікування початку" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "Ласкаво просимо до openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "Якщо увімкнено, натискання на педаль акселератора вимкне openpilot." -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi-Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Трафік Wi-Fi" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "Невірний пароль" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "Ви повинні прийняти Умови та положення, щоб користуватися openpilot." -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "Ви повинні прийняти Умови використання, щоб користуватися openpilot. Перед тим, як продовжити, ознайомтеся з останніми умовами на сайті https://comma.ai/terms." -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "запуск камери" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." msgstr "перевіряю..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "замовч." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "вниз" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." msgstr "завантажую..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "не вдалося перевірити оновлення" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." msgstr "завершую..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "для \"{}\"" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "км/год" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "залиште порожнім для автоматичного налаштування" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "вліво" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "обмеж." -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "миль/год" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "ніколи" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "зараз" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "Поздовжнє керування openpilot (Альфа)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot Недоступний" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "Поздовжнє керування openpilot може з'явитися в майбутньому оновленні." -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "Для роботи openpilot потрібно, щоб пристрій був встановлений з нахилом не більше 4° вліво або вправо та не більше 5° вгору або 9° вниз. openpilot постійно калібрується, тому скидання калібрування потрібне рідко." -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "вправо" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "необмеж." -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "вгору" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "оновлено, ніколи не перевірялось" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "оновлено, перевірив {}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "доступне оновлення" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} СПОВІЩЕННЯ" msgstr[1] "{} СПОВІЩЕННЯ" msgstr[2] "{} СПОВІЩЕНЬ" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} день тому" msgstr[1] "{} дні тому" msgstr[2] "{} днів тому" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} година тому" msgstr[1] "{} години тому" msgstr[2] "{} годин тому" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} хвилина тому" msgstr[1] "{} хвилини тому" msgstr[2] "{} хвилин тому" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "{} сегмент вашого водіння на даний момент містяться в тренувальному наборі даних." msgstr[1] "{} сегменти вашого водіння на даний момент містяться в тренувальному наборі даних." msgstr[2] "{} сегментів вашого водіння на даний момент містяться в тренувальному наборі даних." -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ ПІДПИСАНО" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🌧️ Режим зливи 🌧️" diff --git a/selfdrive/ui/translations/app_zh-CHS.po b/selfdrive/ui/translations/app_zh-CHS.po index 4d9a5b78e2..55a7c329f6 100644 --- a/selfdrive/ui/translations/app_zh-CHS.po +++ b/selfdrive/ui/translations/app_zh-CHS.po @@ -1,1034 +1,825 @@ -# Language zh-CHS translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-22 16:32-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: zh-CHS\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: zh-CHS\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " 转向扭矩响应校准完成。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " 转向扭矩响应校准已完成 {}%。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " 您的设备朝向 {:.1f}° {} 与 {:.1f}° {}。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 年行驶数据存储" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "全天候 LTE 连接" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

转向延迟校准完成。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

转向延迟校准已完成 {}%。" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "添加" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN 设置" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "确认过度作动" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "高级" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "激进" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "同意" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "始终启用驾驶员监控" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "确定要关机吗?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "确定要重启吗?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "确定要重置校准吗?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "确定要卸载吗?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "返回" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "前往 connect.comma.ai 成为 comma prime 会员" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "将 connect.comma.ai 添加到主屏幕,像应用一样使用" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "更改" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "检查" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "安稳模式已开启" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" -msgstr "CONNECT" +msgstr "连接" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "连接中..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "取消" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "蜂窝计量" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "更改语言" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "若车辆通电,更改此设置将重启 openpilot。" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "点击“添加新设备”,扫描右侧二维码" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "关闭" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "当前版本" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "下载" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "拒绝" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "拒绝并卸载 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "开发者" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "设备" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "踩下加速踏板时脱离" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "脱离以关机" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "脱离以重启" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "脱离以重置校准" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "以 km/h 显示速度(非 mph)。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" -msgstr "Dongle ID" +msgstr "设备 ID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "下载" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "车内摄像头" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "驾驶风格" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "编辑" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "错误" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "实验模式已开启" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "启用" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "启用 ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "启用车道偏离警示" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "启用漫游" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "启用 SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "启用网络共享" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "即使未启用 openpilot 也启用驾驶员监控。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "启用 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "启用 openpilot 纵向控制(alpha)开关,以使用实验模式。" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "输入 APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "输入 SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "输入新的网络共享密码" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "输入密码" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "输入您的 GitHub 用户名" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "错误" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "实验模式" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "此车型当前无法使用实验模式,因为纵向控制使用的是原厂 ACC。" -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "正在遗忘..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "完成设置" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "数据洪流" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehose 模式" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "忘记" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "要忘记 Wi‑Fi 网络“{}”吗?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "良好" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "在手机上前往 https://connect.comma.ai" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "高" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "隐藏网络" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "安装" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP 地址" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "安装更新" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "摇杆调试模式" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "加载中" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "纵向操作模式" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "最大" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "最大化上传训练数据,以改进 openpilot 的驾驶模型。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "无" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "否" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "网络" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "未找到 SSH 密钥" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "未找到用户“{}”的 SSH 密钥" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "暂无发行说明。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "离线" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "确定" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "在线" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "打开" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "配对" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "预览" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "PRIME 功能:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "配对设备" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "配对设备" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "将设备配对到您的 comma 账号" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "将设备与 comma connect(connect.comma.ai)配对,领取您的 comma prime 优惠。" -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "请连接 Wi‑Fi 以完成初始配对" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "关机" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "在计量制 Wi‑Fi 连接时避免大量上传" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "在计量制蜂窝网络时避免大量上传" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "预览车内摄像头以确保驾驶员监控视野良好。(车辆必须熄火)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "二维码错误" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "移除" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "重置" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "查看" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "重启" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "重启设备" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "重启并更新" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "录制并上传车内摄像头" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "录制并上传麦克风音频" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "行驶时录制并保存麦克风音频。音频将包含在 comma connect 的行车记录视频中。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "法规" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "从容" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "远程访问" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "远程快照" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "请求超时" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "重置" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "重置校准" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "查看训练指南" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "查看 openpilot 的规则、功能与限制" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "选择" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH 密钥" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "正在扫描 Wi‑Fi 网络…" -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "选择" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "选择分支" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "选择语言" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "序列号" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "延后更新" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "软件" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "标准" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "系统无响应" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "请立即接管控制" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "温度" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "目标分支" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "网络共享密码" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "切换" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "界面调试模式" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "卸载" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "更新" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "卸载" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "未知" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "仅在车辆熄火时下载更新。" -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "立即升级" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "上传车内摄像头数据,帮助改进驾驶员监控算法。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "使用公制" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "车辆" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "查看" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "等待开始" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "欢迎使用 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "启用后,踩下加速踏板将会脱离 openpilot。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Wi‑Fi 计量网络" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "密码错误" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "您必须接受条款与条件才能使用 openpilot。" -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "您必须接受条款与条件才能使用 openpilot。继续前请阅读 https://comma.ai/terms 上的最新条款。" -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "相机启动中" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "检查中..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "默认" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "下" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "下载中..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "检查更新失败" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "正在完成更新..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "用于“{}”" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "留空以自动配置" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "左" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "计量" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "从不" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "现在" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot 纵向控制(Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot 无法使用" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilot 纵向控制可能会在未来更新中提供。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot 要求设备安装在左右 4°、上 5° 或下 9° 以内。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "右" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "不限流量" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "上" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "已是最新,最后检查:从未" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "已是最新,最后检查:{}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "有可用更新" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} 条警报" msgstr[1] "{} 条警报" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} 天前" msgstr[1] "{} 天前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} 小时前" msgstr[1] "{} 小时前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} 分钟前" msgstr[1] "{} 分钟前" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "目前已有 {} 个您的驾驶片段被纳入训练数据集。" msgstr[1] "目前已有 {} 个您的驾驶片段被纳入训练数据集。" -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ 已订阅" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehose 模式 🔥" diff --git a/selfdrive/ui/translations/app_zh-CHT.po b/selfdrive/ui/translations/app_zh-CHT.po index 1c2fd06563..93f9b9ed8e 100644 --- a/selfdrive/ui/translations/app_zh-CHT.po +++ b/selfdrive/ui/translations/app_zh-CHT.po @@ -1,1034 +1,825 @@ -# Language zh-CHT translations for PACKAGE package. -# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Automatically generated, 2025. -# msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 00:50-0700\n" -"PO-Revision-Date: 2025-10-22 16:32-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: zh-CHT\n" -"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Language: zh-CHT\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: openpilot/selfdrive/ui/layouts/settings/device.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is complete." msgstr " 轉向扭矩回應校正完成。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:150 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Steering torque response calibration is {}% complete." msgstr " 轉向扭矩回應校正已完成 {}%。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid " Your device is pointed {:.1f}° {} and {:.1f}° {}." msgstr " 您的裝置朝向 {:.1f}° {} 與 {:.1f}° {}。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:43 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "--" msgstr "--" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "1 year of drive storage" msgstr "1 年行駛資料儲存" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "24/7 LTE connectivity" msgstr "全年無休 LTE 連線" -#: openpilot/selfdrive/ui/layouts/sidebar.py:46 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "2G" msgstr "2G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:47 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "3G" msgstr "3G" -#: openpilot/selfdrive/ui/layouts/sidebar.py:49 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "5G" msgstr "5G" -#: openpilot/selfdrive/ui/layouts/settings/device.py:140 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is complete." msgstr "

轉向延遲校正完成。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "

Steering lag calibration is {}% complete." msgstr "

轉向延遲校正已完成 {}%。" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:30 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "ADD" msgstr "新增" -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "APN Setting" msgstr "APN 設定" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:109 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Acknowledge Excessive Actuation" msgstr "確認過度作動" -#: system/ui/widgets/network.py:92 -#: system/ui/widgets/network.py:74 -#, python-format +#: system/ui/widgets/network.py msgid "Advanced" msgstr "進階" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Aggressive" msgstr "積極" -#: openpilot/selfdrive/ui/layouts/onboarding.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Agree" msgstr "同意" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Always-On Driver Monitoring" msgstr "持續啟用駕駛監控" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to power off?" msgstr "確定要關機嗎?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reboot?" msgstr "確定要重新啟動嗎?" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Are you sure you want to reset calibration?" msgstr "確定要重設校正嗎?" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Are you sure you want to uninstall?" msgstr "確定要解除安裝嗎?" -#: system/ui/widgets/network.py:96 -#: openpilot/selfdrive/ui/layouts/onboarding.py:151 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py +#: system/ui/widgets/network.py msgid "Back" msgstr "返回" -#: openpilot/selfdrive/ui/widgets/prime.py:38 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Become a comma prime member at connect.comma.ai" msgstr "前往 connect.comma.ai 成為 comma prime 會員" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:119 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Bookmark connect.comma.ai to your home screen to use it like an app" msgstr "將 connect.comma.ai 加到主畫面,像 App 一樣使用" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "CHANGE" msgstr "變更" -#: openpilot/selfdrive/ui/layouts/settings/software.py:157 -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#: openpilot/selfdrive/ui/layouts/settings/software.py:117 -#: openpilot/selfdrive/ui/layouts/settings/software.py:128 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "CHECK" msgstr "檢查" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "CHILL MODE ON" msgstr "安穩模式已開啟" -#: system/ui/widgets/network.py:152 -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/network.py msgid "CONNECT" -msgstr "CONNECT" +msgstr "連線" -#: system/ui/widgets/network.py:376 -#, python-format +#: system/ui/widgets/network.py msgid "CONNECTING..." msgstr "連線中..." -#: system/ui/widgets/network.py:326 -#: system/ui/widgets/confirm_dialog.py:24 -#: system/ui/widgets/option_dialog.py:36 -#: system/ui/widgets/keyboard.py:83 -#, python-format +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/keyboard.py +#: system/ui/widgets/network.py +#: system/ui/widgets/option_dialog.py msgid "Cancel" msgstr "取消" -#: system/ui/widgets/network.py:131 -#, python-format +#: system/ui/widgets/network.py msgid "Cellular Metered" msgstr "行動網路計量" -#: openpilot/selfdrive/ui/layouts/settings/device.py:66 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Change Language" msgstr "變更語言" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Changing this setting will restart openpilot if the car is powered on." msgstr "若車輛通電,變更此設定將重新啟動 openpilot。" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:118 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Click \"add new device\" and scan the QR code on the right" msgstr "點選「新增裝置」,掃描右側 QR 碼" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:104 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Close" msgstr "關閉" -#: openpilot/selfdrive/ui/layouts/settings/software.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Current Version" msgstr "目前版本" -#: openpilot/selfdrive/ui/layouts/settings/software.py:120 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "DOWNLOAD" msgstr "下載" -#: openpilot/selfdrive/ui/layouts/onboarding.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline" msgstr "拒絕" -#: openpilot/selfdrive/ui/layouts/onboarding.py:152 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Decline, uninstall openpilot" msgstr "拒絕並解除安裝 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:64 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Developer" msgstr "開發人員" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:59 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Device" msgstr "裝置" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Disengage on Accelerator Pedal" msgstr "踩下加速踏板時脫離" -#: openpilot/selfdrive/ui/layouts/settings/device.py:176 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Power Off" msgstr "脫離以關機" -#: openpilot/selfdrive/ui/layouts/settings/device.py:164 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reboot" msgstr "脫離以重新啟動" -#: openpilot/selfdrive/ui/layouts/settings/device.py:95 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Disengage to Reset Calibration" msgstr "脫離以重設校正" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:32 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Display speed in km/h instead of mph." msgstr "以 km/h 顯示速度(非 mph)。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Dongle ID" -msgstr "Dongle ID" +msgstr "裝置 ID" -#: openpilot/selfdrive/ui/layouts/settings/software.py:57 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Download" msgstr "下載" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Driver Camera" msgstr "車內鏡頭" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:96 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Driving Personality" msgstr "駕駛風格" -#: system/ui/widgets/network.py:120 -#: system/ui/widgets/network.py:136 -#, python-format +#: system/ui/widgets/network.py msgid "EDIT" msgstr "編輯" -#: openpilot/selfdrive/ui/layouts/sidebar.py:138 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ERROR" msgstr "錯誤" -#: openpilot/selfdrive/ui/layouts/sidebar.py:45 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ETH" msgstr "ETH" -#: openpilot/selfdrive/ui/widgets/exp_mode_button.py:51 -#, python-format +#: openpilot/selfdrive/ui/widgets/exp_mode_button.py msgid "EXPERIMENTAL MODE ON" msgstr "實驗模式已開啟" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:229 -#: openpilot/selfdrive/ui/layouts/settings/developer.py:180 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable" msgstr "啟用" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:39 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable ADB" msgstr "啟用 ADB" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable Lane Departure Warnings" msgstr "啟用偏離車道警示" -#: system/ui/widgets/network.py:126 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Roaming" msgstr "啟用漫遊" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:48 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Enable SSH" msgstr "啟用 SSH" -#: system/ui/widgets/network.py:117 -#, python-format +#: system/ui/widgets/network.py msgid "Enable Tethering" msgstr "啟用網路共享" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:30 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable driver monitoring even when openpilot is not engaged." msgstr "即使未啟動 openpilot 亦啟用駕駛監控。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:46 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable openpilot" msgstr "啟用 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:190 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode." msgstr "啟用 openpilot 縱向控制(alpha)切換,以使用實驗模式。" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "Enter APN" msgstr "輸入 APN" -#: system/ui/widgets/network.py:243 -#, python-format +#: system/ui/widgets/network.py msgid "Enter SSID" msgstr "輸入 SSID" -#: system/ui/widgets/network.py:257 -#, python-format +#: system/ui/widgets/network.py msgid "Enter new tethering password" msgstr "輸入新的網路共享密碼" -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Enter password" msgstr "輸入密碼" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:89 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Enter your GitHub username" msgstr "輸入您的 GitHub 使用者名稱" -#: system/ui/widgets/list_view.py:123 -#: system/ui/widgets/list_view.py:160 -#, python-format +#: system/ui/widgets/list_view.py msgid "Error" msgstr "錯誤" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:52 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental Mode" msgstr "實驗模式" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:182 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control." msgstr "此車款目前無法使用實驗模式,因為縱向控制使用的是原廠 ACC。" -#: system/ui/widgets/network.py:380 -#, python-format +#: system/ui/widgets/network.py msgid "FORGETTING..." msgstr "正在遺忘..." -#: openpilot/selfdrive/ui/widgets/setup.py:43 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Finish Setup" msgstr "完成設定" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:63 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Firehose" -msgstr "Firehose" +msgstr "資料洪流" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:10 +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "Firehose Mode" msgstr "Firehose 模式" -#: system/ui/widgets/network.py:458 -#: system/ui/widgets/network.py:326 -#, python-format +#: system/ui/widgets/network.py msgid "Forget" msgstr "忘記" -#: system/ui/widgets/network.py:327 -#, python-format +#: system/ui/widgets/network.py msgid "Forget Wi-Fi Network \"{}\"?" msgstr "要忘記 Wi‑Fi 網路「{}」嗎?" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "GOOD" msgstr "良好" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:117 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Go to https://connect.comma.ai on your phone" msgstr "在手機上前往 https://connect.comma.ai" -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "HIGH" msgstr "高" -#: system/ui/widgets/network.py:152 -#, python-format +#: system/ui/widgets/network.py msgid "Hidden Network" msgstr "隱藏網路" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#: openpilot/selfdrive/ui/layouts/settings/software.py:146 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "INSTALL" msgstr "安裝" -#: system/ui/widgets/network.py:147 -#, python-format +#: system/ui/widgets/network.py msgid "IP Address" msgstr "IP 位址" -#: openpilot/selfdrive/ui/layouts/settings/software.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Install Update" msgstr "安裝更新" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:56 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Joystick Debug Mode" msgstr "搖桿除錯模式" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:29 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "LOADING" msgstr "載入中" -#: openpilot/selfdrive/ui/layouts/sidebar.py:48 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "LTE" msgstr "LTE" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:64 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "Longitudinal Maneuver Mode" msgstr "縱向操作模式" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:148 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "MAX" msgstr "最大" -#: openpilot/selfdrive/ui/widgets/setup.py:74 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Maximize your training data uploads to improve openpilot's driving models." msgstr "最大化上傳訓練資料,以改進 openpilot 的駕駛模型。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:57 -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "N/A" msgstr "無" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "NO" msgstr "否" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:60 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Network" msgstr "網路" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:115 -#, python-format -msgid "No SSH keys found" -msgstr "找不到 SSH 金鑰" - -#: openpilot/selfdrive/ui/widgets/ssh_key.py:127 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "No SSH keys found for user '{}'" msgstr "找不到使用者 '{}' 的 SSH 金鑰" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:321 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "No release notes available." msgstr "無可用發行說明。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:73 -#: openpilot/selfdrive/ui/layouts/sidebar.py:134 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "OFFLINE" msgstr "離線" -#: system/ui/widgets/confirm_dialog.py:93 -#: system/ui/widgets/html_render.py:263 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/sidebar.py +#: system/ui/widgets/confirm_dialog.py +#: system/ui/widgets/html_render.py msgid "OK" msgstr "確定" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 -#: openpilot/selfdrive/ui/layouts/sidebar.py:136 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "ONLINE" msgstr "線上" -#: openpilot/selfdrive/ui/widgets/setup.py:19 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Open" msgstr "開啟" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PAIR" msgstr "配對" -#: openpilot/selfdrive/ui/layouts/sidebar.py:142 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "PANDA" msgstr "PANDA" -#: openpilot/selfdrive/ui/layouts/settings/device.py:60 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "PREVIEW" msgstr "預覽" -#: openpilot/selfdrive/ui/widgets/prime.py:44 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "PRIME FEATURES:" msgstr "PRIME 功能:" -#: openpilot/selfdrive/ui/layouts/settings/device.py:45 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Pair Device" msgstr "配對裝置" -#: openpilot/selfdrive/ui/widgets/setup.py:18 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair device" msgstr "配對裝置" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:92 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "Pair your device to your comma account" msgstr "將裝置配對至您的 comma 帳號" -#: openpilot/selfdrive/ui/widgets/setup.py:47 -#: openpilot/selfdrive/ui/layouts/settings/device.py:23 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer." msgstr "將裝置與 comma connect(connect.comma.ai)配對,領取您的 comma prime 優惠。" -#: openpilot/selfdrive/ui/widgets/setup.py:91 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "Please connect to Wi-Fi to complete initial pairing" msgstr "請連線至 Wi‑Fi 以完成初始化配對" -#: openpilot/selfdrive/ui/layouts/settings/device.py:183 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Power Off" msgstr "關機" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered Wi-Fi connection" msgstr "在計量制 Wi‑Fi 連線時避免大量上傳" -#: system/ui/widgets/network.py:132 -#, python-format +#: system/ui/widgets/network.py msgid "Prevent large data uploads when on a metered cellular connection" msgstr "在計量制行動網路時避免大量上傳" -#: openpilot/selfdrive/ui/layouts/settings/device.py:24 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off)" msgstr "預覽車內鏡頭以確保駕駛監控視野良好。(車輛須熄火)" -#: openpilot/selfdrive/ui/widgets/pairing_dialog.py:150 -#, python-format +#: openpilot/selfdrive/ui/widgets/pairing_dialog.py msgid "QR Code Error" msgstr "QR 碼錯誤" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:31 +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "REMOVE" msgstr "移除" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "RESET" msgstr "重設" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "REVIEW" msgstr "檢視" -#: openpilot/selfdrive/ui/layouts/settings/device.py:171 -#: openpilot/selfdrive/ui/layouts/settings/device.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reboot" msgstr "重新啟動" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:66 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Reboot Device" msgstr "重新啟動裝置" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:112 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Reboot and Update" msgstr "重新啟動並更新" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:76 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Driver Camera" msgstr "錄製並上傳車內鏡頭" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:82 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and Upload Microphone Audio" msgstr "錄製並上傳麥克風音訊" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:33 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect." msgstr "行車時錄製並儲存麥克風音訊。音訊將包含在 comma connect 的行車紀錄影片中。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Regulatory" msgstr "法規" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Relaxed" msgstr "從容" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote access" msgstr "遠端存取" -#: openpilot/selfdrive/ui/widgets/prime.py:47 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Remote snapshots" msgstr "遠端擷圖" -#: openpilot/selfdrive/ui/widgets/ssh_key.py:124 -#, python-format +#: openpilot/selfdrive/ui/widgets/ssh_key.py msgid "Request timed out" msgstr "要求逾時" -#: openpilot/selfdrive/ui/layouts/settings/device.py:111 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset" msgstr "重設" -#: openpilot/selfdrive/ui/layouts/settings/device.py:49 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Reset Calibration" msgstr "重設校正" -#: openpilot/selfdrive/ui/layouts/settings/device.py:63 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review Training Guide" msgstr "檢視訓練指南" -#: openpilot/selfdrive/ui/layouts/settings/device.py:26 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Review the rules, features, and limitations of openpilot" msgstr "檢視 openpilot 的規則、功能與限制" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "SELECT" msgstr "選取" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:53 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "SSH Keys" msgstr "SSH 金鑰" -#: system/ui/widgets/network.py:316 -#, python-format +#: system/ui/widgets/network.py msgid "Scanning Wi-Fi networks..." msgstr "正在掃描 Wi‑Fi 網路…" -#: system/ui/widgets/option_dialog.py:37 -#, python-format +#: system/ui/widgets/option_dialog.py msgid "Select" msgstr "選取" -#: openpilot/selfdrive/ui/layouts/settings/software.py:203 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Select a branch" msgstr "選取分支" -#: openpilot/selfdrive/ui/layouts/settings/device.py:89 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Select a language" msgstr "選取語言" -#: openpilot/selfdrive/ui/layouts/settings/device.py:58 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "Serial" msgstr "序號" -#: openpilot/selfdrive/ui/widgets/offroad_alerts.py:106 -#, python-format +#: openpilot/selfdrive/ui/widgets/offroad_alerts.py msgid "Snooze Update" msgstr "延後更新" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:62 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Software" msgstr "軟體" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:98 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Standard" msgstr "標準" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:59 -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:65 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "System Unresponsive" msgstr "系統無回應" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:58 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "TAKE CONTROL IMMEDIATELY" msgstr "請立刻接手控制" -#: openpilot/selfdrive/ui/layouts/sidebar.py:71 -#: openpilot/selfdrive/ui/layouts/sidebar.py:125 -#: openpilot/selfdrive/ui/layouts/sidebar.py:127 -#: openpilot/selfdrive/ui/layouts/sidebar.py:129 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "TEMP" msgstr "溫度" -#: openpilot/selfdrive/ui/layouts/settings/software.py:68 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Target Branch" msgstr "目標分支" -#: system/ui/widgets/network.py:121 -#, python-format +#: system/ui/widgets/network.py msgid "Tethering Password" msgstr "網路共享密碼" -#: openpilot/selfdrive/ui/layouts/settings/settings.py:61 +#: openpilot/selfdrive/ui/layouts/settings/settings.py msgid "Toggles" msgstr "切換" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "UI Debug Mode" -msgstr "" +msgstr "介面除錯模式" -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "UNINSTALL" msgstr "解除安裝" -#: openpilot/selfdrive/ui/layouts/home.py:155 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "UPDATE" msgstr "更新" -#: openpilot/selfdrive/ui/layouts/settings/software.py:173 -#: openpilot/selfdrive/ui/layouts/settings/software.py:79 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Uninstall" msgstr "解除安裝" -#: openpilot/selfdrive/ui/layouts/sidebar.py:117 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Unknown" msgstr "未知" -#: openpilot/selfdrive/ui/layouts/settings/software.py:55 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "Updates are only downloaded while the car is off." msgstr "僅在車輛熄火時下載更新。" -#: openpilot/selfdrive/ui/widgets/prime.py:33 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "Upgrade Now" msgstr "立即升級" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:31 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Upload data from the driver facing camera and help improve the driver monitoring algorithm." msgstr "上傳車內鏡頭資料,協助改善駕駛監控演算法。" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:88 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "Use Metric System" msgstr "使用公制" -#: openpilot/selfdrive/ui/layouts/sidebar.py:72 -#: openpilot/selfdrive/ui/layouts/sidebar.py:144 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "VEHICLE" msgstr "車輛" -#: openpilot/selfdrive/ui/layouts/settings/device.py:65 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "VIEW" msgstr "檢視" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:52 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "Waiting to start" msgstr "等待開始" -#: openpilot/selfdrive/ui/layouts/onboarding.py:115 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "Welcome to openpilot" msgstr "歡迎使用 openpilot" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:20 +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "When enabled, pressing the accelerator pedal will disengage openpilot." msgstr "啟用後,踩下加速踏板將會脫離 openpilot。" -#: openpilot/selfdrive/ui/layouts/sidebar.py:44 +#: openpilot/selfdrive/ui/layouts/sidebar.py msgid "Wi-Fi" msgstr "Wi‑Fi" -#: system/ui/widgets/network.py:141 -#, python-format +#: system/ui/widgets/network.py msgid "Wi-Fi Network Metered" msgstr "Wi‑Fi 計量網路" -#: system/ui/widgets/network.py:320 -#, python-format +#: system/ui/widgets/network.py msgid "Wrong password" msgstr "密碼錯誤" -#: openpilot/selfdrive/ui/layouts/onboarding.py:149 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions in order to use openpilot." msgstr "您必須接受條款與細則才能使用 openpilot。" -#: openpilot/selfdrive/ui/layouts/onboarding.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/onboarding.py msgid "You must accept the Terms and Conditions to use openpilot. Read the latest terms at https://comma.ai/terms before continuing." msgstr "您必須接受條款與細則才能使用 openpilot。繼續前請閱讀 https://comma.ai/terms 上的最新條款。" -#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py:38 -#, python-format +#: openpilot/selfdrive/ui/onroad/driver_camera_dialog.py msgid "camera starting" msgstr "相機啟動中" -#: openpilot/selfdrive/ui/layouts/settings/software.py:19 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "checking..." -msgstr "" +msgstr "檢查中..." -#: openpilot/selfdrive/ui/widgets/prime.py:63 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "comma prime" msgstr "comma prime" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "default" msgstr "預設" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "down" msgstr "下" -#: openpilot/selfdrive/ui/layouts/settings/software.py:20 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "downloading..." -msgstr "" +msgstr "下載中..." -#: openpilot/selfdrive/ui/layouts/settings/software.py:116 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "failed to check for update" msgstr "檢查更新失敗" -#: openpilot/selfdrive/ui/layouts/settings/software.py:21 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "finalizing update..." -msgstr "" +msgstr "正在完成更新..." -#: system/ui/widgets/network.py:238 -#: system/ui/widgets/network.py:321 -#, python-format +#: system/ui/widgets/network.py msgid "for \"{}\"" msgstr "適用於「{}」" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "km/h" msgstr "km/h" -#: system/ui/widgets/network.py:201 -#, python-format +#: system/ui/widgets/network.py msgid "leave blank for automatic configuration" msgstr "留空以自動設定" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "left" msgstr "左" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "metered" msgstr "計量" -#: openpilot/selfdrive/ui/onroad/hud_renderer.py:177 -#, python-format +#: openpilot/selfdrive/ui/onroad/hud_renderer.py msgid "mph" msgstr "mph" -#: openpilot/selfdrive/ui/layouts/settings/software.py:27 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "never" msgstr "從不" -#: openpilot/selfdrive/ui/layouts/settings/software.py:38 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "now" msgstr "現在" -#: openpilot/selfdrive/ui/layouts/settings/developer.py:71 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/developer.py msgid "openpilot Longitudinal Control (Alpha)" msgstr "openpilot 縱向控制(Alpha)" -#: openpilot/selfdrive/ui/onroad/alert_renderer.py:51 -#, python-format +#: openpilot/selfdrive/ui/onroad/alert_renderer.py msgid "openpilot Unavailable" msgstr "openpilot 無法使用" -#: openpilot/selfdrive/ui/layouts/settings/toggles.py:184 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/toggles.py msgid "openpilot longitudinal control may come in a future update." msgstr "openpilot 縱向控制可能於未來更新提供。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:25 +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "openpilot requires the device to be mounted within 4° left or right and within 5° up or 9° down." msgstr "openpilot 要求裝置安裝在左右 4°、上 5° 或下 9° 以內。" -#: openpilot/selfdrive/ui/layouts/settings/device.py:126 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "right" msgstr "右" -#: system/ui/widgets/network.py:139 -#, python-format +#: system/ui/widgets/network.py msgid "unmetered" msgstr "不限流量" -#: openpilot/selfdrive/ui/layouts/settings/device.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/device.py msgid "up" msgstr "上" -#: openpilot/selfdrive/ui/layouts/settings/software.py:127 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked never" msgstr "已為最新,最後檢查:從未" -#: openpilot/selfdrive/ui/layouts/settings/software.py:125 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "up to date, last checked {}" msgstr "已為最新,最後檢查:{}" -#: openpilot/selfdrive/ui/layouts/settings/software.py:119 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "update available" msgstr "有可用更新" -#: openpilot/selfdrive/ui/layouts/home.py:169 -#, python-format +#: openpilot/selfdrive/ui/layouts/home.py msgid "{} ALERT" msgid_plural "{} ALERTS" msgstr[0] "{} 則警示" msgstr[1] "{} 則警示" -#: openpilot/selfdrive/ui/layouts/settings/software.py:47 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} day ago" msgid_plural "{} days ago" msgstr[0] "{} 天前" msgstr[1] "{} 天前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:44 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} hour ago" msgid_plural "{} hours ago" msgstr[0] "{} 小時前" msgstr[1] "{} 小時前" -#: openpilot/selfdrive/ui/layouts/settings/software.py:41 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/software.py msgid "{} minute ago" msgid_plural "{} minutes ago" msgstr[0] "{} 分鐘前" msgstr[1] "{} 分鐘前" -#: openpilot/selfdrive/ui/layouts/settings/firehose.py:70 -#, python-format +#: openpilot/selfdrive/ui/layouts/settings/firehose.py msgid "{} segment of your driving is in the training dataset so far." msgid_plural "{} segments of your driving is in the training dataset so far." msgstr[0] "目前已有 {} 個您的駕駛片段納入訓練資料集。" msgstr[1] "目前已有 {} 個您的駕駛片段納入訓練資料集。" -#: openpilot/selfdrive/ui/widgets/prime.py:62 -#, python-format +#: openpilot/selfdrive/ui/widgets/prime.py msgid "✓ SUBSCRIBED" msgstr "✓ 已訂閱" -#: openpilot/selfdrive/ui/widgets/setup.py:21 -#, python-format +#: openpilot/selfdrive/ui/widgets/setup.py msgid "🔥 Firehose Mode 🔥" msgstr "🔥 Firehose 模式 🔥" diff --git a/selfdrive/ui/translations/auto_translate.py b/selfdrive/ui/translations/auto_translate.py deleted file mode 100755 index 9354790f94..0000000000 --- a/selfdrive/ui/translations/auto_translate.py +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import json -import os -import pathlib -import xml.etree.ElementTree as ET -from typing import cast - -import requests - -TRANSLATIONS_DIR = pathlib.Path(__file__).resolve().parent -TRANSLATIONS_LANGUAGES = TRANSLATIONS_DIR / "languages.json" - -OPENAI_MODEL = "gpt-4" -OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY") -OPENAI_PROMPT = "You are a professional translator from English to {language} (ISO 639 language code). " + \ - "The following sentence or word is in the GUI of a software called openpilot, translate it accordingly." - - -def get_language_files(languages: list[str] | None = None) -> dict[str, pathlib.Path]: - files = {} - - with open(TRANSLATIONS_LANGUAGES) as fp: - language_dict = json.load(fp) - - for filename in language_dict.values(): - path = TRANSLATIONS_DIR / f"{filename}.ts" - language = path.stem - - if languages is None or language in languages: - files[language] = path - - return files - - -def translate_phrase(text: str, language: str) -> str: - response = requests.post( - "https://api.openai.com/v1/chat/completions", - json={ - "model": OPENAI_MODEL, - "messages": [ - { - "role": "system", - "content": OPENAI_PROMPT.format(language=language), - }, - { - "role": "user", - "content": text, - }, - ], - "temperature": 0.8, - "max_tokens": 1024, - "top_p": 1, - }, - headers={ - "Authorization": f"Bearer {OPENAI_API_KEY}", - "Content-Type": "application/json", - }, - ) - - if 400 <= response.status_code < 600: - raise requests.HTTPError(f'Error {response.status_code}: {response.json()}', response=response) - - data = response.json() - - return cast(str, data["choices"][0]["message"]["content"]) - - -def translate_file(path: pathlib.Path, language: str, all_: bool) -> None: - tree = ET.parse(path) - - root = tree.getroot() - - for context in root.findall("./context"): - name = context.find("name") - if name is None: - raise ValueError("name not found") - - print(f"Context: {name.text}") - - for message in context.findall("./message"): - source = message.find("source") - translation = message.find("translation") - - if source is None or translation is None: - raise ValueError("source or translation not found") - - if not all_ and translation.attrib.get("type") != "unfinished": - continue - - llm_translation = translate_phrase(cast(str, source.text), language) - - print(f"Source: {source.text}\n" + - f"Current translation: {translation.text}\n" + - f"LLM translation: {llm_translation}") - - translation.text = llm_translation - - with path.open("w", encoding="utf-8") as fp: - fp.write('\n' + - '\n' + - ET.tostring(root, encoding="utf-8").decode()) - - -def main(): - arg_parser = argparse.ArgumentParser("Auto translate") - - group = arg_parser.add_mutually_exclusive_group(required=True) - group.add_argument("-a", "--all-files", action="store_true", help="Translate all files") - group.add_argument("-f", "--file", nargs="+", help="Translate the selected files. (Example: -f fr de)") - - arg_parser.add_argument("-t", "--all-translations", action="store_true", default=False, help="Translate all sections. (Default: only unfinished)") - - args = arg_parser.parse_args() - - if OPENAI_API_KEY is None: - print("OpenAI API key is missing. (Hint: use `export OPENAI_API_KEY=YOUR-KEY` before you run the script).\n" + - "If you don't have one go to: https://beta.openai.com/account/api-keys.") - exit(1) - - files = get_language_files(None if args.all_files else args.file) - - if args.file: - missing_files = set(args.file) - set(files) - if len(missing_files): - print(f"No language files found: {missing_files}") - exit(1) - - print(f"Translation mode: {'all' if args.all_translations else 'only unfinished'}. Files: {list(files)}") - - for lang, path in files.items(): - print(f"Translate {lang} ({path})") - translate_file(path, lang, args.all_translations) - - -if __name__ == "__main__": - main() diff --git a/selfdrive/ui/translations/auto_translate.sh b/selfdrive/ui/translations/auto_translate.sh new file mode 100755 index 0000000000..03a207ca3c --- /dev/null +++ b/selfdrive/ui/translations/auto_translate.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail + +DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd)" +ROOT="$DIR/../../../" + +cd $DIR +./update_translations.py + +command -v codex >/dev/null || { + echo "Install codex CLI to continue:" + echo "-> https://developers.openai.com/codex/cli" + echo + exit 1 +} + +codex exec --cd "$ROOT" -c 'model_reasoning_effort="low"' --dangerously-bypass-approvals-and-sandbox "$(cat < 2: - has_content = True - break - # End of entry - if stripped.startswith(('msgid', '#')) or not stripped: - break - - if not has_content: - unfinished_translations += 1 - - return (total_translations, unfinished_translations) - -if __name__ == "__main__": - with open(LANGUAGES_FILE) as f: - translation_files = json.load(f) - - badge_svg = [] - max_badge_width = 0 # keep track of max width to set parent element - for idx, (name, file) in enumerate(translation_files.items()): - po_file_path = os.path.join(str(TRANSLATIONS_DIR), f"app_{file}.po") - - total_translations, unfinished_translations = parse_po_file(po_file_path) - - percent_finished = int(100 - (unfinished_translations / total_translations * 100.)) if total_translations > 0 else 0 - color = f"rgb{(94, 188, 0) if percent_finished == 100 else (248, 255, 50) if percent_finished > 90 else (204, 55, 27)}" - - # Download badge - badge_label = f"LANGUAGE {name}" - badge_message = f"{percent_finished}% complete" - if unfinished_translations != 0: - badge_message += f" ({unfinished_translations} unfinished)" - - r = requests.get(f"{SHIELDS_URL}/{badge_label}-{badge_message}-{color}", timeout=10) - assert r.status_code == 200, "Error downloading badge" - content_svg = r.content.decode("utf-8") - - xml = ET.fromstring(content_svg) - assert "width" in xml.attrib - max_badge_width = max(max_badge_width, int(xml.attrib["width"])) - - # Make tag ids in each badge unique to combine them into one svg - for tag in ("r", "s"): - content_svg = content_svg.replace(f'id="{tag}"', f'id="{tag}{idx}"') - content_svg = content_svg.replace(f'"url(#{tag})"', f'"url(#{tag}{idx})"') - - badge_svg.extend([f'', content_svg, ""]) - - badge_svg.insert(0, '') - badge_svg.append("") - - with open(os.path.join(BASEDIR, "translation_badge.svg"), "w") as badge_f: - badge_f.write("\n".join(badge_svg)) diff --git a/selfdrive/ui/translations/potools.py b/selfdrive/ui/translations/potools.py index 7571cccdd6..ac4dafb988 100644 --- a/selfdrive/ui/translations/potools.py +++ b/selfdrive/ui/translations/potools.py @@ -8,7 +8,6 @@ import ast import os import re from dataclasses import dataclass, field -from datetime import UTC, datetime from pathlib import Path @@ -165,18 +164,18 @@ def write_po(path: str | Path, header: POEntry | None, entries: list[POEntry]) - if header: for c in header.comments: f.write(c + '\n') - if header.flags: - f.write('#, ' + ', '.join(header.flags) + '\n') f.write(f'msgid {_quote("")}\n') f.write(f'msgstr {_quote(header.msgstr)}\n\n') for entry in entries: for c in entry.comments: f.write(c + '\n') - for ref in entry.source_refs: + # Keep file-level context for translators, but drop line numbers to + # avoid churning PO diffs on unrelated code edits. + source_files = sorted({ref.rsplit(':', 1)[0] for ref in entry.source_refs}) + for ref in source_files: f.write(f'#: {ref}\n') - if entry.flags: - f.write('#, ' + ', '.join(entry.flags) + '\n') + # Runtime loading ignores gettext flags; omit them to reduce noise. f.write(f'msgid {_quote(entry.msgid)}\n') if entry.is_plural: f.write(f'msgid_plural {_quote(entry.msgid_plural)}\n') @@ -256,31 +255,24 @@ def extract_strings(files: list[str], basedir: str) -> list[POEntry]: # ──── POT generation ──── +def _build_pot_header() -> POEntry: + return POEntry( + msgstr='Content-Type: text/plain; charset=UTF-8\n', + ) + + +def _build_po_header(language: str) -> POEntry: + plural_forms = PLURAL_FORMS.get(language, 'nplurals=2; plural=(n != 1);') + return POEntry( + msgstr='Content-Type: text/plain; charset=UTF-8\n' + + f'Language: {language}\n' + + f'Plural-Forms: {plural_forms}\n', + ) + + def generate_pot(entries: list[POEntry], pot_path: str | Path) -> None: """Generate a .pot template file from extracted entries.""" - now = datetime.now(UTC).strftime('%Y-%m-%d %H:%M%z') - header = POEntry( - comments=[ - '# SOME DESCRIPTIVE TITLE.', - "# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER", - '# This file is distributed under the same license as the PACKAGE package.', - '# FIRST AUTHOR , YEAR.', - '#', - ], - flags=['fuzzy'], - msgstr='Project-Id-Version: PACKAGE VERSION\n' + - 'Report-Msgid-Bugs-To: \n' + - f'POT-Creation-Date: {now}\n' + - 'PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n' + - 'Last-Translator: FULL NAME \n' + - 'Language-Team: LANGUAGE \n' + - 'Language: \n' + - 'MIME-Version: 1.0\n' + - 'Content-Type: text/plain; charset=UTF-8\n' + - 'Content-Transfer-Encoding: 8bit\n' + - 'Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n', - ) - write_po(pot_path, header, entries) + write_po(pot_path, _build_pot_header(), entries) # ──── PO init (replaces msginit) ──── @@ -305,43 +297,22 @@ def init_po(pot_path: str | Path, po_path: str | Path, language: str) -> None: """Create a new .po file from a .pot template (replaces msginit).""" _, entries = parse_po(pot_path) plural_forms = PLURAL_FORMS.get(language, 'nplurals=2; plural=(n != 1);') - now = datetime.now(UTC).strftime('%Y-%m-%d %H:%M%z') - - header = POEntry( - comments=[ - f'# {language} translations for PACKAGE package.', - "# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER", - '# This file is distributed under the same license as the PACKAGE package.', - '# Automatically generated.', - '#', - ], - msgstr='Project-Id-Version: PACKAGE VERSION\n' + - 'Report-Msgid-Bugs-To: \n' + - f'POT-Creation-Date: {now}\n' + - f'PO-Revision-Date: {now}\n' + - 'Last-Translator: Automatically generated\n' + - 'Language-Team: none\n' + - f'Language: {language}\n' + - 'MIME-Version: 1.0\n' + - 'Content-Type: text/plain; charset=UTF-8\n' + - 'Content-Transfer-Encoding: 8bit\n' + - f'Plural-Forms: {plural_forms}\n', - ) nplurals = int(re.search(r'nplurals=(\d+)', plural_forms).group(1)) for e in entries: if e.is_plural: e.msgstr_plural = dict.fromkeys(range(nplurals), '') - write_po(po_path, header, entries) + write_po(po_path, _build_po_header(language), entries) # ──── PO merge (replaces msgmerge) ──── def merge_po(po_path: str | Path, pot_path: str | Path) -> None: """Update a .po file with entries from a .pot template (replaces msgmerge --update).""" - po_header, po_entries = parse_po(po_path) + _, po_entries = parse_po(po_path) _, pot_entries = parse_po(pot_path) + language = Path(po_path).stem.removeprefix("app_") existing = {e.msgid: e for e in po_entries} merged = [] @@ -359,4 +330,4 @@ def merge_po(po_path: str | Path, pot_path: str | Path) -> None: merged.append(pot_e) merged.sort(key=lambda e: e.msgid) - write_po(po_path, po_header, merged) + write_po(po_path, _build_po_header(language), merged) diff --git a/selfdrive/ui/update_translations.py b/selfdrive/ui/translations/update_translations.py similarity index 100% rename from selfdrive/ui/update_translations.py rename to selfdrive/ui/translations/update_translations.py From f4b8384332bd98f4bc8a445017ab938db83d4d04 Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Mon, 23 Mar 2026 09:41:52 -0700 Subject: [PATCH 18/33] Process replay: add diff report (#37048) * rm upload * use ci-artifacts * sanitize * rm ref_commit * add ci * handle exept * bootstrap * always * fix * replay * keep ref_commit fork compatibility * remove upload-only * apply comments * safe diffs in master * Revert "safe diffs in master" This reverts commit 369fccac786a67799193e9152488813c6df20414. * continue on master diff * imports * copy formatting from car_diff * main * setup refs and cur * copy diff * copy formatting * comment * rm token * rm hash * continue on master diff * use ci-artifacts refs * add run card diff * checkout * shebang * card_diff.yml * rm ci-artifacts * apply ci-artifacts * call differ * rename * uv lock * tests * readme * checkout * add all configs * import base_url * rename yaml * integrate in test_processes * fix diff report * var names * extract to module * print report * add msg count to diff * traceback * diff format * typing * name step * allow NaN * replace join --- .github/workflows/diff_report.yaml | 45 +++++++++ .github/workflows/tests.yaml | 10 ++ selfdrive/test/process_replay/diff_report.py | 92 +++++++++++++++++++ .../test/process_replay/test_processes.py | 24 +++-- 4 files changed, 165 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/diff_report.yaml create mode 100644 selfdrive/test/process_replay/diff_report.py diff --git a/.github/workflows/diff_report.yaml b/.github/workflows/diff_report.yaml new file mode 100644 index 0000000000..2ddb850944 --- /dev/null +++ b/.github/workflows/diff_report.yaml @@ -0,0 +1,45 @@ +name: diff report + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +jobs: + comment: + name: comment + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + pull-requests: write + actions: read + steps: + - name: Wait for process replay + id: wait + continue-on-error: true + uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.event.pull_request.head.sha }} + check-name: process replay + repo-token: ${{ secrets.GITHUB_TOKEN }} + allowed-conclusions: success,failure + wait-interval: 20 + - name: Download diff + if: steps.wait.outcome == 'success' + uses: dawidd6/action-download-artifact@v6 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: tests.yaml + workflow_conclusion: '' + pr: ${{ github.event.number }} + name: diff_report_${{ github.event.number }} + path: . + allow_forks: true + - name: Comment on PR + if: steps.wait.outcome == 'success' + uses: thollander/actions-comment-pull-request@v2 + with: + filePath: diff_report.txt + comment_tag: diff_report + pr_number: ${{ github.event.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f4be0ad5a6..91a8e5c324 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -139,12 +139,22 @@ jobs: id: print-diff if: always() run: cat selfdrive/test/process_replay/diff.txt + - name: Print diff report + if: always() + run: cat selfdrive/test/process_replay/diff_report.txt - uses: actions/upload-artifact@v6 if: always() continue-on-error: true with: name: process_replay_diff.txt path: selfdrive/test/process_replay/diff.txt + - name: Upload diff report + uses: actions/upload-artifact@v6 + if: always() && github.event_name == 'pull_request' + continue-on-error: true + with: + name: diff_report_${{ github.event.number }} + path: selfdrive/test/process_replay/diff_report.txt - name: Checkout ci-artifacts if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master' uses: actions/checkout@v4 diff --git a/selfdrive/test/process_replay/diff_report.py b/selfdrive/test/process_replay/diff_report.py new file mode 100644 index 0000000000..32f058f8ee --- /dev/null +++ b/selfdrive/test/process_replay/diff_report.py @@ -0,0 +1,92 @@ +import os +from collections import defaultdict + +from opendbc.car.tests.car_diff import format_diff, format_numeric_diffs +from openpilot.selfdrive.test.process_replay.compare_logs import compare_logs +from openpilot.selfdrive.test.process_replay.process_replay import PROC_REPLAY_DIR + + +class MsgWrap: + """Adapter so to_dict() includes defaults""" + def __init__(self, msg): + self._msg = msg + def to_dict(self) -> dict: + return self._msg.to_dict(verbose=True) + + +def diff_process(cfg, ref_msgs, new_msgs) -> tuple | None: + ref = defaultdict(list) + new = defaultdict(list) + for m in ref_msgs: + if m.which() in cfg.subs: + ref[m.which()].append(m) + for m in new_msgs: + if m.which() in cfg.subs: + new[m.which()].append(m) + + diffs = [] + for sub in cfg.subs: + if len(ref[sub]) != len(new[sub]): + diffs.append((f"{sub} (message count)", 0, (len(ref[sub]), len(new[sub])), 0)) + for i, (r, n) in enumerate(zip(ref[sub], new[sub], strict=False)): + for d in compare_logs([r], [n], cfg.ignore, tolerance=cfg.tolerance): + if d[0] == "change": + a, b = d[2] + if a != a and b != b: + continue + diffs.append((d[1], i, d[2], r.logMonoTime)) + elif d[0] in ("add", "remove"): + for item in d[2]: + if item[1] != item[1]: + continue + diffs.append((f"{d[1]}.{item[0]}", i, (d[0], item[1]), r.logMonoTime)) + return (diffs, ref, new) if diffs else None + + +def diff_format(diffs, ref, new, field) -> list[str]: + if any(part.isdigit() for part in field.split(".")): + return format_numeric_diffs(diffs) + msg_type = field.split(".")[0] + ref_ts = [(m.logMonoTime, MsgWrap(m)) for m in ref.get(msg_type, [])] + new_wrapped = [MsgWrap(m) for m in new.get(msg_type, [])] + return format_diff(diffs, ref_ts, new_wrapped, field) + + +def diff_report(replay_diffs, segments) -> None: + seg_to_plat = {seg: plat for plat, seg in segments} + + with_diffs, errors, n_passed = [], [], 0 + for seg, proc, data in replay_diffs: + plat = seg_to_plat.get(seg, "UNKNOWN") + if data is None: + n_passed += 1 + elif isinstance(data, str): + errors.append((plat, seg, proc, data)) + else: + with_diffs.append((plat, seg, proc, data)) + + icon = "⚠️" if with_diffs else "✅" + lines = [ + "## Process replay diff report", + "Replays driving segments through this PR and compares the behavior to master.", + "Please review any changes carefully to ensure they are expected.\n", + f"{icon} {len(with_diffs)} changed, {n_passed} passed, {len(errors)} errors", + ] + + for plat, seg, proc, err in errors: + lines.append(f"\nERROR {plat} - {seg} [{proc}]: {err}") + + if with_diffs: + lines.append("
Show changes\n\n```") + for plat, seg, proc, (diffs, ref, new) in with_diffs: + lines.append(f"\n{plat} - {seg} [{proc}]") + by_field = defaultdict(list) + for d in diffs: + by_field[d[0]].append(d) + for field, fd in sorted(by_field.items()): + lines.append(f"\n {field} ({len(fd)} diffs)") + lines.extend(diff_format(fd, ref, new, field)) + lines.append("```\n
") + + with open(os.path.join(PROC_REPLAY_DIR, "diff_report.txt"), "w") as f: + f.write("\n".join(lines)) diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index fbe300a7c9..bc0085534c 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -3,6 +3,7 @@ import argparse import concurrent.futures import os import sys +import traceback from collections import defaultdict from tqdm import tqdm from typing import Any @@ -11,6 +12,7 @@ from opendbc.car.car_helpers import interface_names from openpilot.common.git import get_commit from openpilot.tools.lib.openpilotci import get_url from openpilot.selfdrive.test.process_replay.compare_logs import compare_logs, format_diff +from openpilot.selfdrive.test.process_replay.diff_report import diff_process, diff_report from openpilot.selfdrive.test.process_replay.process_replay import CONFIGS, PROC_REPLAY_DIR, FAKEDATA, replay_process, \ check_most_messages_valid from openpilot.tools.lib.filereader import FileReader @@ -72,11 +74,16 @@ EXCLUDED_PROCS = {"modeld", "dmonitoringmodeld"} def run_test_process(data): segment, cfg, args, cur_log_fn, ref_log_path, lr_dat = data + ref_log_msgs = list(LogReader(ref_log_path)) lr = LogReader.from_bytes(lr_dat) - res, log_msgs = test_process(cfg, lr, segment, ref_log_path, cur_log_fn, args.ignore_fields, args.ignore_msgs) + res, log_msgs = test_process(cfg, lr, segment, ref_log_msgs, cur_log_fn, args.ignore_fields, args.ignore_msgs) # save logs so we can update refs save_log(cur_log_fn, log_msgs) - return (segment, cfg.proc_name, res) + try: + diff_data = diff_process(cfg, ref_log_msgs, log_msgs) + except Exception: + diff_data = traceback.format_exc() + return (segment, cfg.proc_name, res, diff_data) def get_log_data(segment): @@ -85,14 +92,12 @@ def get_log_data(segment): return (segment, f.read()) -def test_process(cfg, lr, segment, ref_log_path, new_log_path, ignore_fields=None, ignore_msgs=None): +def test_process(cfg, lr, segment, ref_log_msgs, new_log_path, ignore_fields=None, ignore_msgs=None): if ignore_fields is None: ignore_fields = [] if ignore_msgs is None: ignore_msgs = [] - ref_log_msgs = list(LogReader(ref_log_path)) - try: log_msgs = replay_process(cfg, lr, disable_progress=True) except Exception as e: @@ -201,9 +206,11 @@ if __name__ == "__main__": log_paths[segment][cfg.proc_name]['new'] = cur_log_fn results: Any = defaultdict(dict) + diffs: list = [] p2 = pool.map(run_test_process, pool_args) - for (segment, proc, result) in tqdm(p2, desc="Running Tests", total=len(pool_args)): + for (segment, proc, result, diff_data) in tqdm(p2, desc="Running Tests", total=len(pool_args)): results[segment][proc] = result + diffs.append((segment, proc, diff_data)) diff_short, diff_long, failed = format_diff(results, log_paths, ref_commit) if not args.update_refs: @@ -211,6 +218,11 @@ if __name__ == "__main__": f.write(diff_long) print(diff_short) + try: + diff_report(diffs, segments) + except Exception: + print(f"failed to generate diff report:\n{traceback.format_exc()}") + if failed: print("TEST FAILED") else: From d75b8f45406fb6d962a66493c20d6d1051aae885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Mon, 23 Mar 2026 13:25:31 -0700 Subject: [PATCH 19/33] process_replay: fix logMonoTime simulation (#37708) * Fix logMonoTime * Fix last drain * Remove import * Bring it back --- selfdrive/test/process_replay/process_replay.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index 5e9b2e742c..a74dfcbb43 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -145,6 +145,7 @@ class ProcessContainer: self.cfg = copy.deepcopy(cfg) self.process = copy.deepcopy(managed_processes[cfg.proc_name]) self.msg_queue: list[capnp._DynamicStructReader] = [] + self.last_input_log_mono_time: int = -1 self.cnt = 0 self.pm: messaging.PubMaster | None = None self.sockets: list[messaging.SubSocket] | None = None @@ -267,6 +268,7 @@ class ProcessContainer: ms = messaging.drain_sock(socket) for m in ms: m = m.as_builder() + assert start_time > 0, "start_time must be positive" m.logMonoTime = start_time + int(self.cfg.processing_time * 1e9) output_msgs.append(m.as_reader()) return output_msgs @@ -293,10 +295,11 @@ class ProcessContainer: trigger_empty_recv = any(m.which() == self.cfg.main_pub for m in self.msg_queue) # get output msgs from previous inputs - output_msgs = self.get_output_msgs(msg.logMonoTime) + output_msgs = self.get_output_msgs(self.last_input_log_mono_time) for m in self.msg_queue: self.pm.send(m.which(), m.as_builder()) + self.last_input_log_mono_time = max(self.last_input_log_mono_time, m.logMonoTime) # send frames if needed if self.vipc_server is not None and m.which() in self.cfg.vision_pubs: camera_state = getattr(m, m.which()) @@ -713,7 +716,7 @@ def _replay_multi_process( # flush last set of messages from each process for container in containers: - last_time = log_msgs[-1].logMonoTime if len(log_msgs) > 0 else int(time.monotonic() * 1e9) + last_time = container.last_input_log_mono_time if container.last_input_log_mono_time > 0 else int(time.monotonic() * 1e9) log_msgs.extend(container.get_output_msgs(last_time)) finally: for container in containers: From 0870e26fb6aef77e9fc19a6634e6cf4bef673feb Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 23 Mar 2026 19:57:35 -0700 Subject: [PATCH 20/33] fix debug fw query script --- selfdrive/debug/debug_fw_fingerprinting_offline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/debug/debug_fw_fingerprinting_offline.py b/selfdrive/debug/debug_fw_fingerprinting_offline.py index d841e91053..d36b350bbc 100755 --- a/selfdrive/debug/debug_fw_fingerprinting_offline.py +++ b/selfdrive/debug/debug_fw_fingerprinting_offline.py @@ -44,7 +44,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='View back and forth ISO-TP communication between various ECUs given an address') parser.add_argument('route', nargs='?', help='Route name, live if not specified') parser.add_argument('--addrs', nargs='*', default=[], help='List of tx address to view (0x7e0 for engine)') - parser.add_argument('--rxoffset', default='') + parser.add_argument('--rxoffset', default='0x8') args = parser.parse_args() addrs = [int(addr, base=16) if addr.startswith('0x') else int(addr) for addr in args.addrs] From e5ebd455761d9b40243e4f466b6cff46d69d52d5 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 23 Mar 2026 22:04:11 -0700 Subject: [PATCH 21/33] fw query: remove aux panda support (#37725) * rm num_pandas * bump to master --- opendbc_repo | 2 +- selfdrive/car/card.py | 3 +-- selfdrive/debug/car/fw_versions.py | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/opendbc_repo b/opendbc_repo index e27af8c188..e72e18e113 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit e27af8c188cec1ad7ef6c39ad57f6338f8b02281 +Subproject commit e72e18e113b8649fdda3e78b85110586751f1a81 diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index 12b8313471..b64210514a 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -90,7 +90,6 @@ class Car: break alpha_long_allowed = self.params.get_bool("AlphaLongitudinalEnabled") - num_pandas = len(messaging.recv_one_retry(self.sm.sock['pandaStates']).pandaStates) cached_params = None cached_params_raw = self.params.get("CarParamsCache") @@ -98,7 +97,7 @@ class Car: with car.CarParams.from_bytes(cached_params_raw) as _cached_params: cached_params = _cached_params - self.CI = get_car(*self.can_callbacks, obd_callback(self.params), alpha_long_allowed, is_release, num_pandas, cached_params) + self.CI = get_car(*self.can_callbacks, obd_callback(self.params), alpha_long_allowed, is_release, cached_params) self.RI = interfaces[self.CI.CP.carFingerprint].RadarInterface(self.CI.CP) self.CP = self.CI.CP diff --git a/selfdrive/debug/car/fw_versions.py b/selfdrive/debug/car/fw_versions.py index 6ae10d2fb2..5fb65e6972 100755 --- a/selfdrive/debug/car/fw_versions.py +++ b/selfdrive/debug/car/fw_versions.py @@ -45,8 +45,6 @@ if __name__ == "__main__": extra[(Ecu.unknown, 0x750, i)] = [] extra = {"any": {"debug": extra}} - num_pandas = len(messaging.recv_one_retry(pandaStates_sock).pandaStates) - t = time.monotonic() print("Getting vin...") set_obd_multiplexing(True) @@ -56,7 +54,7 @@ if __name__ == "__main__": print() t = time.monotonic() - fw_vers = get_fw_versions(*can_callbacks, set_obd_multiplexing, query_brand=args.brand, extra=extra, num_pandas=num_pandas, progress=True) + fw_vers = get_fw_versions(*can_callbacks, set_obd_multiplexing, query_brand=args.brand, extra=extra, progress=True) _, candidates = match_fw_to_car(fw_vers, vin) print() From 12f1be19ccff662ebaba6b0337e9cf43d34d54db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Sch=C3=A4fer?= Date: Tue, 24 Mar 2026 14:40:45 -0700 Subject: [PATCH 22/33] POP model (#37727) * f9f6da19-c248-460f-8e16-d47e9824bfb7/100 * 05a58a51-e0e3-4e9b-8e27-e644685f2c50/100 --- selfdrive/modeld/models/driving_policy.onnx | 4 ++-- selfdrive/modeld/models/driving_vision.onnx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/modeld/models/driving_policy.onnx b/selfdrive/modeld/models/driving_policy.onnx index 611ae9fe85..7c71bc9471 100644 --- a/selfdrive/modeld/models/driving_policy.onnx +++ b/selfdrive/modeld/models/driving_policy.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78477124cbf3ffe30fa951ebada8410b43c4242c6054584d656f1d329b067e15 -size 14060847 +oid sha256:853c6634746ff439a848349d00e4d5581cd941f13f7c1862c31b72a31cc24858 +size 14061595 diff --git a/selfdrive/modeld/models/driving_vision.onnx b/selfdrive/modeld/models/driving_vision.onnx index 6c9fc4c84d..afd617667c 100644 --- a/selfdrive/modeld/models/driving_vision.onnx +++ b/selfdrive/modeld/models/driving_vision.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee29ee5bce84d1ce23e9ff381280de9b4e4d96d2934cd751740354884e112c66 -size 46877473 +oid sha256:940e9006a25f27f0b6e85da798e6a8fd1f6dd492dd7d0b9ff1a9436460f46129 +size 46887794 From e4813645fa7e36221640eb21dcd50128b5744fb3 Mon Sep 17 00:00:00 2001 From: Jason Young <46612682+jyoung8607@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:02:51 -0500 Subject: [PATCH 23/33] remove any stale scons lock on device startup (#37734) remove any stale scons lock at device startup --- launch_chffrplus.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh index d4689aae53..5e7b4fa0db 100755 --- a/launch_chffrplus.sh +++ b/launch_chffrplus.sh @@ -7,6 +7,7 @@ source "$DIR/launch_env.sh" function agnos_init { # TODO: move this to agnos sudo rm -f /data/etc/NetworkManager/system-connections/*.nmmeta + rm -f /data/scons_cache/config.lock # set success flag for current boot slot sudo abctl --set_success From b706673e1cf3ed61a928e6eb68bf8d663904a5de Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 25 Mar 2026 19:49:38 -0700 Subject: [PATCH 24/33] jotpluggler: part one (#37730) --- SConstruct | 3 +- tools/jotpluggler/.gitignore | 9 + tools/jotpluggler/SConscript | 92 + tools/jotpluggler/app.cc | 1914 ++++++++++++++ tools/jotpluggler/app.h | 884 +++++++ tools/jotpluggler/browser.cc | 465 ++++ tools/jotpluggler/camera.cc | 54 + tools/jotpluggler/camera.h | 5 + tools/jotpluggler/common.cc | 179 ++ tools/jotpluggler/common.h | 63 + tools/jotpluggler/custom_series.cc | 750 ++++++ tools/jotpluggler/dbc.h | 400 +++ tools/jotpluggler/generated_dbcs/.gitignore | 2 + tools/jotpluggler/icons.cc | 24 + tools/jotpluggler/internal.h | 166 ++ tools/jotpluggler/layout.cc | 704 ++++++ tools/jotpluggler/layout_io.cc | 128 + tools/jotpluggler/layouts/.gitignore | 1 + tools/jotpluggler/layouts/CAN-bus-debug.json | 1 + tools/jotpluggler/layouts/camera-timings.json | 1 + .../jotpluggler/layouts/cameras-and-map.json | 1 + tools/jotpluggler/layouts/can-states.json | 1 + .../layouts/controls_mismatch_debug.json | 1 + tools/jotpluggler/layouts/gps.json | 1 + tools/jotpluggler/layouts/gps_vs_llk.json | 1 + .../jotpluggler/layouts/locationd_debug.json | 1 + tools/jotpluggler/layouts/longitudinal.json | 1 + .../jotpluggler/layouts/max-torque-debug.json | 1 + tools/jotpluggler/layouts/new-layout.json | 1 + .../jotpluggler/layouts/system_lag_debug.json | 1 + tools/jotpluggler/layouts/thermal_debug.json | 1 + .../layouts/torque-controller.json | 1 + tools/jotpluggler/layouts/tuning.json | 1 + tools/jotpluggler/layouts/ublox-debug.json | 1 + tools/jotpluggler/logs.cc | 419 ++++ tools/jotpluggler/main.cc | 126 + tools/jotpluggler/map.cc | 1328 ++++++++++ tools/jotpluggler/map.h | 61 + tools/jotpluggler/math_eval.py | 145 ++ tools/jotpluggler/plot.cc | 1027 ++++++++ tools/jotpluggler/render.cc | 173 ++ tools/jotpluggler/runtime.cc | 1280 ++++++++++ tools/jotpluggler/session.cc | 773 ++++++ tools/jotpluggler/sidebar.cc | 215 ++ tools/jotpluggler/sketch_layout.cc | 2202 +++++++++++++++++ tools/jotpluggler/stream.cc | 207 ++ tools/jotpluggler/util.cc | 59 + tools/jotpluggler/util.h | 103 + tools/replay/logreader.cc | 58 +- tools/replay/logreader.h | 25 +- tools/replay/py_downloader.cc | 9 +- 51 files changed, 14061 insertions(+), 8 deletions(-) create mode 100644 tools/jotpluggler/.gitignore create mode 100644 tools/jotpluggler/SConscript create mode 100644 tools/jotpluggler/app.cc create mode 100644 tools/jotpluggler/app.h create mode 100644 tools/jotpluggler/browser.cc create mode 100644 tools/jotpluggler/camera.cc create mode 100644 tools/jotpluggler/camera.h create mode 100644 tools/jotpluggler/common.cc create mode 100644 tools/jotpluggler/common.h create mode 100644 tools/jotpluggler/custom_series.cc create mode 100644 tools/jotpluggler/dbc.h create mode 100644 tools/jotpluggler/generated_dbcs/.gitignore create mode 100644 tools/jotpluggler/icons.cc create mode 100644 tools/jotpluggler/internal.h create mode 100644 tools/jotpluggler/layout.cc create mode 100644 tools/jotpluggler/layout_io.cc create mode 100644 tools/jotpluggler/layouts/.gitignore create mode 100644 tools/jotpluggler/layouts/CAN-bus-debug.json create mode 100644 tools/jotpluggler/layouts/camera-timings.json create mode 100644 tools/jotpluggler/layouts/cameras-and-map.json create mode 100644 tools/jotpluggler/layouts/can-states.json create mode 100644 tools/jotpluggler/layouts/controls_mismatch_debug.json create mode 100644 tools/jotpluggler/layouts/gps.json create mode 100644 tools/jotpluggler/layouts/gps_vs_llk.json create mode 100644 tools/jotpluggler/layouts/locationd_debug.json create mode 100644 tools/jotpluggler/layouts/longitudinal.json create mode 100644 tools/jotpluggler/layouts/max-torque-debug.json create mode 100644 tools/jotpluggler/layouts/new-layout.json create mode 100644 tools/jotpluggler/layouts/system_lag_debug.json create mode 100644 tools/jotpluggler/layouts/thermal_debug.json create mode 100644 tools/jotpluggler/layouts/torque-controller.json create mode 100644 tools/jotpluggler/layouts/tuning.json create mode 100644 tools/jotpluggler/layouts/ublox-debug.json create mode 100644 tools/jotpluggler/logs.cc create mode 100644 tools/jotpluggler/main.cc create mode 100644 tools/jotpluggler/map.cc create mode 100644 tools/jotpluggler/map.h create mode 100755 tools/jotpluggler/math_eval.py create mode 100644 tools/jotpluggler/plot.cc create mode 100644 tools/jotpluggler/render.cc create mode 100644 tools/jotpluggler/runtime.cc create mode 100644 tools/jotpluggler/session.cc create mode 100644 tools/jotpluggler/sidebar.cc create mode 100644 tools/jotpluggler/sketch_layout.cc create mode 100644 tools/jotpluggler/stream.cc create mode 100644 tools/jotpluggler/util.cc create mode 100644 tools/jotpluggler/util.h diff --git a/SConstruct b/SConstruct index 792a48eb7d..119209dcdb 100644 --- a/SConstruct +++ b/SConstruct @@ -49,7 +49,7 @@ pkgs = [importlib.import_module(name) for name in pkg_names] allowed_system_libs = { "EGL", "GLESv2", "GL", "Qt5Charts", "Qt5Core", "Qt5Gui", "Qt5Widgets", - "dl", "drm", "gbm", "m", "pthread", + "dl", "drm", "gbm", "m", "pthread", } def _resolve_lib(env, name): @@ -259,6 +259,7 @@ if arch != "larch64": SConscript([ 'tools/replay/SConscript', 'tools/cabana/SConscript', + 'tools/jotpluggler/SConscript', ]) diff --git a/tools/jotpluggler/.gitignore b/tools/jotpluggler/.gitignore new file mode 100644 index 0000000000..7cb98300fe --- /dev/null +++ b/tools/jotpluggler/.gitignore @@ -0,0 +1,9 @@ +__pycache__/ +jot_*.o +*.o +jotpluggler +car_fingerprint_to_dbc.h +generated_dbcs/.stamp +generated_dbcs/*.dbc +layouts/.jotpluggler_autosave/ +reports/ diff --git a/tools/jotpluggler/SConscript b/tools/jotpluggler/SConscript new file mode 100644 index 0000000000..122d502341 --- /dev/null +++ b/tools/jotpluggler/SConscript @@ -0,0 +1,92 @@ +import os +import imgui +import libusb +from opendbc import get_generated_dbcs +from opendbc.car import Bus +from opendbc.car.fingerprints import MIGRATION +from opendbc.car.values import PLATFORMS +from openpilot.common.basedir import BASEDIR + +Import('env', 'arch', 'common', 'messaging', 'visionipc', 'cereal', 'replay_lib') + +jot_env = env.Clone() +jot_env["LIBPATH"] += [imgui.MESA_DIR, libusb.LIB_DIR] +jot_env["CPPPATH"] += [imgui.INCLUDE_DIR, libusb.INCLUDE_DIR] +jot_env["CXXFLAGS"] += [ + "-DGLFW_INCLUDE_NONE", + '-DJOTP_REPO_ROOT=\'"%s"\'' % os.path.realpath(BASEDIR), +] + +def materialize_generated_dbcs(target, source, env): + out_dir = os.path.dirname(str(target[0])) + os.makedirs(out_dir, exist_ok=True) + + for name in os.listdir(out_dir): + if name.endswith('.dbc'): + os.unlink(os.path.join(out_dir, name)) + + for name, content in sorted(get_generated_dbcs().items()): + with open(os.path.join(out_dir, f"{name}.dbc"), "w") as f: + f.write(content) + + with open(str(target[0]), "w") as f: + f.write("ok\n") + + return None + +def write_car_fingerprint_to_dbc_header(target, source, env): + pairs = {} + + for name, platform in sorted(PLATFORMS.items()): + dbc = platform.config.dbc_dict.get(Bus.pt, "") + if not dbc and name.startswith("TESLA_"): + dbc = platform.config.dbc_dict.get(Bus.party, "") + if not dbc and name == "COMMA_BODY": + dbc = "comma_body" + if dbc and name != "MOCK": + pairs[name] = dbc + + for fingerprint, car in sorted(MIGRATION.items()): + dbc = pairs.get(str(car), "") + if dbc: + pairs[fingerprint] = dbc + + lines = [ + "#pragma once", + "", + "#include ", + "#include ", + "", + "inline constexpr std::pair kCarFingerprintToDbc[] = {", + ] + lines.extend(f' {{"{fingerprint}", "{dbc}"}},' for fingerprint, dbc in sorted(pairs.items())) + lines.extend([ + "};", + "", + "inline std::string_view dbc_for_car_fingerprint(std::string_view fingerprint) {", + " for (const auto &[car_fingerprint, dbc] : kCarFingerprintToDbc) {", + " if (car_fingerprint == fingerprint) return dbc;", + " }", + " return {};", + "}", + "", + ]) + + with open(str(target[0]), "w") as f: + f.write("\n".join(lines)) + + return None + +generated_dbc_stamp = jot_env.Command(f"generated_dbcs/.stamp", [], materialize_generated_dbcs) +car_fingerprint_to_dbc = jot_env.Command("car_fingerprint_to_dbc.h", [], write_car_fingerprint_to_dbc_header) + +libs = [replay_lib, common, messaging, visionipc, cereal, File(f"{imgui.LIB_DIR}/libimgui.a"), File(f"{imgui.LIB_DIR}/libglfw3.a"), + "avformat", "avcodec", "avutil", "x264", "yuv", "z", "bz2", "zstd", "m", "pthread", "usb-1.0"] +if arch == "Darwin": + jot_env["FRAMEWORKS"] = ["OpenGL", "Cocoa", "IOKit", "CoreFoundation", "CoreVideo", "CoreMedia", "VideoToolbox"] +else: + libs += ["GL", "dl", "va", "va-drm", "drm"] + +program = jot_env.Program("jotpluggler", jot_env.Glob("*.cc"), LIBS=libs) +jot_env.Depends(program, generated_dbc_stamp) +jot_env.Depends(program, car_fingerprint_to_dbc) diff --git a/tools/jotpluggler/app.cc b/tools/jotpluggler/app.cc new file mode 100644 index 0000000000..4b56299ead --- /dev/null +++ b/tools/jotpluggler/app.cc @@ -0,0 +1,1914 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/camera.h" +#include "tools/jotpluggler/common.h" +#include "tools/jotpluggler/internal.h" +#include "tools/jotpluggler/map.h" +#include "system/hardware/hw.h" +#include "imgui_impl_glfw.h" + +#include "imgui_internal.h" +#include "imgui_impl_opengl3.h" +#include "imgui_impl_opengl3_loader.h" +#include "implot.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "third_party/json11/json11.hpp" + +namespace fs = std::filesystem; + +constexpr const char *UNTITLED_PANE_TITLE = "..."; +ImFont *g_ui_font = nullptr; +ImFont *g_ui_bold_font = nullptr; +ImFont *g_mono_font = nullptr; + +std::string layout_name_from_arg(const std::string &layout_arg) { + const fs::path raw(layout_arg); + if (raw.extension() == ".xml" || raw.extension() == ".json") { + return raw.stem().string(); + } + if (raw.filename() != raw) { + return raw.filename().replace_extension("").string(); + } + fs::path stem_path = raw; + return stem_path.replace_extension("").string(); +} + +fs::path layouts_dir() { + return repo_root() / "tools" / "jotpluggler" / "layouts"; +} + +std::string sanitize_layout_stem(std::string_view name) { + std::string out; + out.reserve(name.size()); + bool last_was_dash = false; + for (const char raw : name) { + const unsigned char c = static_cast(raw); + if (std::isalnum(c) != 0) { + out.push_back(static_cast(std::tolower(c))); + last_was_dash = false; + } else if (raw == '-' || raw == '_') { + out.push_back(raw); + last_was_dash = false; + } else if (!last_was_dash && !out.empty()) { + out.push_back('-'); + last_was_dash = true; + } + } + while (!out.empty() && out.back() == '-') { + out.pop_back(); + } + return out.empty() ? "untitled" : out; +} + +fs::path autosave_dir() { + return layouts_dir() / ".jotpluggler_autosave"; +} + +fs::path resolve_layout_path(const std::string &layout_arg) { + const fs::path direct(layout_arg); + if (fs::exists(direct)) { + if (direct.extension() == ".json") return fs::absolute(direct); + const fs::path sibling_json = direct.parent_path() / (direct.stem().string() + ".json"); + if (direct.extension() == ".xml" && fs::exists(sibling_json)) { + return fs::absolute(sibling_json); + } + } + const fs::path candidate = layouts_dir() / (layout_name_from_arg(layout_arg) + ".json"); + if (!fs::exists(candidate)) throw std::runtime_error("Unknown layout: " + layout_arg); + return candidate; +} + +fs::path autosave_path_for_layout(const fs::path &layout_path) { + const std::string stem = layout_path.empty() ? "untitled" : layout_path.stem().string(); + return autosave_dir() / (sanitize_layout_stem(stem) + ".json"); +} + +std::vector available_layout_names() { + std::vector names; + const fs::path root = layouts_dir(); + if (!fs::exists(root) || !fs::is_directory(root)) { + return names; + } + for (const auto &entry : fs::directory_iterator(root)) { + if (!entry.is_regular_file() || entry.path().extension() != ".json") { + continue; + } + names.push_back(entry.path().stem().string()); + } + std::sort(names.begin(), names.end()); + return names; +} + +void refresh_replaced_layout_ui(AppSession *session, UiState *state, bool mark_docks) { + state->tabs.clear(); + cancel_rename_tab(state); + sync_ui_state(state, session->layout); + sync_layout_buffers(state, *session); + if (mark_docks) { + mark_all_docks_dirty(state); + } +} + +void start_new_layout(AppSession *session, UiState *state, const std::string &status_text) { + session->layout = make_empty_layout(); + session->layout_path.clear(); + session->autosave_path.clear(); + state->undo.reset(session->layout); + state->layout_dirty = false; + state->status_text = status_text; + refresh_replaced_layout_ui(session, state, true); + reset_shared_range(state, *session); +} + +bool is_decoded_can_series_path(std::string_view path) { + const std::string value(path); + return util::starts_with(value, "/can/") || util::starts_with(value, "/sendcan/"); +} + +bool apply_route_can_decode_update(AppSession *session, UiState *state); + +void rebuild_series_lookup_preserving_formats(AppSession *session, + std::string_view updated_prefix, + bool refresh_updated_formats_only) { + const std::string prefix(updated_prefix); + if (!updated_prefix.empty()) { + for (auto it = session->route_data.series_formats.begin(); it != session->route_data.series_formats.end();) { + if (util::starts_with(it->first, prefix)) { + it = session->route_data.series_formats.erase(it); + } else { + ++it; + } + } + } + session->series_by_path.clear(); + session->series_by_path.reserve(session->route_data.series.size()); + for (RouteSeries &series : session->route_data.series) { + session->series_by_path.emplace(series.path, &series); + if (refresh_updated_formats_only) { + if (!updated_prefix.empty() && util::starts_with(series.path, prefix)) { + const bool enum_like = session->route_data.enum_info.find(series.path) != session->route_data.enum_info.end(); + session->route_data.series_formats[series.path] = compute_series_format(series.values, enum_like); + } + } else { + const bool enum_like = session->route_data.enum_info.find(series.path) != session->route_data.enum_info.end(); + session->route_data.series_formats[series.path] = compute_series_format(series.values, enum_like); + } + } +} + +bool apply_route_can_decode_update(AppSession *session, UiState *state) { + const std::string active_dbc_name = !session->dbc_override.empty() ? session->dbc_override : session->route_data.dbc_name; + if (!active_dbc_name.empty() && !load_dbc_by_name(active_dbc_name).has_value()) { + state->error_text = "DBC not found: " + active_dbc_name; + state->open_error_popup = true; + return false; + } + std::unordered_map can_enum_info; + std::vector can_series = decode_can_messages(session->route_data.can_messages, active_dbc_name, &can_enum_info); + + std::vector updated_series; + updated_series.reserve(session->route_data.series.size() + can_series.size()); + for (RouteSeries &series : session->route_data.series) { + if (!is_decoded_can_series_path(series.path)) { + updated_series.push_back(std::move(series)); + } + } + for (RouteSeries &series : can_series) { + updated_series.push_back(std::move(series)); + } + std::sort(updated_series.begin(), updated_series.end(), [](const RouteSeries &a, const RouteSeries &b) { + return a.path < b.path; + }); + + std::unordered_map updated_enum_info; + updated_enum_info.reserve(session->route_data.enum_info.size() + can_enum_info.size()); + for (auto &[path, info] : session->route_data.enum_info) { + if (!is_decoded_can_series_path(path)) { + updated_enum_info.emplace(path, std::move(info)); + } + } + for (auto &[path, info] : can_enum_info) { + updated_enum_info[path] = std::move(info); + } + + session->route_data.series = std::move(updated_series); + session->route_data.enum_info = std::move(updated_enum_info); + session->route_data.paths.clear(); + session->route_data.paths.reserve(session->route_data.series.size()); + for (const RouteSeries &series : session->route_data.series) { + session->route_data.paths.push_back(series.path); + } + std::sort(session->route_data.paths.begin(), session->route_data.paths.end()); + session->route_data.roots = collect_route_roots_for_paths(session->route_data.paths); + + rebuild_route_index(session); + rebuild_browser_nodes(session, state); + refresh_all_custom_curves(session, state); + sync_camera_feeds(session); + return true; +} + +void apply_dbc_override_change(AppSession *session, UiState *state, const std::string &dbc_override) { + session->dbc_override = dbc_override; + if (session->data_mode == SessionDataMode::Stream) { + start_stream_session(session, state, session->stream_source, session->stream_buffer_seconds, false); + } else if (!session->route_name.empty()) { + const bool ok = apply_route_can_decode_update(session, state); + if (ok) { + state->status_text = dbc_override.empty() ? "DBC auto-detect enabled" : "DBC set to " + dbc_override; + } else { + state->status_text = "Failed to apply DBC"; + } + } else if (dbc_override.empty()) { + state->status_text = "DBC auto-detect enabled"; + } else { + state->status_text = "DBC set to " + dbc_override; + } +} + +void configure_style() { + ImGui::StyleColorsLight(); + ImPlot::StyleColorsLight(); + + ImGuiIO &io = ImGui::GetIO(); + g_ui_font = nullptr; + g_ui_bold_font = nullptr; + g_mono_font = nullptr; + const fs::path fonts_dir = repo_root() / "selfdrive" / "assets" / "fonts"; + ImFontConfig font_cfg; + font_cfg.OversampleH = 2; + font_cfg.OversampleV = 2; + font_cfg.RasterizerDensity = 1.0f; + icon_add_font(16.0f); + const auto add_font_with_icons = [&](const fs::path &path, float size) -> ImFont * { + ImFont *font = io.Fonts->AddFontFromFileTTF(path.c_str(), size, &font_cfg); + if (font != nullptr) { + icon_add_font(size, true, font); + } + return font; + }; + if (ImFont *font = add_font_with_icons(fonts_dir / "Inter-Regular.ttf", 16.0f); font != nullptr) { + g_ui_font = font; + io.FontDefault = font; + } + g_ui_bold_font = add_font_with_icons(fonts_dir / "Inter-SemiBold.ttf", 16.75f); + if (g_ui_font == nullptr) { + if (ImFont *font = add_font_with_icons(fonts_dir / "JetBrainsMono-Medium.ttf", 15.75f); font != nullptr) { + g_mono_font = font; + io.FontDefault = font; + } + } + if (g_mono_font == nullptr) { + g_mono_font = add_font_with_icons(fonts_dir / "JetBrainsMono-Medium.ttf", 15.75f); + } + if (g_ui_bold_font == nullptr) { + g_ui_bold_font = g_ui_font; + } + + ImGuiStyle &style = ImGui::GetStyle(); + style.WindowRounding = 0.0f; + style.ChildRounding = 0.0f; + style.PopupRounding = 0.0f; + style.FrameRounding = 2.0f; + style.ScrollbarRounding = 2.0f; + style.GrabRounding = 2.0f; + style.TabRounding = 0.0f; + style.WindowBorderSize = 1.0f; + style.ChildBorderSize = 1.0f; + style.FrameBorderSize = 1.0f; + style.WindowPadding = ImVec2(8.0f, 7.0f); + style.FramePadding = ImVec2(6.0f, 3.0f); + style.ItemSpacing = ImVec2(8.0f, 5.0f); + style.ItemInnerSpacing = ImVec2(6.0f, 3.0f); + struct ColorDef { ImGuiCol idx; int r, g, b; }; + constexpr ColorDef COLORS[] = { + {ImGuiCol_WindowBg, 250, 250, 251}, {ImGuiCol_ChildBg, 255, 255, 255}, + {ImGuiCol_Border, 194, 198, 204}, {ImGuiCol_TitleBg, 252, 252, 253}, + {ImGuiCol_TitleBgActive, 252, 252, 253}, {ImGuiCol_TitleBgCollapsed, 252, 252, 253}, + {ImGuiCol_Text, 74, 80, 88}, {ImGuiCol_TextDisabled, 108, 118, 128}, + {ImGuiCol_Button, 255, 255, 255}, {ImGuiCol_ButtonHovered, 246, 248, 250}, + {ImGuiCol_ButtonActive, 238, 240, 244}, {ImGuiCol_FrameBg, 255, 255, 255}, + {ImGuiCol_FrameBgHovered, 248, 249, 251}, {ImGuiCol_FrameBgActive, 241, 244, 248}, + {ImGuiCol_Header, 243, 245, 248}, {ImGuiCol_HeaderHovered, 237, 240, 244}, + {ImGuiCol_HeaderActive, 232, 236, 240}, {ImGuiCol_PopupBg, 248, 249, 251}, + {ImGuiCol_MenuBarBg, 232, 236, 241}, {ImGuiCol_Separator, 194, 198, 204}, + {ImGuiCol_ScrollbarBg, 240, 242, 245}, {ImGuiCol_ScrollbarGrab, 202, 207, 214}, + {ImGuiCol_ScrollbarGrabHovered, 180, 186, 194}, {ImGuiCol_ScrollbarGrabActive, 164, 171, 180}, + {ImGuiCol_Tab, 219, 224, 230}, {ImGuiCol_TabHovered, 232, 236, 241}, + {ImGuiCol_TabSelected, 250, 251, 253}, {ImGuiCol_TabSelectedOverline, 92, 109, 136}, + {ImGuiCol_TabDimmed, 213, 219, 226}, {ImGuiCol_TabDimmedSelected, 244, 247, 249}, + {ImGuiCol_TabDimmedSelectedOverline, 92, 109, 136}, {ImGuiCol_DockingEmptyBg, 244, 246, 248}, + }; + for (const auto &c : COLORS) { style.Colors[c.idx] = color_rgb(c.r, c.g, c.b); } + style.Colors[ImGuiCol_DockingPreview] = color_rgb(69, 115, 184, 0.22f); + + ImPlotStyle &plot_style = ImPlot::GetStyle(); + plot_style.PlotBorderSize = 1.0f; + plot_style.MinorAlpha = 0.65f; + plot_style.LegendPadding = ImVec2(6.0f, 5.0f); + plot_style.LegendInnerPadding = ImVec2(6.0f, 3.0f); + plot_style.LegendSpacing = ImVec2(7.0f, 2.0f); + plot_style.PlotPadding = ImVec2(4.0f, 8.0f); + plot_style.FitPadding = ImVec2(0.02f, 0.4f); + + ImPlot::MapInputDefault(); + ImPlotInputMap &input_map = ImPlot::GetInputMap(); + input_map.Pan = ImGuiMouseButton_Right; + input_map.PanMod = ImGuiMod_None; + input_map.Select = ImGuiMouseButton_Left; + input_map.SelectCancel = ImGuiMouseButton_Right; + input_map.SelectMod = ImGuiMod_None; +} + +void app_push_mono_font() { + if (g_mono_font != nullptr) { + ImGui::PushFont(g_mono_font); + } +} + +void app_pop_mono_font() { + if (g_mono_font != nullptr) { + ImGui::PopFont(); + } +} + +void app_push_bold_font() { + if (g_ui_bold_font != nullptr) { + ImGui::PushFont(g_ui_bold_font); + } +} + +void app_pop_bold_font() { + if (g_ui_bold_font != nullptr) { + ImGui::PopFont(); + } +} + +UiMetrics compute_ui_metrics(const ImVec2 &size, float top_offset, float sidebar_width) { + UiMetrics ui; + ui.width = size.x; + ui.height = size.y; + ui.top_offset = top_offset; + ui.sidebar_width = sidebar_width <= 0.0f + ? 0.0f + : std::clamp(sidebar_width, SIDEBAR_MIN_WIDTH, std::min(SIDEBAR_MAX_WIDTH, size.x * 0.6f)); + ui.content_x = ui.sidebar_width; + ui.content_y = top_offset; + ui.content_w = std::max(1.0f, size.x - ui.content_x); + ui.content_h = std::max(1.0f, size.y - ui.content_y - STATUS_BAR_HEIGHT); + ui.status_bar_y = std::max(0.0f, size.y - STATUS_BAR_HEIGHT); + return ui; +} + +void sync_ui_state(UiState *state, const SketchLayout &layout) { + const bool initializing = state->tabs.empty(); + state->tabs.resize(layout.tabs.size()); + if (layout.tabs.empty()) { + state->active_tab_index = 0; + state->requested_tab_index = -1; + return; + } + if (initializing) { + state->active_tab_index = std::clamp(layout.current_tab_index, 0, static_cast(layout.tabs.size()) - 1); + state->requested_tab_index = state->active_tab_index; + } + state->active_tab_index = std::clamp(state->active_tab_index, 0, static_cast(layout.tabs.size()) - 1); + for (size_t i = 0; i < layout.tabs.size(); ++i) { + if (state->tabs[i].runtime_id == 0) { + state->tabs[i].runtime_id = state->next_tab_runtime_id++; + } + const int pane_count = static_cast(layout.tabs[i].panes.size()); + state->tabs[i].map_panes.resize(static_cast(std::max(0, pane_count))); + state->tabs[i].camera_panes.resize(static_cast(std::max(0, pane_count))); + state->tabs[i].active_pane_index = pane_count <= 0 + ? 0 + : std::clamp(state->tabs[i].active_pane_index, 0, pane_count - 1); + } +} + +void resize_tab_pane_state(TabUiState *tab_state, size_t pane_count) { + if (tab_state == nullptr) return; + tab_state->map_panes.resize(pane_count); + tab_state->camera_panes.resize(pane_count); +} + +void sync_route_buffers(UiState *state, const AppSession &session) { + state->route_buffer = session.route_name; + state->data_dir_buffer = session.data_dir; +} + +void sync_stream_buffers(UiState *state, const AppSession &session) { + state->stream_address_buffer = session.stream_source.address; + state->stream_source_kind = session.stream_source.kind; + state->stream_buffer_seconds = session.stream_buffer_seconds; +} + +fs::path default_layout_save_path(const AppSession &session) { + return session.layout_path.empty() ? layouts_dir() / "new-layout.json" : session.layout_path; +} + +void sync_layout_buffers(UiState *state, const AppSession &session) { + state->load_layout_buffer = session.layout_path.empty() ? std::string() : session.layout_path.string(); + state->save_layout_buffer = default_layout_save_path(session).string(); +} + +const WorkspaceTab *app_active_tab(const SketchLayout &layout, const UiState &state) { + if (layout.tabs.empty()) return nullptr; + const int index = std::clamp(state.active_tab_index, 0, static_cast(layout.tabs.size()) - 1); + return &layout.tabs[static_cast(index)]; +} + +WorkspaceTab *app_active_tab(SketchLayout *layout, const UiState &state) { + if (layout->tabs.empty()) return nullptr; + const int index = std::clamp(state.active_tab_index, 0, static_cast(layout->tabs.size()) - 1); + return &layout->tabs[static_cast(index)]; +} + +TabUiState *app_active_tab_state(UiState *state) { + if (state->tabs.empty()) return nullptr; + const int index = std::clamp(state->active_tab_index, 0, static_cast(state->tabs.size()) - 1); + return &state->tabs[static_cast(index)]; +} + +std::string pane_window_name(int tab_runtime_id, int pane_index, const Pane &pane) { + const char *title = pane.title.empty() ? UNTITLED_PANE_TITLE : pane.title.c_str(); + return util::string_format("%s###tab%d_pane%d", title, tab_runtime_id, pane_index); +} + +std::string tab_item_label(const WorkspaceTab &tab, int tab_runtime_id) { + return util::string_format("%s##workspace_tab_%d", tab.tab_name.c_str(), tab_runtime_id); +} + +void request_tab_selection(UiState *state, int tab_index) { + state->active_tab_index = tab_index; + state->requested_tab_index = tab_index; +} + +void begin_rename_tab(const SketchLayout &layout, UiState *state, int tab_index) { + if (tab_index < 0 || tab_index >= static_cast(layout.tabs.size())) { + return; + } + state->rename_tab_buffer = layout.tabs[static_cast(tab_index)].tab_name; + state->rename_tab_index = tab_index; + state->focus_rename_tab_input = true; + request_tab_selection(state, tab_index); +} + +void cancel_rename_tab(UiState *state) { + state->rename_tab_index = -1; + state->focus_rename_tab_input = false; +} + +ImGuiID dockspace_id_for_tab(int tab_runtime_id) { + return ImHashStr(util::string_format("jotpluggler_dockspace_%d", tab_runtime_id).c_str()); +} + +bool curve_has_local_samples(const Curve &curve) { + return curve.xs.size() > 1 && curve.xs.size() == curve.ys.size(); +} + +void mark_all_docks_dirty(UiState *state) { + for (TabUiState &tab_state : state->tabs) { + tab_state.dock_needs_build = true; + } +} + +void mark_tab_dock_dirty(UiState *state, int tab_index) { + if (tab_index >= 0 && tab_index < static_cast(state->tabs.size())) { + state->tabs[static_cast(tab_index)].dock_needs_build = true; + } +} + +void normalize_split_node(WorkspaceNode *node) { + if (node->is_pane) { + return; + } + for (WorkspaceNode &child : node->children) { + normalize_split_node(&child); + } + if (node->children.empty()) { + return; + } + if (node->children.size() == 1) { + *node = node->children.front(); + return; + } + if (node->sizes.size() != node->children.size()) { + node->sizes.assign(node->children.size(), 1.0f / static_cast(node->children.size())); + return; + } + float total = 0.0f; + for (float &size : node->sizes) { + size = std::max(size, 0.0f); + total += size; + } + if (total <= 0.0f) { + node->sizes.assign(node->children.size(), 1.0f / static_cast(node->children.size())); + return; + } + for (float &size : node->sizes) { + size /= total; + } +} + +void decrement_pane_indices(WorkspaceNode *node, int removed_index) { + if (node->is_pane) { + if (node->pane_index > removed_index) { + node->pane_index -= 1; + } + return; + } + for (WorkspaceNode &child : node->children) { + decrement_pane_indices(&child, removed_index); + } +} + +bool remove_pane_node(WorkspaceNode *node, int pane_index) { + if (node->is_pane) return node->pane_index == pane_index; + + for (size_t i = 0; i < node->children.size();) { + if (remove_pane_node(&node->children[i], pane_index)) { + node->children.erase(node->children.begin() + static_cast(i)); + if (i < node->sizes.size()) { + node->sizes.erase(node->sizes.begin() + static_cast(i)); + } + } else { + ++i; + } + } + + normalize_split_node(node); + return !node->is_pane && node->children.empty(); +} + +bool split_pane_node(WorkspaceNode *node, int target_pane_index, SplitOrientation orientation, + bool new_before, int new_pane_index) { + if (node->is_pane) { + if (node->pane_index != target_pane_index) return false; + WorkspaceNode existing_pane; + existing_pane.is_pane = true; + existing_pane.pane_index = target_pane_index; + + WorkspaceNode new_pane; + new_pane.is_pane = true; + new_pane.pane_index = new_pane_index; + + node->is_pane = false; + node->pane_index = -1; + node->orientation = orientation; + node->sizes = {0.5f, 0.5f}; + node->children.clear(); + if (new_before) { + node->children.push_back(std::move(new_pane)); + node->children.push_back(std::move(existing_pane)); + } else { + node->children.push_back(std::move(existing_pane)); + node->children.push_back(std::move(new_pane)); + } + return true; + } + + if (node->orientation == orientation) { + for (size_t i = 0; i < node->children.size(); ++i) { + WorkspaceNode &child = node->children[i]; + if (!child.is_pane || child.pane_index != target_pane_index) { + continue; + } + + WorkspaceNode new_pane; + new_pane.is_pane = true; + new_pane.pane_index = new_pane_index; + + const auto insert_it = node->children.begin() + static_cast(new_before ? i : i + 1); + node->children.insert(insert_it, std::move(new_pane)); + node->sizes.assign(node->children.size(), 1.0f / static_cast(node->children.size())); + return true; + } + } + + for (WorkspaceNode &child : node->children) { + if (split_pane_node(&child, target_pane_index, orientation, new_before, new_pane_index)) return true; + } + return false; +} + +Pane make_empty_pane(const std::string &title = UNTITLED_PANE_TITLE) { + Pane pane; + pane.title = title; + return pane; +} + +WorkspaceTab make_empty_tab(const std::string &tab_name) { + WorkspaceTab tab; + tab.tab_name = tab_name; + tab.panes.push_back(make_empty_pane()); + tab.root.is_pane = true; + tab.root.pane_index = 0; + return tab; +} + +SketchLayout make_empty_layout() { + SketchLayout layout; + layout.tabs.push_back(make_empty_tab("tab1")); + layout.current_tab_index = 0; + layout.roots.push_back("layout"); + return layout; +} + +bool tab_name_exists(const SketchLayout &layout, const std::string &name) { + return std::any_of(layout.tabs.begin(), layout.tabs.end(), [&](const WorkspaceTab &tab) { + return tab.tab_name == name; + }); +} + +std::string next_tab_name(const SketchLayout &layout, const std::string &base_name) { + if (base_name == "tab" || base_name == "tab1") { + int max_suffix = 0; + for (const WorkspaceTab &tab : layout.tabs) { + if (tab.tab_name.size() > 3 && util::starts_with(tab.tab_name, "tab")) { + const std::string suffix = tab.tab_name.substr(3); + if (!suffix.empty() && std::all_of(suffix.begin(), suffix.end(), ::isdigit)) { + max_suffix = std::max(max_suffix, std::stoi(suffix)); + } + } + } + return "tab" + std::to_string(std::max(1, max_suffix + 1)); + } + std::string base = base_name.empty() ? "tab" : base_name; + if (!tab_name_exists(layout, base)) return base; + for (int i = 2; i < 1000; ++i) { + const std::string candidate = base + " " + std::to_string(i); + if (!tab_name_exists(layout, candidate)) return candidate; + } + return base + " copy"; +} + +void clear_layout_autosave(const AppSession &session) { + if (!session.autosave_path.empty() && fs::exists(session.autosave_path)) { + fs::remove(session.autosave_path); + } +} + +bool autosave_layout(AppSession *session, UiState *state) { + try { + if (session->autosave_path.empty()) { + session->autosave_path = autosave_path_for_layout(session->layout_path); + } + session->layout.current_tab_index = state->active_tab_index; + save_layout_json(session->layout, session->autosave_path); + state->layout_dirty = true; + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to save layout draft"; + return false; + } +} + +bool mark_layout_dirty(AppSession *session, UiState *state) { + return autosave_layout(session, state); +} + +bool active_tab_has_map_pane(const SketchLayout &layout) { + if (layout.tabs.empty()) { + return false; + } + const int tab_index = std::clamp(layout.current_tab_index, 0, static_cast(layout.tabs.size()) - 1); + const WorkspaceTab &tab = layout.tabs[static_cast(tab_index)]; + return std::any_of(tab.panes.begin(), tab.panes.end(), [](const Pane &pane) { + return pane_kind_is_special(pane.kind); + }); +} + +void draw_browser_special_item(const char *item_id, const char *label) { + const ImGuiStyle &style = ImGui::GetStyle(); + const ImVec2 row_size(std::max(1.0f, ImGui::GetContentRegionAvail().x), ImGui::GetFrameHeight()); + ImGui::PushID(item_id); + ImGui::InvisibleButton("##special_data_row", row_size); + const bool hovered = ImGui::IsItemHovered(); + const bool held = ImGui::IsItemActive(); + const ImRect rect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax()); + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + if (hovered) { + const ImU32 bg = ImGui::GetColorU32(held ? ImGuiCol_HeaderActive : ImGuiCol_HeaderHovered); + draw_list->AddRectFilled(rect.Min, rect.Max, bg, 0.0f); + } + ImGui::RenderTextEllipsis(draw_list, + ImVec2(rect.Min.x + style.FramePadding.x, rect.Min.y + style.FramePadding.y), + ImVec2(rect.Max.x - style.FramePadding.x, rect.Max.y), + rect.Max.x - style.FramePadding.x, + label, + nullptr, + nullptr); + if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceAllowNullID)) { + ImGui::SetDragDropPayload("JOTP_SPECIAL_ITEM", item_id, std::strlen(item_id) + 1); + ImGui::TextUnformatted(label); + ImGui::EndDragDropSource(); + } + ImGui::PopID(); +} + +std::array app_next_curve_color(const Pane &pane) { + static constexpr std::array, 10> PALETTE = {{ + {35, 107, 180}, + {220, 82, 52}, + {67, 160, 71}, + {243, 156, 18}, + {123, 97, 255}, + {0, 150, 136}, + {214, 48, 49}, + {52, 73, 94}, + {197, 90, 17}, + {96, 125, 139}, + }}; + return PALETTE[pane.curves.size() % PALETTE.size()]; +} + +void draw_sidebar(AppSession *session, const UiMetrics &ui, UiState *state, bool show_camera_feed) { + ImGui::SetNextWindowPos(ImVec2(0.0f, ui.top_offset)); + ImGui::SetNextWindowSize(ImVec2(ui.sidebar_width, std::max(1.0f, ui.height - ui.top_offset))); + ImGui::PushStyleColor(ImGuiCol_WindowBg, color_rgb(238, 240, 244)); + ImGui::PushStyleColor(ImGuiCol_Border, color_rgb(190, 197, 205)); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | + ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoSavedSettings; + if (ImGui::Begin("##sidebar", nullptr, flags)) { + const RouteLoadSnapshot load = session->route_loader ? session->route_loader->snapshot() : RouteLoadSnapshot{}; + const bool show_load_progress = session->route_loader && (load.active || load.total_segments > 0); + const bool streaming = session->data_mode == SessionDataMode::Stream; + CameraFeedView *sidebar_camera = session->pane_camera_feeds[static_cast(sidebar_preview_camera_view(*session))].get(); + if (show_camera_feed && sidebar_camera != nullptr) { + sidebar_camera->draw(ImGui::GetContentRegionAvail().x, load.active); + } else if (streaming) { + ImGui::SeparatorText("Camera"); + ImGui::TextDisabled("Camera not available during live stream."); + ImGui::Spacing(); + } + + ImGui::SeparatorText(streaming ? "Stream" : "Route"); + if (streaming) { + const StreamPollSnapshot stream = session->stream_poller ? session->stream_poller->snapshot() : StreamPollSnapshot{}; + const bool paused = stream.paused || session->stream_paused; + const bool live = stream.connected && !paused; + const ImVec4 status_color = live ? color_rgb(38, 135, 67) : (paused ? color_rgb(168, 119, 34) : color_rgb(155, 63, 63)); + ImGui::TextColored(status_color, "%s %s", live ? "●" : "○", stream.source_label.c_str()); + ImGui::TextDisabled("%s%s", stream_source_kind_label(stream.source_kind), paused ? " paused" : ""); + const double span = session->route_data.has_time_range ? (session->route_data.x_max - session->route_data.x_min) : 0.0; + const float fill = stream.buffer_seconds <= 0.0 + ? 0.0f + : std::clamp(static_cast(span / stream.buffer_seconds), 0.0f, 1.0f); + ImGui::ProgressBar(fill, ImVec2(-FLT_MIN, 0.0f), nullptr); + ImGui::TextDisabled("%.0fs buffer | %zu series", session->stream_buffer_seconds, session->route_data.series.size()); + const char *button_label = paused ? "Resume" : "Pause"; + if (ImGui::Button(button_label, ImVec2(std::max(1.0f, ImGui::GetContentRegionAvail().x), 0.0f))) { + if (paused) { + start_stream_session(session, state, session->stream_source, session->stream_buffer_seconds, true); + } else { + stop_stream_session(session, state); + state->status_text = "Paused stream " + stream_source_target_label(session->stream_source); + } + } + } else if (session->route_name.empty()) { + ImGui::TextDisabled("No route loaded"); + } + if (!session->route_data.car_fingerprint.empty()) { + ImGui::TextWrapped("Car: %s", session->route_data.car_fingerprint.c_str()); + } + const std::vector dbc_names = available_dbc_names(); + ImGui::SetNextItemWidth(-FLT_MIN); + if (ImGui::BeginCombo("##dbc_combo", dbc_combo_label(*session).c_str())) { + const bool auto_selected = session->dbc_override.empty(); + if (ImGui::Selectable("Auto", auto_selected)) { + apply_dbc_override_change(session, state, {}); + } + if (auto_selected) { + ImGui::SetItemDefaultFocus(); + } + ImGui::Separator(); + for (const std::string &dbc_name : dbc_names) { + const bool selected = session->dbc_override == dbc_name; + if (ImGui::Selectable(dbc_name.c_str(), selected) && !selected) { + apply_dbc_override_change(session, state, dbc_name); + } + if (selected) { + ImGui::SetItemDefaultFocus(); + } + } + ImGui::EndCombo(); + } + ImGui::SeparatorText("Layout"); + ImGui::SetNextItemWidth(-FLT_MIN); + const std::string layout_combo_label = [&] { + const std::string base = session->layout_path.empty() ? std::string("untitled") : session->layout_path.stem().string(); + return state->layout_dirty ? base + " *" : base; + }(); + if (ImGui::BeginCombo("##layout_combo", layout_combo_label.c_str())) { + if (ImGui::Selectable("New Layout")) { + start_new_layout(session, state); + } + ImGui::Separator(); + const std::vector layouts = available_layout_names(); + const std::string current_layout = session->layout_path.empty() ? std::string("untitled") : session->layout_path.stem().string(); + for (const std::string &layout_name : layouts) { + const bool selected = layout_name == current_layout; + if (ImGui::Selectable(layout_name.c_str(), selected) && !selected) { + reload_layout(session, state, layout_name); + } + if (selected) { + ImGui::SetItemDefaultFocus(); + } + } + ImGui::EndCombo(); + } + const float layout_button_gap = ImGui::GetStyle().ItemSpacing.x; + const float layout_row_width = std::max(1.0f, ImGui::GetContentRegionAvail().x); + const float layout_button_width = std::max(1.0f, (layout_row_width - 2.0f * layout_button_gap) / 3.0f); + if (ImGui::Button("New", ImVec2(layout_button_width, 0.0f))) { + start_new_layout(session, state); + } + ImGui::SameLine(0.0f, layout_button_gap); + if (ImGui::Button("Save", ImVec2(layout_button_width, 0.0f))) { + state->request_save_layout = true; + } + ImGui::SameLine(0.0f, layout_button_gap); + ImGui::BeginDisabled(!state->layout_dirty); + if (ImGui::Button("Reset", ImVec2(layout_button_width, 0.0f))) { + state->request_reset_layout = true; + } + ImGui::EndDisabled(); + ImGui::Spacing(); + + ImGui::SeparatorText("Data Sources"); + ImGui::SetNextItemWidth(-FLT_MIN); + input_text_with_hint_string("##browser_filter", "Search...", &state->browser_filter); + const float footer_height = ImGui::GetFrameHeightWithSpacing() + + ImGui::GetTextLineHeightWithSpacing() + + 16.0f + + (show_load_progress ? (ImGui::GetFrameHeightWithSpacing() + 12.0f) : 0.0f); + const float browser_height = std::max(1.0f, ImGui::GetContentRegionAvail().y - footer_height); + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 2.0f)); + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(8.0f, 3.0f)); + if (ImGui::BeginChild("##timeseries_browser", ImVec2(0.0f, browser_height), true)) { + const std::string filter = lowercase_copy(state->browser_filter); + std::vector visible_paths; + for (const BrowserNode &node : session->browser_nodes) { + collect_visible_leaf_paths(node, filter, &visible_paths); + } + for (const SpecialItemSpec &spec : kSpecialItemSpecs) { + draw_browser_special_item(spec.id, spec.label); + } + ImGui::Dummy(ImVec2(0.0f, 2.0f)); + ImGui::Separator(); + ImGui::Dummy(ImVec2(0.0f, 2.0f)); + for (const BrowserNode &node : session->browser_nodes) { + draw_browser_node(session, node, state, filter, visible_paths); + } + } + ImGui::EndChild(); + ImGui::PopStyleVar(2); + + ImGui::SeparatorText("Custom Series"); + if (ImGui::Button("Create...", ImVec2(std::max(1.0f, ImGui::GetContentRegionAvail().x), 0.0f))) { + open_custom_series_editor(state, state->selected_browser_path); + } + if (show_load_progress) { + const float total = static_cast(std::max(1, load.total_segments)); + const bool finalizing = load.active + && load.total_segments > 0 + && load.segments_downloaded >= load.total_segments + && load.segments_parsed >= load.total_segments; + const float progress = load.total_segments == 0 + ? 0.0f + : (finalizing + ? 0.99f + : std::clamp(static_cast(load.segments_downloaded + load.segments_parsed) / (2.0f * total), 0.0f, 0.99f)); + ImGui::Dummy(ImVec2(0.0f, 8.0f)); + ImGui::ProgressBar(progress, ImVec2(-FLT_MIN, 0.0f), finalizing ? "Finalizing..." : nullptr); + } + } + ImGui::End(); + ImGui::PopStyleColor(2); +} + +std::string app_curve_display_name(const Curve &curve) { + if (!curve.label.empty()) return curve.label; + if (!curve.name.empty()) return curve.name; + return "curve"; +} + +Curve make_curve_for_path(const Pane &pane, const std::string &path) { + Curve curve; + curve.name = path; + curve.label = path; + curve.color = app_next_curve_color(pane); + return curve; +} + +bool add_curve_to_pane(WorkspaceTab *tab, int pane_index, Curve curve) { + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return false; + } + Pane &pane = tab->panes[static_cast(pane_index)]; + if (pane.kind != PaneKind::Plot) { + pane.kind = PaneKind::Plot; + if (is_default_special_title(pane.title)) { + pane.title = UNTITLED_PANE_TITLE; + } + } + for (Curve &existing : pane.curves) { + const bool same_named_curve = !curve.name.empty() && existing.name == curve.name; + const bool same_unnamed_curve = curve.name.empty() && existing.name.empty() && existing.label == curve.label; + if (same_named_curve || same_unnamed_curve) { + existing.visible = true; + return false; + } + } + pane.curves.push_back(std::move(curve)); + return true; +} + +bool add_path_curve_to_pane(AppSession *session, UiState *state, int pane_index, const std::string &path) { + if (app_find_route_series(*session, path) == nullptr) { + state->status_text = "Path not found in route"; + return false; + } + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + if (tab == nullptr || pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + state->status_text = "No active pane"; + return false; + } + const SketchLayout before_layout = session->layout; + const bool inserted = add_curve_to_pane(tab, pane_index, make_curve_for_path(tab->panes[static_cast(pane_index)], path)); + bool autosave_ok = true; + if (inserted) { + state->undo.push(before_layout); + autosave_ok = mark_layout_dirty(session, state); + } + if (autosave_ok) { + state->status_text = inserted ? "Added " + path : "Curve already present"; + } + return true; +} + +int add_path_curves_to_pane(AppSession *session, UiState *state, int pane_index, const std::vector &paths) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + if (tab == nullptr || pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + state->status_text = "No active pane"; + return 0; + } + + int inserted_count = 0; + int duplicate_count = 0; + const SketchLayout before_layout = session->layout; + for (const std::string &path : paths) { + if (app_find_route_series(*session, path) == nullptr) continue; + if (add_curve_to_pane(tab, pane_index, make_curve_for_path(tab->panes[static_cast(pane_index)], path))) { + ++inserted_count; + } else { + ++duplicate_count; + } + } + + if (inserted_count > 0) { + state->undo.push(before_layout); + if (mark_layout_dirty(session, state)) { + state->status_text = inserted_count == 1 + ? "Added " + paths.front() + : "Added " + std::to_string(inserted_count) + " curves"; + } + return inserted_count; + } + + if (duplicate_count > 0) { + state->status_text = duplicate_count == 1 ? "Curve already present" : "Curves already present"; + } else { + state->status_text = "No matching series found"; + } + return 0; +} + +bool app_add_curve_to_active_pane(AppSession *session, UiState *state, const std::string &path) { + const TabUiState *tab_state = app_active_tab_state(state); + if (tab_state == nullptr) { + state->status_text = "No active pane"; + return false; + } + return add_path_curve_to_pane(session, state, tab_state->active_pane_index, path); +} + +bool apply_special_item_to_pane(WorkspaceTab *tab, TabUiState *tab_state, int pane_index, std::string_view item_id) { + if (tab == nullptr || tab_state == nullptr) return false; + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) return false; + const SpecialItemSpec *spec = special_item_spec(item_id); + if (spec == nullptr) return false; + Pane &pane = tab->panes[static_cast(pane_index)]; + if (!((pane.kind == PaneKind::Plot && pane.curves.empty()) || pane_kind_is_special(pane.kind))) { + return false; + } + if (pane.kind == spec->kind && (spec->kind != PaneKind::Camera || pane.camera_view == spec->camera_view)) { + tab_state->active_pane_index = pane_index; + return false; + } + const PaneKind previous_kind = pane.kind; + pane.kind = spec->kind; + pane.camera_view = spec->camera_view; + if (spec->kind == PaneKind::Map) { + if (pane.title == UNTITLED_PANE_TITLE || previous_kind != PaneKind::Plot) { + pane.title = spec->label; + } + } else { + pane.title = spec->label; + resize_tab_pane_state(tab_state, tab->panes.size()); + tab_state->camera_panes[static_cast(pane_index)].fit_to_pane = true; + } + tab_state->active_pane_index = pane_index; + return true; +} + +bool split_pane(WorkspaceTab *tab, int pane_index, PaneDropZone zone, std::optional curve = std::nullopt) { + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return false; + } + if (zone == PaneDropZone::Center) return false; + + const int new_pane_index = static_cast(tab->panes.size()); + Pane new_pane = make_empty_pane(); + if (curve.has_value()) { + new_pane.curves.push_back(*curve); + } + tab->panes.push_back(std::move(new_pane)); + + const bool vertical = zone == PaneDropZone::Top || zone == PaneDropZone::Bottom; + const bool new_before = zone == PaneDropZone::Left || zone == PaneDropZone::Top; + return split_pane_node(&tab->root, pane_index, + vertical ? SplitOrientation::Vertical : SplitOrientation::Horizontal, + new_before, new_pane_index); +} + +bool close_pane(WorkspaceTab *tab, int pane_index) { + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return false; + } + if (tab->panes.size() <= 1) { + tab->panes[static_cast(pane_index)] = make_empty_pane(); + return true; + } + if (remove_pane_node(&tab->root, pane_index)) return false; + tab->panes.erase(tab->panes.begin() + static_cast(pane_index)); + decrement_pane_indices(&tab->root, pane_index); + normalize_split_node(&tab->root); + return true; +} + +void clear_pane(WorkspaceTab *tab, int pane_index) { + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return; + } + Pane &pane = tab->panes[static_cast(pane_index)]; + pane.curves.clear(); + pane.title = UNTITLED_PANE_TITLE; +} + +void create_runtime_tab(SketchLayout *layout, UiState *state) { + const std::string tab_name = next_tab_name(*layout, "tab1"); + layout->tabs.push_back(make_empty_tab(tab_name)); + state->tabs.push_back(TabUiState{.dock_needs_build = true, .active_pane_index = 0, .runtime_id = state->next_tab_runtime_id++}); + request_tab_selection(state, static_cast(layout->tabs.size()) - 1); + state->status_text = "Created " + tab_name; +} + +void duplicate_runtime_tab(SketchLayout *layout, UiState *state) { + if (layout->tabs.empty()) { + return; + } + const int source_index = std::clamp(state->active_tab_index, 0, static_cast(layout->tabs.size()) - 1); + WorkspaceTab copy = layout->tabs[static_cast(source_index)]; + copy.tab_name = next_tab_name(*layout, copy.tab_name + " copy"); + layout->tabs.push_back(std::move(copy)); + const int active_pane_index = source_index < static_cast(state->tabs.size()) ? state->tabs[static_cast(source_index)].active_pane_index : 0; + state->tabs.push_back(TabUiState{.dock_needs_build = true, .active_pane_index = active_pane_index, .runtime_id = state->next_tab_runtime_id++}); + request_tab_selection(state, static_cast(layout->tabs.size()) - 1); + state->status_text = "Duplicated tab"; +} + +void close_runtime_tab(SketchLayout *layout, UiState *state) { + if (layout->tabs.empty()) { + return; + } + const int tab_index = std::clamp(state->active_tab_index, 0, static_cast(layout->tabs.size()) - 1); + if (layout->tabs.size() == 1) { + layout->tabs[0] = make_empty_tab(layout->tabs[0].tab_name.empty() ? "tab1" : layout->tabs[0].tab_name); + if (state->tabs.empty()) { + state->tabs.push_back(TabUiState{.dock_needs_build = true, .active_pane_index = 0}); + } else { + state->tabs.resize(1); + state->tabs[0] = TabUiState{ + .dock_needs_build = true, + .active_pane_index = 0, + .runtime_id = state->tabs[0].runtime_id == 0 ? state->next_tab_runtime_id++ : state->tabs[0].runtime_id, + }; + } + state->active_tab_index = 0; + state->requested_tab_index = 0; + layout->current_tab_index = 0; + cancel_rename_tab(state); + state->status_text = "Closed tab"; + return; + } + layout->tabs.erase(layout->tabs.begin() + static_cast(tab_index)); + if (tab_index < static_cast(state->tabs.size())) { + state->tabs.erase(state->tabs.begin() + static_cast(tab_index)); + } + if (state->active_tab_index >= static_cast(layout->tabs.size())) { + state->active_tab_index = static_cast(layout->tabs.size()) - 1; + } + sync_ui_state(state, *layout); + state->requested_tab_index = state->active_tab_index; + state->status_text = "Closed tab"; +} + +void rename_runtime_tab(SketchLayout *layout, UiState *state) { + if (state->rename_tab_index < 0 || state->rename_tab_index >= static_cast(layout->tabs.size())) { + return; + } + layout->tabs[static_cast(state->rename_tab_index)].tab_name = state->rename_tab_buffer; + state->status_text = "Renamed tab"; + layout->current_tab_index = state->rename_tab_index; + cancel_rename_tab(state); +} + +void draw_inline_tab_editor(AppSession *session, UiState *state, const ImRect &tab_rect) { + const int rename_tab_index = state->rename_tab_index; + if (rename_tab_index < 0 || rename_tab_index >= static_cast(session->layout.tabs.size())) { + return; + } + + const float width = std::max(48.0f, tab_rect.Max.x - tab_rect.Min.x - 10.0f); + const ImVec2 pos = ImVec2(tab_rect.Min.x + 5.0f, tab_rect.Min.y + 2.0f); + ImGui::SetCursorScreenPos(pos); + ImGui::PushItemWidth(width); + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4.0f, 2.0f)); + if (state->focus_rename_tab_input) { + ImGui::SetKeyboardFocusHere(); + state->focus_rename_tab_input = false; + } + const bool submitted = input_text_string("##rename_tab_inline", + &state->rename_tab_buffer, + ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_EnterReturnsTrue); + const bool active = ImGui::IsItemActive(); + const bool escape = active && ImGui::IsKeyPressed(ImGuiKey_Escape); + const bool deactivated = ImGui::IsItemDeactivated(); + ImGui::PopStyleVar(); + ImGui::PopItemWidth(); + + if (escape) { + cancel_rename_tab(state); + } else if (submitted || deactivated) { + const SketchLayout before_layout = session->layout; + rename_runtime_tab(&session->layout, state); + state->undo.push(before_layout); + mark_layout_dirty(session, state); + } +} + + +std::optional draw_pane_drop_target(int tab_index, int pane_index, const Pane &target_pane) { + if (ImGui::GetDragDropPayload() == nullptr) return std::nullopt; + + const ImVec2 window_pos = ImGui::GetWindowPos(); + const ImVec2 content_min = ImGui::GetWindowContentRegionMin(); + const ImVec2 content_max = ImGui::GetWindowContentRegionMax(); + ImRect content_rect(ImVec2(window_pos.x + content_min.x, window_pos.y + content_min.y), + ImVec2(window_pos.x + content_max.x, window_pos.y + content_max.y)); + content_rect.Expand(ImVec2(-6.0f, -6.0f)); + if (content_rect.GetWidth() < 60.0f || content_rect.GetHeight() < 60.0f) { + return std::nullopt; + } + + const float edge_w = std::min(90.0f, content_rect.GetWidth() * 0.24f); + const float edge_h = std::min(72.0f, content_rect.GetHeight() * 0.24f); + struct ZoneRect { + PaneDropZone zone; + ImRect rect; + }; + const std::array zones = {{ + {PaneDropZone::Left, ImRect(content_rect.Min, ImVec2(content_rect.Min.x + edge_w, content_rect.Max.y))}, + {PaneDropZone::Right, ImRect(ImVec2(content_rect.Max.x - edge_w, content_rect.Min.y), content_rect.Max)}, + {PaneDropZone::Top, ImRect(content_rect.Min, ImVec2(content_rect.Max.x, content_rect.Min.y + edge_h))}, + {PaneDropZone::Bottom, ImRect(ImVec2(content_rect.Min.x, content_rect.Max.y - edge_h), content_rect.Max)}, + {PaneDropZone::Center, ImRect(ImVec2(content_rect.Min.x + edge_w, content_rect.Min.y + edge_h), + ImVec2(content_rect.Max.x - edge_w, content_rect.Max.y - edge_h))}, + }}; + + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + for (const ZoneRect &zone : zones) { + if (zone.rect.GetWidth() <= 0.0f || zone.rect.GetHeight() <= 0.0f) { + continue; + } + + ImGui::PushID(static_cast(zone.zone) * 1000 + pane_index + tab_index * 100); + ImGui::SetCursorScreenPos(zone.rect.Min); + ImGui::InvisibleButton("##drop_zone", zone.rect.GetSize()); + if (ImGui::BeginDragDropTarget()) { + auto try_accept = [&](const char *type) -> const ImGuiPayload * { + const ImGuiPayload *p = ImGui::AcceptDragDropPayload(type, ImGuiDragDropFlags_AcceptBeforeDelivery); + if (p && p->Preview) { + draw_list->AddRectFilled(zone.rect.Min, zone.rect.Max, IM_COL32(70, 130, 220, 55)); + draw_list->AddRect(zone.rect.Min, zone.rect.Max, IM_COL32(45, 95, 175, 220), 0.0f, 0, 2.0f); + } + return p; + }; + auto deliver = [&](PaneDropAction action) -> std::optional { + action.zone = zone.zone; + action.target_pane_index = pane_index; + ImGui::EndDragDropTarget(); + ImGui::PopID(); + return action; + }; + if (const ImGuiPayload *p = try_accept("JOTP_BROWSER_PATHS"); p && p->Delivery) { + if (zone.zone != PaneDropZone::Center || target_pane.kind == PaneKind::Plot) { + PaneDropAction action; + action.from_browser = true; + action.browser_paths = decode_browser_drag_payload(static_cast(p->Data)); + return deliver(std::move(action)); + } + } + if (zone.zone != PaneDropZone::Center || (target_pane.kind == PaneKind::Plot && target_pane.curves.empty()) || pane_kind_is_special(target_pane.kind)) { + if (const ImGuiPayload *p = try_accept("JOTP_SPECIAL_ITEM"); p && p->Delivery) { + PaneDropAction action; + action.special_item_id = static_cast(p->Data); + return deliver(std::move(action)); + } + } + if (const ImGuiPayload *p = try_accept("JOTP_PANE_CURVE"); p && p->Delivery) { + if (zone.zone != PaneDropZone::Center || target_pane.kind == PaneKind::Plot) { + PaneDropAction action; + action.curve_ref = *static_cast(p->Data); + return deliver(std::move(action)); + } + } + ImGui::EndDragDropTarget(); + } + ImGui::PopID(); + } + return std::nullopt; +} + +bool commit_tab_layout_change(AppSession *session, + UiState *state, + WorkspaceTab *tab, + TabUiState *tab_state, + const SketchLayout &before_layout, + std::string_view status_text, + bool dock_changed) { + if (dock_changed) { + mark_tab_dock_dirty(state, state->active_tab_index); + } + resize_tab_pane_state(tab_state, tab->panes.size()); + state->undo.push(before_layout); + if (mark_layout_dirty(session, state)) { + state->status_text = std::string(status_text); + } + return true; +} + +bool apply_pane_menu_action(AppSession *session, UiState *state, int pane_index, + const PaneMenuAction &action) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + TabUiState *tab_state = app_active_tab_state(state); + if (tab == nullptr || tab_state == nullptr) return false; + + const int original_pane_count = static_cast(tab->panes.size()); + const SketchLayout before_layout = session->layout; + bool dock_changed = false; + bool layout_changed = false; + std::string_view success_status = "Workspace updated"; + switch (action.kind) { + case PaneMenuActionKind::OpenAxisLimits: + tab_state->active_pane_index = pane_index; + open_axis_limits_editor(*session, state, pane_index); + state->status_text = "Axis limits editor opened"; + return true; + case PaneMenuActionKind::OpenCustomSeries: + tab_state->active_pane_index = pane_index; + open_custom_series_editor(state, preferred_custom_series_source(tab->panes[static_cast(pane_index)])); + state->status_text = "Custom series editor opened"; + return true; + case PaneMenuActionKind::SplitLeft: + case PaneMenuActionKind::SplitRight: + case PaneMenuActionKind::SplitTop: + case PaneMenuActionKind::SplitBottom: { + constexpr PaneDropZone kZones[] = {PaneDropZone::Left, PaneDropZone::Right, PaneDropZone::Top, PaneDropZone::Bottom}; + const auto zone = kZones[static_cast(action.kind) - static_cast(PaneMenuActionKind::SplitLeft)]; + if (split_pane(tab, pane_index, zone)) { + tab_state->active_pane_index = static_cast(tab->panes.size()) - 1; + dock_changed = true; + layout_changed = true; + } + break; + } + case PaneMenuActionKind::ResetView: + reset_shared_range(state, *session); + state->follow_latest = session->data_mode == SessionDataMode::Stream; + state->suppress_range_side_effects = true; + clamp_shared_range(state, *session); + persist_shared_range_to_tab(tab, *state); + clear_pane_vertical_limits(&tab->panes[static_cast(pane_index)]); + layout_changed = true; + success_status = "Plot view reset"; + break; + case PaneMenuActionKind::ResetHorizontal: + reset_shared_range(state, *session); + state->follow_latest = session->data_mode == SessionDataMode::Stream; + state->suppress_range_side_effects = true; + clamp_shared_range(state, *session); + persist_shared_range_to_tab(tab, *state); + layout_changed = true; + success_status = "Horizontal zoom reset"; + break; + case PaneMenuActionKind::ResetVertical: + clear_pane_vertical_limits(&tab->panes[static_cast(pane_index)]); + layout_changed = true; + success_status = "Vertical zoom reset"; + break; + case PaneMenuActionKind::Clear: + clear_pane(tab, pane_index); + tab_state->active_pane_index = pane_index; + layout_changed = true; + break; + case PaneMenuActionKind::Close: + if (close_pane(tab, pane_index)) { + tab_state->active_pane_index = std::clamp(pane_index, 0, static_cast(tab->panes.size()) - 1); + layout_changed = true; + dock_changed = static_cast(tab->panes.size()) != original_pane_count; + } + break; + case PaneMenuActionKind::None: + return false; + } + + if (!layout_changed) { + return false; + } + return commit_tab_layout_change(session, state, tab, tab_state, before_layout, success_status, dock_changed); +} + +bool apply_pane_drop_action(AppSession *session, UiState *state, const PaneDropAction &action) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + TabUiState *tab_state = app_active_tab_state(state); + if (tab == nullptr || tab_state == nullptr) return false; + + if (!action.special_item_id.empty()) { + const SpecialItemSpec *spec = special_item_spec(action.special_item_id); + if (spec == nullptr) { + return false; + } + if (action.zone == PaneDropZone::Center) { + if (action.target_pane_index < 0 || action.target_pane_index >= static_cast(tab->panes.size())) { + return false; + } + if (!((tab->panes[static_cast(action.target_pane_index)].kind == PaneKind::Plot + && tab->panes[static_cast(action.target_pane_index)].curves.empty()) + || pane_kind_is_special(tab->panes[static_cast(action.target_pane_index)].kind))) { + state->status_text = std::string(special_item_label(action.special_item_id)) + " can only replace another special pane or use an empty pane"; + return false; + } + const SketchLayout before_layout = session->layout; + const bool changed = apply_special_item_to_pane(tab, tab_state, action.target_pane_index, spec->id); + if (!changed) { + state->status_text = std::string(special_item_label(action.special_item_id)) + " already shown in pane"; + return false; + } + return commit_tab_layout_change(session, state, tab, tab_state, before_layout, + std::string(special_item_label(action.special_item_id)) + " added to pane", + false); + } + const SketchLayout before_layout = session->layout; + if (split_pane(tab, action.target_pane_index, action.zone)) { + tab_state->active_pane_index = static_cast(tab->panes.size()) - 1; + const bool changed = apply_special_item_to_pane(tab, tab_state, tab_state->active_pane_index, spec->id); + if (!changed) { + return false; + } + return commit_tab_layout_change(session, state, tab, tab_state, before_layout, + "Split pane and added " + std::string(special_item_label(action.special_item_id)), + true); + } + return false; + } + + if (action.from_browser) { + if (action.browser_paths.empty()) return false; + if (action.zone == PaneDropZone::Center) { + const int inserted_count = add_path_curves_to_pane(session, state, action.target_pane_index, action.browser_paths); + if (inserted_count > 0) { + tab_state->active_pane_index = action.target_pane_index; + } + return inserted_count > 0; + } + const SketchLayout before_layout = session->layout; + if (split_pane(tab, action.target_pane_index, action.zone)) { + tab_state->active_pane_index = static_cast(tab->panes.size()) - 1; + int inserted_count = 0; + for (const std::string &path : action.browser_paths) { + if (app_find_route_series(*session, path) == nullptr) continue; + if (add_curve_to_pane(tab, tab_state->active_pane_index, + make_curve_for_path(tab->panes[static_cast(tab_state->active_pane_index)], path))) { + ++inserted_count; + } + } + if (inserted_count > 0) { + return commit_tab_layout_change(session, state, tab, tab_state, before_layout, + inserted_count == 1 + ? "Split pane and added " + action.browser_paths.front() + : "Split pane and added " + std::to_string(inserted_count) + " curves", + true); + } + return false; + } + return false; + } + + if (action.curve_ref.tab_index < 0 + || action.curve_ref.tab_index >= static_cast(session->layout.tabs.size())) { + return false; + } + WorkspaceTab &source_tab = session->layout.tabs[static_cast(action.curve_ref.tab_index)]; + if (action.curve_ref.pane_index < 0 + || action.curve_ref.pane_index >= static_cast(source_tab.panes.size())) { + return false; + } + const Pane &source_pane = source_tab.panes[static_cast(action.curve_ref.pane_index)]; + if (action.curve_ref.curve_index < 0 + || action.curve_ref.curve_index >= static_cast(source_pane.curves.size())) { + return false; + } + const Curve curve = source_pane.curves[static_cast(action.curve_ref.curve_index)]; + + if (action.zone == PaneDropZone::Center) { + const SketchLayout before_layout = session->layout; + const bool inserted = add_curve_to_pane(tab, action.target_pane_index, curve); + tab_state->active_pane_index = action.target_pane_index; + if (inserted) { + state->undo.push(before_layout); + if (mark_layout_dirty(session, state)) { + state->status_text = "Added " + app_curve_display_name(curve); + } + } else { + state->status_text = "Curve already present"; + } + return true; + } + const SketchLayout before_layout = session->layout; + if (split_pane(tab, action.target_pane_index, action.zone, curve)) { + tab_state->active_pane_index = static_cast(tab->panes.size()) - 1; + return commit_tab_layout_change(session, state, tab, tab_state, before_layout, + "Split pane and added " + app_curve_display_name(curve), + true); + } + return false; +} + +ImGuiDir dock_direction(SplitOrientation orientation) { + return orientation == SplitOrientation::Horizontal ? ImGuiDir_Left : ImGuiDir_Up; +} + +void build_dock_tree(const WorkspaceNode &node, const WorkspaceTab &tab, int tab_runtime_id, ImGuiID dock_id) { + if (node.is_pane) { + if (node.pane_index >= 0 && node.pane_index < static_cast(tab.panes.size())) { + ImGui::DockBuilderDockWindow( + pane_window_name(tab_runtime_id, node.pane_index, tab.panes[static_cast(node.pane_index)]).c_str(), + dock_id); + if (ImGuiDockNode *dock_node = ImGui::DockBuilderGetNode(dock_id); dock_node != nullptr) { + dock_node->LocalFlags |= ImGuiDockNodeFlags_AutoHideTabBar | + ImGuiDockNodeFlags_NoWindowMenuButton | + ImGuiDockNodeFlags_NoCloseButton; + } + } + return; + } + if (node.children.empty()) { + return; + } + if (node.children.size() == 1) { + build_dock_tree(node.children.front(), tab, tab_runtime_id, dock_id); + return; + } + + float remaining = 1.0f; + ImGuiID current = dock_id; + for (size_t i = 0; i + 1 < node.children.size(); ++i) { + const float child_size = i < node.sizes.size() ? node.sizes[i] : 0.0f; + const float ratio = remaining <= 0.0f ? 0.5f : std::clamp(child_size / remaining, 0.05f, 0.95f); + ImGuiID child_id = 0; + ImGuiID remainder_id = 0; + ImGui::DockBuilderSplitNode(current, dock_direction(node.orientation), ratio, &child_id, &remainder_id); + build_dock_tree(node.children[i], tab, tab_runtime_id, child_id); + current = remainder_id; + remaining = std::max(0.0f, remaining - child_size); + } + build_dock_tree(node.children.back(), tab, tab_runtime_id, current); +} + +void ensure_dockspace(const WorkspaceTab &tab, TabUiState *tab_state, ImVec2 dockspace_size) { + if (dockspace_size.x <= 0.0f || dockspace_size.y <= 0.0f || tab_state == nullptr) { + return; + } + const bool size_changed = std::abs(tab_state->last_dockspace_size.x - dockspace_size.x) > 1.0f + || std::abs(tab_state->last_dockspace_size.y - dockspace_size.y) > 1.0f; + if (!tab_state->dock_needs_build && !size_changed) { + return; + } + + const ImGuiID dockspace_id = dockspace_id_for_tab(tab_state->runtime_id); + ImGui::DockBuilderRemoveNode(dockspace_id); + ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_DockSpace | ImGuiDockNodeFlags_AutoHideTabBar); + ImGui::DockBuilderSetNodeSize(dockspace_id, dockspace_size); + build_dock_tree(tab.root, tab, tab_state->runtime_id, dockspace_id); + ImGui::DockBuilderFinish(dockspace_id); + tab_state->dock_needs_build = false; + tab_state->last_dockspace_size = dockspace_size; +} + +void draw_pane_windows(AppSession *session, UiState *state) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + TabUiState *tab_state = app_active_tab_state(state); + if (tab == nullptr || tab_state == nullptr) { + return; + } + + std::optional> pending_menu_action; + std::optional pending_close_pane; + std::optional pending_drop_action; + + for (size_t i = 0; i < tab->panes.size(); ++i) { + Pane &pane = tab->panes[i]; + std::optional menu_action; + std::optional drop_action; + bool close_pane_requested = false; + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(2.0f, 2.0f)); + ImGui::PushStyleColor(ImGuiCol_WindowBg, color_rgb(250, 250, 251)); + ImGui::PushStyleColor(ImGuiCol_Border, color_rgb(194, 198, 204)); + ImGui::PushStyleColor(ImGuiCol_TitleBg, color_rgb(252, 252, 253)); + ImGui::PushStyleColor(ImGuiCol_TitleBgActive, color_rgb(252, 252, 253)); + ImGui::PushStyleColor(ImGuiCol_TitleBgCollapsed, color_rgb(252, 252, 253)); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse; + const std::string window_name = pane_window_name(tab_state->runtime_id, static_cast(i), pane); + const bool opened = ImGui::Begin(window_name.c_str(), nullptr, flags); + if (opened) { + if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) + || (ImGui::IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows) && ImGui::IsMouseClicked(0))) { + tab_state->active_pane_index = static_cast(i); + } + if (pane.kind == PaneKind::Map) { + draw_map_pane(session, state, &pane, static_cast(i)); + } else if (pane.kind == PaneKind::Camera) { + draw_camera_pane(session, state, tab_state, static_cast(i), pane); + } else { + draw_plot(*session, &pane, state); + } + draw_pane_frame_overlay(); + close_pane_requested = draw_pane_close_button_overlay(); + menu_action = draw_pane_context_menu(*tab, static_cast(i)); + drop_action = draw_pane_drop_target(state->active_tab_index, static_cast(i), pane); + } + ImGui::End(); + ImGui::PopStyleVar(); + ImGui::PopStyleColor(5); + if (!pending_menu_action.has_value() && menu_action.has_value()) { + pending_menu_action = std::make_pair(static_cast(i), *menu_action); + } + if (!pending_menu_action.has_value() && !pending_close_pane.has_value() && close_pane_requested) { + pending_close_pane = static_cast(i); + } + if (!pending_menu_action.has_value() && !pending_close_pane.has_value() + && !pending_drop_action.has_value() && drop_action.has_value()) { + pending_drop_action = *drop_action; + } + } + + if (pending_menu_action.has_value()) { + apply_pane_menu_action(session, state, pending_menu_action->first, pending_menu_action->second); + return; + } + if (pending_close_pane.has_value()) { + PaneMenuAction action; + action.kind = PaneMenuActionKind::Close; + action.pane_index = *pending_close_pane; + apply_pane_menu_action(session, state, *pending_close_pane, action); + return; + } + if (pending_drop_action.has_value()) { + apply_pane_drop_action(session, state, *pending_drop_action); + } +} + +void draw_workspace(AppSession *session, const UiMetrics &ui, UiState *state) { + state->custom_series.selected = false; + state->logs.selected = false; + ImGui::SetNextWindowPos(ImVec2(ui.content_x, ui.content_y)); + ImGui::SetNextWindowSize(ImVec2(ui.content_w, ui.content_h)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); + ImGui::PushStyleColor(ImGuiCol_WindowBg, color_rgb(244, 246, 248)); + ImGui::PushStyleColor(ImGuiCol_Border, color_rgb(186, 191, 198)); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | + ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoSavedSettings | + ImGuiWindowFlags_NoScrollbar | + ImGuiWindowFlags_NoScrollWithMouse; + if (ImGui::Begin("##workspace_host", nullptr, flags)) { + const int selection_request = state->requested_tab_index; + std::optional rename_tab_rect; + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f, 6.0f)); + ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(8.0f, 4.0f)); + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)); + if (ImGui::BeginTabBar("##layout_tabs", ImGuiTabBarFlags_FittingPolicyScroll)) { + enum class TabActionKind { + None, + New, + Rename, + Duplicate, + Close, + }; + TabActionKind pending_action = TabActionKind::None; + int pending_tab_index = -1; + bool custom_series_tab_open = state->custom_series.open; + bool suppress_aux_tabs_this_frame = state->request_close_tab && session->layout.tabs.size() == 1; + for (size_t i = 0; i < session->layout.tabs.size(); ++i) { + const WorkspaceTab &tab = session->layout.tabs[i]; + const TabUiState &tab_ui = state->tabs[i]; + ImGuiTabItemFlags tab_flags = ImGuiTabItemFlags_None; + if (static_cast(i) == selection_request) { + tab_flags |= ImGuiTabItemFlags_SetSelected; + } + bool tab_open = true; + const bool opened = ImGui::BeginTabItem(tab_item_label(tab, tab_ui.runtime_id).c_str(), &tab_open, tab_flags); + if (state->rename_tab_index == static_cast(i)) { + rename_tab_rect = ImRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax()); + } + if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { + pending_action = TabActionKind::Rename; + pending_tab_index = static_cast(i); + } + if (!tab_open) { + pending_action = TabActionKind::Close; + pending_tab_index = static_cast(i); + if (session->layout.tabs.size() == 1) { + suppress_aux_tabs_this_frame = true; + } + } + if (ImGui::BeginPopupContextItem()) { + if (ImGui::MenuItem("New Tab")) { + pending_action = TabActionKind::New; + } + if (ImGui::MenuItem("Rename Tab...")) { + pending_action = TabActionKind::Rename; + pending_tab_index = static_cast(i); + } + if (ImGui::MenuItem("Duplicate Tab")) { + pending_action = TabActionKind::Duplicate; + pending_tab_index = static_cast(i); + } + if (ImGui::MenuItem("Close Tab")) { + pending_action = TabActionKind::Close; + pending_tab_index = static_cast(i); + } + ImGui::EndPopup(); + } + if (opened) { + state->active_tab_index = static_cast(i); + session->layout.current_tab_index = state->active_tab_index; + if (i < state->tabs.size()) { + ensure_dockspace(tab, &state->tabs[i], ImGui::GetContentRegionAvail()); + } + ImGui::DockSpace(dockspace_id_for_tab(tab_ui.runtime_id), + ImVec2(0.0f, 0.0f), + ImGuiDockNodeFlags_AutoHideTabBar | + ImGuiDockNodeFlags_NoWindowMenuButton | + ImGuiDockNodeFlags_NoCloseButton); + ImGui::EndTabItem(); + } + } + if (!suppress_aux_tabs_this_frame) { + ImGuiTabItemFlags logs_flags = ImGuiTabItemFlags_None; + if (state->logs.request_select) { + logs_flags |= ImGuiTabItemFlags_SetSelected; + } + if (ImGui::BeginTabItem("Logs##workspace_logs", nullptr, logs_flags)) { + state->logs.request_select = false; + state->logs.selected = true; + draw_logs_tab(session, state); + ImGui::EndTabItem(); + } + if (custom_series_tab_open) { + ImGuiTabItemFlags custom_flags = ImGuiTabItemFlags_None; + if (state->custom_series.request_select) { + custom_flags |= ImGuiTabItemFlags_SetSelected; + } + if (ImGui::BeginTabItem("Custom Series##workspace_custom_series", &custom_series_tab_open, custom_flags)) { + state->custom_series.request_select = false; + state->custom_series.selected = true; + draw_custom_series_editor(session, state); + ImGui::EndTabItem(); + } + } + } + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 5.0f)); + ImGui::PushStyleColor(ImGuiCol_Tab, color_rgb(210, 217, 225)); + ImGui::PushStyleColor(ImGuiCol_TabHovered, color_rgb(224, 230, 237)); + ImGui::PushStyleColor(ImGuiCol_TabSelected, color_rgb(242, 245, 248)); + if (ImGui::TabItemButton(" ##new_tab_button", ImGuiTabItemFlags_Trailing)) { + pending_action = TabActionKind::New; + } + { + const ImRect rect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax()); + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + const ImU32 color = ImGui::GetColorU32(color_rgb(72, 79, 88)); + const ImVec2 center((rect.Min.x + rect.Max.x) * 0.5f, (rect.Min.y + rect.Max.y) * 0.5f); + constexpr float half_extent = 6.25f; + constexpr float thickness = 2.0f; + draw_list->AddLine(ImVec2(center.x - half_extent, center.y), + ImVec2(center.x + half_extent, center.y), + color, + thickness); + draw_list->AddLine(ImVec2(center.x, center.y - half_extent), + ImVec2(center.x, center.y + half_extent), + color, + thickness); + } + if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) { + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(8.0f, 6.0f)); + ImGui::BeginTooltip(); + ImGui::TextUnformatted("New Tab"); + ImGui::EndTooltip(); + ImGui::PopStyleVar(); + } + ImGui::PopStyleColor(3); + ImGui::PopStyleVar(); + ImGui::EndTabBar(); + + if (!custom_series_tab_open) { + state->custom_series.open = false; + state->custom_series.request_select = false; + } + + if (rename_tab_rect.has_value()) { + draw_inline_tab_editor(session, state, *rename_tab_rect); + } + + if (state->request_new_tab || pending_action == TabActionKind::New) { + const SketchLayout before_layout = session->layout; + create_runtime_tab(&session->layout, state); + state->undo.push(before_layout); + mark_layout_dirty(session, state); + state->request_new_tab = false; + } else if (pending_action == TabActionKind::Rename) { + begin_rename_tab(session->layout, state, pending_tab_index); + } else if (state->request_duplicate_tab || pending_action == TabActionKind::Duplicate) { + if (pending_tab_index >= 0) { + request_tab_selection(state, pending_tab_index); + } + const SketchLayout before_layout = session->layout; + duplicate_runtime_tab(&session->layout, state); + state->undo.push(before_layout); + mark_layout_dirty(session, state); + state->request_duplicate_tab = false; + } else if (state->request_close_tab || pending_action == TabActionKind::Close) { + if (pending_tab_index >= 0) { + request_tab_selection(state, pending_tab_index); + } + const SketchLayout before_layout = session->layout; + close_runtime_tab(&session->layout, state); + state->undo.push(before_layout); + mark_layout_dirty(session, state); + state->request_close_tab = false; + } + if (state->requested_tab_index == selection_request) { + state->requested_tab_index = -1; + } + } + ImGui::PopStyleColor(3); + ImGui::PopStyleVar(2); + } + ImGui::End(); + ImGui::PopStyleVar(); + ImGui::PopStyleColor(2); +} + +int run(const Options &options) { + try { + const fs::path layout_path = options.layout.empty() ? fs::path() : resolve_layout_path(options.layout); + AppSession session = { + .layout_path = layout_path, + .autosave_path = layout_path.empty() ? fs::path() : autosave_path_for_layout(layout_path), + .route_name = options.route_name, + .data_dir = options.data_dir, + .dbc_override = {}, + .stream_source = StreamSourceConfig{.kind = is_local_stream_address(options.stream_address) + ? StreamSourceKind::CerealLocal + : StreamSourceKind::CerealRemote, + .address = options.stream_address}, + .stream_buffer_seconds = options.stream_buffer_seconds, + .data_mode = options.stream ? SessionDataMode::Stream : SessionDataMode::Route, + .route_id = options.stream ? RouteIdentifier{} : parse_route_identifier(options.route_name), + .layout = options.layout.empty() ? make_empty_layout() : load_sketch_layout(layout_path), + }; + UiState ui_state; + if (!layout_path.empty() && !session.autosave_path.empty() && fs::exists(session.autosave_path)) { + session.layout = load_sketch_layout(session.autosave_path); + ui_state.layout_dirty = true; + } + ui_state.undo.reset(session.layout); + sync_ui_state(&ui_state, session.layout); + sync_route_buffers(&ui_state, session); + sync_stream_buffers(&ui_state, session); + sync_layout_buffers(&ui_state, session); + + session.async_route_loading = session.data_mode == SessionDataMode::Route + && options.show && options.output_path.empty() && !options.sync_load; + if (session.data_mode == SessionDataMode::Route && !session.async_route_loading) { + TerminalRouteProgress route_progress(::isatty(STDERR_FILENO) != 0); + rebuild_session_route_data(&session, &ui_state, [&](const RouteLoadProgress &update) { + route_progress.update(update); + }); + route_progress.finish(); + } + + GlfwRuntime glfw_runtime(options); + ImGuiRuntime imgui_runtime(glfw_runtime.window()); + configure_style(); + session.map_data = std::make_unique(); + for (std::unique_ptr &feed : session.pane_camera_feeds) { + feed = std::make_unique(); + } + sync_camera_feeds(&session); + + if (session.async_route_loading) { + session.route_loader = std::make_unique(::isatty(STDERR_FILENO) != 0); + start_async_route_load(&session, &ui_state); + } else if (session.data_mode == SessionDataMode::Stream) { + session.stream_poller = std::make_unique(); + start_stream_session(&session, &ui_state, session.stream_source, session.stream_buffer_seconds); + } + + const bool should_capture = !options.output_path.empty(); + const fs::path output_path = should_capture ? fs::path(options.output_path) : fs::path(); + const bool capture_has_map = should_capture && active_tab_has_map_pane(session.layout); + if (options.show) { + bool captured = false; + const auto capture_ready_at = std::chrono::steady_clock::now() + (capture_has_map ? std::chrono::milliseconds(1800) + : std::chrono::milliseconds(0)); + while (!glfwWindowShouldClose(glfw_runtime.window())) { + const bool capture_ready = std::chrono::steady_clock::now() >= capture_ready_at; + const fs::path *capture_path = (!captured && should_capture && capture_ready) ? &output_path : nullptr; + render_frame(glfw_runtime.window(), &session, &ui_state, capture_path); + captured = captured || capture_path != nullptr; + } + } else { + render_frame(glfw_runtime.window(), &session, &ui_state, nullptr); + if (should_capture) { + for (int i = 0; i < 3; ++i) { + render_frame(glfw_runtime.window(), &session, &ui_state, nullptr); + } + if (capture_has_map) { + for (int i = 0; i < 18; ++i) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + render_frame(glfw_runtime.window(), &session, &ui_state, nullptr); + } + } + render_frame(glfw_runtime.window(), &session, &ui_state, &output_path); + } + } + if (session.stream_poller) { + session.stream_poller->stop(); + } + session.map_data.reset(); + for (std::unique_ptr &feed : session.pane_camera_feeds) { + feed.reset(); + } + return 0; + } catch (const std::exception &err) { + std::cerr << err.what() << "\n"; + return 1; + } +} diff --git a/tools/jotpluggler/app.h b/tools/jotpluggler/app.h new file mode 100644 index 0000000000..71f71f2d9f --- /dev/null +++ b/tools/jotpluggler/app.h @@ -0,0 +1,884 @@ +#pragma once + +#include "cereal/gen/cpp/log.capnp.h" +#include "imgui.h" +#include "tools/jotpluggler/dbc.h" +#include "tools/jotpluggler/util.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ***** +// app options & entry point +// ***** + +struct Options { + std::string layout; + std::string route_name; + std::string data_dir; + std::string output_path; + std::string stream_address = "127.0.0.1"; + int width = 1600; + int height = 900; + bool show = false; + bool sync_load = false; + bool stream = false; + double stream_buffer_seconds = 30.0; +}; + +int run(const Options &options); + +// ***** +// sketch layout & route data +// ***** + +struct PlotRange { + bool valid = false; + double left = 0.0; + double right = 0.0; + double bottom = 0.0; + double top = 1.0; + bool has_y_limit_min = false; + bool has_y_limit_max = false; + double y_limit_min = 0.0; + double y_limit_max = 1.0; +}; + +struct CustomPythonSeries { + std::string linked_source; + std::vector additional_sources; + std::string globals_code; + std::string function_code; +}; + +struct Curve { + std::string name; + std::string label; + std::array color = {160, 170, 180}; + bool visible = true; + bool derivative = false; + double derivative_dt = 0.0; + double value_scale = 1.0; + double value_offset = 0.0; + bool runtime_only = false; + std::optional custom_python; + std::string runtime_error_message; + std::vector xs; + std::vector ys; +}; + +enum class PaneKind : uint8_t { + Plot, + Map, + Camera, +}; + +enum class CameraViewKind : uint8_t { + Road, + Driver, + WideRoad, + QRoad, +}; + +struct Pane { + PaneKind kind = PaneKind::Plot; + CameraViewKind camera_view = CameraViewKind::Road; + std::string title; + PlotRange range; + std::vector curves; +}; + +enum class SplitOrientation { + Horizontal, + Vertical, +}; + +struct WorkspaceNode { + bool is_pane = false; + int pane_index = -1; + SplitOrientation orientation = SplitOrientation::Horizontal; + std::vector sizes; + std::vector children; +}; + +struct WorkspaceTab { + std::string tab_name; + WorkspaceNode root; + std::vector panes; +}; + +struct RouteSeries { + std::string path; + std::vector times; + std::vector values; +}; + +struct CameraSegmentFile { + int segment = -1; + std::string path; +}; + +struct CameraFrameIndexEntry { + double timestamp = 0.0; + int segment = -1; + int decode_index = -1; + uint32_t frame_id = 0; +}; + +struct CameraFeedIndex { + std::vector segment_files; + std::vector entries; +}; + +enum class LogOrigin : uint8_t { + Log, + Android, + Alert, +}; + +struct LogEntry { + double mono_time = 0.0; + double boot_time = 0.0; + double wall_time = 0.0; + uint8_t level = 20; + std::string source; + std::string func; + std::string message; + std::string context; + LogOrigin origin = LogOrigin::Log; +}; + +struct EnumInfo { + std::vector names; +}; + +struct SeriesFormat { + int decimals = 3; + bool integer_like = false; + bool has_negative = false; + int digits_before = 1; + int total_width = 0; + char fmt[16] = "%7.3f"; +}; + +enum class CanServiceKind : uint8_t { + Can, + Sendcan, +}; + +struct CanMessageId { + CanServiceKind service = CanServiceKind::Can; + uint8_t bus = 0; + uint32_t address = 0; + + bool operator==(const CanMessageId &other) const { + return service == other.service && bus == other.bus && address == other.address; + } +}; + +struct CanMessageIdHash { + size_t operator()(const CanMessageId &id) const { + return (static_cast(id.service) << 40) + ^ (static_cast(id.bus) << 32) + ^ static_cast(id.address); + } +}; + +struct CanFrameSample { + double mono_time = 0.0; + uint16_t bus_time = 0; + std::string data; +}; + +struct LiveCanFrame { + double mono_time = 0.0; + uint8_t bus = 0; + uint32_t address = 0; + uint16_t bus_time = 0; + std::string data; +}; + +struct CanMessageData { + CanMessageId id; + std::vector samples; +}; + +struct TimelineEntry { + enum class Type : uint8_t { + None, + Engaged, + AlertInfo, + AlertWarning, + AlertCritical, + }; + + double start_time = 0.0; + double end_time = 0.0; + Type type = Type::None; +}; + +struct GpsPoint { + double time = 0.0; + double lat = 0.0; + double lon = 0.0; + float bearing = 0.0f; + TimelineEntry::Type type = TimelineEntry::Type::None; +}; + +struct GpsTrace { + std::vector points; + double min_lat = 0.0; + double max_lat = 0.0; + double min_lon = 0.0; + double max_lon = 0.0; +}; + +enum class LogSelector : uint8_t { + Auto, + RLog, + QLog, +}; + +struct RouteIdentifier { + std::string dongle_id; + std::string log_id; + int slice_begin = 0; + int slice_end = -1; + bool slice_explicit = false; + LogSelector selector = LogSelector::Auto; + bool selector_explicit = false; + int available_begin = 0; + int available_end = 0; + + bool empty() const { + return dongle_id.empty() || log_id.empty(); + } + + std::string canonical() const { + return empty() ? std::string() : dongle_id + "/" + log_id; + } + + std::string onebox() const { + return empty() ? std::string() : dongle_id + "|" + log_id; + } + + std::string display_slice() const { + const int begin = slice_explicit ? slice_begin : available_begin; + const int end = slice_explicit ? slice_end : available_end; + if (end < 0 || end == begin) { + return std::to_string(begin); + } + return std::to_string(begin) + ":" + std::to_string(end); + } + + char selector_char() const { + switch (selector) { + case LogSelector::RLog: return 'r'; + case LogSelector::QLog: return 'q'; + case LogSelector::Auto: + default: return 'a'; + } + } + + std::string full_spec() const { + if (empty()) return {}; + std::string spec = dongle_id + "/" + log_id; + if (slice_explicit) { + spec += "/"; + spec += display_slice(); + } + if (selector_explicit) { + spec += "/"; + spec.push_back(selector_char()); + } + return spec; + } +}; + +struct RouteData { + std::vector series; + std::vector paths; + std::vector roots; + std::vector can_messages; + CameraFeedIndex road_camera; + CameraFeedIndex driver_camera; + CameraFeedIndex wide_road_camera; + CameraFeedIndex qroad_camera; + GpsTrace gps_trace; + std::vector logs; + std::vector timeline; + std::unordered_map enum_info; + std::unordered_map series_formats; + std::string car_fingerprint; + std::string dbc_name; + RouteIdentifier route_id; + bool has_time_range = false; + double x_min = 0.0; + double x_max = 1.0; +}; + +struct StreamExtractBatch { + std::vector series; + std::vector can_messages; + std::vector logs; + std::vector timeline; + std::unordered_map enum_info; + std::string car_fingerprint; + std::string dbc_name; + bool has_time_offset = false; + double time_offset = 0.0; +}; + +struct SketchLayout { + std::vector tabs; + std::vector roots; + int current_tab_index = 0; +}; + +enum class RouteLoadStage { + Resolving, + DownloadingSegment, + ParsingSegment, + Finished, +}; + +struct RouteLoadProgress { + RouteLoadStage stage = RouteLoadStage::Resolving; + size_t segment_index = 0; + size_t segment_count = 0; + uint64_t current = 0; + uint64_t total = 0; + size_t segments_downloaded = 0; + size_t segments_parsed = 0; + size_t total_segments = 0; + uint64_t bytes_downloaded = 0; + int num_workers = 1; + std::string segment_name; +}; + +using RouteLoadProgressCallback = std::function; + +class StreamAccumulator { +public: + explicit StreamAccumulator(const std::string &dbc_name = {}, std::optional time_offset = std::nullopt); + ~StreamAccumulator(); + + StreamAccumulator(const StreamAccumulator &) = delete; + StreamAccumulator &operator=(const StreamAccumulator &) = delete; + + void setDbcName(const std::string &dbc_name); + void appendEvent(cereal::Event::Which which, kj::ArrayPtr data); + void appendCanFrames(CanServiceKind service, const std::vector &frames); + StreamExtractBatch takeBatch(); + const std::string &carFingerprint() const; + const std::string &dbc_name() const; + std::optional timeOffset() const; + +private: + struct Impl; + std::unique_ptr impl_; +}; + +SketchLayout load_sketch_layout(const std::filesystem::path &layout_path); +std::vector available_dbc_names(); +std::vector collect_route_roots_for_paths(const std::vector &paths); +std::optional load_dbc_by_name(const std::string &dbc_name); +std::vector decode_can_messages(const std::vector &can_messages, + const std::string &dbc_name, + std::unordered_map *enum_info = nullptr); +RouteData load_route_data(const std::string &route_name, + const std::string &data_dir = {}, + const std::string &dbc_name = {}, + const RouteLoadProgressCallback &progress = {}); +RouteIdentifier parse_route_identifier(std::string_view route_name); +void rebuild_gps_trace(RouteData *route_data); + +// ***** +// icons +// ***** + +namespace icon { +constexpr const char ARROW_DOWN_UP[] = "\xef\x84\xa7"; +constexpr const char ARROW_LEFT_RIGHT[] = "\xef\x84\xab"; +constexpr const char BAR_CHART[] = "\xef\x85\xbe"; +constexpr const char BOX_ARROW_UP_RIGHT[] = "\xef\x87\x85"; +constexpr const char CLIPBOARD[] = "\xef\x8a\x90"; +constexpr const char CLIPBOARD2[] = "\xef\x9c\xb3"; +constexpr const char DISTRIBUTE_HORIZONTAL[] = "\xef\x8c\x83"; +constexpr const char DISTRIBUTE_VERTICAL[] = "\xef\x8c\x84"; +constexpr const char FILE_EARMARK_IMAGE[] = "\xef\x8d\xad"; +constexpr const char FILES[] = "\xef\x8f\x82"; +constexpr const char INFO_CIRCLE[] = "\xef\x90\xb1"; +constexpr const char PALETTE[] = "\xef\x92\xb1"; +constexpr const char PLUS_SLASH_MINUS[] = "\xef\x9a\xaa"; +constexpr const char SAVE[] = "\xef\x94\xa5"; +constexpr const char SLIDERS[] = "\xef\x95\xab"; +constexpr const char TRASH[] = "\xef\x97\x9e"; +constexpr const char X_SQUARE[] = "\xef\x98\xa9"; +constexpr const char ZOOM_OUT[] = "\xef\x98\xad"; +} // namespace icon + +void icon_add_font(float size, bool merge = false, const ImFont *base_font = nullptr); +bool icon_menu_item(const char *glyph, + const char *label, + const char *shortcut = nullptr, + bool selected = false, + bool enabled = true); + +// ***** +// app session, UI state, & internal API +// ***** + +class AsyncRouteLoader; +class CameraFeedView; +class StreamPoller; +class MapDataManager; + +enum class SessionDataMode : uint8_t { + Route, + Stream, +}; + +enum class StreamSourceKind : uint8_t { + CerealLocal, + CerealRemote, +}; + +struct StreamSourceConfig { + StreamSourceKind kind = StreamSourceKind::CerealLocal; + std::string address = "127.0.0.1"; +}; + +struct BrowserNode { + std::string label; + std::string full_path; + std::vector children; +}; + +struct AppSession { + std::filesystem::path layout_path; + std::filesystem::path autosave_path; + std::string route_name; + std::string data_dir; + std::string dbc_override; + StreamSourceConfig stream_source; + double stream_buffer_seconds = 30.0; + SessionDataMode data_mode = SessionDataMode::Route; + RouteIdentifier route_id; + SketchLayout layout; + RouteData route_data; + std::unordered_map series_by_path; + std::vector browser_nodes; + std::unique_ptr route_loader; + std::unique_ptr stream_poller; + std::array, 4> pane_camera_feeds; + std::unique_ptr map_data; + bool async_route_loading = false; + double next_stream_custom_refresh_time = 0.0; + bool stream_paused = false; + std::optional stream_time_offset; +}; + +struct TabUiState { + struct MapPaneState { + bool initialized = false; + bool follow = false; + float zoom = 1.0f; + double center_lat = 0.0; + double center_lon = 0.0; + }; + + struct CameraPaneState { + bool fit_to_pane = true; + }; + + bool dock_needs_build = true; + int active_pane_index = 0; + int runtime_id = 0; + ImVec2 last_dockspace_size = ImVec2(0.0f, 0.0f); + std::vector map_panes; + std::vector camera_panes; +}; + +struct CustomSeriesEditorState { + bool open = false; + bool open_help = false; + bool request_select = false; + bool selected = false; + bool focus_name = false; + int selected_template = 0; + int selected_additional_source = -1; + std::string name; + std::string linked_source; + std::vector additional_sources; + std::string globals_code; + std::string function_code = "return value"; + std::string preview_label; + std::vector preview_xs; + std::vector preview_ys; + bool preview_is_result = false; +}; + +enum class LogTimeMode : uint8_t { + Route, + Boot, + WallClock, +}; + +struct LogsUiState { + bool selected = false; + bool request_select = false; + bool all_sources = true; + uint32_t enabled_levels_mask = 0b11110; + int expanded_index = -1; + std::string search; + std::vector selected_sources; + double last_auto_scroll_time = -1.0; + LogTimeMode time_mode = LogTimeMode::Route; +}; + +struct AxisLimitsEditorState { + bool open = false; + int pane_index = -1; + double x_min = 0.0; + double x_max = 1.0; + bool y_min_enabled = false; + bool y_max_enabled = false; + double y_min = 0.0; + double y_max = 1.0; +}; + +struct DbcEditorState { + bool open = false; + bool loaded = false; + std::string source_name; + std::filesystem::path source_path; + enum class SourceKind : uint8_t { + None, + Generated, + Opendbc, + }; + SourceKind source_kind = SourceKind::None; + std::string save_name; + std::string text; +}; + +enum class TimelineDragMode : uint8_t { + None, + ScrubCursor, + PanViewport, + ResizeLeft, + ResizeRight, +}; + +struct UndoStack { + static constexpr size_t kMaxHistory = 50; + + std::vector history; + int position = -1; + + void reset(const SketchLayout &layout) { + history.clear(); + history.push_back(layout); + position = 0; + } + + void push(const SketchLayout &layout) { + if (position < 0) { + reset(layout); + return; + } + if (position + 1 < static_cast(history.size())) { + history.resize(static_cast(position + 1)); + } + history.push_back(layout); + if (history.size() > kMaxHistory) { + history.erase(history.begin()); + } + position = static_cast(history.size()) - 1; + } + + bool can_undo() const { + return position > 0; + } + + bool can_redo() const { + return position >= 0 && position + 1 < static_cast(history.size()); + } + + const SketchLayout &undo() { + return history[static_cast(--position)]; + } + + const SketchLayout &redo() { + return history[static_cast(++position)]; + } +}; + +struct UiState { + bool open_open_route = false; + bool open_stream = false; + bool open_load_layout = false; + bool open_save_layout = false; + bool open_preferences = false; + bool open_find_signal = false; + bool request_close = false; + bool request_reset_layout = false; + bool request_save_layout = false; + bool request_new_tab = false; + bool request_duplicate_tab = false; + bool request_close_tab = false; + bool follow_latest = false; + bool has_shared_range = false; + bool has_tracker_time = false; + bool layout_dirty = false; + bool playback_loop = false; + bool playback_playing = false; + bool show_deprecated_fields = false; + bool show_fps_overlay = false; + bool fps_overlay_initialized = false; + bool suppress_range_side_effects = false; + bool browser_nodes_dirty = false; + int active_tab_index = 0; + int next_tab_runtime_id = 1; + int requested_tab_index = -1; + int rename_tab_index = -1; + bool focus_rename_tab_input = false; + std::vector tabs; + std::string route_buffer; + std::string stream_address_buffer; + std::string rename_tab_buffer; + std::string browser_filter; + std::string data_dir_buffer; + std::string load_layout_buffer; + std::string save_layout_buffer; + std::string find_signal_buffer; + std::string selected_browser_path; + std::vector selected_browser_paths; + std::string browser_selection_anchor; + std::string route_slice_buffer; + std::string error_text; + bool open_error_popup = false; + std::string status_text = "Ready"; + std::string route_copy_feedback_text; + double route_copy_feedback_until = 0.0; + bool editing_route_slice = false; + bool focus_route_slice_input = false; + StreamSourceKind stream_source_kind = StreamSourceKind::CerealLocal; + float sidebar_width = 320.0f; + double route_x_min = 0.0; + double route_x_max = 1.0; + double x_view_min = 0.0; + double x_view_max = 1.0; + double tracker_time = 0.0; + double playback_rate = 1.0; + double playback_step = 0.1; + double stream_buffer_seconds = 30.0; + TimelineDragMode timeline_drag_mode = TimelineDragMode::None; + double timeline_drag_anchor_time = 0.0; + double timeline_drag_anchor_x_min = 0.0; + double timeline_drag_anchor_x_max = 0.0; + AxisLimitsEditorState axis_limits; + DbcEditorState dbc_editor; + CustomSeriesEditorState custom_series; + LogsUiState logs; + UndoStack undo; +}; + +// app.cc public API + +const WorkspaceTab *app_active_tab(const SketchLayout &layout, const UiState &state); +WorkspaceTab *app_active_tab(SketchLayout *layout, const UiState &state); +TabUiState *app_active_tab_state(UiState *state); + +void app_push_mono_font(); +void app_pop_mono_font(); +bool app_add_curve_to_active_pane(AppSession *session, UiState *state, const std::string &path); + +std::string app_curve_display_name(const Curve &curve); +std::array app_next_curve_color(const Pane &pane); +const RouteSeries *app_find_route_series(const AppSession &session, const std::string &path); +void app_decimate_samples(const std::vector &xs_in, + const std::vector &ys_in, + int max_points, + std::vector *xs_out, + std::vector *ys_out); +std::optional app_sample_xy_value_at_time(const std::vector &xs, + const std::vector &ys, + bool stairs, + double tm); +void save_layout_json(const SketchLayout &layout, const std::filesystem::path &path); + +// ***** +// browser +// ***** + +void rebuild_route_index(AppSession *session); +void rebuild_browser_nodes(AppSession *session, UiState *state); +SeriesFormat compute_series_format(const std::vector &values, bool enum_like = false); +std::string format_display_value(double display_value, + const SeriesFormat &format, + const EnumInfo *enum_info); +std::vector decode_browser_drag_payload(std::string_view payload); +void collect_visible_leaf_paths(const BrowserNode &node, + const std::string &filter, + std::vector *out); +void draw_browser_node(AppSession *session, + const BrowserNode &node, + UiState *state, + const std::string &filter, + const std::vector &visible_paths); + +// ***** +// custom series +// ***** + +void open_custom_series_editor(UiState *state, const std::string &preferred_source = {}); +std::string preferred_custom_series_source(const Pane &pane); +void refresh_all_custom_curves(AppSession *session, UiState *state); +void draw_custom_series_editor(AppSession *session, UiState *state); + +// ***** +// logs +// ***** + +void draw_logs_tab(AppSession *session, UiState *state); + +// ***** +// map +// ***** + +void draw_map_pane(AppSession *session, UiState *state, Pane *pane, int pane_index); + +// ***** +// runtime (GLFW, async loaders, streaming, camera) +// ***** + +struct GLFWwindow; + +struct RouteLoadSnapshot { + bool active = false; + size_t total_segments = 0; + size_t segments_downloaded = 0; + size_t segments_parsed = 0; +}; + +struct StreamPollSnapshot { + bool active = false; + bool connected = false; + bool paused = false; + StreamSourceKind source_kind = StreamSourceKind::CerealLocal; + std::string source_label; + std::string dbc_name; + std::string car_fingerprint; + double buffer_seconds = 30.0; + uint64_t received_messages = 0; +}; + +class GlfwRuntime { +public: + explicit GlfwRuntime(const Options &options); + ~GlfwRuntime(); + + GlfwRuntime(const GlfwRuntime &) = delete; + GlfwRuntime &operator=(const GlfwRuntime &) = delete; + + GLFWwindow *window() const; + +private: + GLFWwindow *window_ = nullptr; +}; + +class ImGuiRuntime { +public: + explicit ImGuiRuntime(GLFWwindow *window); + ~ImGuiRuntime(); + + ImGuiRuntime(const ImGuiRuntime &) = delete; + ImGuiRuntime &operator=(const ImGuiRuntime &) = delete; +}; + +class TerminalRouteProgress { +public: + explicit TerminalRouteProgress(bool enabled); + ~TerminalRouteProgress(); + + TerminalRouteProgress(const TerminalRouteProgress &) = delete; + TerminalRouteProgress &operator=(const TerminalRouteProgress &) = delete; + + void update(const RouteLoadProgress &progress); + void finish(); + +private: + struct Impl; + std::unique_ptr impl_; +}; + +class AsyncRouteLoader { +public: + explicit AsyncRouteLoader(bool enable_terminal_progress); + ~AsyncRouteLoader(); + + AsyncRouteLoader(const AsyncRouteLoader &) = delete; + AsyncRouteLoader &operator=(const AsyncRouteLoader &) = delete; + + void start(const std::string &route_name, const std::string &data_dir, const std::string &dbc_name); + RouteLoadSnapshot snapshot() const; + bool consume(RouteData *route_data, std::string *error_text); + +private: + struct Impl; + std::unique_ptr impl_; +}; + +class StreamPoller { +public: + StreamPoller(); + ~StreamPoller(); + + StreamPoller(const StreamPoller &) = delete; + StreamPoller &operator=(const StreamPoller &) = delete; + + void start(const StreamSourceConfig &source, + double buffer_seconds, + const std::string &dbc_name, + std::optional time_offset = std::nullopt); + void setPaused(bool paused); + void stop(); + StreamPollSnapshot snapshot() const; + bool consume(StreamExtractBatch *batch, std::string *error_text); + +private: + struct Impl; + std::unique_ptr impl_; +}; + +class CameraFeedView { +public: + CameraFeedView(); + ~CameraFeedView(); + + CameraFeedView(const CameraFeedView &) = delete; + CameraFeedView &operator=(const CameraFeedView &) = delete; + + void setRouteData(const RouteData &route_data); + void setCameraIndex(const CameraFeedIndex &camera_index, CameraViewKind view); + void update(double tracker_time); + void draw(float width, bool loading); + void drawSized(ImVec2 size, bool loading, bool fit_to_pane = false); + +private: + struct Impl; + std::unique_ptr impl_; +}; diff --git a/tools/jotpluggler/browser.cc b/tools/jotpluggler/browser.cc new file mode 100644 index 0000000000..0d1b5a2c1b --- /dev/null +++ b/tools/jotpluggler/browser.cc @@ -0,0 +1,465 @@ +#include "tools/jotpluggler/app.h" + +#include "imgui_internal.h" + +#include +#include +#include + +namespace { + +constexpr float BROWSER_VALUE_WIDTH = 88.0f; + +bool path_matches_filter(const std::string &path, const std::string &lower_filter) { + if (lower_filter.empty()) return true; + return lowercase_copy(path).find(lower_filter) != std::string::npos; +} + +void insert_browser_path(std::vector *nodes, const std::string &path) { + size_t start = 0; + while (start < path.size() && path[start] == '/') { + ++start; + } + std::vector parts; + while (start < path.size()) { + const size_t end = path.find('/', start); + parts.push_back(path.substr(start, end == std::string::npos ? std::string::npos : end - start)); + if (end == std::string::npos) break; + start = end + 1; + } + if (parts.empty()) { + return; + } + + std::vector *current_nodes = nodes; + std::string current_path; + for (size_t i = 0; i < parts.size(); ++i) { + if (!current_path.empty()) { + current_path += "/"; + } + current_path += parts[i]; + auto it = std::find_if(current_nodes->begin(), current_nodes->end(), + [&](const BrowserNode &node) { return node.label == parts[i]; }); + if (it == current_nodes->end()) { + current_nodes->push_back(BrowserNode{.label = parts[i]}); + it = std::prev(current_nodes->end()); + } + if (i + 1 == parts.size()) { + it->full_path = "/" + current_path; + } + current_nodes = &it->children; + } +} + +void sort_browser_nodes(std::vector *nodes) { + std::sort(nodes->begin(), nodes->end(), [](const BrowserNode &a, const BrowserNode &b) { + if (a.children.empty() != b.children.empty()) { + return !a.children.empty(); + } + return a.label < b.label; + }); + for (BrowserNode &node : *nodes) { + sort_browser_nodes(&node.children); + } +} + +std::vector build_browser_tree(const std::vector &paths) { + std::vector nodes; + for (const std::string &path : paths) { + insert_browser_path(&nodes, path); + } + sort_browser_nodes(&nodes); + return nodes; +} + +bool is_deprecated_browser_path(const std::string &path) { + return path.find("DEPRECATED") != std::string::npos; +} + +std::vector visible_browser_paths(const RouteData &route_data, bool show_deprecated_fields) { + if (show_deprecated_fields) return route_data.paths; + std::vector filtered; + filtered.reserve(route_data.paths.size()); + for (const std::string &path : route_data.paths) { + if (!is_deprecated_browser_path(path)) { + filtered.push_back(path); + } + } + return filtered; +} + +bool browser_selection_contains(const UiState &state, std::string_view path) { + return std::find(state.selected_browser_paths.begin(), state.selected_browser_paths.end(), path) + != state.selected_browser_paths.end(); +} + +std::vector browser_drag_paths(const UiState &state, const std::string &dragged_path) { + if (browser_selection_contains(state, dragged_path) && !state.selected_browser_paths.empty()) { + return state.selected_browser_paths; + } + return {dragged_path}; +} + +std::string encode_browser_drag_payload(const std::vector &paths) { + std::string payload; + for (size_t i = 0; i < paths.size(); ++i) { + if (i != 0) { + payload.push_back('\n'); + } + payload += paths[i]; + } + return payload; +} + +void set_browser_selection_single(UiState *state, const std::string &path) { + state->selected_browser_paths = {path}; + state->selected_browser_path = path; + state->browser_selection_anchor = path; +} + +void toggle_browser_selection(UiState *state, const std::string &path) { + auto it = std::find(state->selected_browser_paths.begin(), state->selected_browser_paths.end(), path); + if (it == state->selected_browser_paths.end()) { + state->selected_browser_paths.push_back(path); + } else { + state->selected_browser_paths.erase(it); + } + state->selected_browser_path = path; + state->browser_selection_anchor = path; + if (state->selected_browser_paths.empty()) { + state->selected_browser_path.clear(); + } +} + +void select_browser_range(UiState *state, const std::vector &visible_paths, const std::string &clicked_path) { + if (visible_paths.empty()) { + set_browser_selection_single(state, clicked_path); + return; + } + + const std::string anchor = state->browser_selection_anchor.empty() ? clicked_path : state->browser_selection_anchor; + const auto anchor_it = std::find(visible_paths.begin(), visible_paths.end(), anchor); + const auto clicked_it = std::find(visible_paths.begin(), visible_paths.end(), clicked_path); + if (clicked_it == visible_paths.end()) { + return; + } + if (anchor_it == visible_paths.end()) { + set_browser_selection_single(state, clicked_path); + return; + } + + const auto [begin_it, end_it] = std::minmax(anchor_it, clicked_it); + std::vector selected; + selected.reserve(static_cast(std::distance(begin_it, end_it)) + 1); + for (auto it = begin_it; it != end_it + 1; ++it) { + selected.push_back(*it); + } + state->selected_browser_paths = std::move(selected); + state->selected_browser_path = clicked_path; +} + +void prune_browser_selection(UiState *state, const std::vector &visible_paths) { + const std::unordered_set visible_set(visible_paths.begin(), visible_paths.end()); + auto is_visible = [&](const std::string &path) { + return visible_set.count(path) > 0; + }; + + state->selected_browser_paths.erase( + std::remove_if(state->selected_browser_paths.begin(), state->selected_browser_paths.end(), + [&](const std::string &path) { return !is_visible(path); }), + state->selected_browser_paths.end()); + + if (!state->selected_browser_path.empty() && !is_visible(state->selected_browser_path)) { + state->selected_browser_path.clear(); + } + if (!state->browser_selection_anchor.empty() && !is_visible(state->browser_selection_anchor)) { + state->browser_selection_anchor.clear(); + } + if (state->selected_browser_paths.empty()) { + state->selected_browser_path.clear(); + } else if (state->selected_browser_path.empty()) { + state->selected_browser_path = state->selected_browser_paths.back(); + } +} + +std::optional sample_route_series_value(const RouteSeries &series, double tm, bool stairs) { + return app_sample_xy_value_at_time(series.times, series.values, stairs, tm); +} + +std::string browser_series_value_text(const AppSession &session, const UiState &state, std::string_view path) { + auto it = session.series_by_path.find(std::string(path)); + if (it == session.series_by_path.end() || it->second == nullptr) return {}; + + const RouteSeries &series = *it->second; + if (series.values.empty()) return {}; + + const auto enum_it = session.route_data.enum_info.find(series.path); + const EnumInfo *enum_info = enum_it == session.route_data.enum_info.end() ? nullptr : &enum_it->second; + const bool stairs = enum_info != nullptr; + + std::optional value; + if (state.has_tracker_time) { + value = sample_route_series_value(series, state.tracker_time, stairs); + } else { + value = series.values.back(); + } + if (!value.has_value()) return {}; + + const auto display_it = session.route_data.series_formats.find(series.path); + const SeriesFormat display_info = display_it == session.route_data.series_formats.end() + ? compute_series_format(series.values, enum_info != nullptr) + : display_it->second; + + return format_display_value(*value, display_info, enum_info); +} + +bool browser_node_matches(const BrowserNode &node, const std::string &filter) { + if (filter.empty()) return true; + if (!node.full_path.empty() && path_matches_filter(node.full_path, filter)) { + return true; + } + for (const BrowserNode &child : node.children) { + if (browser_node_matches(child, filter)) return true; + } + return false; +} + +} // namespace + +namespace { + +int decimals_needed(double value) { + const double abs_value = std::abs(value); + if (abs_value < 1.0e-12) return 0; + for (int decimals = 0; decimals <= 6; ++decimals) { + const double scale = std::pow(10.0, decimals); + if (std::abs(abs_value * scale - std::round(abs_value * scale)) < 1.0e-6) { + return decimals; + } + } + return 6; +} + +void finalize_series_format(SeriesFormat *format) { + format->digits_before = std::max(format->digits_before, 1); + format->decimals = std::clamp(format->decimals, 0, 6); + format->integer_like = format->decimals == 0; + const int sign_width = format->has_negative ? 1 : 0; + const int dot_width = format->decimals > 0 ? 1 : 0; + format->total_width = sign_width + format->digits_before + dot_width + format->decimals; + std::snprintf(format->fmt, sizeof(format->fmt), "%%%d.%df", format->total_width, format->decimals); +} + +} // namespace + +SeriesFormat compute_series_format(const std::vector &values, bool enum_like) { + SeriesFormat format; + if (values.empty()) return format; + + const size_t step = std::max(1, values.size() / 256); + bool saw_finite = false; + bool all_integer = enum_like; + double min_value = 0.0; + double max_value = 0.0; + int max_needed_decimals = 0; + + for (size_t i = 0; i < values.size(); i += step) { + const double value = values[i]; + if (!std::isfinite(value)) continue; + if (!saw_finite) { + min_value = value; + max_value = value; + saw_finite = true; + } else { + min_value = std::min(min_value, value); + max_value = std::max(max_value, value); + } + if (std::abs(value - std::round(value)) > 1.0e-9) { + all_integer = false; + } + if (!all_integer) { + max_needed_decimals = std::max(max_needed_decimals, decimals_needed(value)); + } + } + + if (!saw_finite) return format; + + format.has_negative = min_value < 0.0; + const double peak = std::max(std::abs(min_value), std::abs(max_value)); + format.digits_before = peak < 1.0 ? 1 : static_cast(std::floor(std::log10(peak))) + 1; + + if (enum_like || all_integer) { + format.decimals = 0; + } else if (peak >= 1000.0) { + format.decimals = std::min(max_needed_decimals, 1); + } else if (peak >= 100.0) { + format.decimals = std::min(max_needed_decimals, 2); + } else { + format.decimals = std::min(max_needed_decimals, 4); + } + + finalize_series_format(&format); + return format; +} + +std::string format_display_value(double display_value, + const SeriesFormat &display_info, + const EnumInfo *enum_info) { + if (!std::isfinite(display_value)) return "---"; + if (enum_info != nullptr) { + const int idx = static_cast(std::llround(display_value)); + if (idx >= 0 && std::abs(display_value - static_cast(idx)) < 0.01 + && static_cast(idx) < enum_info->names.size() + && !enum_info->names[static_cast(idx)].empty()) { + return enum_info->names[static_cast(idx)]; + } + } + char buf[64] = {}; + std::snprintf(buf, sizeof(buf), display_info.fmt, display_value); + return buf; +} + +std::vector decode_browser_drag_payload(std::string_view payload) { + std::vector out; + size_t begin = 0; + while (begin <= payload.size()) { + const size_t end = payload.find('\n', begin); + const size_t length = (end == std::string_view::npos ? payload.size() : end) - begin; + if (length > 0) { + out.emplace_back(payload.substr(begin, length)); + } + if (end == std::string_view::npos) break; + begin = end + 1; + } + return out; +} + +void collect_visible_leaf_paths(const BrowserNode &node, + const std::string &filter, + std::vector *out) { + if (!browser_node_matches(node, filter)) { + return; + } + if (node.children.empty()) { + if (!node.full_path.empty()) { + out->push_back(node.full_path); + } + return; + } + for (const BrowserNode &child : node.children) { + collect_visible_leaf_paths(child, filter, out); + } +} + +void rebuild_browser_nodes(AppSession *session, UiState *state) { + const std::vector paths = visible_browser_paths(session->route_data, state->show_deprecated_fields); + session->browser_nodes = build_browser_tree(paths); + prune_browser_selection(state, paths); +} + +void rebuild_route_index(AppSession *session) { + session->series_by_path.clear(); + session->route_data.series_formats.clear(); + for (RouteSeries &series : session->route_data.series) { + session->series_by_path.emplace(series.path, &series); + const bool enum_like = session->route_data.enum_info.find(series.path) != session->route_data.enum_info.end(); + session->route_data.series_formats.emplace(series.path, compute_series_format(series.values, enum_like)); + } +} + +void draw_browser_node(AppSession *session, + const BrowserNode &node, + UiState *state, + const std::string &filter, + const std::vector &visible_paths) { + if (!browser_node_matches(node, filter)) { + return; + } + + if (node.children.empty()) { + const bool selected = browser_selection_contains(*state, node.full_path); + const std::string value_text = browser_series_value_text(*session, *state, node.full_path); + const ImGuiStyle &style = ImGui::GetStyle(); + const ImVec2 row_size(std::max(1.0f, ImGui::GetContentRegionAvail().x), ImGui::GetFrameHeight()); + ImGui::PushID(node.full_path.c_str()); + const bool clicked = ImGui::InvisibleButton("##browser_leaf", row_size); + const bool hovered = ImGui::IsItemHovered(); + const bool held = ImGui::IsItemActive(); + const ImRect rect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax()); + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + if (selected || hovered) { + const ImU32 bg = ImGui::GetColorU32(selected + ? (held ? ImGuiCol_HeaderActive : ImGuiCol_Header) + : ImGuiCol_HeaderHovered); + draw_list->AddRectFilled(rect.Min, rect.Max, bg, 0.0f); + } + + const float value_right = rect.Max.x - style.FramePadding.x; + const float value_left = value_right - (value_text.empty() ? 0.0f : BROWSER_VALUE_WIDTH); + const float label_left = rect.Min.x + style.FramePadding.x; + const float label_right = value_text.empty() + ? rect.Max.x - style.FramePadding.x + : std::max(label_left + 40.0f, value_left - 10.0f); + ImGui::RenderTextEllipsis(draw_list, + ImVec2(label_left, rect.Min.y + style.FramePadding.y), + ImVec2(label_right, rect.Max.y), + label_right, + node.label.c_str(), + nullptr, + nullptr); + if (!value_text.empty()) { + app_push_mono_font(); + ImGui::PushStyleColor(ImGuiCol_Text, selected ? color_rgb(70, 77, 86) : color_rgb(116, 124, 133)); + ImGui::RenderTextClipped(ImVec2(value_left, rect.Min.y + style.FramePadding.y), + ImVec2(value_right, rect.Max.y), + value_text.c_str(), + nullptr, + nullptr, + ImVec2(1.0f, 0.0f)); + ImGui::PopStyleColor(); + app_pop_mono_font(); + } + + if (clicked) { + const bool shift_down = ImGui::GetIO().KeyShift; + const bool ctrl_down = ImGui::GetIO().KeyCtrl || ImGui::GetIO().KeySuper; + if (shift_down) { + select_browser_range(state, visible_paths, node.full_path); + } else if (ctrl_down) { + toggle_browser_selection(state, node.full_path); + } else { + set_browser_selection_single(state, node.full_path); + } + } + if (hovered && ImGui::IsMouseDoubleClicked(0)) { + set_browser_selection_single(state, node.full_path); + app_add_curve_to_active_pane(session, state, node.full_path); + } + if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceAllowNullID)) { + const std::vector drag_paths = browser_drag_paths(*state, node.full_path); + const std::string payload = encode_browser_drag_payload(drag_paths); + ImGui::SetDragDropPayload("JOTP_BROWSER_PATHS", payload.c_str(), payload.size() + 1); + if (drag_paths.size() == 1) { + ImGui::TextUnformatted(drag_paths.front().c_str()); + } else { + ImGui::Text("%zu timeseries", drag_paths.size()); + ImGui::TextUnformatted(drag_paths.front().c_str()); + } + ImGui::EndDragDropSource(); + } + ImGui::PopID(); + return; + } + + ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_SpanAvailWidth; + if (!filter.empty()) { + flags |= ImGuiTreeNodeFlags_DefaultOpen; + } + const bool open = ImGui::TreeNodeEx(node.label.c_str(), flags); + if (open) { + for (const BrowserNode &child : node.children) { + draw_browser_node(session, child, state, filter, visible_paths); + } + ImGui::TreePop(); + } +} diff --git a/tools/jotpluggler/camera.cc b/tools/jotpluggler/camera.cc new file mode 100644 index 0000000000..24a35d8794 --- /dev/null +++ b/tools/jotpluggler/camera.cc @@ -0,0 +1,54 @@ +#include "tools/jotpluggler/camera.h" + +#include "imgui.h" +#include "imgui_internal.h" + +namespace { + +bool draw_camera_fit_toggle_overlay(bool fit_to_pane) { + const ImVec2 window_pos = ImGui::GetWindowPos(); + const ImVec2 content_min = ImGui::GetWindowContentRegionMin(); + const ImRect rect(ImVec2(window_pos.x + content_min.x + 8.0f, window_pos.y + content_min.y + 8.0f), + ImVec2(window_pos.x + content_min.x + 58.0f, window_pos.y + content_min.y + 28.0f)); + const bool hovered = ImGui::IsMouseHoveringRect(rect.Min, rect.Max, false); + const bool held = hovered && ImGui::IsMouseDown(ImGuiMouseButton_Left); + if (hovered) ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + draw_list->AddRectFilled(rect.Min, rect.Max, hovered ? IM_COL32(255, 255, 255, 234) : IM_COL32(255, 255, 255, 214), 4.0f); + draw_list->AddRect(rect.Min, rect.Max, IM_COL32(184, 189, 196, 255), 4.0f, 0, 1.0f); + const ImRect box(ImVec2(rect.Min.x + 6.0f, rect.Min.y + 4.0f), ImVec2(rect.Min.x + 18.0f, rect.Min.y + 16.0f)); + draw_list->AddRect(box.Min, box.Max, IM_COL32(112, 120, 129, 255), 2.0f, 0, 1.0f); + if (fit_to_pane) { + draw_list->AddLine(ImVec2(box.Min.x + 2.5f, box.Min.y + 6.5f), ImVec2(box.Min.x + 5.5f, box.Max.y - 2.5f), IM_COL32(60, 111, 202, 255), 1.8f); + draw_list->AddLine(ImVec2(box.Min.x + 5.5f, box.Max.y - 2.5f), ImVec2(box.Max.x - 2.5f, box.Min.y + 2.5f), IM_COL32(60, 111, 202, 255), 1.8f); + } + draw_list->AddText(ImVec2(box.Max.x + 6.0f, rect.Min.y + 3.0f), IM_COL32(72, 79, 88, 255), "Fit"); + return hovered && !held && ImGui::IsMouseReleased(ImGuiMouseButton_Left); +} + +} // namespace + +void draw_camera_pane(AppSession *session, UiState *state, TabUiState *tab_state, int pane_index, const Pane &pane) { + CameraFeedView *feed = session->pane_camera_feeds[static_cast(pane.camera_view)].get(); + if (feed == nullptr) { + ImGui::TextDisabled("Camera unavailable"); + return; + } + + const bool fit_to_pane = tab_state != nullptr + && pane_index >= 0 + && pane_index < static_cast(tab_state->camera_panes.size()) + ? tab_state->camera_panes[static_cast(pane_index)].fit_to_pane + : true; + if (state->has_tracker_time) { + feed->update(state->tracker_time); + } + feed->drawSized(ImGui::GetContentRegionAvail(), session->async_route_loading, fit_to_pane); + if (tab_state != nullptr + && pane_index >= 0 + && pane_index < static_cast(tab_state->camera_panes.size()) + && draw_camera_fit_toggle_overlay(fit_to_pane)) { + tab_state->camera_panes[static_cast(pane_index)].fit_to_pane = !fit_to_pane; + } +} diff --git a/tools/jotpluggler/camera.h b/tools/jotpluggler/camera.h new file mode 100644 index 0000000000..666e335af8 --- /dev/null +++ b/tools/jotpluggler/camera.h @@ -0,0 +1,5 @@ +#pragma once + +#include "tools/jotpluggler/app.h" + +void draw_camera_pane(AppSession *session, UiState *state, TabUiState *tab_state, int pane_index, const Pane &pane); diff --git a/tools/jotpluggler/common.cc b/tools/jotpluggler/common.cc new file mode 100644 index 0000000000..9bd6c18cea --- /dev/null +++ b/tools/jotpluggler/common.cc @@ -0,0 +1,179 @@ +#include "tools/jotpluggler/common.h" + +#include +#include +#include + +namespace { + +std::string format_coord(const GpsPoint &point) { + return util::string_format("%.5f,%.5f", point.lat, point.lon); +} + +} // namespace + +const CameraViewSpec &camera_view_spec(CameraViewKind view) { + auto it = std::find_if(kCameraViewSpecs.begin(), kCameraViewSpecs.end(), [&](const CameraViewSpec &spec) { + return spec.view == view; + }); + return it != kCameraViewSpecs.end() ? *it : kCameraViewSpecs.front(); +} + +const CameraViewSpec *camera_view_spec_from_special_item(std::string_view item_id) { + auto it = std::find_if(kCameraViewSpecs.begin(), kCameraViewSpecs.end(), [&](const CameraViewSpec &spec) { + return item_id == spec.special_item_id; + }); + return it != kCameraViewSpecs.end() ? &*it : nullptr; +} + +const CameraViewSpec *camera_view_spec_from_layout_name(std::string_view layout_name) { + auto it = std::find_if(kCameraViewSpecs.begin(), kCameraViewSpecs.end(), [&](const CameraViewSpec &spec) { + return layout_name == spec.layout_name; + }); + return it != kCameraViewSpecs.end() ? &*it : nullptr; +} + +const SpecialItemSpec *special_item_spec(std::string_view item_id) { + auto it = std::find_if(kSpecialItemSpecs.begin(), kSpecialItemSpecs.end(), [&](const SpecialItemSpec &spec) { + return item_id == spec.id; + }); + return it != kSpecialItemSpecs.end() ? &*it : nullptr; +} + +const char *special_item_label(std::string_view item_id) { + const SpecialItemSpec *spec = special_item_spec(item_id); + return spec != nullptr ? spec->label : "Item"; +} + +bool pane_kind_is_special(PaneKind kind) { + return kind == PaneKind::Map || kind == PaneKind::Camera; +} + +bool is_default_special_title(std::string_view title) { + if (title == "Map") return true; + return std::any_of(kCameraViewSpecs.begin(), kCameraViewSpecs.end(), [&](const CameraViewSpec &spec) { + return title == spec.label; + }); +} + +CameraViewKind sidebar_preview_camera_view(const AppSession &session) { + return session.route_data.road_camera.entries.empty() && !session.route_data.qroad_camera.entries.empty() + ? CameraViewKind::QRoad + : CameraViewKind::Road; +} + +const std::filesystem::path &repo_root() { + static const std::filesystem::path root(JOTP_REPO_ROOT); + return root; +} + +ImU32 timeline_entry_color(TimelineEntry::Type type, float alpha) { + return timeline_entry_color(type, alpha, {111, 143, 175}); +} + +ImU32 timeline_entry_color(TimelineEntry::Type type, float alpha, std::array none_color) { + switch (type) { + case TimelineEntry::Type::Engaged: + return ImGui::GetColorU32(color_rgb(0, 163, 108, alpha)); + case TimelineEntry::Type::AlertInfo: + return ImGui::GetColorU32(color_rgb(255, 195, 0, alpha)); + case TimelineEntry::Type::AlertWarning: + case TimelineEntry::Type::AlertCritical: + return ImGui::GetColorU32(color_rgb(199, 0, 57, alpha)); + case TimelineEntry::Type::None: + default: + return ImGui::GetColorU32(color_rgb(none_color, alpha)); + } +} + +const char *timeline_entry_label(TimelineEntry::Type type) { + static constexpr const char *kLabels[] = { + "disengaged", + "engaged", + "alert info", + "alert warning", + "alert critical", + }; + const size_t index = static_cast(type); + return index < std::size(kLabels) ? kLabels[index] : kLabels[0]; +} + +TimelineEntry::Type timeline_type_at_time(const std::vector &timeline, double time_value) { + for (const TimelineEntry &entry : timeline) { + if (time_value >= entry.start_time && time_value <= entry.end_time) { + return entry.type; + } + } + return TimelineEntry::Type::None; +} + +std::string normalize_stream_address(std::string address) { + return is_local_stream_address(address) ? "127.0.0.1" : address; +} + +const char *stream_source_kind_label(StreamSourceKind kind) { + static constexpr const char *kLabels[] = { + "Local (MSGQ)", + "Remote (ZMQ)", + }; + const size_t index = static_cast(kind); + return index < std::size(kLabels) ? kLabels[index] : kLabels[0]; +} + +std::string stream_source_target_label(const StreamSourceConfig &source) { + switch (source.kind) { + case StreamSourceKind::CerealRemote: + return normalize_stream_address(source.address); + case StreamSourceKind::CerealLocal: + default: + return "127.0.0.1"; + } +} + +bool env_flag_enabled(const char *name, bool default_value) { + const char *raw = std::getenv(name); + if (raw == nullptr || raw[0] == '\0') { + return default_value; + } + const std::string value = lowercase_copy(util::strip(raw)); + return !(value == "0" || value == "false" || value == "no" || value == "off"); +} + +void open_external_url(std::string_view url) { +#ifdef __APPLE__ + const std::string command = "open " + shell_quote(url) + " &"; +#else + const std::string command = "xdg-open " + shell_quote(url) + " >/dev/null 2>&1 &"; +#endif + util::check_system(command); +} + +std::string route_useradmin_url(const RouteIdentifier &route_id) { + return route_id.empty() ? std::string() + : "https://useradmin.comma.ai/?onebox=" + route_id.dongle_id + "%7C" + route_id.log_id; +} + +std::string route_connect_url(const RouteIdentifier &route_id) { + return route_id.empty() ? std::string() + : "https://connect.comma.ai/" + route_id.canonical(); +} + +std::string route_google_maps_url(const GpsTrace &trace) { + if (trace.points.size() < 2) { + return {}; + } + + const std::string prefix = "https://www.google.com/maps/dir/?api=1&travelmode=driving&origin=" + + format_coord(trace.points.front()) + "&destination=" + format_coord(trace.points.back()); + for (size_t n = std::min(9, trace.points.size() > 2 ? trace.points.size() - 2 : 0); ; --n) { + std::string url = prefix; + if (n > 0) { + url += "&waypoints="; + for (size_t i = 0; i < n; ++i) { + if (i) url += "%7C"; + url += format_coord(trace.points[1 + ((trace.points.size() - 2) * (i + 1)) / (n + 1)]); + } + } + if (url.size() <= 1900 || n == 0) return url; + } +} diff --git a/tools/jotpluggler/common.h b/tools/jotpluggler/common.h new file mode 100644 index 0000000000..25b1f91e89 --- /dev/null +++ b/tools/jotpluggler/common.h @@ -0,0 +1,63 @@ +#pragma once + +#include "tools/jotpluggler/app.h" + +#include +#include + +struct CameraViewSpec { + CameraViewKind view = CameraViewKind::Road; + const char *label = ""; + const char *runtime_name = ""; + const char *layout_name = ""; + const char *special_item_id = ""; + CameraFeedIndex RouteData::*route_member = nullptr; +}; + +struct SpecialItemSpec { + const char *id = ""; + const char *label = ""; + PaneKind kind = PaneKind::Plot; + CameraViewKind camera_view = CameraViewKind::Road; +}; + +inline constexpr std::array kCameraViewSpecs = {{ + {CameraViewKind::Road, "Road Camera", "road", "road", "camera_road", &RouteData::road_camera}, + {CameraViewKind::Driver, "Driver Camera", "driver", "driver", "camera_driver", &RouteData::driver_camera}, + {CameraViewKind::WideRoad, "Wide Road Camera", "wide", "wide_road", "camera_wide_road", &RouteData::wide_road_camera}, + {CameraViewKind::QRoad, "qRoad Camera", "qroad", "qroad", "camera_qroad", &RouteData::qroad_camera}, +}}; + +inline constexpr std::array kSpecialItemSpecs = {{ + {"map", "Map", PaneKind::Map, CameraViewKind::Road}, + {kCameraViewSpecs[0].special_item_id, kCameraViewSpecs[0].label, PaneKind::Camera, kCameraViewSpecs[0].view}, + {kCameraViewSpecs[1].special_item_id, kCameraViewSpecs[1].label, PaneKind::Camera, kCameraViewSpecs[1].view}, + {kCameraViewSpecs[2].special_item_id, kCameraViewSpecs[2].label, PaneKind::Camera, kCameraViewSpecs[2].view}, + {kCameraViewSpecs[3].special_item_id, kCameraViewSpecs[3].label, PaneKind::Camera, kCameraViewSpecs[3].view}, +}}; + +const CameraViewSpec &camera_view_spec(CameraViewKind view); +const CameraViewSpec *camera_view_spec_from_special_item(std::string_view item_id); +const CameraViewSpec *camera_view_spec_from_layout_name(std::string_view layout_name); + +const SpecialItemSpec *special_item_spec(std::string_view item_id); +const char *special_item_label(std::string_view item_id); + +bool pane_kind_is_special(PaneKind kind); +bool is_default_special_title(std::string_view title); +CameraViewKind sidebar_preview_camera_view(const AppSession &session); +const std::filesystem::path &repo_root(); + +ImU32 timeline_entry_color(TimelineEntry::Type type, float alpha = 1.0f); +ImU32 timeline_entry_color(TimelineEntry::Type type, float alpha, std::array none_color); +const char *timeline_entry_label(TimelineEntry::Type type); +TimelineEntry::Type timeline_type_at_time(const std::vector &timeline, double time_value); +std::string normalize_stream_address(std::string address); +const char *stream_source_kind_label(StreamSourceKind kind); +std::string stream_source_target_label(const StreamSourceConfig &source); + +bool env_flag_enabled(const char *name, bool default_value = false); +void open_external_url(std::string_view url); +std::string route_useradmin_url(const RouteIdentifier &route_id); +std::string route_connect_url(const RouteIdentifier &route_id); +std::string route_google_maps_url(const GpsTrace &trace); diff --git a/tools/jotpluggler/custom_series.cc b/tools/jotpluggler/custom_series.cc new file mode 100644 index 0000000000..bd2a3f36d1 --- /dev/null +++ b/tools/jotpluggler/custom_series.cc @@ -0,0 +1,750 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/common.h" + +#include "implot.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "third_party/json11/json11.hpp" + +namespace fs = std::filesystem; + +namespace { + +struct PythonEvalResult { + std::vector xs; + std::vector ys; +}; + +struct CustomSeriesTemplate { + const char *name; + const char *globals_code; + const char *function_code; + const char *preview_text; + int required_additional_sources; + const char *requirement_text; +}; + +void write_binary_vector(const fs::path &path, const std::vector &values) { + write_file_or_throw(path, values.data(), values.size() * sizeof(double)); +} + +std::vector read_binary_vector(const fs::path &path) { + const std::string raw = read_file_or_throw(path); + if (raw.size() % sizeof(double) != 0) { + throw std::runtime_error("Invalid binary series file: " + path.string()); + } + std::vector values(raw.size() / sizeof(double)); + if (!values.empty()) { + std::memcpy(values.data(), raw.data(), raw.size()); + } + return values; +} + +void write_text_file(const fs::path &path, std::string_view text) { + write_file_or_throw(path, text); +} + +fs::path create_custom_series_temp_dir() { + const auto stamp = std::chrono::steady_clock::now().time_since_epoch().count(); + const fs::path dir = fs::temp_directory_path() / ("jotpluggler_math_" + std::to_string(::getpid()) + "_" + std::to_string(stamp)); + fs::create_directories(dir); + return dir; +} + +void reset_custom_series_editor(CustomSeriesEditorState *editor) { + *editor = CustomSeriesEditorState{}; +} + +bool add_additional_source(CustomSeriesEditorState *editor, const std::string &path) { + if (path.empty() || path == editor->linked_source) return false; + if (std::find(editor->additional_sources.begin(), editor->additional_sources.end(), path) != editor->additional_sources.end()) { + return false; + } + editor->additional_sources.push_back(path); + return true; +} + +std::string next_custom_curve_name(const Pane &pane) { + std::set used; + for (const Curve &curve : pane.curves) { + if (!curve.label.empty()) { + used.insert(curve.label); + } + if (!curve.name.empty()) { + used.insert(curve.name); + } + } + for (int i = 1; i < 1000; ++i) { + const std::string candidate = "series" + std::to_string(i); + if (used.find(candidate) == used.end()) { + return candidate; + } + } + return "series"; +} + +Curve make_custom_curve(const Pane &pane, + const std::string &name, + const CustomPythonSeries &spec, + PythonEvalResult result) { + Curve curve; + curve.name = name; + curve.label = name; + curve.color = app_next_curve_color(pane); + curve.runtime_only = true; + curve.custom_python = spec; + curve.xs = std::move(result.xs); + curve.ys = std::move(result.ys); + return curve; +} + +bool upsert_custom_curve_in_pane(WorkspaceTab *tab, int pane_index, Curve curve) { + if (pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return false; + } + Pane &pane = tab->panes[static_cast(pane_index)]; + for (Curve &existing : pane.curves) { + if (existing.runtime_only && existing.name == curve.name) { + existing.visible = true; + existing.label = curve.label; + existing.custom_python = curve.custom_python; + existing.xs = std::move(curve.xs); + existing.ys = std::move(curve.ys); + return false; + } + } + pane.curves.push_back(std::move(curve)); + return true; +} + +std::set collect_custom_series_paths(const CustomPythonSeries &spec, + std::string_view globals_code, + std::string_view function_code) { + std::set paths; + if (!spec.linked_source.empty()) { + paths.insert(spec.linked_source); + } + paths.insert(spec.additional_sources.begin(), spec.additional_sources.end()); + + static const std::regex kPathRegex(R"([tv]\(\s*["']([^"']+)["']\s*\))"); + const auto collect_from = [&](std::string_view code) { + std::string owned(code); + for (std::sregex_iterator it(owned.begin(), owned.end(), kPathRegex), end; it != end; ++it) { + paths.insert((*it)[1].str()); + } + }; + collect_from(globals_code); + collect_from(function_code); + return paths; +} + +PythonEvalResult evaluate_custom_python_series(const AppSession &session, + const CustomPythonSeries &spec) { + const std::set referenced_paths = + collect_custom_series_paths(spec, spec.globals_code, spec.function_code); + if (referenced_paths.empty()) throw std::runtime_error("No input series referenced. Set an input timeseries or reference route paths in code."); + + const fs::path temp_dir = create_custom_series_temp_dir(); + try { + const fs::path globals_path = temp_dir / "globals.py"; + const fs::path code_path = temp_dir / "code.py"; + const fs::path manifest_path = temp_dir / "manifest.json"; + const fs::path out_t_path = temp_dir / "result.t.bin"; + const fs::path out_v_path = temp_dir / "result.v.bin"; + + write_text_file(globals_path, spec.globals_code); + write_text_file(code_path, spec.function_code); + + json11::Json::array paths_json(session.route_data.paths.begin(), session.route_data.paths.end()); + json11::Json::array additional_json(spec.additional_sources.begin(), spec.additional_sources.end()); + json11::Json::array series_json; + size_t series_index = 0; + for (const std::string &path : referenced_paths) { + const RouteSeries *series = app_find_route_series(session, path); + if (series == nullptr || series->times.size() < 2 || series->times.size() != series->values.size()) { + throw std::runtime_error("Missing route series " + path); + } + const std::string prefix = "series_" + std::to_string(series_index++); + const fs::path time_path = temp_dir / (prefix + ".t.bin"); + const fs::path value_path = temp_dir / (prefix + ".v.bin"); + write_binary_vector(time_path, series->times); + write_binary_vector(value_path, series->values); + series_json.push_back(json11::Json::object{ + {"path", path}, {"t", time_path.string()}, {"v", value_path.string()}}); + } + const json11::Json manifest_json = json11::Json::object{ + {"paths", std::move(paths_json)}, + {"linked_source", spec.linked_source}, + {"additional_sources", std::move(additional_json)}, + {"series", std::move(series_json)}, + }; + write_text_file(manifest_path, manifest_json.dump()); + + const CommandResult process = run_process_capture_output({ + "python3", + (repo_root() / "tools" / "jotpluggler" / "math_eval.py").string(), + manifest_path.string(), + globals_path.string(), + code_path.string(), + out_t_path.string(), + out_v_path.string(), + }); + if (process.exit_code != 0) { + const std::string error_text = util::strip(process.output); + throw std::runtime_error(error_text.empty() ? "Python evaluation failed" : error_text); + } + + PythonEvalResult result; + result.xs = read_binary_vector(out_t_path); + result.ys = read_binary_vector(out_v_path); + if (result.xs.size() < 2 || result.xs.size() != result.ys.size()) { + throw std::runtime_error("Custom series returned invalid output"); + } + fs::remove_all(temp_dir); + return result; + } catch (...) { + std::error_code ignore_error; + fs::remove_all(temp_dir, ignore_error); + throw; + } +} + +void refresh_custom_curve_samples(AppSession *session, UiState *state, Curve *curve) { + if (!curve->custom_python.has_value()) { + return; + } + if (!session->route_data.has_time_range || session->route_data.series.empty()) { + curve->runtime_error_message.clear(); + curve->xs.clear(); + curve->ys.clear(); + return; + } + try { + PythonEvalResult result = evaluate_custom_python_series(*session, *curve->custom_python); + curve->runtime_error_message.clear(); + curve->xs = std::move(result.xs); + curve->ys = std::move(result.ys); + } catch (const std::exception &err) { + curve->xs.clear(); + curve->ys.clear(); + const std::string err_text = err.what(); + if (session->data_mode == SessionDataMode::Stream && util::starts_with(err_text, "Missing route series ")) { + curve->runtime_error_message = err_text; + return; + } + const std::string error_message = std::string("Failed to evaluate custom series \"") + + app_curve_display_name(*curve) + "\":\n\n" + err_text; + if (curve->runtime_error_message != error_message) { + curve->runtime_error_message = error_message; + state->error_text = error_message; + state->open_error_popup = true; + } + } +} + +const std::array &custom_series_templates() { + static constexpr std::array kTemplates = {{ + { + .name = "Derivative", + .globals_code = "", + .function_code = "return np.gradient(value, time)", + .preview_text = "return np.gradient(value, time)", + .required_additional_sources = 0, + .requirement_text = "", + }, + { + .name = "Difference", + .globals_code = "", + .function_code = "return value - v1", + .preview_text = "Requires one additional source timeseries.\n\nreturn value - v1", + .required_additional_sources = 1, + .requirement_text = "Difference requires one additional source timeseries for v1.", + }, + { + .name = "Smoothing", + .globals_code = "window = 20\nweights = np.ones(window) / window", + .function_code = "return np.convolve(value, weights, mode='same')", + .preview_text = "window = 20\nweights = np.ones(window) / window\n\nreturn np.convolve(value, weights, mode='same')", + .required_additional_sources = 0, + .requirement_text = "", + }, + { + .name = "Integral", + .globals_code = "", + .function_code = "dt = np.mean(np.diff(time))\nreturn np.cumsum(value) * dt", + .preview_text = "dt = np.mean(np.diff(time))\nreturn np.cumsum(value) * dt", + .required_additional_sources = 0, + .requirement_text = "", + }, + }}; + return kTemplates; +} + +void draw_custom_series_help_popup(CustomSeriesEditorState *editor) { + if (editor->open_help) { + ImGui::OpenPopup("Custom Series Help"); + editor->open_help = false; + } + if (!ImGui::BeginPopupModal("Custom Series Help", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextUnformatted("Available variables"); + ImGui::Separator(); + ImGui::BulletText("np: numpy"); + ImGui::BulletText("t(path), v(path): timestamps and values for a route series"); + ImGui::BulletText("paths: all available route series paths"); + ImGui::BulletText("time, value: linked input timeseries"); + ImGui::BulletText("t1, v1, t2, v2, ...: additional source timeseries"); + ImGui::Spacing(); + ImGui::TextWrapped("Write either a single expression like \"return np.gradient(value, time)\" " + "or a multi-line Python body that returns an array or a (times, values) tuple."); + ImGui::Spacing(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); +} + +void draw_custom_series_preview(const AppSession &session, CustomSeriesEditorState *editor) { + std::vector preview_xs; + std::vector preview_ys; + std::string preview_label = editor->preview_label; + if (editor->preview_is_result && editor->preview_xs.size() > 1 && editor->preview_xs.size() == editor->preview_ys.size()) { + preview_xs = editor->preview_xs; + preview_ys = editor->preview_ys; + if (preview_label.empty()) { + preview_label = "Result preview"; + } + } else if (!editor->linked_source.empty()) { + if (const RouteSeries *series = app_find_route_series(session, editor->linked_source); series != nullptr + && series->times.size() > 1 && series->times.size() == series->values.size()) { + preview_xs = series->times; + preview_ys = series->values; + preview_label = "Input preview (not result)"; + } + } + + if (!preview_xs.empty() && preview_xs.size() == preview_ys.size()) { + std::vector plot_xs; + std::vector plot_ys; + app_decimate_samples(preview_xs, preview_ys, 1200, &plot_xs, &plot_ys); + const double preview_x_min = preview_xs.front(); + const double preview_x_max = preview_xs.back() > preview_xs.front() + ? preview_xs.back() + : preview_xs.front() + 1e-6; + std::string plot_id = "##custom_series_preview"; + if (editor->preview_is_result) { + plot_id += "_result_"; + plot_id += editor->name.empty() ? preview_label : editor->name; + } else if (!editor->linked_source.empty()) { + plot_id += "_input_"; + plot_id += editor->linked_source; + } + ImGui::TextUnformatted(preview_label.c_str()); + if (!editor->linked_source.empty() && !editor->preview_is_result) { + ImGui::SameLine(); + ImGui::TextDisabled("%s", editor->linked_source.c_str()); + } + if (ImPlot::BeginPlot(plot_id.c_str(), + ImVec2(-1.0f, std::max(180.0f, ImGui::GetContentRegionAvail().y - 6.0f)), + ImPlotFlags_NoTitle | ImPlotFlags_NoMenus | ImPlotFlags_NoLegend)) { + ImPlot::SetupAxes(nullptr, nullptr, ImPlotAxisFlags_NoMenus | ImPlotAxisFlags_NoHighlight, + ImPlotAxisFlags_NoMenus | ImPlotAxisFlags_NoHighlight | ImPlotAxisFlags_AutoFit | ImPlotAxisFlags_RangeFit); + ImPlot::SetupAxisLimitsConstraints(ImAxis_X1, preview_x_min, preview_x_max); + ImPlot::SetupAxisLimits(ImAxis_X1, preview_x_min, preview_x_max, ImPlotCond_Once); + ImPlot::SetupAxisFormat(ImAxis_X1, "%.1f"); + ImPlot::SetupAxisFormat(ImAxis_Y1, "%.6g"); + ImPlotSpec spec; + spec.LineColor = color_rgb(35, 107, 180); + spec.LineWeight = 2.0f; + ImPlot::PlotLine("##custom_preview_line", plot_xs.data(), plot_ys.data(), static_cast(plot_xs.size()), spec); + ImPlot::EndPlot(); + } + } else { + ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 72.0f); + ImGui::PushStyleColor(ImGuiCol_Text, color_rgb(116, 124, 133)); + ImGui::TextWrapped("Choose an input timeseries or click Preview to evaluate the custom result."); + ImGui::PopStyleColor(); + } +} + +std::string custom_series_name_status(const Pane &pane, std::string_view name) { + const std::string trimmed = util::strip(std::string(name)); + if (trimmed.empty()) return "name required"; + if (!trimmed.empty() && trimmed.front() == '/') { + return "cannot start with /"; + } + for (const Curve &curve : pane.curves) { + if (curve.runtime_only && curve.name == trimmed) return "updates existing curve"; + } + return "new curve"; +} + +const CustomSeriesTemplate &selected_custom_series_template(const CustomSeriesEditorState &editor) { + const auto &templates = custom_series_templates(); + return templates[static_cast(std::clamp(editor.selected_template, 0, static_cast(templates.size()) - 1))]; +} + +bool custom_series_template_ready(const CustomSeriesEditorState &editor) { + const CustomSeriesTemplate &templ = selected_custom_series_template(editor); + return !editor.linked_source.empty() + && static_cast(editor.additional_sources.size()) >= templ.required_additional_sources; +} + +bool prepare_custom_series_spec(CustomSeriesEditorState *editor, + UiState *state, + bool require_name, + CustomPythonSeries *out_spec) { + editor->name = util::strip(editor->name); + editor->linked_source = util::strip(editor->linked_source); + for (std::string &path : editor->additional_sources) { + path = util::strip(path); + } + editor->additional_sources.erase( + std::remove_if(editor->additional_sources.begin(), editor->additional_sources.end(), + [&](const std::string &path) { return path.empty() || path == editor->linked_source; }), + editor->additional_sources.end()); + + if (require_name && editor->name.empty()) { + state->error_text = "Custom series name is required."; + state->open_error_popup = true; + return false; + } + if (require_name && !editor->name.empty() && editor->name.front() == '/') { + state->error_text = "Custom series names may not start with '/'."; + state->open_error_popup = true; + return false; + } + + *out_spec = CustomPythonSeries{ + .linked_source = editor->linked_source, + .additional_sources = editor->additional_sources, + .globals_code = editor->globals_code, + .function_code = editor->function_code, + }; + return true; +} + +bool preview_custom_series_editor(AppSession *session, UiState *state) { + CustomSeriesEditorState &editor = state->custom_series; + const CustomSeriesTemplate &templ = selected_custom_series_template(editor); + if (editor.linked_source.empty()) { + state->error_text = "Choose an input timeseries before previewing."; + state->open_error_popup = true; + state->status_text = "Custom series preview failed"; + return false; + } + if (static_cast(editor.additional_sources.size()) < templ.required_additional_sources) { + state->error_text = templ.requirement_text; + state->open_error_popup = true; + state->status_text = "Custom series preview failed"; + return false; + } + CustomPythonSeries spec; + if (!prepare_custom_series_spec(&editor, state, false, &spec)) return false; + + try { + PythonEvalResult result = evaluate_custom_python_series(*session, spec); + editor.preview_label = editor.name.empty() ? "Result preview" : editor.name; + editor.preview_xs = std::move(result.xs); + editor.preview_ys = std::move(result.ys); + editor.preview_is_result = true; + state->status_text = "Previewed custom series"; + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Custom series preview failed"; + return false; + } +} + +bool apply_custom_series_editor(AppSession *session, UiState *state) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + TabUiState *tab_state = app_active_tab_state(state); + if (tab == nullptr || tab_state == nullptr) { + state->status_text = "No active pane"; + return false; + } + if (tab_state->active_pane_index < 0 || tab_state->active_pane_index >= static_cast(tab->panes.size())) { + state->status_text = "No active pane"; + return false; + } + + CustomSeriesEditorState &editor = state->custom_series; + CustomPythonSeries spec; + if (!prepare_custom_series_spec(&editor, state, true, &spec)) return false; + + try { + PythonEvalResult result = evaluate_custom_python_series(*session, spec); + const SketchLayout before_layout = session->layout; + Pane &pane = tab->panes[static_cast(tab_state->active_pane_index)]; + editor.preview_label = editor.name; + editor.preview_xs = result.xs; + editor.preview_ys = result.ys; + editor.preview_is_result = true; + const bool inserted = upsert_custom_curve_in_pane(tab, + tab_state->active_pane_index, + make_custom_curve(pane, editor.name, spec, std::move(result))); + state->undo.push(before_layout); + state->status_text = inserted ? "Created custom series " + editor.name + : "Updated custom series " + editor.name; + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Custom series failed"; + return false; + } +} + +} // namespace + +void open_custom_series_editor(UiState *state, const std::string &preferred_source) { + CustomSeriesEditorState &editor = state->custom_series; + if (!editor.open && editor.name.empty() && editor.linked_source.empty() && editor.function_code == "return value") { + editor.focus_name = true; + } + if (editor.linked_source.empty() && !preferred_source.empty()) { + editor.linked_source = preferred_source; + } + editor.open = true; + editor.request_select = true; +} + +std::string preferred_custom_series_source(const Pane &pane) { + for (const Curve &curve : pane.curves) { + if (!curve.name.empty() && curve.name.front() == '/') { + return curve.name; + } + if (curve.custom_python.has_value() && !curve.custom_python->linked_source.empty()) { + return curve.custom_python->linked_source; + } + } + return {}; +} + +void refresh_all_custom_curves(AppSession *session, UiState *state) { + for (WorkspaceTab &tab : session->layout.tabs) { + for (Pane &pane : tab.panes) { + for (Curve &curve : pane.curves) { + refresh_custom_curve_samples(session, state, &curve); + } + } + } +} + +void draw_editor_source_panel(UiState *state, CustomSeriesEditorState &editor) { + ImGui::TextWrapped("Input timeseries. Provides arguments time and value:"); + ImGui::SetNextItemWidth(-FLT_MIN); + input_text_string("##custom_linked_source", &editor.linked_source, ImGuiInputTextFlags_ReadOnly); + if (ImGui::BeginDragDropTarget()) { + if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("JOTP_BROWSER_PATH")) { + editor.linked_source = static_cast(payload->Data); + editor.additional_sources.erase( + std::remove(editor.additional_sources.begin(), editor.additional_sources.end(), editor.linked_source), + editor.additional_sources.end()); + editor.preview_is_result = false; + } + ImGui::EndDragDropTarget(); + } + if (ImGui::Button("Use Selected", ImVec2(120.0f, 0.0f)) && !state->selected_browser_path.empty()) { + editor.linked_source = state->selected_browser_path; + editor.additional_sources.erase( + std::remove(editor.additional_sources.begin(), editor.additional_sources.end(), editor.linked_source), + editor.additional_sources.end()); + editor.preview_is_result = false; + } + ImGui::SameLine(); + if (ImGui::Button("Clear", ImVec2(120.0f, 0.0f))) { + editor.linked_source.clear(); + editor.preview_is_result = false; + } + + ImGui::Spacing(); + ImGui::TextUnformatted("Additional source timeseries:"); + ImGui::SameLine(); + const CustomSeriesTemplate &tmpl = selected_custom_series_template(editor); + if (tmpl.required_additional_sources > 0) { + const bool ready = static_cast(editor.additional_sources.size()) >= tmpl.required_additional_sources; + ImGui::TextColored(ready ? color_rgb(58, 126, 73) : color_rgb(180, 122, 44), "%s", tmpl.requirement_text); + } + ImGui::SameLine(); + ImGui::BeginDisabled(editor.selected_additional_source < 0 + || editor.selected_additional_source >= static_cast(editor.additional_sources.size())); + if (ImGui::Button("Remove Selected", ImVec2(140.0f, 0.0f)) + && editor.selected_additional_source >= 0 + && editor.selected_additional_source < static_cast(editor.additional_sources.size())) { + editor.additional_sources.erase(editor.additional_sources.begin() + + static_cast(editor.selected_additional_source)); + editor.selected_additional_source = editor.additional_sources.empty() + ? -1 : std::clamp(editor.selected_additional_source, 0, static_cast(editor.additional_sources.size()) - 1); + editor.preview_is_result = false; + } + ImGui::EndDisabled(); + + if (ImGui::BeginChild("##custom_additional_sources", ImVec2(0.0f, 156.0f), true)) { + if (ImGui::BeginTable("##custom_additional_table", 2, + ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingStretchProp)) { + ImGui::TableSetupColumn("id", ImGuiTableColumnFlags_WidthFixed, 42.0f); + ImGui::TableSetupColumn("path", ImGuiTableColumnFlags_WidthStretch); + for (size_t i = 0; i < editor.additional_sources.size(); ++i) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::Text("v%zu", i + 1); + ImGui::TableNextColumn(); + if (ImGui::Selectable(editor.additional_sources[i].c_str(), + editor.selected_additional_source == static_cast(i), + ImGuiSelectableFlags_SpanAllColumns)) { + editor.selected_additional_source = static_cast(i); + } + } + ImGui::EndTable(); + } + if (ImGui::BeginDragDropTarget()) { + if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("JOTP_BROWSER_PATH")) { + if (add_additional_source(&editor, static_cast(payload->Data))) + editor.preview_is_result = false; + } + ImGui::EndDragDropTarget(); + } + } + ImGui::EndChild(); + if (ImGui::Button("Add Selected", ImVec2(120.0f, 0.0f))) { + for (const std::string &path : state->selected_browser_paths) { + if (add_additional_source(&editor, path)) editor.preview_is_result = false; + } + } + + ImGui::Spacing(); + ImGui::SeparatorText("Function library"); + const auto &templates = custom_series_templates(); + if (ImGui::BeginChild("##custom_series_template_list", ImVec2(0.0f, 132.0f), true)) { + for (size_t i = 0; i < templates.size(); ++i) { + if (ImGui::Selectable(templates[i].name, editor.selected_template == static_cast(i), + ImGuiSelectableFlags_AllowDoubleClick)) { + editor.selected_template = static_cast(i); + if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { + editor.globals_code = templates[i].globals_code; + editor.function_code = templates[i].function_code; + editor.preview_is_result = false; + } + } + } + } + ImGui::EndChild(); + if (ImGui::Button("Use Selected Example")) { + const auto &sel = selected_custom_series_template(editor); + editor.globals_code = sel.globals_code; + editor.function_code = sel.function_code; + editor.preview_is_result = false; + } + ImGui::Spacing(); + ImGui::TextDisabled("Preview"); + ImGui::BeginChild("##custom_series_template_preview", ImVec2(0.0f, 0.0f), true); + ImGui::TextUnformatted(selected_custom_series_template(editor).preview_text); + ImGui::EndChild(); +} + +void draw_editor_code_panel(CustomSeriesEditorState &editor, const Pane *active_pane) { + const std::string name_status = active_pane != nullptr ? custom_series_name_status(*active_pane, editor.name) : "no active pane"; + ImGui::TextUnformatted("New name:"); + ImGui::SameLine(); + const bool name_error = name_status == "name required" || name_status == "cannot start with /"; + ImGui::TextColored(name_error ? color_rgb(200, 72, 64) : color_rgb(58, 126, 73), "%s", name_status.c_str()); + if (editor.focus_name) { ImGui::SetKeyboardFocusHere(); editor.focus_name = false; } + ImGui::SetNextItemWidth(-FLT_MIN); + input_text_string("##custom_series_name", &editor.name, ImGuiInputTextFlags_AutoSelectAll); + + ImGui::Spacing(); + ImGui::SeparatorText("Global variables"); + ImGui::SameLine(); + if (ImGui::SmallButton("Help")) editor.open_help = true; + const float globals_h = std::max(96.0f, ImGui::GetContentRegionAvail().y * 0.28f); + if (input_text_multiline_string("##custom_series_globals", &editor.globals_code, + ImVec2(-FLT_MIN, globals_h), ImGuiInputTextFlags_AllowTabInput)) + editor.preview_is_result = false; + + ImGui::Spacing(); + ImGui::TextUnformatted("def calc(time, value):"); + const float func_h = std::max(180.0f, ImGui::GetContentRegionAvail().y - 16.0f); + if (input_text_multiline_string("##custom_series_function", &editor.function_code, + ImVec2(-FLT_MIN, func_h), ImGuiInputTextFlags_AllowTabInput)) + editor.preview_is_result = false; +} + +void draw_custom_series_editor(AppSession *session, UiState *state) { + CustomSeriesEditorState &editor = state->custom_series; + if (!editor.open) return; + + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + TabUiState *tab_state = app_active_tab_state(state); + Pane *active_pane = (tab && tab_state && tab_state->active_pane_index >= 0 + && tab_state->active_pane_index < static_cast(tab->panes.size())) + ? &tab->panes[static_cast(tab_state->active_pane_index)] : nullptr; + if (editor.focus_name && active_pane && editor.name.empty()) + editor.name = next_custom_curve_name(*active_pane); + + draw_custom_series_help_popup(&editor); + + if (ImGui::BeginTabBar("##custom_series_tabs")) { + if (ImGui::BeginTabItem("Single Function")) { + const float footer_height = ImGui::GetFrameHeightWithSpacing() * 2.0f + 10.0f; + if (ImGui::BeginChild("##custom_series_body", + ImVec2(0.0f, std::max(1.0f, ImGui::GetContentRegionAvail().y - footer_height)), false)) { + if (ImGui::BeginChild("##custom_series_preview_child", + ImVec2(0.0f, std::max(200.0f, ImGui::GetContentRegionAvail().y * 0.28f)), true)) + draw_custom_series_preview(*session, &editor); + ImGui::EndChild(); + ImGui::Spacing(); + + if (ImGui::BeginTable("##custom_series_editor_table", 2, + ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_SizingStretchProp, + ImVec2(0.0f, std::max(1.0f, ImGui::GetContentRegionAvail().y)))) { + ImGui::TableSetupColumn("left", ImGuiTableColumnFlags_WidthFixed, 320.0f); + ImGui::TableSetupColumn("right", ImGuiTableColumnFlags_WidthStretch); + ImGui::TableNextColumn(); + if (ImGui::BeginChild("##custom_series_left", ImVec2(0.0f, 0.0f), false)) + draw_editor_source_panel(state, editor); + ImGui::EndChild(); + ImGui::TableNextColumn(); + if (ImGui::BeginChild("##custom_series_right", ImVec2(0.0f, 0.0f), false)) + draw_editor_code_panel(editor, active_pane); + ImGui::EndChild(); + ImGui::EndTable(); + } + } + ImGui::EndChild(); + + ImGui::Spacing(); + if (ImGui::Button("New", ImVec2(120.0f, 0.0f))) { + reset_custom_series_editor(&editor); + if (!state->selected_browser_path.empty()) editor.linked_source = state->selected_browser_path; + editor.open = true; + editor.focus_name = true; + } + ImGui::SameLine(); + ImGui::BeginDisabled(!custom_series_template_ready(editor)); + if (ImGui::Button("Preview Result", ImVec2(120.0f, 0.0f))) + preview_custom_series_editor(session, state); + ImGui::EndDisabled(); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && !custom_series_template_ready(editor)) { + if (editor.linked_source.empty()) ImGui::SetTooltip("Choose an input timeseries first."); + else ImGui::SetTooltip("%s", selected_custom_series_template(editor).requirement_text); + } + ImGui::SameLine(); + if (ImGui::Button("Apply", ImVec2(120.0f, 0.0f))) apply_custom_series_editor(session, state); + ImGui::SameLine(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { editor.open = false; editor.request_select = false; } + ImGui::EndTabItem(); + } + ImGui::EndTabBar(); + } +} diff --git a/tools/jotpluggler/dbc.h b/tools/jotpluggler/dbc.h new file mode 100644 index 0000000000..d7c5461502 --- /dev/null +++ b/tools/jotpluggler/dbc.h @@ -0,0 +1,400 @@ +#pragma once + +#include "common/util.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace dbc { + + +struct ValueDescriptionEntry { + double value = 0.0; + std::string text; +}; + +struct Signal { + enum class Type { + Normal = 0, + Multiplexed, + Multiplexor, + }; + + Type type = Type::Normal; + std::string name; + int start_bit = 0; + int msb = 0; + int lsb = 0; + int size = 0; + double factor = 1.0; + double offset = 0.0; + double min = 0.0; + double max = 0.0; + bool is_signed = false; + bool is_little_endian = false; + std::string unit; + std::string comment; + std::string receiver_name; + int multiplex_value = 0; + int multiplexor_index = -1; + std::vector value_descriptions; +}; + +struct Message { + uint32_t address = 0; + std::string name; + uint32_t size = 0; + std::string comment; + std::string transmitter; + std::vector signals; + int multiplexor_index = -1; + + const std::vector &getSignals() const { return signals; } +}; + +class Database { +public: + Database() = default; + explicit Database(const std::filesystem::path &path); + static Database fromContent(const std::string &content, const std::string &filename = ""); + + const Message *message(uint32_t address) const; + const std::unordered_map &messages() const { return messages_; } + std::vector enumNames(const Signal &signal) const; + +private: + void parse(const std::string &content, const std::string &filename); + void parseBo(const std::string &line, int line_number, Message **current_message); + void parseSg(const std::string &line, int line_number, Message *current_message); + void parseVal(const std::string &line, int line_number); + void parseCmBo(const std::string &line, int line_number); + void parseCmSg(const std::string &line, int line_number); + void finalize(); + + std::string filename_; + std::unordered_map messages_; +}; + +void updateMsbLsb(Signal *signal); +double rawSignalValue(const Signal &signal, const uint8_t *data, size_t data_size); +std::optional signalValue(const Signal &signal, const Message &message, const uint8_t *data, size_t data_size); + +namespace { + +std::string unescape_dbc_string(std::string text) { + size_t pos = 0; + while ((pos = text.find("\\\"", pos)) != std::string::npos) { + text.replace(pos, 2, "\""); + ++pos; + } + return text; +} + +int flip_bit_pos(int start_bit) { + return 8 * (start_bit / 8) + 7 - start_bit % 8; +} + +std::string read_multiline_statement(std::istream &stream, std::string statement, int *line_number) { + static const std::regex statement_end(R"(\"\s*;\s*$)"); + while (true) { + const std::string trimmed = util::strip(statement); + if (std::regex_search(trimmed, statement_end)) { + return trimmed; + } + + std::string next_line; + if (!std::getline(stream, next_line)) { + return trimmed; + } + statement += "\n"; + statement += next_line; + ++(*line_number); + } +} + +} // namespace + +inline void updateMsbLsb(Signal *signal) { + if (signal->is_little_endian) { + signal->lsb = signal->start_bit; + signal->msb = signal->start_bit + signal->size - 1; + } else { + signal->lsb = flip_bit_pos(flip_bit_pos(signal->start_bit) + signal->size - 1); + signal->msb = signal->start_bit; + } +} + +inline double rawSignalValue(const Signal &signal, const uint8_t *data, size_t data_size) { + const int msb_byte = signal.msb / 8; + if (msb_byte >= static_cast(data_size)) return 0.0; + + const int lsb_byte = signal.lsb / 8; + uint64_t val = 0; + if (msb_byte == lsb_byte) { + val = (data[msb_byte] >> (signal.lsb & 7)) & ((1ULL << signal.size) - 1); + } else { + int bits = signal.size; + int i = msb_byte; + const int step = signal.is_little_endian ? -1 : 1; + while (i >= 0 && i < static_cast(data_size) && bits > 0) { + const int msb = (i == msb_byte) ? signal.msb & 7 : 7; + const int lsb = (i == lsb_byte) ? signal.lsb & 7 : 0; + const int nbits = msb - lsb + 1; + val = (val << nbits) | ((data[i] >> lsb) & ((1ULL << nbits) - 1)); + bits -= nbits; + i += step; + } + } + + if (signal.is_signed && (val & (1ULL << (signal.size - 1)))) { + val |= ~((1ULL << signal.size) - 1); + } + + return static_cast(val) * signal.factor + signal.offset; +} + +[[noreturn]] inline void parse_error(const std::string &filename, int line_number, const std::string &message, const std::string &line) { + std::ostringstream out; + out << "[" << filename << ":" << line_number << "] " << message << ": " << line; + throw std::runtime_error(out.str()); +} + +inline Database::Database(const std::filesystem::path &path) { + const std::string content = util::read_file(path.string()); + if (content.empty() && !std::filesystem::exists(path)) { + throw std::runtime_error("Failed to open DBC " + path.string()); + } + parse(content, path.filename().string()); +} + +inline Database Database::fromContent(const std::string &content, const std::string &filename) { + Database db; + db.parse(content, filename); + return db; +} + +inline const Message *Database::message(uint32_t address) const { + auto it = messages_.find(address); + return it == messages_.end() ? nullptr : &it->second; +} + +inline std::vector Database::enumNames(const Signal &signal) const { + if (signal.value_descriptions.empty()) return {}; + int max_index = -1; + for (const auto &entry : signal.value_descriptions) { + const double rounded = std::round(entry.value); + if (std::abs(entry.value - rounded) > 1e-6 || rounded < 0.0 || rounded > 512.0) return {}; + max_index = std::max(max_index, static_cast(rounded)); + } + if (max_index < 0) return {}; + std::vector names(static_cast(max_index + 1)); + for (const auto &entry : signal.value_descriptions) { + names[static_cast(std::llround(entry.value))] = entry.text; + } + return names; +} + +inline void Database::parse(const std::string &content, const std::string &filename) { + filename_ = filename; + messages_.clear(); + std::istringstream stream(content); + std::string raw_line; + Message *current_message = nullptr; + int line_number = 0; + while (std::getline(stream, raw_line)) { + ++line_number; + std::string line = util::strip(raw_line); + if (line.empty()) continue; + if (util::starts_with(line, "BO_ ")) { + parseBo(line, line_number, ¤t_message); + } else if (util::starts_with(line, "SG_ ")) { + if (current_message == nullptr) { + parse_error(filename, line_number, "Signal without current message", line); + } + parseSg(line, line_number, current_message); + } else if (util::starts_with(line, "VAL_ ")) { + parseVal(line, line_number); + } else if (util::starts_with(line, "CM_ BO_")) { + parseCmBo(read_multiline_statement(stream, raw_line, &line_number), line_number); + } else if (util::starts_with(line, "CM_ SG_")) { + parseCmSg(read_multiline_statement(stream, raw_line, &line_number), line_number); + } + } + finalize(); +} + +inline void Database::parseBo(const std::string &line, int line_number, Message **current_message) { + static const std::regex pattern(R"(^BO_\s+(\w+)\s+(\w+)\s*:\s*(\w+)\s+(\w+)\s*$)"); + std::smatch match; + if (!std::regex_match(line, match, pattern)) { + parse_error("", line_number, "Invalid BO_ line format", line); + } + uint32_t address = static_cast(std::stoul(match[1].str(), nullptr, 0)); + if (messages_.find(address) != messages_.end()) { + parse_error(filename_, line_number, "Duplicate message address", line); + } + Message &message = messages_[address]; + message.address = address; + message.name = match[2].str(); + message.size = static_cast(std::stoul(match[3].str(), nullptr, 0)); + message.transmitter = match[4].str(); + message.signals.clear(); + message.multiplexor_index = -1; + *current_message = &message; +} + +inline void Database::parseSg(const std::string &line, int line_number, Message *current_message) { + static const std::regex multiplex_pattern(R"(^SG_\s+(\w+)\s+(\w+)\s*:\s*(\d+)\|(\d+)@(\d)([+-])\s+\(([0-9.+\-eE]+),([0-9.+\-eE]+)\)\s+\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\]\s+\"(.*)\"\s+(.*)$)"); + static const std::regex normal_pattern(R"(^SG_\s+(\w+)\s*:\s*(\d+)\|(\d+)@(\d)([+-])\s+\(([0-9.+\-eE]+),([0-9.+\-eE]+)\)\s+\[([0-9.+\-eE]+)\|([0-9.+\-eE]+)\]\s+\"(.*)\"\s+(.*)$)"); + + std::smatch match; + Signal signal; + int offset = 0; + if (std::regex_match(line, match, normal_pattern)) { + offset = 0; + } else if (std::regex_match(line, match, multiplex_pattern)) { + offset = 1; + const std::string indicator = match[2].str(); + if (indicator == "M") { + if (std::any_of(current_message->signals.begin(), current_message->signals.end(), [](const Signal &existing) { + return existing.type == Signal::Type::Multiplexor; + })) { + parse_error(filename_, line_number, "Multiple multiplexor", line); + } + signal.type = Signal::Type::Multiplexor; + } else if (!indicator.empty() && indicator.front() == 'm') { + signal.type = Signal::Type::Multiplexed; + signal.multiplex_value = std::stoi(indicator.substr(1)); + } else { + parse_error("", line_number, "Invalid multiplex indicator", line); + } + } else { + parse_error("", line_number, "Invalid SG_ line format", line); + } + + signal.name = match[1].str(); + if (std::any_of(current_message->signals.begin(), current_message->signals.end(), [&](const Signal &existing) { + return existing.name == signal.name; + })) { + parse_error(filename_, line_number, "Duplicate signal name", line); + } + signal.start_bit = std::stoi(match[2 + offset].str()); + signal.size = std::stoi(match[3 + offset].str()); + signal.is_little_endian = match[4 + offset].str() == "1"; + signal.is_signed = match[5 + offset].str() == "-"; + signal.factor = std::stod(match[6 + offset].str()); + signal.offset = std::stod(match[7 + offset].str()); + signal.min = std::stod(match[8 + offset].str()); + signal.max = std::stod(match[9 + offset].str()); + signal.unit = match[10 + offset].str(); + signal.receiver_name = util::strip(match[11 + offset].str()); + updateMsbLsb(&signal); + current_message->signals.push_back(std::move(signal)); +} + +inline void Database::parseVal(const std::string &line, int line_number) { + static const std::regex prefix(R"(^VAL_\s+(\w+)\s+(\w+)\s+(.*);$)"); + std::smatch match; + if (!std::regex_match(line, match, prefix)) { + parse_error("", line_number, "Invalid VAL_ line format", line); + } + + const uint32_t address = static_cast(std::stoul(match[1].str(), nullptr, 0)); + auto msg_it = messages_.find(address); + if (msg_it == messages_.end()) { + return; + } + auto sig_it = std::find_if(msg_it->second.signals.begin(), msg_it->second.signals.end(), [&](const Signal &signal) { + return signal.name == match[2].str(); + }); + if (sig_it == msg_it->second.signals.end()) { + return; + } + + static const std::regex entry_pattern(R"(([+-]?\d+(?:\.\d+)?)\s+\"((?:[^\"\\]|\\.)*)\")"); + const std::string defs = match[3].str(); + for (std::sregex_iterator it(defs.begin(), defs.end(), entry_pattern), end; it != end; ++it) { + sig_it->value_descriptions.push_back(ValueDescriptionEntry{ + .value = std::stod((*it)[1].str()), + .text = (*it)[2].str(), + }); + } +} + +inline void Database::parseCmBo(const std::string &line, int line_number) { + static const std::regex pattern(R"(^CM_\s+BO_\s*(\w+)\s*\"((?:[^\"\\]|\\.|[\r\n])*)\"\s*;\s*$)"); + std::smatch match; + if (!std::regex_match(line, match, pattern)) { + parse_error(filename_, line_number, "Invalid message comment format", line); + } + const uint32_t address = static_cast(std::stoul(match[1].str(), nullptr, 0)); + auto it = messages_.find(address); + if (it != messages_.end()) { + it->second.comment = unescape_dbc_string(match[2].str()); + } +} + +inline void Database::parseCmSg(const std::string &line, int line_number) { + static const std::regex pattern(R"(^CM_\s+SG_\s*(\w+)\s*(\w+)\s*\"((?:[^\"\\]|\\.|[\r\n])*)\"\s*;\s*$)"); + std::smatch match; + if (!std::regex_match(line, match, pattern)) { + parse_error(filename_, line_number, "Invalid signal comment format", line); + } + + const uint32_t address = static_cast(std::stoul(match[1].str(), nullptr, 0)); + auto msg_it = messages_.find(address); + if (msg_it == messages_.end()) return; + + auto sig_it = std::find_if(msg_it->second.signals.begin(), msg_it->second.signals.end(), [&](const Signal &signal) { + return signal.name == match[2].str(); + }); + if (sig_it != msg_it->second.signals.end()) { + sig_it->comment = unescape_dbc_string(match[3].str()); + } +} + +inline void Database::finalize() { + for (auto &[_, message] : messages_) { + std::sort(message.signals.begin(), message.signals.end(), [](const Signal &left, const Signal &right) { + return std::tie(right.type, left.multiplex_value, left.start_bit, left.name) + < std::tie(left.type, right.multiplex_value, right.start_bit, right.name); + }); + message.multiplexor_index = -1; + for (size_t i = 0; i < message.signals.size(); ++i) { + if (message.signals[i].type == Signal::Type::Multiplexor) { + message.multiplexor_index = static_cast(i); + break; + } + } + for (Signal &signal : message.signals) { + signal.multiplexor_index = signal.type == Signal::Type::Multiplexed ? message.multiplexor_index : -1; + if (signal.type == Signal::Type::Multiplexed && signal.multiplexor_index < 0) { + signal.type = Signal::Type::Normal; + signal.multiplex_value = 0; + } + } + } +} + +inline std::optional signalValue(const Signal &signal, const Message &message, const uint8_t *data, size_t data_size) { + if (signal.multiplexor_index >= 0) { + const Signal &multiplexor = message.signals[static_cast(signal.multiplexor_index)]; + const double mux_value = rawSignalValue(multiplexor, data, data_size); + if (std::llround(mux_value) != signal.multiplex_value) return std::nullopt; + } + return rawSignalValue(signal, data, data_size); +} + +} // namespace dbc diff --git a/tools/jotpluggler/generated_dbcs/.gitignore b/tools/jotpluggler/generated_dbcs/.gitignore new file mode 100644 index 0000000000..d6b7ef32c8 --- /dev/null +++ b/tools/jotpluggler/generated_dbcs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tools/jotpluggler/icons.cc b/tools/jotpluggler/icons.cc new file mode 100644 index 0000000000..9507090e03 --- /dev/null +++ b/tools/jotpluggler/icons.cc @@ -0,0 +1,24 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/common.h" + +#include + +void icon_add_font(float size, bool merge, const ImFont *base_font) { + const std::filesystem::path ttf = repo_root() / "third_party" / "bootstrap" / "bootstrap-icons.ttf"; + ImGuiIO &io = ImGui::GetIO(); + ImFontConfig config; + config.MergeMode = merge; + config.GlyphMinAdvanceX = size; + if (base_font != nullptr) { + ImFontBaked *baked = const_cast(base_font)->GetFontBaked(size); + const float base_center = baked != nullptr ? (baked->Ascent + baked->Descent) * 0.5f : size * 0.5f; + config.GlyphOffset.y = std::round(size * 0.5f - base_center); + } + static const ImWchar ranges[] = {0xF000, 0xF8FF, 0}; + io.Fonts->AddFontFromFileTTF(ttf.c_str(), size, &config, ranges); +} + +bool icon_menu_item(const char *glyph, const char *label, const char *shortcut, bool selected, bool enabled) { + assert(glyph != nullptr && glyph[0] != '\0'); + return ImGui::MenuItem(util::string_format("%s %s", glyph, label).c_str(), shortcut, selected, enabled); +} diff --git a/tools/jotpluggler/internal.h b/tools/jotpluggler/internal.h new file mode 100644 index 0000000000..22a5c1dd95 --- /dev/null +++ b/tools/jotpluggler/internal.h @@ -0,0 +1,166 @@ +#pragma once + +#include "tools/jotpluggler/common.h" +#include "tools/jotpluggler/map.h" + +#include +#include +#include + +struct GLFWwindow; + +enum class PaneDropZone { + Center, + Left, + Right, + Top, + Bottom, +}; + +enum class PaneMenuActionKind { + None, + OpenAxisLimits, + OpenCustomSeries, + SplitLeft, + SplitRight, + SplitTop, + SplitBottom, + ResetView, + ResetHorizontal, + ResetVertical, + Clear, + Close, +}; + +struct PaneMenuAction { + PaneMenuActionKind kind = PaneMenuActionKind::None; + int pane_index = -1; +}; + +struct PaneCurveDragPayload { + int tab_index = -1; + int pane_index = -1; + int curve_index = -1; +}; + +struct PaneDropAction { + PaneDropZone zone = PaneDropZone::Center; + int target_pane_index = -1; + bool from_browser = false; + std::vector browser_paths; + std::string special_item_id; + PaneCurveDragPayload curve_ref; +}; + +inline constexpr float SIDEBAR_WIDTH = 320.0f; +inline constexpr float SIDEBAR_MIN_WIDTH = 220.0f; +inline constexpr float SIDEBAR_MAX_WIDTH = 520.0f; +inline constexpr float TIMELINE_BAR_HEIGHT = 14.0f; +inline constexpr float STATUS_BAR_HEIGHT = 52.0f; +inline constexpr double MIN_HORIZONTAL_ZOOM_SECONDS = 2.0; + +struct UiMetrics { + float width = 0.0f; + float height = 0.0f; + float top_offset = 0.0f; + float sidebar_width = SIDEBAR_WIDTH; + float content_x = 0.0f; + float content_y = 0.0f; + float content_w = 0.0f; + float content_h = 0.0f; + float status_bar_y = 0.0f; +}; + +std::filesystem::path resolve_layout_path(const std::string &layout_arg); +std::filesystem::path autosave_path_for_layout(const std::filesystem::path &layout_path); +std::vector available_layout_names(); + +SketchLayout make_empty_layout(); +void cancel_rename_tab(UiState *state); +void sync_ui_state(UiState *state, const SketchLayout &layout); +void sync_route_buffers(UiState *state, const AppSession &session); +void sync_stream_buffers(UiState *state, const AppSession &session); +void sync_layout_buffers(UiState *state, const AppSession &session); +void mark_all_docks_dirty(UiState *state); +void clear_layout_autosave(const AppSession &session); +bool autosave_layout(AppSession *session, UiState *state); +bool apply_axis_limits_editor(AppSession *session, UiState *state); +void open_axis_limits_editor(const AppSession &session, UiState *state, int pane_index); +void persist_shared_range_to_tab(WorkspaceTab *tab, const UiState &state); +void clear_pane_vertical_limits(Pane *pane); + +void refresh_replaced_layout_ui(AppSession *session, UiState *state, bool mark_docks); +void start_new_layout(AppSession *session, UiState *state, const std::string &status_text = "New untitled layout"); +void apply_dbc_override_change(AppSession *session, UiState *state, const std::string &dbc_override); + +void app_push_bold_font(); +void app_pop_bold_font(); +void draw_vertical_splitter(const char *id, float height, float min_left, float max_left, float *left_width); +void draw_right_splitter(const char *id, float height, float min_right, float max_right, float *right_width); +bool draw_horizontal_splitter(const char *id, float width, float min_top, float max_top, float *top_height); +void draw_payload_bytes(std::string_view data, const std::string *prev_data = nullptr); +void draw_payload_preview_boxes(const char *id, std::string_view data, const std::string *prev_data, float max_width); +void draw_signal_sparkline(const AppSession &session, + const UiState &state, + std::string_view signal_path, + bool selected, + ImVec2 size = ImVec2(0.0f, 24.0f)); +ImU32 mix_color(ImU32 a, ImU32 b, float t); +void draw_empty_panel(const char *title, const char *message); + +UiMetrics compute_ui_metrics(const ImVec2 &size, float top_offset, float sidebar_width); +void draw_sidebar(AppSession *session, const UiMetrics &ui, UiState *state, bool show_camera_feed); +void draw_workspace(AppSession *session, const UiMetrics &ui, UiState *state); +void draw_pane_windows(AppSession *session, UiState *state); + +// plot.cc +void draw_plot(const AppSession &session, Pane *pane, UiState *state); +bool draw_pane_close_button_overlay(); +void draw_pane_frame_overlay(); +std::optional draw_pane_context_menu(const WorkspaceTab &tab, int pane_index); +bool curve_has_samples(const AppSession &session, const Curve &curve); +bool curve_has_local_samples(const Curve &curve); +std::string app_curve_display_name(const Curve &curve); +bool mark_layout_dirty(AppSession *session, UiState *state); + +const RouteSeries *app_find_route_series(const AppSession &session, const std::string &path); +void sync_camera_feeds(AppSession *session); +void apply_route_data(AppSession *session, UiState *state, RouteData route_data); +bool apply_undo(AppSession *session, UiState *state); +bool apply_redo(AppSession *session, UiState *state); +bool infer_stream_follow_state(const UiState &state, const AppSession &session); +void ensure_shared_range(UiState *state, const AppSession &session); +void clamp_shared_range(UiState *state, const AppSession &session); +void reset_shared_range(UiState *state, const AppSession &session); +void update_follow_range(UiState *state, const AppSession &session); +void advance_playback(UiState *state, const AppSession &session); +void step_tracker(UiState *state, double direction); +std::string dbc_combo_label(const AppSession &session); +const char *log_selector_name(LogSelector selector); +const char *log_selector_description(LogSelector selector); +std::string format_cache_bytes(uint64_t bytes); +MapCacheStats directory_cache_stats(const std::filesystem::path &root); +float draw_main_menu_bar(AppSession *session, UiState *state); + +bool reset_layout(AppSession *session, UiState *state); +bool reload_layout(AppSession *session, UiState *state, const std::string &layout_arg); +bool save_layout(AppSession *session, UiState *state, const std::string &layout_path); +void rebuild_session_route_data(AppSession *session, UiState *state, + const RouteLoadProgressCallback &progress = {}); +void stop_stream_session(AppSession *session, UiState *state, bool preserve_data = true); +bool start_stream_session(AppSession *session, + UiState *state, + const StreamSourceConfig &source, + double buffer_seconds, + bool preserve_existing_data = false); +void start_async_route_load(AppSession *session, UiState *state); +void poll_async_route_load(AppSession *session, UiState *state); +bool reload_session(AppSession *session, UiState *state, const std::string &route_name, const std::string &data_dir); +void draw_popups(AppSession *session, UiState *state); + +void draw_status_bar(const AppSession &session, const UiMetrics &ui, UiState *state); +void draw_sidebar_resizer(const UiMetrics &ui, UiState *state); + +void apply_stream_batch(AppSession *session, UiState *state, StreamExtractBatch batch); + +void render_frame(GLFWwindow *window, AppSession *session, UiState *state, const std::filesystem::path *capture_path); diff --git a/tools/jotpluggler/layout.cc b/tools/jotpluggler/layout.cc new file mode 100644 index 0000000000..8a58ef7cd6 --- /dev/null +++ b/tools/jotpluggler/layout.cc @@ -0,0 +1,704 @@ +#include "tools/jotpluggler/internal.h" +#include "system/hardware/hw.h" + +#include + +namespace fs = std::filesystem; + +namespace { + +enum class ModalAction { + None, + Primary, + Secondary, +}; + +struct FindSignalMatch { + const std::string *path = nullptr; + int score = 0; +}; + +struct DbcEditorSource { + fs::path path; + DbcEditorState::SourceKind kind = DbcEditorState::SourceKind::None; +}; + +StreamSourceConfig stream_source_config_from_ui(const UiState &state) { + StreamSourceConfig source; + source.kind = state.stream_source_kind; + source.address = util::strip(state.stream_address_buffer); + if (source.kind == StreamSourceKind::CerealLocal) { + source.address = "127.0.0.1"; + } else { + source.address = normalize_stream_address(std::move(source.address)); + } + return source; +} + +void open_queued_popup(bool &flag, const char *name) { + if (flag) { + ImGui::OpenPopup(name); + flag = false; + } +} + +ModalAction draw_modal_action_row(const char *primary_label, + const char *secondary_label = "Cancel", + float width = 120.0f) { + if (ImGui::Button(primary_label, ImVec2(width, 0.0f))) { + return ModalAction::Primary; + } + ImGui::SameLine(); + if (ImGui::Button(secondary_label, ImVec2(width, 0.0f))) { + return ModalAction::Secondary; + } + return ModalAction::None; +} + +std::vector find_signal_matches(const AppSession &session, std::string_view query) { + std::vector matches; + if (query.empty()) { + return matches; + } + const std::string needle = lowercase_copy(query); + for (const std::string &path : session.route_data.paths) { + const std::string hay = lowercase_copy(path); + const size_t pos = hay.find(needle); + if (pos == std::string::npos) { + continue; + } + const size_t slash = path.find_last_of('/'); + const std::string_view label = slash == std::string::npos ? std::string_view(path) : std::string_view(path).substr(slash + 1); + int score = static_cast(pos * 8 + path.size()); + if (lowercase_copy(label) == needle) score -= 60; + if (util::starts_with(hay, needle)) score -= 30; + matches.push_back({.path = &path, .score = score}); + } + std::sort(matches.begin(), matches.end(), [](const FindSignalMatch &a, const FindSignalMatch &b) { + return std::tie(a.score, *a.path) < std::tie(b.score, *b.path); + }); + if (matches.size() > 200) { + matches.resize(200); + } + return matches; +} + +bool open_find_signal_result(UiState *state, const std::string &path) { + state->selected_browser_paths = {path}; + state->selected_browser_path = path; + state->browser_selection_anchor = path; + state->status_text = "Selected signal " + path; + return true; +} + +void draw_open_route_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Open Route", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextUnformatted("Load a route into the current layout."); + ImGui::Separator(); + input_text_string("Route", &state->route_buffer); + input_text_string("Data Dir", &state->data_dir_buffer); + ImGui::Spacing(); + switch (draw_modal_action_row("Load")) { + case ModalAction::Primary: + reload_session(session, state, state->route_buffer, state->data_dir_buffer); + ImGui::CloseCurrentPopup(); + break; + case ModalAction::Secondary: + sync_route_buffers(state, *session); + ImGui::CloseCurrentPopup(); + break; + case ModalAction::None: + break; + } + ImGui::EndPopup(); +} + +void draw_stream_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Live Stream", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + + ImGui::TextUnformatted("Connect to a live source."); + ImGui::Separator(); + if (ImGui::RadioButton("Local (MSGQ)", state->stream_source_kind == StreamSourceKind::CerealLocal)) { + state->stream_source_kind = StreamSourceKind::CerealLocal; + } + if (ImGui::RadioButton("Remote (ZMQ)", state->stream_source_kind == StreamSourceKind::CerealRemote)) { + state->stream_source_kind = StreamSourceKind::CerealRemote; + } + + if (state->stream_source_kind == StreamSourceKind::CerealRemote) { + input_text_string("Address", &state->stream_address_buffer); + } + ImGui::InputDouble("Buffer (seconds)", &state->stream_buffer_seconds, 0.0, 0.0, "%.0f"); + ImGui::Spacing(); + switch (draw_modal_action_row("Connect")) { + case ModalAction::Primary: { + const StreamSourceConfig source = stream_source_config_from_ui(*state); + if (start_stream_session(session, state, source, state->stream_buffer_seconds, false)) { + ImGui::CloseCurrentPopup(); + } + break; + } + case ModalAction::Secondary: + sync_stream_buffers(state, *session); + ImGui::CloseCurrentPopup(); + break; + case ModalAction::None: + break; + } + ImGui::EndPopup(); +} + +void draw_load_layout_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Load Layout", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextUnformatted("Load a JotPlugger JSON layout."); + ImGui::Separator(); + input_text_string("Layout", &state->load_layout_buffer); + ImGui::Spacing(); + switch (draw_modal_action_row("Load")) { + case ModalAction::Primary: + if (reload_layout(session, state, state->load_layout_buffer)) { + ImGui::CloseCurrentPopup(); + } + break; + case ModalAction::Secondary: + sync_layout_buffers(state, *session); + ImGui::CloseCurrentPopup(); + break; + case ModalAction::None: + break; + } + ImGui::EndPopup(); +} + +void draw_save_layout_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Save Layout", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextUnformatted("Save the current workspace as a JotPlugger JSON layout."); + ImGui::Separator(); + input_text_string("Layout", &state->save_layout_buffer); + ImGui::Spacing(); + switch (draw_modal_action_row("Save")) { + case ModalAction::Primary: + if (save_layout(session, state, state->save_layout_buffer)) { + ImGui::CloseCurrentPopup(); + } + break; + case ModalAction::Secondary: + sync_layout_buffers(state, *session); + ImGui::CloseCurrentPopup(); + break; + case ModalAction::None: + break; + } + ImGui::EndPopup(); +} + +void draw_preferences_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Preferences", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + if (session->map_data) { + const MapCacheStats map_cache = session->map_data->cacheStats(); + const MapCacheStats download_cache = directory_cache_stats(Path::download_cache_root()); + ImGui::TextUnformatted("Map"); + ImGui::Separator(); + ImGui::Text("Map cache: %s in %zu file%s", + format_cache_bytes(map_cache.bytes).c_str(), + map_cache.files, + map_cache.files == 1 ? "" : "s"); + if (ImGui::Button("Clear Map Cache", ImVec2(120.0f, 0.0f))) { + session->map_data->clearCache(); + state->status_text = "Cleared map cache"; + } + ImGui::Spacing(); + ImGui::TextUnformatted("comma Download Cache"); + ImGui::Separator(); + ImGui::Text("Download cache: %s in %zu file%s", + format_cache_bytes(download_cache.bytes).c_str(), + download_cache.files, + download_cache.files == 1 ? "" : "s"); + ImGui::TextDisabled("%s", Path::download_cache_root().c_str()); + ImGui::Spacing(); + } + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); +} + +void draw_find_signal_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Find Signal", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextUnformatted("Search decoded signals across the loaded route."); + ImGui::Separator(); + ImGui::SetNextItemWidth(560.0f); + input_text_with_hint_string("##find_signal_query", "Search signal path or name...", &state->find_signal_buffer); + if (ImGui::IsWindowAppearing()) { + ImGui::SetKeyboardFocusHere(-1); + } + const std::vector matches = find_signal_matches(*session, state->find_signal_buffer); + ImGui::Spacing(); + ImGui::TextDisabled("%zu match%s", matches.size(), matches.size() == 1 ? "" : "es"); + if (ImGui::BeginChild("##find_signal_results", ImVec2(760.0f, 360.0f), true)) { + for (const FindSignalMatch &match : matches) { + const std::string &path = *match.path; + const size_t slash = path.find_last_of('/'); + const std::string_view label = slash == std::string::npos ? std::string_view(path) : std::string_view(path).substr(slash + 1); + if (ImGui::Selectable((std::string(label) + "##" + path).c_str(), false, ImGuiSelectableFlags_SpanAllColumns)) { + if (open_find_signal_result(state, path)) { + ImGui::CloseCurrentPopup(); + } + } + ImGui::SameLine(280.0f); + ImGui::TextDisabled("%s", path.c_str()); + } + } + ImGui::EndChild(); + ImGui::Spacing(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); +} + +std::string default_dbc_template() { + return "VERSION \"\"\n\nNS_ :\nBS_:\nBU_: XXX\n"; +} + +DbcEditorSource resolve_dbc_editor_source(const std::string &dbc_name) { + const fs::path generated_dbc_dir = repo_root() / "tools" / "jotpluggler" / "generated_dbcs"; + const std::array candidates = {{ + {.path = repo_root() / "opendbc" / "dbc" / (dbc_name + ".dbc"), .kind = DbcEditorState::SourceKind::Opendbc}, + {.path = generated_dbc_dir / (dbc_name + ".dbc"), .kind = DbcEditorState::SourceKind::Generated}, + }}; + for (const DbcEditorSource &candidate : candidates) { + if (fs::exists(candidate.path)) { + return candidate; + } + } + return {}; +} + +void load_dbc_editor_state(const AppSession &session, UiState *state) { + DbcEditorState &editor = state->dbc_editor; + const std::string dbc_name = !session.dbc_override.empty() ? session.dbc_override : session.route_data.dbc_name; + editor.source_name = dbc_name.empty() ? "untitled" : dbc_name; + editor.source_path.clear(); + editor.source_kind = DbcEditorState::SourceKind::None; + if (dbc_name.empty()) { + editor.save_name = "custom_can"; + editor.text = default_dbc_template(); + } else { + const DbcEditorSource source = resolve_dbc_editor_source(dbc_name); + editor.source_kind = source.kind; + editor.source_path = source.path; + editor.text = source.path.empty() ? default_dbc_template() : read_file_or_throw(source.path); + editor.save_name = source.kind == DbcEditorState::SourceKind::Generated ? dbc_name : dbc_name + "_edited"; + } + editor.loaded = true; +} + +bool ensure_dbc_editor_loaded(const AppSession &session, UiState *state) { + if (!state->dbc_editor.loaded) { + try { + load_dbc_editor_state(session, state); + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + return false; + } + } + return true; +} + +bool save_dbc_editor_contents(AppSession *session, UiState *state) { + DbcEditorState &editor = state->dbc_editor; + editor.save_name = util::strip(editor.save_name); + if (editor.save_name.empty()) { + state->error_text = "DBC name cannot be empty"; + state->open_error_popup = true; + return false; + } + if (editor.source_kind == DbcEditorState::SourceKind::Opendbc && editor.save_name == editor.source_name) { + state->error_text = "Save edited opendbc files under a new name"; + state->open_error_popup = true; + return false; + } + try { + dbc::Database::fromContent(editor.text, editor.save_name + ".dbc"); + const fs::path generated_dbc_dir = repo_root() / "tools" / "jotpluggler" / "generated_dbcs"; + fs::create_directories(generated_dbc_dir); + const fs::path output = generated_dbc_dir / (editor.save_name + ".dbc"); + write_file_or_throw(output, editor.text); + apply_dbc_override_change(session, state, editor.save_name); + editor.source_name = editor.save_name; + editor.source_path = output; + editor.source_kind = DbcEditorState::SourceKind::Generated; + editor.loaded = false; + state->status_text = "Saved DBC " + editor.save_name; + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + return false; + } +} + +void draw_dbc_editor_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("DBC Editor", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + DbcEditorState &editor = state->dbc_editor; + if (!ensure_dbc_editor_loaded(*session, state)) { + ImGui::CloseCurrentPopup(); + ImGui::EndPopup(); + return; + } + ImGui::TextUnformatted("Edit DBC text and save it into generated_dbcs."); + ImGui::Separator(); + ImGui::SetNextItemWidth(260.0f); + input_text_string("DBC Name", &editor.save_name, ImGuiInputTextFlags_AutoSelectAll); + if (!editor.source_path.empty()) { + ImGui::TextDisabled("%s", editor.source_path.string().c_str()); + } else { + ImGui::TextDisabled("New in-memory DBC"); + } + ImGui::Spacing(); + input_text_multiline_string("##dbc_editor_text", &editor.text, ImVec2(920.0f, 520.0f), ImGuiInputTextFlags_AllowTabInput); + ImGui::Spacing(); + if (ImGui::Button("Apply + Save", ImVec2(140.0f, 0.0f))) { + if (save_dbc_editor_contents(session, state)) { + ImGui::CloseCurrentPopup(); + } + } + ImGui::SameLine(); + if (ImGui::Button("Reload Source", ImVec2(140.0f, 0.0f))) { + editor.loaded = false; + } + ImGui::SameLine(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + editor.loaded = false; + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); +} + +void draw_axis_limits_popup(AppSession *session, UiState *state) { + if (!ImGui::BeginPopupModal("Edit Axis Limits", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + const WorkspaceTab *tab = app_active_tab(session->layout, *state); + const bool valid_pane = tab != nullptr + && state->axis_limits.pane_index >= 0 + && state->axis_limits.pane_index < static_cast(tab->panes.size()); + if (!valid_pane) { + ImGui::TextWrapped("The selected pane is no longer available."); + ImGui::Spacing(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + state->axis_limits.pane_index = -1; + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + return; + } + + ImGui::TextUnformatted("X range applies to the active tab. Y limits apply to the selected pane."); + ImGui::Separator(); + ImGui::TextUnformatted("Horizontal"); + ImGui::SetNextItemWidth(180.0f); + ImGui::InputDouble("X Min", &state->axis_limits.x_min, 0.0, 0.0, "%.3f"); + ImGui::SetNextItemWidth(180.0f); + ImGui::InputDouble("X Max", &state->axis_limits.x_max, 0.0, 0.0, "%.3f"); + ImGui::Spacing(); + ImGui::TextUnformatted("Vertical"); + ImGui::Checkbox("Use Y Min", &state->axis_limits.y_min_enabled); + ImGui::BeginDisabled(!state->axis_limits.y_min_enabled); + ImGui::SetNextItemWidth(180.0f); + ImGui::InputDouble("Y Min", &state->axis_limits.y_min, 0.0, 0.0, "%.6g"); + ImGui::EndDisabled(); + ImGui::Checkbox("Use Y Max", &state->axis_limits.y_max_enabled); + ImGui::BeginDisabled(!state->axis_limits.y_max_enabled); + ImGui::SetNextItemWidth(180.0f); + ImGui::InputDouble("Y Max", &state->axis_limits.y_max, 0.0, 0.0, "%.6g"); + ImGui::EndDisabled(); + ImGui::Spacing(); + switch (draw_modal_action_row("Apply")) { + case ModalAction::Primary: + if (apply_axis_limits_editor(session, state)) { + state->axis_limits.pane_index = -1; + ImGui::CloseCurrentPopup(); + } + break; + case ModalAction::Secondary: + state->axis_limits.pane_index = -1; + ImGui::CloseCurrentPopup(); + break; + case ModalAction::None: + break; + } + ImGui::EndPopup(); +} + +void draw_error_popup(UiState *state) { + if (state->open_error_popup) { + ImGui::OpenPopup("Error"); + state->open_error_popup = false; + } + if (!ImGui::BeginPopupModal("Error", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + return; + } + ImGui::TextWrapped("%s", state->error_text.c_str()); + ImGui::Spacing(); + if (ImGui::Button("Close", ImVec2(120.0f, 0.0f))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); +} + +} // namespace + +bool reset_layout(AppSession *session, UiState *state) { + try { + if (session->layout_path.empty()) { + start_new_layout(session, state, "Reset layout"); + return true; + } + clear_layout_autosave(*session); + session->layout = load_sketch_layout(session->layout_path); + state->layout_dirty = false; + session->autosave_path = autosave_path_for_layout(session->layout_path); + state->undo.reset(session->layout); + refresh_replaced_layout_ui(session, state, false); + reset_shared_range(state, *session); + state->status_text = "Reset layout"; + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to reset layout"; + return false; + } +} + +bool reload_layout(AppSession *session, UiState *state, const std::string &layout_arg) { + try { + const bool preserve_shared_range = session->route_data.has_time_range && state->has_shared_range; + const double preserved_x_min = state->x_view_min; + const double preserved_x_max = state->x_view_max; + const fs::path layout_path = resolve_layout_path(layout_arg); + session->autosave_path = autosave_path_for_layout(layout_path); + const bool load_draft = fs::exists(session->autosave_path); + session->layout = load_sketch_layout(load_draft ? session->autosave_path : layout_path); + session->layout_path = layout_path; + state->layout_dirty = load_draft; + state->undo.reset(session->layout); + refresh_replaced_layout_ui(session, state, true); + if (preserve_shared_range) { + state->has_shared_range = true; + state->x_view_min = preserved_x_min; + state->x_view_max = preserved_x_max; + clamp_shared_range(state, *session); + } else { + reset_shared_range(state, *session); + } + state->status_text = std::string(load_draft ? "Loaded layout draft " : "Loaded layout ") + + layout_path.filename().string(); + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to load layout"; + return false; + } +} + +bool save_layout(AppSession *session, UiState *state, const std::string &layout_path) { + try { + if (layout_path.empty()) throw std::runtime_error("Layout path is empty"); + session->layout.current_tab_index = state->active_tab_index; + const fs::path previous_autosave = session->autosave_path; + const fs::path output = fs::absolute(fs::path(layout_path)); + save_layout_json(session->layout, output); + session->layout_path = output; + session->autosave_path = autosave_path_for_layout(output); + if (!previous_autosave.empty() && previous_autosave != session->autosave_path && fs::exists(previous_autosave)) { + fs::remove(previous_autosave); + } + clear_layout_autosave(*session); + state->layout_dirty = false; + sync_layout_buffers(state, *session); + state->status_text = "Saved layout " + output.filename().string(); + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to save layout"; + return false; + } +} + +void rebuild_session_route_data(AppSession *session, UiState *state, + const RouteLoadProgressCallback &progress) { + apply_route_data(session, state, load_route_data(session->route_name, session->data_dir, session->dbc_override, progress)); +} + +void stop_stream_session(AppSession *session, UiState *state, bool preserve_data) { + if (preserve_data && session->stream_poller && session->data_mode == SessionDataMode::Stream) { + session->stream_poller->setPaused(true); + } else if (session->stream_poller) { + session->stream_poller->stop(); + } + session->stream_paused = preserve_data && session->data_mode == SessionDataMode::Stream; + if (!preserve_data) { + session->stream_time_offset.reset(); + apply_route_data(session, state, RouteData{}); + } + sync_stream_buffers(state, *session); +} + +bool start_stream_session(AppSession *session, + UiState *state, + const StreamSourceConfig &source, + double buffer_seconds, + bool preserve_existing_data) { + try { + if (session->route_loader) { + session->route_loader.reset(); + } + session->data_mode = SessionDataMode::Stream; + session->route_id = {}; + session->route_name.clear(); + session->data_dir.clear(); + session->stream_source = source; + if (session->stream_source.kind == StreamSourceKind::CerealLocal) { + session->stream_source.address = "127.0.0.1"; + } + session->stream_buffer_seconds = std::max(1.0, buffer_seconds); + session->next_stream_custom_refresh_time = 0.0; + session->stream_paused = false; + if (preserve_existing_data && session->stream_poller) { + StreamPollSnapshot snapshot = session->stream_poller->snapshot(); + if (snapshot.active) { + session->stream_poller->setPaused(false); + sync_route_buffers(state, *session); + sync_stream_buffers(state, *session); + state->follow_latest = true; + state->playback_playing = false; + state->status_text = "Resumed stream " + stream_source_target_label(session->stream_source); + return true; + } + } + if (!preserve_existing_data) { + session->stream_time_offset.reset(); + apply_route_data(session, state, RouteData{}); + } + if (!session->stream_poller) { + session->stream_poller = std::make_unique(); + } + session->stream_poller->start(session->stream_source, + session->stream_buffer_seconds, + session->dbc_override, + session->stream_time_offset); + sync_route_buffers(state, *session); + sync_stream_buffers(state, *session); + state->follow_latest = true; + state->playback_playing = false; + state->status_text = preserve_existing_data ? "Resumed stream " + stream_source_target_label(session->stream_source) + : "Streaming from " + stream_source_target_label(session->stream_source); + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to start stream"; + return false; + } +} + +void start_async_route_load(AppSession *session, UiState *state) { + if (!session->route_loader) { + return; + } + apply_route_data(session, state, RouteData{}); + session->route_loader->start(session->route_name, session->data_dir, session->dbc_override); + state->status_text = session->route_name.empty() ? "Ready" : "Loading route " + session->route_name; +} + +void poll_async_route_load(AppSession *session, UiState *state) { + if (!session->route_loader) { + return; + } + RouteData loaded_route; + std::string error_text; + if (!session->route_loader->consume(&loaded_route, &error_text)) { + return; + } + if (!error_text.empty()) { + state->error_text = error_text; + state->open_error_popup = true; + state->status_text = "Failed to load route"; + return; + } + apply_route_data(session, state, std::move(loaded_route)); + state->status_text = session->route_name.empty() ? "Ready" : "Loaded route " + session->route_name; +} + +bool reload_session(AppSession *session, UiState *state, const std::string &route_name, const std::string &data_dir) { + try { + stop_stream_session(session, state, false); + session->data_mode = SessionDataMode::Route; + session->route_name = route_name; + session->route_id = parse_route_identifier(route_name); + session->data_dir = data_dir; + if (session->async_route_loading) { + if (!session->route_loader) { + session->route_loader = std::make_unique(::isatty(STDERR_FILENO) != 0); + } + start_async_route_load(session, state); + } else { + rebuild_session_route_data(session, state); + state->status_text = "Loaded route " + route_name; + } + sync_route_buffers(state, *session); + return true; + } catch (const std::exception &err) { + state->error_text = err.what(); + state->open_error_popup = true; + state->status_text = "Failed to load route"; + return false; + } +} + +void draw_popups(AppSession *session, UiState *state) { + open_queued_popup(state->open_open_route, "Open Route"); + if (state->open_stream) { + sync_stream_buffers(state, *session); + } + open_queued_popup(state->open_stream, "Live Stream"); + if (state->open_load_layout || state->open_save_layout) { + sync_layout_buffers(state, *session); + } + open_queued_popup(state->open_load_layout, "Load Layout"); + open_queued_popup(state->open_save_layout, "Save Layout"); + open_queued_popup(state->open_preferences, "Preferences"); + open_queued_popup(state->dbc_editor.open, "DBC Editor"); + open_queued_popup(state->open_find_signal, "Find Signal"); + open_queued_popup(state->axis_limits.open, "Edit Axis Limits"); + + draw_open_route_popup(session, state); + draw_stream_popup(session, state); + draw_load_layout_popup(session, state); + draw_save_layout_popup(session, state); + draw_preferences_popup(session, state); + draw_dbc_editor_popup(session, state); + draw_find_signal_popup(session, state); + draw_axis_limits_popup(session, state); + draw_error_popup(state); +} diff --git a/tools/jotpluggler/layout_io.cc b/tools/jotpluggler/layout_io.cc new file mode 100644 index 0000000000..f984c0f0e8 --- /dev/null +++ b/tools/jotpluggler/layout_io.cc @@ -0,0 +1,128 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/common.h" + +#include +#include +#include +#include + +#include "third_party/json11/json11.hpp" + +namespace fs = std::filesystem; + +namespace { + +std::string curve_color_hex(const std::array &color) { + std::ostringstream hex; + hex << "#" << std::hex << std::setfill('0') + << std::setw(2) << static_cast(color[0]) + << std::setw(2) << static_cast(color[1]) + << std::setw(2) << static_cast(color[2]); + return hex.str(); +} + +json11::Json curve_to_json(const Curve &curve) { + json11::Json::object obj = { + {"name", curve.name}, + {"color", curve_color_hex(curve.color)}, + }; + if (curve.derivative) { + obj["transform"] = "derivative"; + if (curve.derivative_dt > 0.0) { + obj["derivative_dt"] = curve.derivative_dt; + } + } else if (std::abs(curve.value_scale - 1.0) > 1.0e-9 || std::abs(curve.value_offset) > 1.0e-9) { + obj["transform"] = "scale"; + obj["scale"] = curve.value_scale; + obj["offset"] = curve.value_offset; + } + if (curve.custom_python.has_value()) { + json11::Json::array additional_sources; + for (const std::string &path : curve.custom_python->additional_sources) { + additional_sources.push_back(path); + } + obj["custom_python"] = json11::Json::object{ + {"linked_source", curve.custom_python->linked_source}, + {"additional_sources", additional_sources}, + {"globals_code", curve.custom_python->globals_code}, + {"function_code", curve.custom_python->function_code}, + }; + } + return obj; +} + +json11::Json workspace_node_to_json(const WorkspaceNode &node, const WorkspaceTab &tab) { + if (node.is_pane) { + if (node.pane_index < 0 || node.pane_index >= static_cast(tab.panes.size())) { + return nullptr; + } + const Pane &pane = tab.panes[static_cast(node.pane_index)]; + json11::Json::object obj = { + {"title", pane.title.empty() ? std::string("...") : pane.title}, + }; + if (pane.kind == PaneKind::Map) { + obj["kind"] = "map"; + } else if (pane.kind == PaneKind::Camera) { + obj["kind"] = "camera"; + obj["camera_view"] = camera_view_spec(pane.camera_view).layout_name; + } + if (pane.range.valid) { + obj["range"] = json11::Json::object{ + {"left", pane.range.left}, {"right", pane.range.right}, + {"top", pane.range.top}, {"bottom", pane.range.bottom}, + }; + } + if (pane.range.has_y_limit_min || pane.range.has_y_limit_max) { + json11::Json::object limits; + if (pane.range.has_y_limit_min) { + limits["min"] = pane.range.y_limit_min; + } + if (pane.range.has_y_limit_max) { + limits["max"] = pane.range.y_limit_max; + } + obj["y_limits"] = limits; + } + json11::Json::array curves; + for (const Curve &curve : pane.curves) { + if (!curve.runtime_only) { + curves.push_back(curve_to_json(curve)); + } + } + obj["curves"] = curves; + return obj; + } + + if (node.children.empty()) return nullptr; + json11::Json::array sizes; + for (size_t i = 0; i < node.children.size(); ++i) { + sizes.push_back(i < node.sizes.size() ? static_cast(node.sizes[i]) + : 1.0 / static_cast(node.children.size())); + } + json11::Json::array children; + for (const WorkspaceNode &child : node.children) { + children.push_back(workspace_node_to_json(child, tab)); + } + return json11::Json::object{ + {"split", node.orientation == SplitOrientation::Horizontal ? "horizontal" : "vertical"}, + {"sizes", sizes}, + {"children", children}, + }; +} + +} // namespace + +void save_layout_json(const SketchLayout &layout, const fs::path &path) { + ensure_parent_dir(path); + json11::Json::array tabs; + for (const WorkspaceTab &tab : layout.tabs) { + tabs.push_back(json11::Json::object{ + {"name", tab.tab_name}, + {"root", workspace_node_to_json(tab.root, tab)}, + }); + } + const json11::Json root = json11::Json::object{ + {"current_tab_index", std::clamp(layout.current_tab_index, 0, std::max(0, static_cast(layout.tabs.size()) - 1))}, + {"tabs", tabs}, + }; + write_file_or_throw(path, root.dump() + "\n"); +} diff --git a/tools/jotpluggler/layouts/.gitignore b/tools/jotpluggler/layouts/.gitignore new file mode 100644 index 0000000000..a965bb777d --- /dev/null +++ b/tools/jotpluggler/layouts/.gitignore @@ -0,0 +1 @@ +.jotpluggler_autosave/ diff --git a/tools/jotpluggler/layouts/CAN-bus-debug.json b/tools/jotpluggler/layouts/CAN-bus-debug.json new file mode 100644 index 0000000000..496993a1fd --- /dev/null +++ b/tools/jotpluggler/layouts/CAN-bus-debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.33362,0.33276,0.33362],"children":[{"title":"CAN RX","range":{"left":0.0,"right":60.526742,"top":1101.875,"bottom":-26.875},"curves":[{"name":"/pandaStates/0/canState0/totalRxCnt","color":"#f14cc1","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState1/totalRxCnt","color":"#9467bd","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState2/totalRxCnt","color":"#ff7f0e","transform":"derivative","derivative_dt":1.0}]},{"title":"CAN TX","range":{"left":0.0,"right":60.526742,"top":455.1,"bottom":-11.1},"curves":[{"name":"/pandaStates/0/canState0/totalTxCnt","color":"#17becf","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState1/totalTxCnt","color":"#bcbd22","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState2/totalTxCnt","color":"#1f77b4","transform":"derivative","derivative_dt":1.0}]},{"title":"CAN errors","range":{"left":0.0,"right":60.526742,"top":2515.35,"bottom":-61.35},"curves":[{"name":"/pandaStates/0/canState0/totalErrorCnt","color":"#1f77b4","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState1/totalErrorCnt","color":"#d62728","transform":"derivative","derivative_dt":1.0},{"name":"/pandaStates/0/canState2/totalErrorCnt","color":"#1ac938","transform":"derivative","derivative_dt":1.0}]}]}}]} diff --git a/tools/jotpluggler/layouts/camera-timings.json b/tools/jotpluggler/layouts/camera-timings.json new file mode 100644 index 0000000000..64decf15d3 --- /dev/null +++ b/tools/jotpluggler/layouts/camera-timings.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"SOF / EOF (encodeIdx)","root":{"split":"vertical","sizes":[0.500885,0.499115],"children":[{"title":"...","range":{"left":0.0,"right":630.006367,"top":65000000.0,"bottom":35000000.0},"curves":[{"name":"/driverEncodeIdx/timestampSof","color":"#1f77b4","transform":"derivative","derivative_dt":1.0},{"name":"/roadEncodeIdx/timestampSof","color":"#d62728","transform":"derivative","derivative_dt":1.0},{"name":"/wideRoadEncodeIdx/timestampSof","color":"#1ac938","transform":"derivative","derivative_dt":1.0}],"y_limits":{"min":35000000.0,"max":65000000.0}},{"title":"...","range":{"left":0.0,"right":630.006367,"top":65000000.0,"bottom":35000000.0},"curves":[{"name":"/driverEncodeIdx/timestampEof","color":"#f14cc1","transform":"derivative","derivative_dt":1.0},{"name":"/roadEncodeIdx/timestampEof","color":"#9467bd","transform":"derivative","derivative_dt":1.0},{"name":"/wideRoadEncodeIdx/timestampEof","color":"#17becf","transform":"derivative","derivative_dt":1.0}],"y_limits":{"min":35000000.0,"max":65000000.0}}]}},{"name":"model timings","root":{"split":"vertical","sizes":[0.5,0.5],"children":[{"title":"...","range":{"left":0.0,"right":630.006367,"top":0.016865,"bottom":0.015143},"curves":[{"name":"/modelV2/modelExecutionTime","color":"#ff7f0e"}]},{"title":"...","range":{"left":0.0,"right":630.006367,"top":0.1,"bottom":-0.1},"curves":[{"name":"/modelV2/frameDropPerc","color":"#f14cc1"}]}]}},{"name":"sensor info","root":{"split":"vertical","sizes":[1.0],"children":[{"title":"...","range":{"left":0.0,"right":630.006367,"top":0.1,"bottom":-0.1},"curves":[{"name":"/driverCameraState/sensor","color":"#bcbd22"},{"name":"/roadCameraState/sensor","color":"#1f77b4"},{"name":"/wideRoadCameraState/sensor","color":"#d62728"}]}]}},{"name":"SOF / EOF (cameraState)","root":{"split":"vertical","sizes":[0.500885,0.499115],"children":[{"title":"...","range":{"left":0.0,"right":630.006367,"top":65000000.0,"bottom":35000000.0},"curves":[{"name":"/driverCameraState/timestampSof","color":"#1f77b4","transform":"derivative","derivative_dt":1.0},{"name":"/roadCameraState/timestampSof","color":"#d62728","transform":"derivative","derivative_dt":1.0},{"name":"/wideRoadCameraState/timestampSof","color":"#1ac938","transform":"derivative","derivative_dt":1.0}],"y_limits":{"min":35000000.0,"max":65000000.0}},{"title":"...","range":{"left":0.0,"right":630.006367,"top":65000000.0,"bottom":35000000.0},"curves":[{"name":"/driverCameraState/timestampEof","color":"#ff7f0e","transform":"derivative","derivative_dt":1.0},{"name":"/roadCameraState/timestampEof","color":"#f14cc1","transform":"derivative","derivative_dt":1.0},{"name":"/wideRoadCameraState/timestampEof","color":"#9467bd","transform":"derivative","derivative_dt":1.0}],"y_limits":{"min":35000000.0,"max":65000000.0}}]}}]} diff --git a/tools/jotpluggler/layouts/cameras-and-map.json b/tools/jotpluggler/layouts/cameras-and-map.json new file mode 100644 index 0000000000..68c590f7bc --- /dev/null +++ b/tools/jotpluggler/layouts/cameras-and-map.json @@ -0,0 +1 @@ +{"current_tab_index": 0, "tabs": [{"name": "tab1", "root": {"children": [{"children": [{"curves": [], "kind": "map", "title": "Map"}, {"camera_view": "road", "curves": [], "kind": "camera", "title": "Road Camera"}], "sizes": [0.5, 0.5], "split": "horizontal"}, {"children": [{"camera_view": "wide_road", "curves": [], "kind": "camera", "title": "Wide Road Camera"}, {"camera_view": "driver", "curves": [], "kind": "camera", "title": "Driver Camera"}], "sizes": [0.5, 0.5], "split": "horizontal"}], "sizes": [0.5, 0.5], "split": "vertical"}}]} diff --git a/tools/jotpluggler/layouts/can-states.json b/tools/jotpluggler/layouts/can-states.json new file mode 100644 index 0000000000..6f04940a33 --- /dev/null +++ b/tools/jotpluggler/layouts/can-states.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.500381,0.499619],"children":[{"split":"horizontal","sizes":[0.5,0.5],"children":[{"title":"...","range":{"left":0.0,"right":632.799721,"top":771630.925,"bottom":-17755.925},"curves":[{"name":"/pandaStates/0/canState0/totalRxCnt","color":"#1f77b4"},{"name":"/pandaStates/0/canState1/totalRxCnt","color":"#d62728"},{"name":"/pandaStates/0/canState2/totalRxCnt","color":"#1ac938"}]},{"title":"...","range":{"left":0.0,"right":632.799721,"top":760365.5,"bottom":-18545.5},"curves":[{"name":"/pandaStates/0/canState0/totalTxCnt","color":"#ff7f0e"},{"name":"/pandaStates/0/canState1/totalTxCnt","color":"#f14cc1"},{"name":"/pandaStates/0/canState2/totalTxCnt","color":"#9467bd"}]}]},{"split":"horizontal","sizes":[0.333333,0.333333,0.333333],"children":[{"title":"...","range":{"left":0.0,"right":632.799721,"top":55.35,"bottom":-1.35},"curves":[{"name":"/pandaStates/0/canState0/totalRxLostCnt","color":"#ff7f0e"},{"name":"/pandaStates/0/canState1/totalRxLostCnt","color":"#f14cc1"},{"name":"/pandaStates/0/canState2/totalRxLostCnt","color":"#9467bd"}]},{"title":"...","range":{"left":0.0,"right":632.799721,"top":2.05,"bottom":-0.05},"curves":[{"name":"/pandaStates/0/canState0/totalTxLostCnt","color":"#17becf"},{"name":"/pandaStates/0/canState1/totalTxLostCnt","color":"#bcbd22"},{"name":"/pandaStates/0/canState2/totalTxLostCnt","color":"#1f77b4"}]},{"title":"...","range":{"left":0.0,"right":632.799721,"top":0.1,"bottom":-0.1},"curves":[{"name":"/pandaStates/0/canState0/busOffCnt","color":"#17becf"},{"name":"/pandaStates/0/canState1/busOffCnt","color":"#1ac938"},{"name":"/pandaStates/0/canState2/busOffCnt","color":"#bcbd22"}]}]}]}}]} diff --git a/tools/jotpluggler/layouts/controls_mismatch_debug.json b/tools/jotpluggler/layouts/controls_mismatch_debug.json new file mode 100644 index 0000000000..16912cd684 --- /dev/null +++ b/tools/jotpluggler/layouts/controls_mismatch_debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.2,0.2,0.2,0.2,0.2],"children":[{"title":"...","range":{"left":0.018309,"right":59.674401,"top":1.025,"bottom":-0.025},"curves":[{"name":"/carControl/enabled","color":"#1f77b4"},{"name":"/pandaStates/0/controlsAllowed","color":"#d62728"}]},{"title":"...","range":{"left":0.018309,"right":59.674401,"top":27.087398,"bottom":-0.905168},"curves":[{"name":"/carState/cumLagMs","color":"#9467bd"}]},{"title":"...","range":{"left":0.018309,"right":59.674401,"top":1.025,"bottom":-0.025},"curves":[{"name":"/pandaStates/0/safetyRxInvalid","color":"#1f77b4"},{"name":"/pandaStates/0/safetyRxChecksInvalid","color":"#e801ce"}]},{"title":"...","range":{"left":0.018309,"right":59.674401,"top":158.85,"bottom":-2.85},"curves":[{"name":"/pandaStates/0/safetyTxBlocked","color":"#d62728"}]},{"title":"...","range":{"left":0.018309,"right":59.674401,"top":1.025,"bottom":-0.025},"curves":[{"name":"/carState/gasPressed","color":"#1ac938"},{"name":"/carState/brakePressed","color":"#ff7f0e"}]}]}}]} diff --git a/tools/jotpluggler/layouts/gps.json b/tools/jotpluggler/layouts/gps.json new file mode 100644 index 0000000000..fdabbfd381 --- /dev/null +++ b/tools/jotpluggler/layouts/gps.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.24977,0.250689,0.24977,0.24977],"children":[{"title":"...","range":{"left":0.0,"right":1678.753571,"top":1.025,"bottom":-0.025},"curves":[{"name":"/gpsLocationExternal/hasFix","color":"#1f77b4"}]},{"title":"...","range":{"left":0.0,"right":1678.753571,"top":17.425,"bottom":-0.425},"curves":[{"name":"/gpsLocationExternal/satelliteCount","color":"#d62728"}]},{"title":"...","range":{"left":0.0,"right":1678.753571,"top":3.0,"bottom":0.0},"curves":[{"name":"/gpsLocationExternal/horizontalAccuracy","color":"#1ac938"}],"y_limits":{"min":0.0,"max":3.0}},{"title":"...","range":{"left":0.0,"right":1678.753571,"top":766.374004,"bottom":-17.262},"curves":[{"name":"/gpsLocationExternal/horizontalAccuracy","color":"#1ac938"}]}]}}]} diff --git a/tools/jotpluggler/layouts/gps_vs_llk.json b/tools/jotpluggler/layouts/gps_vs_llk.json new file mode 100644 index 0000000000..878e0a57a8 --- /dev/null +++ b/tools/jotpluggler/layouts/gps_vs_llk.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.333805,0.33239,0.333805],"children":[{"title":"...","range":{"left":76.646983,"right":196.811937,"top":32.070386,"bottom":0.368228},"curves":[{"name":"haversine distance [m]","color":"#1f77b4","custom_python":{"linked_source":"/gpsLocationExternal/latitude","additional_sources":["/gpsLocationExternal/longitude","/liveLocationKalmanDEPRECATED/positionGeodetic/value/0","/liveLocationKalmanDEPRECATED/positionGeodetic/value/1"],"globals_code":"R = 6378.137 # Radius of earth in KM","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n global R\n # Compute the Haversine distance between\n # two points defined by latitude and longitude.\n # Return the distance in meters\n lat1, lon1 = value, v1\n lat2, lon2 = v2, v3\n dLat = (lat2 - lat1) * np.pi / 180\n dLon = (lon2 - lon1) * np.pi / 180\n a = np.sin(dLat/2) * np.sin(dLat/2) +\n np.cos(lat1 * np.pi / 180) * np.cos(lat2 * np.pi / 180) *\n np.sin(dLon/2) * np.sin(dLon/2)\n c = 2 * np.arctan2(np.sqrt(a), np.sqrt(1-a))\n d = R * c\n distance = d * 1000 # meters\n return distance\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"...","range":{"left":76.646983,"right":196.811937,"top":12.637299,"bottom":-0.259115},"curves":[{"name":"/carState/vEgo","color":"#17becf"},{"name":"/gpsLocationExternal/speed","color":"#bcbd22"}]},{"split":"horizontal","sizes":[0.500516,0.499484],"children":[{"title":"...","range":{"left":76.646983,"right":196.811937,"top":0.1,"bottom":-0.1},"curves":[{"name":"/liveLocationKalmanDEPRECATED/positionGeodetic/std/0","color":"#d62728"},{"name":"/liveLocationKalmanDEPRECATED/positionGeodetic/std/1","color":"#1ac938"}]},{"title":"...","range":{"left":76.646983,"right":196.811937,"top":7.160833,"bottom":-0.449385},"curves":[{"name":"/gpsLocationExternal/horizontalAccuracy","color":"#ff7f0e"},{"name":"/gpsLocationExternal/verticalAccuracy","color":"#f14cc1"},{"name":"/gpsLocationExternal/speedAccuracy","color":"#9467bd"}]}]}]}}]} diff --git a/tools/jotpluggler/layouts/locationd_debug.json b/tools/jotpluggler/layouts/locationd_debug.json new file mode 100644 index 0000000000..0541427bc1 --- /dev/null +++ b/tools/jotpluggler/layouts/locationd_debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.166588,0.167062,0.166113,0.166588,0.167062,0.166588],"children":[{"title":"...","range":{"left":0.0,"right":2280.128382,"top":1.025,"bottom":-0.025},"curves":[{"name":"/livePose/inputsOK","color":"#ff7f0e"}]},{"title":"...","range":{"left":0.0,"right":2280.128382,"top":14.542814,"bottom":-5.586039},"curves":[{"name":"/accelerometer/acceleration/v/0","color":"#f14cc1"},{"name":"/accelerometer/acceleration/v/1","color":"#9467bd"},{"name":"/accelerometer/acceleration/v/2","color":"#17becf"}]},{"title":"...","range":{"left":0.0,"right":2280.128382,"top":0.988911,"bottom":-0.745939},"curves":[{"name":"/gyroscope/gyroUncalibrated/v/0","color":"#d62728"},{"name":"/gyroscope/gyroUncalibrated/v/1","color":"#1ac938"},{"name":"/gyroscope/gyroUncalibrated/v/2","color":"#ff7f0e"}]},{"title":"...","range":{"left":0.0,"right":2280.128382,"top":1.025,"bottom":-0.025},"curves":[{"name":"/accelerometer/__valid","color":"#17becf"},{"name":"/gyroscope/__valid","color":"#bcbd22"},{"name":"/carState/__valid","color":"#f14cc1"},{"name":"/liveCalibration/__valid","color":"#1ac938"},{"name":"/cameraOdometry/__valid","color":"#9467bd"}]},{"title":"...","range":{"left":0.0,"right":2280.128382,"top":1000000000.292252,"bottom":999999999.735447},"curves":[{"name":"/gyroscope/__logMonoTime","color":"#1f77b4","transform":"derivative"},{"name":"/accelerometer/__logMonoTime","color":"#d62728","transform":"derivative"}]},{"title":"...","range":{"left":0.0,"right":2280.128382,"top":20790107743.93223,"bottom":-529653831.495853},"curves":[{"name":"/accelerometer/timestamp","color":"#bcbd22","transform":"derivative"},{"name":"/gyroscope/timestamp","color":"#1f77b4","transform":"derivative"}]}]}}]} diff --git a/tools/jotpluggler/layouts/longitudinal.json b/tools/jotpluggler/layouts/longitudinal.json new file mode 100644 index 0000000000..27f43eb357 --- /dev/null +++ b/tools/jotpluggler/layouts/longitudinal.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.250401,0.249599,0.250401,0.249599],"children":[{"title":"...","range":{"left":104.907277,"right":126.285782,"top":1.391623,"bottom":-2.563614},"curves":[{"name":"/carState/aEgo","color":"#f14cc1"},{"name":"/longitudinalPlan/accels/0","color":"#9467bd"},{"name":"/carControl/actuators/accel","color":"#17becf"},{"name":"/carOutput/actuatorsOutput/accel","color":"#d62728"}]},{"title":"...","range":{"left":104.907277,"right":126.285782,"top":1.18496,"bottom":-1.811222},"curves":[{"name":"/controlsState/upAccelCmd","color":"#1f77b4"},{"name":"/controlsState/uiAccelCmd","color":"#d62728"},{"name":"/controlsState/ufAccelCmd","color":"#1ac938"}]},{"title":"...","range":{"left":104.907277,"right":126.285782,"top":15.862889,"bottom":-0.568809},"curves":[{"name":"/carState/vEgo","color":"#1ac938"},{"name":"/longitudinalPlan/speeds/0","color":"#ff7f0e"}]},{"title":"...","range":{"left":104.907277,"right":126.285782,"top":1.025,"bottom":-0.025},"curves":[{"name":"/carControl/longActive","color":"#1f77b4"},{"name":"/carState/gasPressed","color":"#d62728"}]}]}}]} diff --git a/tools/jotpluggler/layouts/max-torque-debug.json b/tools/jotpluggler/layouts/max-torque-debug.json new file mode 100644 index 0000000000..3a87fb3217 --- /dev/null +++ b/tools/jotpluggler/layouts/max-torque-debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.249724,0.250829,0.249724,0.249724],"children":[{"title":"...","range":{"left":0.00045,"right":2483.624998,"top":6.050533,"bottom":-7.599037},"curves":[{"name":"Actual lateral accel (roll compensated)","color":"#1ac938","custom_python":{"linked_source":"/controlsState/curvature","additional_sources":["/carState/vEgo","/liveParameters/roll"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n return (value * v1 ** 2) - (v2 * 9.81)\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"Desired lateral accel (roll compensated)","color":"#ff7f0e","custom_python":{"linked_source":"/controlsState/desiredCurvature","additional_sources":["/carState/vEgo","/liveParameters/roll"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n return (value * v1 ** 2) - (v2 * 9.81)\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"...","range":{"left":0.00045,"right":2483.624998,"top":5.384416,"bottom":-7.503945},"curves":[{"name":"roll compensated lateral acceleration","color":"#1ac938","custom_python":{"linked_source":"/controlsState/curvature","additional_sources":["/carState/vEgo","/liveParameters/roll","/carState/steeringPressed","/carControl/latActive"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3, v4):\n if (v3 == 0 and v4 == 1):\n return (value * v1 ** 2) - (v2 * 9.81)\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i], v4[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"...","range":{"left":0.00045,"right":2483.624998,"top":1.05,"bottom":-1.05},"curves":[{"name":"/carState/steeringPressed","color":"#0097ff"},{"name":"/carOutput/actuatorsOutput/torque","color":"#d62728"}]},{"title":"...","range":{"left":0.00045,"right":2483.624998,"top":80.762969,"bottom":-2.181837},"curves":[{"name":"/carState/vEgo","color":"#f14cc1","transform":"scale","scale":2.23694,"offset":0.0}]}]}}]} diff --git a/tools/jotpluggler/layouts/new-layout.json b/tools/jotpluggler/layouts/new-layout.json new file mode 100644 index 0000000000..bffb62d7c7 --- /dev/null +++ b/tools/jotpluggler/layouts/new-layout.json @@ -0,0 +1 @@ +{"current_tab_index": 0, "tabs": [{"name": "tab1", "root": {"curves": [], "title": "..."}}]} diff --git a/tools/jotpluggler/layouts/system_lag_debug.json b/tools/jotpluggler/layouts/system_lag_debug.json new file mode 100644 index 0000000000..281de440fa --- /dev/null +++ b/tools/jotpluggler/layouts/system_lag_debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.249729,0.250814,0.249729,0.249729],"children":[{"title":"...","range":{"left":0.0,"right":59.992103,"top":102.5,"bottom":-2.5},"curves":[{"name":"/deviceState/cpuUsagePercent/0","color":"#1f77b4"},{"name":"/deviceState/cpuUsagePercent/1","color":"#d62728"},{"name":"/deviceState/cpuUsagePercent/2","color":"#1ac938"},{"name":"/deviceState/cpuUsagePercent/3","color":"#ff7f0e"},{"name":"/deviceState/cpuUsagePercent/4","color":"#f14cc1"},{"name":"/deviceState/cpuUsagePercent/5","color":"#9467bd"},{"name":"/deviceState/cpuUsagePercent/6","color":"#17becf"},{"name":"/deviceState/cpuUsagePercent/7","color":"#bcbd22"}]},{"title":"...","range":{"left":0.0,"right":59.992103,"top":64.005001,"bottom":51.195},"curves":[{"name":"/deviceState/cpuTempC/0","color":"#d62728"},{"name":"/deviceState/cpuTempC/1","color":"#1ac938"},{"name":"/deviceState/cpuTempC/2","color":"#ff7f0e"},{"name":"/deviceState/cpuTempC/3","color":"#f14cc1"},{"name":"/deviceState/cpuTempC/4","color":"#9467bd"},{"name":"/deviceState/cpuTempC/5","color":"#17becf"},{"name":"/deviceState/cpuTempC/6","color":"#bcbd22"},{"name":"/deviceState/cpuTempC/7","color":"#1f77b4"},{"name":"/deviceState/gpuTempC/0","color":"#d62728"},{"name":"/deviceState/gpuTempC/1","color":"#1ac938"}]},{"title":"...","range":{"left":0.0,"right":59.992103,"top":37.371108,"bottom":-0.91149},"curves":[{"name":"/modelV2/frameDropPerc","color":"#f14cc1"}]},{"title":"...","range":{"left":0.0,"right":59.992103,"top":-3.593455,"bottom":-12.190956},"curves":[{"name":"/carState/cumLagMs","color":"#9467bd"}]}]}}]} diff --git a/tools/jotpluggler/layouts/thermal_debug.json b/tools/jotpluggler/layouts/thermal_debug.json new file mode 100644 index 0000000000..3a7ce454cf --- /dev/null +++ b/tools/jotpluggler/layouts/thermal_debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.166785,0.166785,0.166075,0.166785,0.166785,0.166785],"children":[{"title":"...","range":{"left":0.006955,"right":301.842654,"top":87.987497,"bottom":75.912497},"curves":[{"name":"/deviceState/cpuTempC/0","color":"#1f77b4"},{"name":"/deviceState/cpuTempC/1","color":"#d62728"},{"name":"/deviceState/cpuTempC/2","color":"#1ac938"},{"name":"/deviceState/cpuTempC/3","color":"#ff7f0e"},{"name":"/deviceState/cpuTempC/4","color":"#f14cc1"},{"name":"/deviceState/cpuTempC/5","color":"#9467bd"},{"name":"/deviceState/cpuTempC/6","color":"#17becf"},{"name":"/deviceState/cpuTempC/7","color":"#bcbd22"}]},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":85.861052,"bottom":66.49695},"curves":[{"name":"/deviceState/pmicTempC/0","color":"#1f77b4"},{"name":"/deviceState/gpuTempC/0","color":"#d62728"},{"name":"/deviceState/gpuTempC/1","color":"#1ac938"},{"name":"/deviceState/memoryTempC","color":"#f14cc1"}]},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":86.207876,"bottom":70.665918},"curves":[{"name":"/deviceState/maxTempC","color":"#1f77b4"}]},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":1.025,"bottom":-0.025},"curves":[{"name":"/deviceState/thermalStatus","color":"#1f77b4"}]},{"split":"horizontal","sizes":[0.333124,0.333752,0.333124],"children":[{"title":"...","range":{"left":0.006955,"right":301.842654,"top":12.057358,"bottom":4.843517},"curves":[{"name":"/deviceState/powerDrawW","color":"#ff7f0e"}]},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":100.0,"bottom":0.0},"curves":[{"name":"/deviceState/fanSpeedPercentDesired","color":"#9467bd"},{"name":"/pandaStates/0/fanPower","color":"#1f77b4"}],"y_limits":{"min":0.0,"max":100.0}},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":5018.4,"bottom":255.6},"curves":[{"name":"/peripheralState/fanSpeedRpm","color":"#1f77b4"}]}]},{"split":"horizontal","sizes":[0.502513,0.497487],"children":[{"title":"...","range":{"left":0.006955,"right":301.842654,"top":100.025,"bottom":14.975},"curves":[{"name":"/deviceState/cpuUsagePercent/0","color":"#1f77b4"},{"name":"/deviceState/cpuUsagePercent/1","color":"#d62728"},{"name":"/deviceState/cpuUsagePercent/2","color":"#1ac938"},{"name":"/deviceState/cpuUsagePercent/3","color":"#ff7f0e"}]},{"title":"...","range":{"left":0.006955,"right":301.842654,"top":102.5,"bottom":-2.5},"curves":[{"name":"/deviceState/cpuUsagePercent/4","color":"#f14cc1"},{"name":"/deviceState/cpuUsagePercent/5","color":"#9467bd"},{"name":"/deviceState/cpuUsagePercent/6","color":"#17becf"},{"name":"/deviceState/cpuUsagePercent/7","color":"#bcbd22"}]}]}]}}]} diff --git a/tools/jotpluggler/layouts/torque-controller.json b/tools/jotpluggler/layouts/torque-controller.json new file mode 100644 index 0000000000..7e269e59e6 --- /dev/null +++ b/tools/jotpluggler/layouts/torque-controller.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"Lateral Plan Conformance","root":{"split":"vertical","sizes":[0.250949,0.249051,0.250949,0.249051],"children":[{"title":"desired vs actual lateral acceleration (closer means better conformance to plan)","range":{"left":0.000194,"right":1138.891674,"top":1.858161,"bottom":-1.823407},"curves":[{"name":"/controlsState/lateralControlState/torqueState/actualLateralAccel","color":"#1f77b4"},{"name":"/controlsState/lateralControlState/torqueState/desiredLateralAccel","color":"#d62728"}]},{"title":"desired vs actual lateral acceleration, road-roll factored out (closer means better conformance to plan)","range":{"left":0.000194,"right":1138.891674,"top":2.749816,"bottom":-3.723091},"curves":[{"name":"Actual lateral accel (roll compensated)","color":"#1ac938","custom_python":{"linked_source":"/controlsState/curvature","additional_sources":["/carState/vEgo","/liveParameters/roll"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n return (value * v1 ** 2) - (v2 * 9.81)\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"Desired lateral accel (roll compensated)","color":"#ff7f0e","custom_python":{"linked_source":"/controlsState/desiredCurvature","additional_sources":["/carState/vEgo","/liveParameters/roll"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n return (value * v1 ** 2) - (v2 * 9.81)\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"controller feed-forward vs actuator output (closer means controller prediction is more accurate)","range":{"left":0.000194,"right":1138.891674,"top":1.978032,"bottom":-1.570956},"curves":[{"name":"/carOutput/actuatorsOutput/torque","color":"#9467bd","transform":"scale","scale":-1.0,"offset":0.0},{"name":"/controlsState/lateralControlState/torqueState/f","color":"#1f77b4"},{"name":"/carState/steeringPressed","color":"#ff000f"}]},{"title":"vehicle speed","range":{"left":0.000194,"right":1138.891674,"top":105.981304,"bottom":-2.709314},"curves":[{"name":"carState.vEgo mph","color":"#d62728","custom_python":{"linked_source":"/carState/vEgo","additional_sources":[],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value):\n return value * 2.23694\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"carState.vEgo kmh","color":"#1ac938","custom_python":{"linked_source":"/carState/vEgo","additional_sources":[],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value):\n return value * 3.6\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"/carState/vEgo","color":"#ff7f0e"}]}]}},{"name":"Vehicle Dynamics","root":{"split":"vertical","sizes":[0.334282,0.331437,0.334282],"children":[{"title":"configured-initial vs online-learned steerRatio, set configured value to match learned","range":{"left":0.0,"right":1138.816328,"top":19.665784,"bottom":19.359553},"curves":[{"name":"/carParams/steerRatio","color":"#1f77b4"},{"name":"/liveParameters/steerRatio","color":"#1ac938"}]},{"title":"configured-initial vs online-learned tireStiffnessRatio, set configured value to match learned","range":{"left":0.0,"right":1138.816328,"top":1.11221,"bottom":0.995631},"curves":[{"name":"/carParams/tireStiffnessFactor","color":"#d62728"},{"name":"/liveParameters/stiffnessFactor","color":"#ff7f0e"}]},{"title":"live steering angle offsets for straight-ahead driving, large values here may indicate alignment problems","range":{"left":0.0,"right":1138.816328,"top":-1.081041,"bottom":-4.494133},"curves":[{"name":"/liveParameters/angleOffsetAverageDeg","color":"#f14cc1"},{"name":"/liveParameters/angleOffsetDeg","color":"#9467bd"}]}]}},{"name":"Actuator Performance","root":{"split":"vertical","sizes":[0.333333,0.333333,0.333333],"children":[{"title":"offline-calculated vs online-learned lateral accel scaling factor, accel obtained from 100% actuator output","range":{"left":0.0,"right":1138.920072,"top":1.21611,"bottom":0.539474},"curves":[{"name":"/liveTorqueParameters/latAccelFactorFiltered","color":"#1f77b4"},{"name":"/liveTorqueParameters/latAccelFactorRaw","color":"#d62728"},{"name":"/carParams/lateralTuning/torque/latAccelFactor","color":"#1c9222"}]},{"title":"learned lateral accel offset, vehicle-specific compensation to obtain true zero lateral accel","range":{"left":0.0,"right":1138.920072,"top":-0.304367,"bottom":-0.418688},"curves":[{"name":"/liveTorqueParameters/latAccelOffsetFiltered","color":"#1ac938"},{"name":"/liveTorqueParameters/latAccelOffsetRaw","color":"#ff7f0e"}]},{"title":"offline-calculated vs online-learned EPS friction factor, necessary to start moving the steering wheel","range":{"left":0.0,"right":1138.920072,"top":0.226389,"bottom":0.15805},"curves":[{"name":"/liveTorqueParameters/frictionCoefficientFiltered","color":"#f14cc1"},{"name":"/liveTorqueParameters/frictionCoefficientRaw","color":"#9467bd"},{"name":"/carParams/lateralTuning/torque/friction","color":"#1c9222"}]}]}},{"name":"Actuator Delay","root":{"split":"vertical","sizes":[0.30441,0.358464,0.337127],"children":[{"title":"actuator lag learning state, 0 = learning, 1 = learned/applying, 2 = invalid","range":{"left":0.0,"right":1138.749979,"top":1.025,"bottom":-0.025},"curves":[{"name":"/liveDelay/status","color":"#ff7f0e"}]},{"title":"offline default vs online estimated steering actuator lag","range":{"left":0.0,"right":1138.749979,"top":0.419648,"bottom":0.318362},"curves":[{"name":"/liveDelay/lateralDelay","color":"#1f77b4"},{"name":"/liveDelay/lateralDelayEstimate","color":"#d62728"},{"name":"opendbc default steering lag","color":"#1ac938","custom_python":{"linked_source":"/carParams/steerActuatorDelay","additional_sources":[],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value):\n return value + 0.2\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"online estimated steering actuator lag, standard deviation","range":{"left":0.0,"right":1138.749979,"top":0.06732,"bottom":-0.001642},"curves":[{"name":"/liveDelay/lateralDelayEstimateStd","color":"#f14cc1"}]}]}},{"name":"Controls Performance","root":{"split":"vertical","sizes":[0.265655,0.251898,0.245731,0.236717],"children":[{"title":"rate-of-change limits on steering actuator (blue = original, green = rate-limited before CAN output)","range":{"left":0.000194,"right":1138.891921,"top":1.05,"bottom":-1.05},"curves":[{"name":"/carControl/actuators/torque","color":"#0c00f2"},{"name":"/carOutput/actuatorsOutput/torque","color":"#2cd63a"}]},{"title":"controller feed-forward vs actuator output (closer means controller prediction is more accurate)","range":{"left":0.000194,"right":1138.891921,"top":1.978032,"bottom":-1.570956},"curves":[{"name":"/carOutput/actuatorsOutput/torque","color":"#9467bd","transform":"scale","scale":-1.0,"offset":0.0},{"name":"/controlsState/lateralControlState/torqueState/f","color":"#1f77b4"},{"name":"/carState/steeringPressed","color":"#ff000f"}]},{"title":"proportional, integral, and feed-forward terms (actuator output = sum of PIF terms)","range":{"left":0.000194,"right":1138.891921,"top":2.099784,"bottom":-4.027542},"curves":[{"name":"/controlsState/lateralControlState/torqueState/f","color":"#0ab027"},{"name":"/controlsState/lateralControlState/torqueState/p","color":"#d62728"},{"name":"/controlsState/lateralControlState/torqueState/i","color":"#ffaf00"},{"name":"Zero","color":"#756a6a","custom_python":{"linked_source":"/carState/canValid","additional_sources":[],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value):\n return (0)\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"road roll angle, from openpilot localizer","range":{"left":0.000194,"right":1138.891921,"top":0.109446,"bottom":-0.045525},"curves":[{"name":"/liveParameters/roll","color":"#f14cc1"}]}]}}]} diff --git a/tools/jotpluggler/layouts/tuning.json b/tools/jotpluggler/layouts/tuning.json new file mode 100644 index 0000000000..0a8e81743e --- /dev/null +++ b/tools/jotpluggler/layouts/tuning.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"Lateral","root":{"split":"vertical","sizes":[0.200458,0.199313,0.200458,0.199313,0.200458],"children":[{"title":"Velocity [m/s]","range":{"left":1.253354,"right":631.055584,"top":29.954036,"bottom":-0.841715},"curves":[{"name":"/carState/vEgo","color":"#0072b2"}]},{"title":"Curvature [1/m] True [blue] Vehicle Model [purple] Plan [green]","range":{"left":0.0,"right":631.055209,"top":0.006648,"bottom":-0.00315},"curves":[{"name":"engaged curvature plan","color":"#009e73","custom_python":{"linked_source":"/modelV2/action/desiredCurvature","additional_sources":["/carState/steeringPressed","/carControl/enabled"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n global engage_delay, last_bad_time\n curvature = value\n pressed = v1\n enabled = v2\n if (pressed == 1 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return value\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"engaged curvature vehicle model","color":"#785ef0","custom_python":{"linked_source":"/controlsState/curvature","additional_sources":["/carState/steeringPressed","/carControl/enabled"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2):\n global engage_delay, last_bad_time\n curvature = value\n pressed = v1\n enabled = v2\n if (pressed == 1 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return value\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"engaged curvature yaw","color":"#0072b2","custom_python":{"linked_source":"/carControl/angularVelocity/2","additional_sources":["/carState/steeringPressed","/carControl/enabled","/carState/vEgo"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n global engage_delay, last_bad_time\n curvature = value / v3\n pressed = v1\n enabled = v2\n if (pressed == 1 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return curvature\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"Roll [rad]","range":{"left":0.0,"right":631.038276,"top":0.166067,"bottom":-1.598381},"curves":[{"name":"/carControl/orientationNED/0","color":"#ffb000"}]},{"title":"Engaged [green] Steering Pressed [blue]","range":{"left":1.252984,"right":631.055584,"top":1.025,"bottom":-0.025},"curves":[{"name":"/selfdriveState/enabled","color":"#009e73"},{"name":"/carState/steeringPressed","color":"#0072b2"}]},{"title":"Steering Limited: Rate [orange] Saturated [magenta]","range":{"left":1.253354,"right":631.055584,"top":1.025,"bottom":-0.025},"curves":[{"name":"steering rate limited","color":"#ffb000","custom_python":{"linked_source":"/carControl/actuators/torque","additional_sources":["/carOutput/actuatorsOutput/torque","/carControl/actuators/steeringAngleDeg","/carOutput/actuatorsOutput/steeringAngleDeg"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n return (np.abs(value - v1) > 0.001 or np.abs(v2 - v3) > 0.05) and 1 or 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"/controlsState/lateralControlState/pidState/saturated","color":"#dc267f"}]}]}},{"name":"Longitudinal","root":{"split":"vertical","sizes":[0.1875,0.1875,0.1875,0.1875,0.25],"children":[{"title":"Velocity [m/s] True [blue] Plan [green] Cruise [magenta]","range":{"left":0.0,"right":631.055584,"top":42.713492,"bottom":-1.041792},"curves":[{"name":"/carState/cruiseState/speed","color":"#dc267f"},{"name":"/longitudinalPlan/speeds/0","color":"#009e73"},{"name":"/carState/vEgo","color":"#0072b2"}]},{"title":"Acceleration [m/s^2] True [blue] Actuator [purple] Plan [green]","range":{"left":1.253354,"right":631.055759,"top":0.808303,"bottom":-1.213305},"curves":[{"name":"engaged_accel_plan","color":"#009e73","custom_python":{"linked_source":"/longitudinalPlan/accels/0","additional_sources":["/carState/brakePressed","/carState/gasPressed","/carControl/enabled"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n global engage_delay, last_bad_time\n accel = value\n brake = v1\n gas = v2\n enabled = v3\n if (brake != 0 or gas != 0 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return value\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"engaged_accel_actuator","color":"#785ef0","custom_python":{"linked_source":"/carControl/actuators/accel","additional_sources":["/carState/brakePressed","/carState/gasPressed","/carControl/enabled"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n global engage_delay, last_bad_time\n accel = value\n brake = v1\n gas = v2\n enabled = v3\n if (brake != 0 or gas != 0 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return value\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"engaged_accel_actual","color":"#0072b2","custom_python":{"linked_source":"/carState/aEgo","additional_sources":["/carState/brakePressed","/carState/gasPressed","/carControl/enabled"],"globals_code":"engage_delay = 5\nlast_bad_time = -engage_delay","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n global engage_delay, last_bad_time\n accel = value\n brake = v1\n gas = v2\n enabled = v3\n if (brake != 0 or gas != 0 or enabled == 0):\n last_bad_time = time\n if (time > last_bad_time + engage_delay):\n return value\n else:\n return 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}}]},{"title":"Pitch [rad]","range":{"left":0.0,"right":631.038276,"top":0.158854,"bottom":-0.594843},"curves":[{"name":"/carControl/orientationNED/1","color":"#ffb000"}]},{"title":"Engaged [green] Gas [orange] Brake [magenta]","range":{"left":1.253354,"right":631.055759,"top":1.025,"bottom":-0.025},"curves":[{"name":"/carControl/enabled","color":"#009e73"},{"name":"/carState/gasPressed","color":"#ffb000"},{"name":"/carState/brakePressed","color":"#dc267f"}]},{"title":"State [blue: off,pid,stop,start] Source [green: cruise,lead0,lead1,lead2,e2e]","range":{"left":1.25362,"right":631.055759,"top":5.125,"bottom":-0.125},"curves":[{"name":"/carControl/actuators/longControlState","color":"#0072b2"},{"name":"/longitudinalPlan/longitudinalPlanSource","color":"#009e73"}]}]}},{"name":"Lateral Debug","root":{"split":"vertical","sizes":[0.25,0.25,0.25,0.25],"children":[{"title":"Controller F [magenta] P [purple] I [blue]","range":{"left":0.0,"right":1.0,"top":1.0,"bottom":0.0},"curves":[{"name":"/controlsState/lateralControlState/pidState/f","color":"#f14cc1"},{"name":"/controlsState/lateralControlState/pidState/p","color":"#9467bd"},{"name":"/controlsState/lateralControlState/pidState/i","color":"#17becf"}]},{"title":"Driver Torque [blue] EPS Torque [green]","range":{"left":1.253354,"right":631.055584,"top":2690.99903,"bottom":-3450.198981},"curves":[{"name":"/carState/steeringTorqueEps","color":"#009e73"},{"name":"/carState/steeringTorque","color":"#0072b2"}]},{"title":"Engaged [green] Steering Pressed [blue]","range":{"left":1.253354,"right":631.055759,"top":1.025,"bottom":-0.025},"curves":[{"name":"/carControl/enabled","color":"#009e73"},{"name":"/carState/steeringPressed","color":"#0072b2"}]},{"title":"Steering Limited: Rate [orange] Saturated [magenta]","range":{"left":1.253354,"right":631.055584,"top":1.025,"bottom":-0.025},"curves":[{"name":"steering rate limited","color":"#ffb000","custom_python":{"linked_source":"/carControl/actuators/torque","additional_sources":["/carOutput/actuatorsOutput/torque","/carControl/actuators/steeringAngleDeg","/carOutput/actuatorsOutput/steeringAngleDeg"],"globals_code":"","function_code":"def __jotpluggler_eval_sample(time, value, v1, v2, v3):\n return (np.abs(value - v1) > 0.001 or np.abs(v2 - v3) > 0.05) and 1 or 0\n\n__jotpluggler_result = np.empty_like(value, dtype=np.float64)\nfor __jotpluggler_i in range(len(value)):\n __jotpluggler_result[__jotpluggler_i] = __jotpluggler_eval_sample(time[__jotpluggler_i], value[__jotpluggler_i], v1[__jotpluggler_i], v2[__jotpluggler_i], v3[__jotpluggler_i])\nreturn __jotpluggler_result"}},{"name":"/controlsState/lateralControlState/pidState/saturated","color":"#dc267f"}]}]}}]} diff --git a/tools/jotpluggler/layouts/ublox-debug.json b/tools/jotpluggler/layouts/ublox-debug.json new file mode 100644 index 0000000000..4509a192df --- /dev/null +++ b/tools/jotpluggler/layouts/ublox-debug.json @@ -0,0 +1 @@ +{"current_tab_index":0,"tabs":[{"name":"tab1","root":{"split":"vertical","sizes":[0.333333,0.333333,0.333333],"children":[{"title":"...","range":{"left":0.0,"right":134.825489,"top":4402341.574525,"bottom":-107369.555525},"curves":[{"name":"/gpsLocationExternal/horizontalAccuracy","color":"#1f77b4"}]},{"title":"...","range":{"left":0.0,"right":134.825489,"top":1.025,"bottom":-0.025},"curves":[{"name":"/gpsLocationExternal/flags","color":"#d62728"}]},{"title":"...","range":{"left":0.0,"right":134.825489,"top":6.15,"bottom":-0.15},"curves":[{"name":"/ubloxGnss/measurementReport/numMeas","color":"#1ac938"}]}]}}]} diff --git a/tools/jotpluggler/logs.cc b/tools/jotpluggler/logs.cc new file mode 100644 index 0000000000..4da1cbf501 --- /dev/null +++ b/tools/jotpluggler/logs.cc @@ -0,0 +1,419 @@ +#include "tools/jotpluggler/app.h" + +#include +#include + +namespace { + +struct LevelOption { + const char *label; + int value; +}; + +constexpr std::array LEVEL_OPTIONS = {{ + {"DEBUG", 10}, + {"INFO", 20}, + {"WARNING", 30}, + {"ERROR", 40}, + {"CRITICAL", 50}, +}}; +constexpr uint32_t ALL_LEVEL_MASK = (1u << LEVEL_OPTIONS.size()) - 1u; + +bool log_matches_search(const LogEntry &entry, std::string_view query) { + if (query.empty()) return true; + const std::string needle = lowercase_copy(query); + const auto contains = [&](std::string_view haystack) { + return lowercase_copy(haystack).find(needle) != std::string::npos; + }; + return contains(entry.message) || contains(entry.source) || contains(entry.func); +} + +std::vector collect_log_sources(const std::vector &logs) { + std::vector sources; + for (const LogEntry &entry : logs) { + if (entry.source.empty()) continue; + if (std::find(sources.begin(), sources.end(), entry.source) == sources.end()) { + sources.push_back(entry.source); + } + } + std::sort(sources.begin(), sources.end()); + return sources; +} + +std::vector filter_log_indices(const RouteData &route_data, const LogsUiState &logs_state) { + std::vector indices; + indices.reserve(route_data.logs.size()); + for (size_t i = 0; i < route_data.logs.size(); ++i) { + const LogEntry &entry = route_data.logs[i]; + int level_index = 0; + if (entry.level >= 50) { + level_index = 4; + } else if (entry.level >= 40) { + level_index = 3; + } else if (entry.level >= 30) { + level_index = 2; + } else if (entry.level >= 20) { + level_index = 1; + } + if ((logs_state.enabled_levels_mask & (1u << level_index)) == 0) { + continue; + } + if (!logs_state.all_sources) { + const auto it = std::find(logs_state.selected_sources.begin(), + logs_state.selected_sources.end(), + entry.source); + if (it == logs_state.selected_sources.end()) continue; + } + if (!log_matches_search(entry, logs_state.search)) continue; + indices.push_back(static_cast(i)); + } + return indices; +} + +int find_active_log_position(const RouteData &route_data, + const std::vector &filtered_indices, + double tracker_time) { + if (filtered_indices.empty()) return -1; + auto it = std::lower_bound(filtered_indices.begin(), filtered_indices.end(), tracker_time, + [&](int log_index, double tm) { + return route_data.logs[static_cast(log_index)].mono_time < tm; + }); + if (it == filtered_indices.begin()) return static_cast(std::distance(filtered_indices.begin(), it)); + if (it == filtered_indices.end()) return static_cast(filtered_indices.size()) - 1; + if (route_data.logs[static_cast(*it)].mono_time > tracker_time) { + --it; + } + return static_cast(std::distance(filtered_indices.begin(), it)); +} + +std::string format_route_time(double seconds) { + if (seconds < 0.0) { + seconds = 0.0; + } + const int minutes = static_cast(seconds / 60.0); + const double remaining = seconds - static_cast(minutes) * 60.0; + return util::string_format("%d:%06.3f", minutes, remaining); +} + +std::string format_boot_time(double seconds) { + return util::string_format("%.3f", seconds); +} + +std::string format_wall_time(double seconds) { + if (seconds <= 0.0) return "--"; + const time_t wall_seconds = static_cast(seconds); + std::tm wall_tm = {}; + localtime_r(&wall_seconds, &wall_tm); + const int millis = static_cast(std::llround((seconds - std::floor(seconds)) * 1000.0)); + return util::string_format("%02d:%02d:%02d.%03d", + wall_tm.tm_hour, wall_tm.tm_min, wall_tm.tm_sec, millis); +} + +std::string format_log_time(const LogEntry &entry, LogTimeMode mode) { + switch (mode) { + case LogTimeMode::Route: + return format_route_time(entry.mono_time); + case LogTimeMode::Boot: + return format_boot_time(entry.boot_time); + case LogTimeMode::WallClock: + return format_wall_time(entry.wall_time); + } + return format_route_time(entry.mono_time); +} + +const char *time_mode_label(LogTimeMode mode) { + switch (mode) { + case LogTimeMode::Route: return "Route"; + case LogTimeMode::Boot: return "Boot"; + case LogTimeMode::WallClock: return "Wall clock"; + } + return "Route"; +} + +std::string level_filter_label(uint32_t mask) { + if (mask == ALL_LEVEL_MASK) return "All levels"; + if (mask == 0b11110) return "INFO+"; + if (mask == 0b11100) return "WARNING+"; + if (mask == 0b11000) return "ERROR+"; + if (mask == 0b10000) return "CRITICAL"; + + int enabled_count = 0; + const char *last_label = "None"; + for (size_t i = 0; i < LEVEL_OPTIONS.size(); ++i) { + if ((mask & (1u << i)) == 0) { + continue; + } + ++enabled_count; + last_label = LEVEL_OPTIONS[i].label; + } + if (enabled_count == 0) return "None"; + if (enabled_count == 1) return last_label; + return "Custom"; +} + +std::string source_filter_label(const LogsUiState &logs_state, const std::vector &sources) { + if (logs_state.all_sources || logs_state.selected_sources.size() == sources.size()) { + return "All sources"; + } + if (logs_state.selected_sources.empty()) return "No sources"; + if (logs_state.selected_sources.size() == 1) return logs_state.selected_sources.front(); + return std::to_string(logs_state.selected_sources.size()) + " sources"; +} + +const char *level_label(const LogEntry &entry) { + if (entry.origin == LogOrigin::Alert) return "ALRT"; + if (entry.level >= 50) return "CRIT"; + if (entry.level >= 40) return "ERR"; + if (entry.level >= 30) return "WARN"; + if (entry.level >= 20) return "INFO"; + return "DBG"; +} + +ImVec4 level_text_color(const LogEntry &entry, bool active) { + if (active) return color_rgb(46, 54, 63); + if (entry.origin == LogOrigin::Alert) return color_rgb(50, 100, 200); + if (entry.level >= 50) return color_rgb(176, 26, 18); + if (entry.level >= 40) return color_rgb(200, 50, 40); + if (entry.level >= 30) return color_rgb(200, 130, 0); + if (entry.level >= 20) return color_rgb(80, 86, 94); + return color_rgb(126, 133, 141); +} + +ImU32 row_bg_color(const LogEntry &entry, bool active) { + if (active) return IM_COL32(80, 140, 210, 38); + return 0; +} + +void set_tracker_to_log(UiState *state, const LogEntry &entry) { + state->tracker_time = entry.mono_time; + state->has_tracker_time = true; + state->logs.last_auto_scroll_time = entry.mono_time; +} + +void draw_log_expansion_row(const LogEntry &entry) { + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::TextUnformatted(""); + ImGui::TableSetColumnIndex(1); + ImGui::TextUnformatted(""); + ImGui::TableSetColumnIndex(2); + ImGui::TextUnformatted(entry.func.empty() ? "" : entry.func.c_str()); + ImGui::TableSetColumnIndex(3); + ImGui::PushStyleColor(ImGuiCol_Text, color_rgb(96, 104, 113)); + ImGui::TextWrapped("%s", entry.message.c_str()); + if (!entry.func.empty()) { + ImGui::TextWrapped("func: %s", entry.func.c_str()); + } + if (!entry.context.empty()) { + ImGui::TextWrapped("ctx: %s", entry.context.c_str()); + } + ImGui::PopStyleColor(); +} + +void draw_log_row(const LogEntry &entry, + int log_index, + bool active, + UiState *state) { + ImGui::PushID(log_index); + const ImU32 bg = row_bg_color(entry, active); + ImGui::TableNextRow(); + if (bg != 0) { + ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0, bg); + } + + const std::string time_text = std::string(active ? "\xE2\x96\xB6 " : " ") + format_log_time(entry, state->logs.time_mode); + const auto clickable_text = [&](const char *id, const std::string &text, ImVec4 color = color_rgb(74, 80, 88)) { + ImGui::PushID(id); + ImGui::PushStyleColor(ImGuiCol_Text, color); + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0, 0, 0, 0)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0, 0, 0, 0)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0, 0, 0, 0)); + const bool clicked = ImGui::Selectable(text.c_str(), false, ImGuiSelectableFlags_AllowDoubleClick); + ImGui::PopStyleColor(4); + ImGui::PopID(); + return clicked; + }; + + bool clicked = false; + ImGui::TableSetColumnIndex(0); + app_push_mono_font(); + clicked = clickable_text("time", time_text); + app_pop_mono_font(); + + ImGui::TableSetColumnIndex(1); + clicked = clickable_text("level", level_label(entry), level_text_color(entry, active)) || clicked; + + ImGui::TableSetColumnIndex(2); + clicked = clickable_text("source", entry.source) || clicked; + + ImGui::TableSetColumnIndex(3); + clicked = clickable_text("message", entry.message) || clicked; + + if (clicked) { + set_tracker_to_log(state, entry); + state->logs.expanded_index = state->logs.expanded_index == log_index ? -1 : log_index; + } + ImGui::PopID(); +} + +} // namespace + +void draw_logs_tab(AppSession *session, UiState *state) { + LogsUiState &logs_state = state->logs; + const RouteData &route_data = session->route_data; + const RouteLoadSnapshot load = session->route_loader ? session->route_loader->snapshot() : RouteLoadSnapshot{}; + const bool loading_logs = load.active && route_data.logs.empty(); + const std::vector sources = collect_log_sources(route_data.logs); + + if (!logs_state.all_sources) { + logs_state.selected_sources.erase( + std::remove_if(logs_state.selected_sources.begin(), + logs_state.selected_sources.end(), + [&](const std::string &source) { + return std::find(sources.begin(), sources.end(), source) == sources.end(); + }), + logs_state.selected_sources.end()); + } + + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 3.0f)); + ImGui::SetNextItemWidth(110.0f); + const std::string levels_label = level_filter_label(logs_state.enabled_levels_mask); + if (ImGui::BeginCombo("##logs_level", levels_label.c_str())) { + bool all_levels = logs_state.enabled_levels_mask == ALL_LEVEL_MASK; + if (ImGui::Checkbox("All levels", &all_levels)) { + logs_state.enabled_levels_mask = all_levels ? ALL_LEVEL_MASK : 0u; + } + ImGui::Separator(); + for (size_t i = 0; i < LEVEL_OPTIONS.size(); ++i) { + bool enabled = (logs_state.enabled_levels_mask & (1u << i)) != 0; + if (ImGui::Checkbox(LEVEL_OPTIONS[i].label, &enabled)) { + if (enabled) { + logs_state.enabled_levels_mask |= (1u << i); + } else { + logs_state.enabled_levels_mask &= ~(1u << i); + } + } + } + ImGui::EndCombo(); + } + ImGui::SameLine(); + + ImGui::SetNextItemWidth(150.0f); + input_text_with_hint_string("##logs_search", "Search...", &logs_state.search); + ImGui::SameLine(); + + const std::string sources_label = source_filter_label(logs_state, sources); + ImGui::SetNextItemWidth(180.0f); + if (ImGui::BeginCombo("##logs_source", sources_label.c_str())) { + bool all_sources = logs_state.all_sources; + if (ImGui::Checkbox("All sources", &all_sources)) { + logs_state.all_sources = all_sources; + if (logs_state.all_sources) { + logs_state.selected_sources.clear(); + } else { + logs_state.selected_sources = sources; + } + } + ImGui::Separator(); + for (const std::string &source : sources) { + bool enabled = logs_state.all_sources + || std::find(logs_state.selected_sources.begin(), logs_state.selected_sources.end(), source) != logs_state.selected_sources.end(); + if (ImGui::Checkbox(source.c_str(), &enabled)) { + if (logs_state.all_sources) { + logs_state.all_sources = false; + logs_state.selected_sources = sources; + } + auto it = std::find(logs_state.selected_sources.begin(), logs_state.selected_sources.end(), source); + if (enabled) { + if (it == logs_state.selected_sources.end()) { + logs_state.selected_sources.push_back(source); + } + } else if (it != logs_state.selected_sources.end()) { + logs_state.selected_sources.erase(it); + } + if (logs_state.selected_sources.size() == sources.size()) { + logs_state.all_sources = true; + logs_state.selected_sources.clear(); + } + } + } + ImGui::EndCombo(); + } + ImGui::SameLine(); + + ImGui::SetNextItemWidth(110.0f); + if (ImGui::BeginCombo("##logs_time_mode", time_mode_label(logs_state.time_mode))) { + for (LogTimeMode mode : {LogTimeMode::Route, LogTimeMode::Boot, LogTimeMode::WallClock}) { + const bool selected = logs_state.time_mode == mode; + if (ImGui::Selectable(time_mode_label(mode), selected)) { + logs_state.time_mode = mode; + } + } + ImGui::EndCombo(); + } + + const std::vector filtered_indices = filter_log_indices(route_data, logs_state); + const bool have_tracker = state->has_tracker_time && !filtered_indices.empty(); + const int active_pos = have_tracker ? find_active_log_position(route_data, filtered_indices, state->tracker_time) : -1; + + ImGui::SameLine(); + ImGui::SetCursorPosX(std::max(ImGui::GetCursorPosX(), ImGui::GetWindowContentRegionMax().x - 110.0f)); + ImGui::Text("%zu / %zu", filtered_indices.size(), route_data.logs.size()); + ImGui::PopStyleVar(); + + if (route_data.logs.empty()) { + ImGui::Spacing(); + ImGui::PushStyleColor(ImGuiCol_Text, color_rgb(116, 124, 133)); + ImGui::TextWrapped("%s", loading_logs ? "Loading logs..." : "No text logs available for this route."); + ImGui::PopStyleColor(); + return; + } + + if (ImGui::BeginChild("##logs_table_child", ImVec2(0.0f, 0.0f), false)) { + if (have_tracker && std::abs(logs_state.last_auto_scroll_time - state->tracker_time) > 1.0e-6) { + const float row_height = ImGui::GetTextLineHeightWithSpacing() + 6.0f; + const float visible_h = std::max(1.0f, ImGui::GetWindowHeight()); + const float target = std::max(0.0f, static_cast(active_pos) * row_height - visible_h * 0.45f); + ImGui::SetScrollY(target); + logs_state.last_auto_scroll_time = state->tracker_time; + } + + if (ImGui::BeginTable("##logs_table", + 4, + ImGuiTableFlags_BordersInnerV | + ImGuiTableFlags_RowBg | + ImGuiTableFlags_Resizable | + ImGuiTableFlags_SizingStretchProp)) { + ImGui::TableSetupColumn("Time", ImGuiTableColumnFlags_WidthFixed, 120.0f); + ImGui::TableSetupColumn("Level", ImGuiTableColumnFlags_WidthFixed, 72.0f); + ImGui::TableSetupColumn("Source", ImGuiTableColumnFlags_WidthFixed, 180.0f); + ImGui::TableSetupColumn("Message", ImGuiTableColumnFlags_WidthStretch); + ImGui::TableHeadersRow(); + + const bool use_clipper = logs_state.expanded_index < 0; + if (use_clipper) { + ImGuiListClipper clipper; + clipper.Begin(static_cast(filtered_indices.size())); + while (clipper.Step()) { + for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; ++i) { + const int log_index = filtered_indices[static_cast(i)]; + const LogEntry &entry = route_data.logs[static_cast(log_index)]; + draw_log_row(entry, log_index, i == active_pos, state); + } + } + } else { + for (int i = 0; i < static_cast(filtered_indices.size()); ++i) { + const int log_index = filtered_indices[static_cast(i)]; + const LogEntry &entry = route_data.logs[static_cast(log_index)]; + draw_log_row(entry, log_index, i == active_pos, state); + if (logs_state.expanded_index == log_index) { + draw_log_expansion_row(entry); + } + } + } + + ImGui::EndTable(); + } + } + ImGui::EndChild(); +} diff --git a/tools/jotpluggler/main.cc b/tools/jotpluggler/main.cc new file mode 100644 index 0000000000..22bc29664c --- /dev/null +++ b/tools/jotpluggler/main.cc @@ -0,0 +1,126 @@ +#include +#include + +#include "tools/jotpluggler/app.h" + +namespace { + +constexpr const char *DEMO_ROUTE = "5beb9b58bd12b691/0000010a--a51155e496"; + +void print_usage(const char *argv0) { + std::cerr + << "Usage: " << argv0 << " [--layout ] [options] [route]\n" + << "\n" + << "Options:\n" + << " --demo\n" + << " --data-dir \n" + << " --stream\n" + << " --address \n" + << " --buffer-seconds \n" + << " --width \n" + << " --height \n" + << " --output \n" + << " --show\n" + << " --sync-load\n" + << "\n" + << "Examples:\n" + << " " << argv0 << "\n" + << " " << argv0 << " --demo\n" + << " " << argv0 << " --layout longitudinal --demo\n" + << " " << argv0 << " --layout longitudinal --demo --output /tmp/longitudinal.png\n" + << " " << argv0 << " --stream --show\n" + << " " << argv0 << " --stream --address 192.168.60.52 --buffer-seconds 45 --show\n"; +} + +bool parse_int(const char *value, int *out) { + char *end = nullptr; + const long parsed = std::strtol(value, &end, 10); + if (end == nullptr || *end != '\0') return false; + *out = static_cast(parsed); + return true; +} + +bool parse_double(const char *value, double *out) { + char *end = nullptr; + const double parsed = std::strtod(value, &end); + if (end == nullptr || *end != '\0') return false; + *out = parsed; + return true; +} + +} // namespace + +int main(int argc, char *argv[]) { + Options options; + for (int i = 1; i < argc; ++i) { + const std::string arg = argv[i]; + const auto require_value = [&](const char *flag) -> const char * { + if (i + 1 >= argc) { + std::cerr << "Missing value for " << flag << "\n"; + print_usage(argv[0]); + std::exit(2); + } + return argv[++i]; + }; + + if (arg == "--layout") { + options.layout = require_value("--layout"); + } else if (arg == "--demo") { + options.route_name = DEMO_ROUTE; + } else if (arg == "--data-dir") { + options.data_dir = require_value("--data-dir"); + } else if (arg == "--stream") { + options.stream = true; + } else if (arg == "--address") { + options.stream_address = require_value("--address"); + } else if (arg == "--buffer-seconds") { + if (!parse_double(require_value("--buffer-seconds"), &options.stream_buffer_seconds)) { + std::cerr << "Invalid buffer seconds\n"; + return 2; + } + } else if (arg == "--output") { + options.output_path = require_value("--output"); + } else if (arg == "--width") { + if (!parse_int(require_value("--width"), &options.width)) { + std::cerr << "Invalid width\n"; + return 2; + } + } else if (arg == "--height") { + if (!parse_int(require_value("--height"), &options.height)) { + std::cerr << "Invalid height\n"; + return 2; + } + } else if (arg == "--show") { + options.show = true; + } else if (arg == "--sync-load") { + options.sync_load = true; + } else if (arg == "--help" || arg == "-h") { + print_usage(argv[0]); + return 0; + } else if (!arg.empty() && arg[0] != '-' && options.route_name.empty()) { + options.route_name = arg; + } else { + std::cerr << "Unknown argument: " << arg << "\n"; + print_usage(argv[0]); + return 2; + } + } + + if (options.output_path.empty() && !options.show) { + options.show = true; + } + if (options.width <= 0 || options.height <= 0) { + std::cerr << "Width and height must be positive\n"; + return 2; + } + if (options.stream && !options.route_name.empty()) { + std::cerr << "Route/file mode and --stream are mutually exclusive\n"; + return 2; + } + if (options.stream_buffer_seconds <= 0.0) { + std::cerr << "Buffer seconds must be positive\n"; + return 2; + } + + return run(options); +} diff --git a/tools/jotpluggler/map.cc b/tools/jotpluggler/map.cc new file mode 100644 index 0000000000..8725908ea0 --- /dev/null +++ b/tools/jotpluggler/map.cc @@ -0,0 +1,1328 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/common.h" +#include "tools/jotpluggler/map.h" + +#include + +extern "C" { +#include +} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/util.h" +#include "third_party/json11/json11.hpp" + +namespace fs = std::filesystem; + +namespace { + +constexpr int MAP_MIN_ZOOM = 1; +constexpr int MAP_MAX_ZOOM = 18; +constexpr int MAP_SINGLE_POINT_MIN_ZOOM = 14; +constexpr float MAP_WHEEL_ZOOM_STEP = 0.25f; +constexpr double MAP_TRACE_PAD_FRAC = 0.45; +constexpr double MAP_TRACE_MIN_LAT_PAD = 0.01; +constexpr double MAP_BOUNDS_GRID = 0.005; +constexpr double MAP_CORRIDOR_LAT_PAD = 0.010; +constexpr double MAP_CORRIDOR_MIN_STEP_S = 1.5; +constexpr size_t MAP_CORRIDOR_MAX_BOXES = 36; +constexpr float MAP_INITIAL_FIT_FILL = 0.88f; +constexpr float MAP_MIN_ZOOM_FILL = 0.98f; +constexpr float MAP_EDGE_FADE_FRAC = 0.28f; +constexpr const char *MAP_QUERY_ENDPOINTS[] = { + "https://overpass-api.de/api/interpreter", + "https://overpass.private.coffee/api/interpreter", +}; +struct GeoPoint { + double lat = 0.0; + double lon = 0.0; +}; + +struct ProjectedPoint { + float x = 0.0f; + float y = 0.0f; +}; + +struct ProjectedBounds { + float min_x = 0.0f; + float min_y = 0.0f; + float max_x = 0.0f; + float max_y = 0.0f; + + bool valid() const { + return max_x >= min_x && max_y >= min_y; + } +}; + +enum class RoadClass : uint8_t { + Motorway, + Primary, + Secondary, + Local, +}; + +struct RoadFeature { + RoadClass road_class = RoadClass::Local; + ProjectedBounds bounds; + std::vector points; +}; + +struct WaterLineFeature { + ProjectedBounds bounds; + std::vector points; +}; + +struct WaterPolygonFeature { + ProjectedBounds bounds; + std::vector ring; +}; + +} // namespace + +struct RouteBasemap { + std::string key; + GeoBounds bounds; + ProjectedBounds projected_bounds; + std::vector roads; + std::vector water_lines; + std::vector water_polygons; +}; + +struct MapRequestSpec { + std::string key; + GeoBounds bounds; + std::string query; +}; + +namespace { + +double lon_to_world_x(double lon, double zoom) { + return (lon + 180.0) / 360.0 * 256.0 * std::exp2(zoom); +} + +double lat_to_world_y(double lat, double zoom) { + const double lat_rad = lat * M_PI / 180.0; + return (1.0 - std::log(std::tan(lat_rad) + 1.0 / std::cos(lat_rad)) / M_PI) / 2.0 * 256.0 * std::exp2(zoom); +} + +double world_x_to_lon(double x, double zoom) { + return x / std::exp2(zoom) / 256.0 * 360.0 - 180.0; +} + +double world_y_to_lat(double y, double zoom) { + const double n = M_PI - (2.0 * M_PI * (y / std::exp2(zoom))) / 256.0; + return 180.0 / M_PI * std::atan(std::sinh(n)); +} + +double map_trace_center_lat(const GpsTrace &trace) { + return (trace.min_lat + trace.max_lat) * 0.5; +} + +double map_trace_center_lon(const GpsTrace &trace) { + return (trace.min_lon + trace.max_lon) * 0.5; +} + +double clamp_lat(double lat) { + return std::clamp(lat, -85.0, 85.0); +} + +double clamp_lon(double lon) { + return std::clamp(lon, -179.999, 179.999); +} + +float project_lon0(double lon) { + return static_cast((lon + 180.0) / 360.0 * 256.0); +} + +float project_lat0(double lat) { + const double lat_rad = lat * M_PI / 180.0; + return static_cast((1.0 - std::log(std::tan(lat_rad) + 1.0 / std::cos(lat_rad)) / M_PI) / 2.0 * 256.0); +} + +double cos_lat_scale(double lat) { + return std::max(0.2, std::cos(lat * M_PI / 180.0)); +} + +double quantize_down(double value, double step) { + return std::floor(value / step) * step; +} + +double quantize_up(double value, double step) { + return std::ceil(value / step) * step; +} + +ProjectedBounds compute_projected_bounds(const std::vector &points) { + ProjectedBounds bounds; + if (points.empty()) { + return bounds; + } + bounds.min_x = bounds.max_x = points.front().x; + bounds.min_y = bounds.max_y = points.front().y; + for (const ProjectedPoint &point : points) { + bounds.min_x = std::min(bounds.min_x, point.x); + bounds.max_x = std::max(bounds.max_x, point.x); + bounds.min_y = std::min(bounds.min_y, point.y); + bounds.max_y = std::max(bounds.max_y, point.y); + } + return bounds; +} + +ProjectedBounds project_bounds0(const GeoBounds &bounds) { + if (!bounds.valid()) { + return {}; + } + return ProjectedBounds{ + .min_x = project_lon0(bounds.west), + .min_y = project_lat0(bounds.north), + .max_x = project_lon0(bounds.east), + .max_y = project_lat0(bounds.south), + }; +} + +bool feature_intersects_view(const ProjectedBounds &feature, const ProjectedBounds &view, float zoom_scale) { + const float min_x = feature.min_x * zoom_scale; + const float max_x = feature.max_x * zoom_scale; + const float min_y = feature.min_y * zoom_scale; + const float max_y = feature.max_y * zoom_scale; + return !(max_x < view.min_x || min_x > view.max_x + || max_y < view.min_y || min_y > view.max_y); +} + +GeoBounds requested_bounds_for_trace(const GpsTrace &trace) { + if (trace.points.empty()) { + return {}; + } + const double center_lat = map_trace_center_lat(trace); + const double lat_span = std::max(trace.max_lat - trace.min_lat, 0.002); + const double lon_span = std::max(trace.max_lon - trace.min_lon, 0.002 / cos_lat_scale(center_lat)); + const double lat_pad = std::max(lat_span * MAP_TRACE_PAD_FRAC, MAP_TRACE_MIN_LAT_PAD); + const double lon_pad = std::max(lon_span * MAP_TRACE_PAD_FRAC, MAP_TRACE_MIN_LAT_PAD / cos_lat_scale(center_lat)); + + GeoBounds bounds; + bounds.south = clamp_lat(quantize_down(trace.min_lat - lat_pad, MAP_BOUNDS_GRID)); + bounds.north = clamp_lat(quantize_up(trace.max_lat + lat_pad, MAP_BOUNDS_GRID)); + bounds.west = clamp_lon(quantize_down(trace.min_lon - lon_pad, MAP_BOUNDS_GRID)); + bounds.east = clamp_lon(quantize_up(trace.max_lon + lon_pad, MAP_BOUNDS_GRID)); + return bounds; +} + +GeoBounds merge_bounds(const GeoBounds &a, const GeoBounds &b) { + if (!a.valid()) return b; + if (!b.valid()) return a; + return GeoBounds{ + .south = std::min(a.south, b.south), + .west = std::min(a.west, b.west), + .north = std::max(a.north, b.north), + .east = std::max(a.east, b.east), + }; +} + +bool bounds_overlap_or_touch(const GeoBounds &a, const GeoBounds &b) { + return !(a.east < b.west || b.east < a.west || a.north < b.south || b.north < a.south); +} + +std::vector corridor_boxes_for_trace(const GpsTrace &trace) { + std::vector boxes; + if (trace.points.empty()) { + return boxes; + } + + const double center_lat = map_trace_center_lat(trace); + const double lon_pad = MAP_CORRIDOR_LAT_PAD / cos_lat_scale(center_lat); + const double total_time = trace.points.back().time - trace.points.front().time; + const double target_boxes = std::min(MAP_CORRIDOR_MAX_BOXES, std::max(8.0, total_time / MAP_CORRIDOR_MIN_STEP_S)); + const size_t stride = std::max(1, static_cast(std::ceil(trace.points.size() / target_boxes))); + + auto add_box = [&](double lat, double lon) { + GeoBounds box{ + .south = clamp_lat(quantize_down(lat - MAP_CORRIDOR_LAT_PAD, MAP_BOUNDS_GRID)), + .west = clamp_lon(quantize_down(lon - lon_pad, MAP_BOUNDS_GRID)), + .north = clamp_lat(quantize_up(lat + MAP_CORRIDOR_LAT_PAD, MAP_BOUNDS_GRID)), + .east = clamp_lon(quantize_up(lon + lon_pad, MAP_BOUNDS_GRID)), + }; + if (!box.valid()) { + return; + } + for (GeoBounds &existing : boxes) { + if (bounds_overlap_or_touch(existing, box)) { + existing = merge_bounds(existing, box); + return; + } + } + boxes.push_back(box); + }; + + add_box(trace.points.front().lat, trace.points.front().lon); + for (size_t i = stride; i < trace.points.size(); i += stride) { + add_box(trace.points[i].lat, trace.points[i].lon); + } + add_box(trace.points.back().lat, trace.points.back().lon); + + bool merged = true; + while (merged) { + merged = false; + for (size_t i = 0; i < boxes.size() && !merged; ++i) { + for (size_t j = i + 1; j < boxes.size(); ++j) { + if (bounds_overlap_or_touch(boxes[i], boxes[j])) { + boxes[i] = merge_bounds(boxes[i], boxes[j]); + boxes.erase(boxes.begin() + static_cast(j)); + merged = true; + break; + } + } + } + } + return boxes; +} + +ProjectedBounds view_bounds(double top_left_x, double top_left_y, float width, float height) { + return ProjectedBounds{ + .min_x = static_cast(top_left_x), + .min_y = static_cast(top_left_y), + .max_x = static_cast(top_left_x + width), + .max_y = static_cast(top_left_y + height), + }; +} + +int fit_map_zoom_for_bounds(const GeoBounds &bounds, float width, float height, float fill_fraction) { + if (!bounds.valid()) { + return MAP_MIN_ZOOM; + } + const double max_width = std::max(1.0f, width * fill_fraction); + const double max_height = std::max(1.0f, height * fill_fraction); + for (int z = MAP_MAX_ZOOM; z >= MAP_MIN_ZOOM; --z) { + const double pixel_width = std::abs(lon_to_world_x(bounds.east, z) - lon_to_world_x(bounds.west, z)); + const double pixel_height = std::abs(lat_to_world_y(bounds.south, z) - lat_to_world_y(bounds.north, z)); + if (pixel_width <= max_width && pixel_height <= max_height) { + return z; + } + } + return MAP_MIN_ZOOM; +} + +int fit_map_zoom_for_trace(const GpsTrace &trace, float width, float height) { + return fit_map_zoom_for_bounds(requested_bounds_for_trace(trace), width, height, MAP_INITIAL_FIT_FILL); +} + +int minimum_allowed_map_zoom(const GeoBounds &bounds, const GpsTrace &trace, ImVec2 size) { + if (trace.points.size() <= 1) { + return MAP_SINGLE_POINT_MIN_ZOOM; + } + const int fit_zoom = fit_map_zoom_for_bounds(bounds.valid() ? bounds : requested_bounds_for_trace(trace), + size.x, size.y, MAP_MIN_ZOOM_FILL); + return std::clamp(fit_zoom, MAP_MIN_ZOOM, MAP_MAX_ZOOM); +} + +std::optional interpolate_gps(const GpsTrace &trace, double time_value) { + if (trace.points.empty()) { + return std::nullopt; + } + if (time_value <= trace.points.front().time) { + return trace.points.front(); + } + if (time_value >= trace.points.back().time) { + return trace.points.back(); + } + auto upper = std::lower_bound(trace.points.begin(), trace.points.end(), time_value, + [](const GpsPoint &point, double target) { + return point.time < target; + }); + if (upper == trace.points.begin()) { + return trace.points.front(); + } + const GpsPoint &p1 = *upper; + const GpsPoint &p0 = *(upper - 1); + const double dt = p1.time - p0.time; + if (dt <= 1.0e-9) { + return p0; + } + const double alpha = (time_value - p0.time) / dt; + GpsPoint out; + out.time = time_value; + out.lat = p0.lat + (p1.lat - p0.lat) * alpha; + out.lon = p0.lon + (p1.lon - p0.lon) * alpha; + out.bearing = static_cast(p0.bearing + (p1.bearing - p0.bearing) * alpha); + out.type = alpha < 0.5 ? p0.type : p1.type; + return out; +} + +ImU32 map_timeline_color(TimelineEntry::Type type, float alpha = 1.0f) { + return timeline_entry_color(type, alpha, {140, 150, 165}); +} + +ImVec2 gps_to_screen(double lat, double lon, double zoom, double top_left_x, double top_left_y, const ImVec2 &rect_min) { + return ImVec2(rect_min.x + static_cast(lon_to_world_x(lon, zoom) - top_left_x), + rect_min.y + static_cast(lat_to_world_y(lat, zoom) - top_left_y)); +} + +bool point_in_rect_with_margin(const ImVec2 &point, const ImVec2 &rect_min, const ImVec2 &rect_max, + float margin_fraction) { + const float width = rect_max.x - rect_min.x; + const float height = rect_max.y - rect_min.y; + const float margin_x = width * margin_fraction; + const float margin_y = height * margin_fraction; + return point.x >= rect_min.x + margin_x && point.x <= rect_max.x - margin_x + && point.y >= rect_min.y + margin_y && point.y <= rect_max.y - margin_y; +} + +void draw_car_marker(ImDrawList *draw_list, ImVec2 center, float bearing_deg, ImU32 color, float size) { + const float rad = bearing_deg * static_cast(M_PI / 180.0); + const ImVec2 forward(std::sin(rad), -std::cos(rad)); + const ImVec2 perp(-forward.y, forward.x); + const ImVec2 tip(center.x + forward.x * size, center.y + forward.y * size); + const ImVec2 base(center.x - forward.x * size * 0.45f, center.y - forward.y * size * 0.45f); + const ImVec2 left(base.x + perp.x * size * 0.6f, base.y + perp.y * size * 0.6f); + const ImVec2 right(base.x - perp.x * size * 0.6f, base.y - perp.y * size * 0.6f); + draw_list->AddTriangleFilled(tip, left, right, color); + draw_list->AddTriangle(tip, left, right, IM_COL32(255, 255, 255, 210), 2.0f); +} + +bool is_convex_ring(const std::vector &points) { + if (points.size() < 4) { + return false; + } + float sign = 0.0f; + const size_t n = points.size(); + for (size_t i = 0; i < n; ++i) { + const ImVec2 &a = points[i]; + const ImVec2 &b = points[(i + 1) % n]; + const ImVec2 &c = points[(i + 2) % n]; + const float cross = (b.x - a.x) * (c.y - b.y) - (b.y - a.y) * (c.x - b.x); + if (std::abs(cross) < 1.0e-3f) { + continue; + } + if (sign == 0.0f) { + sign = cross; + } else if ((cross > 0.0f) != (sign > 0.0f)) { + return false; + } + } + return sign != 0.0f; +} + +uint64_t fnv1a64(std::string_view text) { + uint64_t value = 1469598103934665603ULL; + for (unsigned char c : text) { + value ^= static_cast(c); + value *= 1099511628211ULL; + } + return value; +} + +fs::path basemap_cache_root() { + const char *home = std::getenv("HOME"); + fs::path root = home != nullptr ? fs::path(home) / ".comma" : fs::temp_directory_path(); + root /= "jotpluggler_vector_map"; + fs::create_directories(root); + return root; +} + +std::string bounds_key(const GeoBounds &bounds) { + return util::string_format("v2_%.5f_%.5f_%.5f_%.5f", + bounds.south, bounds.west, bounds.north, bounds.east); +} + +fs::path basemap_cache_path(const std::string &key) { + const uint64_t hash = fnv1a64(key); + return basemap_cache_root() / util::string_format("%016llx.bin.zst", static_cast(hash)); +} + +uint64_t cache_directory_size_bytes() { + uint64_t total = 0; + const fs::path root = basemap_cache_root(); + if (!fs::exists(root)) { + return 0; + } + for (const fs::directory_entry &entry : fs::directory_iterator(root)) { + if (entry.is_regular_file()) { + total += static_cast(entry.file_size()); + } + } + return total; +} + +size_t cache_directory_file_count() { + size_t count = 0; + const fs::path root = basemap_cache_root(); + if (!fs::exists(root)) { + return 0; + } + for (const fs::directory_entry &entry : fs::directory_iterator(root)) { + if (entry.is_regular_file()) { + ++count; + } + } + return count; +} + +void clear_cache_directory() { + const fs::path root = basemap_cache_root(); + if (!fs::exists(root)) { + return; + } + for (const fs::directory_entry &entry : fs::directory_iterator(root)) { + if (entry.is_regular_file()) { + std::error_code ec; + fs::remove(entry.path(), ec); + } + } +} + +std::string percent_encode(std::string_view text) { + std::string out; + out.reserve(text.size() * 3); + for (unsigned char c : text) { + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') + || c == '-' || c == '_' || c == '.' || c == '~') { + out.push_back(static_cast(c)); + } else { + out += util::string_format("%%%02X", static_cast(c)); + } + } + return out; +} + +std::string bbox_string(const GeoBounds &bounds) { + return util::string_format("%.6f,%.6f,%.6f,%.6f", + bounds.south, bounds.west, bounds.north, bounds.east); +} + +MapRequestSpec build_request_for_trace(const GpsTrace &trace) { + const std::vector boxes = corridor_boxes_for_trace(trace); + GeoBounds union_bounds; + std::string query = "[out:json][timeout:25];("; + for (const GeoBounds &box : boxes) { + union_bounds = merge_bounds(union_bounds, box); + const std::string bbox = bbox_string(box); + query += "way[\"highway\"][\"area\"!=\"yes\"](" + bbox + ");"; + query += "way[\"natural\"=\"water\"](" + bbox + ");"; + query += "way[\"waterway\"=\"riverbank\"](" + bbox + ");"; + query += "way[\"waterway\"~\"river|stream|canal\"](" + bbox + ");"; + } + query += ");out tags geom;"; + + std::string key = bounds_key(union_bounds); + key += ":"; + key += std::to_string(boxes.size()); + for (const GeoBounds &box : boxes) { + key += ":"; + key += bbox_string(box); + } + return MapRequestSpec{ + .key = std::move(key), + .bounds = union_bounds, + .query = std::move(query), + }; +} + +bool fetch_overpass_json(std::string_view query, std::string *out) { + const std::string body = std::string("data=") + percent_encode(query); + for (const char *endpoint : MAP_QUERY_ENDPOINTS) { + const std::string command = "curl -fsSL --compressed --connect-timeout 8 --max-time 30 " + "-A 'jotpluggler-vector-map/1.0' " + "-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' " + "--data-raw " + shell_quote(body) + " " + + shell_quote(endpoint); + const std::string response = util::check_output(command); + if (!response.empty() && response.front() == '{') { + *out = response; + return true; + } + } + return false; +} + +std::string load_overpass_json(std::string_view query) { + std::string response; + if (!fetch_overpass_json(query, &response)) { + return {}; + } + return response; +} + +template +void append_pod(std::string *out, const T &value) { + const size_t start = out->size(); + out->resize(start + sizeof(T)); + std::memcpy(out->data() + start, &value, sizeof(T)); +} + +template +bool read_pod(std::string_view data, size_t *offset, T *value) { + if (*offset + sizeof(T) > data.size()) { + return false; + } + std::memcpy(value, data.data() + *offset, sizeof(T)); + *offset += sizeof(T); + return true; +} + +void append_points(std::string *out, const std::vector &points) { + const uint32_t count = static_cast(points.size()); + append_pod(out, count); + for (const ProjectedPoint &point : points) { + append_pod(out, point.x); + append_pod(out, point.y); + } +} + +bool read_points(std::string_view data, size_t *offset, std::vector *points) { + uint32_t count = 0; + if (!read_pod(data, offset, &count)) { + return false; + } + points->clear(); + points->reserve(count); + for (uint32_t i = 0; i < count; ++i) { + ProjectedPoint point; + if (!read_pod(data, offset, &point.x) || !read_pod(data, offset, &point.y)) { + return false; + } + points->push_back(point); + } + return true; +} + +std::string serialize_basemap_payload(const RouteBasemap &basemap) { + std::string raw; + raw.reserve(1024 + basemap.roads.size() * 48); + raw.append("JBM2", 4); + append_pod(&raw, basemap.bounds.south); + append_pod(&raw, basemap.bounds.west); + append_pod(&raw, basemap.bounds.north); + append_pod(&raw, basemap.bounds.east); + + const uint32_t road_count = static_cast(basemap.roads.size()); + const uint32_t water_line_count = static_cast(basemap.water_lines.size()); + const uint32_t water_polygon_count = static_cast(basemap.water_polygons.size()); + append_pod(&raw, road_count); + append_pod(&raw, water_line_count); + append_pod(&raw, water_polygon_count); + + for (const RoadFeature &road : basemap.roads) { + const uint8_t kind = static_cast(road.road_class); + append_pod(&raw, kind); + append_points(&raw, road.points); + } + for (const WaterLineFeature &water : basemap.water_lines) { + append_points(&raw, water.points); + } + for (const WaterPolygonFeature &water : basemap.water_polygons) { + append_points(&raw, water.ring); + } + return raw; +} + +std::optional deserialize_basemap_payload(std::string_view raw, const std::string &key) { + if (!util::starts_with(std::string(raw), "JBM2")) { + return std::nullopt; + } + size_t offset = 4; + RouteBasemap basemap; + basemap.key = key; + if (!read_pod(raw, &offset, &basemap.bounds.south) + || !read_pod(raw, &offset, &basemap.bounds.west) + || !read_pod(raw, &offset, &basemap.bounds.north) + || !read_pod(raw, &offset, &basemap.bounds.east)) { + return std::nullopt; + } + basemap.projected_bounds = project_bounds0(basemap.bounds); + + uint32_t road_count = 0; + uint32_t water_line_count = 0; + uint32_t water_polygon_count = 0; + if (!read_pod(raw, &offset, &road_count) + || !read_pod(raw, &offset, &water_line_count) + || !read_pod(raw, &offset, &water_polygon_count)) { + return std::nullopt; + } + + basemap.roads.reserve(road_count); + for (uint32_t i = 0; i < road_count; ++i) { + uint8_t kind = 0; + std::vector points; + if (!read_pod(raw, &offset, &kind) || !read_points(raw, &offset, &points)) { + return std::nullopt; + } + basemap.roads.push_back(RoadFeature{ + .road_class = static_cast(kind), + .bounds = compute_projected_bounds(points), + .points = std::move(points), + }); + } + + basemap.water_lines.reserve(water_line_count); + for (uint32_t i = 0; i < water_line_count; ++i) { + std::vector points; + if (!read_points(raw, &offset, &points)) { + return std::nullopt; + } + basemap.water_lines.push_back(WaterLineFeature{ + .bounds = compute_projected_bounds(points), + .points = std::move(points), + }); + } + + basemap.water_polygons.reserve(water_polygon_count); + for (uint32_t i = 0; i < water_polygon_count; ++i) { + std::vector ring; + if (!read_points(raw, &offset, &ring)) { + return std::nullopt; + } + basemap.water_polygons.push_back(WaterPolygonFeature{ + .bounds = compute_projected_bounds(ring), + .ring = std::move(ring), + }); + } + return basemap; +} + +bool save_compressed_basemap(const fs::path &path, const RouteBasemap &basemap) { + const std::string raw = serialize_basemap_payload(basemap); + const size_t bound = ZSTD_compressBound(raw.size()); + std::string compressed(bound, '\0'); + const size_t size = ZSTD_compress(compressed.data(), compressed.size(), raw.data(), raw.size(), 5); + if (ZSTD_isError(size)) { + return false; + } + compressed.resize(size); + ensure_parent_dir(path); + const std::string path_string = path.string(); + return util::write_file(path_string.c_str(), compressed.data(), compressed.size(), O_WRONLY | O_CREAT | O_TRUNC) == 0; +} + +std::optional load_compressed_basemap(const fs::path &path, const std::string &key) { + const std::string compressed = util::read_file(path.string()); + if (compressed.empty()) { + return std::nullopt; + } + const unsigned long long raw_size = ZSTD_getFrameContentSize(compressed.data(), compressed.size()); + if (raw_size == ZSTD_CONTENTSIZE_ERROR || raw_size == ZSTD_CONTENTSIZE_UNKNOWN || raw_size > (1ULL << 31)) { + return std::nullopt; + } + std::string raw(static_cast(raw_size), '\0'); + const size_t actual = ZSTD_decompress(raw.data(), raw.size(), compressed.data(), compressed.size()); + if (ZSTD_isError(actual)) { + return std::nullopt; + } + raw.resize(actual); + return deserialize_basemap_payload(raw, key); +} + +std::vector geometry_points(const json11::Json &geometry_json) { + std::vector points; + const auto items = geometry_json.array_items(); + points.reserve(items.size()); + for (const json11::Json &point : items) { + if (!point["lat"].is_number() || !point["lon"].is_number()) { + continue; + } + points.push_back(ProjectedPoint{ + .x = project_lon0(point["lon"].number_value()), + .y = project_lat0(point["lat"].number_value()), + }); + } + return points; +} + +std::optional classify_road(std::string_view highway) { + if (highway == "motorway" || highway == "motorway_link" || highway == "trunk" || highway == "trunk_link") { + return RoadClass::Motorway; + } + if (highway == "primary" || highway == "primary_link") { + return RoadClass::Primary; + } + if (highway == "secondary" || highway == "secondary_link" || highway == "tertiary" || highway == "tertiary_link") { + return RoadClass::Secondary; + } + if (highway == "residential" || highway == "unclassified" || highway == "living_street" || highway == "road") { + return RoadClass::Local; + } + return std::nullopt; +} + +std::optional parse_basemap_json(const std::string &raw, const GeoBounds &bounds, const std::string &key) { + std::string parse_error; + const json11::Json root = json11::Json::parse(raw, parse_error); + if (!parse_error.empty() || !root.is_object()) { + return std::nullopt; + } + + RouteBasemap basemap; + basemap.key = key; + basemap.bounds = bounds; + basemap.projected_bounds = project_bounds0(bounds); + + for (const json11::Json &element : root["elements"].array_items()) { + if (element["type"].string_value() != "way") { + continue; + } + const json11::Json &tags = element["tags"]; + const std::vector points = geometry_points(element["geometry"]); + if (points.size() < 2) { + continue; + } + + const std::string highway = tags["highway"].string_value(); + if (!highway.empty()) { + const std::optional road_class = classify_road(highway); + if (!road_class.has_value()) { + continue; + } + basemap.roads.push_back(RoadFeature{ + .road_class = *road_class, + .bounds = compute_projected_bounds(points), + .points = points, + }); + continue; + } + + const std::string natural = tags["natural"].string_value(); + const std::string waterway = tags["waterway"].string_value(); + const bool closed = points.size() >= 4 + && std::abs(points.front().x - points.back().x) < 1.0e-6f + && std::abs(points.front().y - points.back().y) < 1.0e-6f; + if ((natural == "water" || waterway == "riverbank") && closed) { + basemap.water_polygons.push_back(WaterPolygonFeature{ + .bounds = compute_projected_bounds(points), + .ring = points, + }); + continue; + } + if (waterway == "river" || waterway == "stream" || waterway == "canal") { + basemap.water_lines.push_back(WaterLineFeature{ + .bounds = compute_projected_bounds(points), + .points = points, + }); + } + } + + return basemap; +} + +struct RoadPaint { + ImU32 casing = 0; + ImU32 fill = 0; + float casing_width = 1.0f; + float fill_width = 1.0f; +}; + +constexpr ImU32 MAP_BG_COLOR = IM_COL32(244, 243, 238, 255); +constexpr ImU32 MAP_WATER_FILL = IM_COL32(193, 216, 235, 185); +constexpr ImU32 MAP_WATER_OUTLINE = IM_COL32(143, 173, 201, 220); +constexpr ImU32 MAP_WATER_LINE = IM_COL32(156, 186, 214, 205); +constexpr ImU32 MAP_ROUTE_HALO = IM_COL32(31, 40, 50, 92); + +RoadPaint road_paint(RoadClass road_class, float zoom) { + const float scale = std::clamp(0.88f + 0.12f * (zoom - 12.0f), 0.76f, 1.95f); + switch (road_class) { + case RoadClass::Motorway: + return { + .casing = IM_COL32(163, 157, 149, 235), + .fill = IM_COL32(245, 235, 215, 255), + .casing_width = 5.6f * scale, + .fill_width = 3.7f * scale, + }; + case RoadClass::Primary: + return { + .casing = IM_COL32(171, 171, 168, 220), + .fill = IM_COL32(249, 246, 237, 248), + .casing_width = 4.6f * scale, + .fill_width = 2.95f * scale, + }; + case RoadClass::Secondary: + return { + .casing = IM_COL32(183, 186, 189, 210), + .fill = IM_COL32(252, 251, 247, 240), + .casing_width = 3.5f * scale, + .fill_width = 2.15f * scale, + }; + case RoadClass::Local: + default: + return { + .casing = IM_COL32(200, 202, 205, 195), + .fill = IM_COL32(255, 255, 254, 230), + .casing_width = 2.5f * scale, + .fill_width = 1.5f * scale, + }; + } +} + +void clamp_map_center(TabUiState::MapPaneState *map_state, const GeoBounds &bounds, const ImVec2 &size) { + if (!bounds.valid() || size.x <= 1.0f || size.y <= 1.0f) { + return; + } + const double zoom = map_state->zoom; + const double min_x = lon_to_world_x(bounds.west, zoom); + const double max_x = lon_to_world_x(bounds.east, zoom); + const double min_y = lat_to_world_y(bounds.north, zoom); + const double max_y = lat_to_world_y(bounds.south, zoom); + const double half_w = size.x * 0.5; + const double half_h = size.y * 0.5; + double center_x = lon_to_world_x(map_state->center_lon, zoom); + double center_y = lat_to_world_y(map_state->center_lat, zoom); + if (max_x - min_x <= size.x) { + center_x = (min_x + max_x) * 0.5; + } else { + center_x = std::clamp(center_x, min_x + half_w, max_x - half_w); + } + if (max_y - min_y <= size.y) { + center_y = (min_y + max_y) * 0.5; + } else { + center_y = std::clamp(center_y, min_y + half_h, max_y - half_h); + } + map_state->center_lon = world_x_to_lon(center_x, zoom); + map_state->center_lat = world_y_to_lat(center_y, zoom); +} + +void initialize_map_pane_state(TabUiState::MapPaneState *map_state, + const GpsTrace &trace, + const GeoBounds &bounds, + ImVec2 size, + SessionDataMode mode, + std::optional cursor_point) { + if (trace.points.empty()) { + return; + } + map_state->initialized = true; + map_state->follow = mode == SessionDataMode::Stream; + const int min_zoom = minimum_allowed_map_zoom(bounds, trace, size); + if (mode == SessionDataMode::Stream && cursor_point.has_value()) { + map_state->zoom = std::max(16.0f, static_cast(min_zoom)); + map_state->center_lat = cursor_point->lat; + map_state->center_lon = cursor_point->lon; + } else { + map_state->zoom = std::max(static_cast(fit_map_zoom_for_trace(trace, size.x, size.y)), + static_cast(min_zoom)); + map_state->center_lat = map_trace_center_lat(trace); + map_state->center_lon = map_trace_center_lon(trace); + } + clamp_map_center(map_state, bounds, size); +} + +void draw_feature_polyline(ImDrawList *draw_list, + const std::vector &points, + float zoom_scale, + double top_left_x, + double top_left_y, + const ImVec2 &rect_min, + ImU32 color, + float thickness, + bool closed = false) { + if (points.size() < 2) { + return; + } + std::vector screen; + screen.reserve(points.size()); + for (const ProjectedPoint &point : points) { + screen.push_back(ImVec2(rect_min.x + point.x * zoom_scale - static_cast(top_left_x), + rect_min.y + point.y * zoom_scale - static_cast(top_left_y))); + } + draw_list->AddPolyline(screen.data(), static_cast(screen.size()), color, + closed ? ImDrawFlags_Closed : ImDrawFlags_None, thickness); +} + +void draw_water_polygon(ImDrawList *draw_list, + const WaterPolygonFeature &feature, + float zoom_scale, + double top_left_x, + double top_left_y, + const ImVec2 &rect_min) { + if (feature.ring.size() < 3) { + return; + } + std::vector screen; + screen.reserve(feature.ring.size()); + for (const ProjectedPoint &point : feature.ring) { + screen.push_back(ImVec2(rect_min.x + point.x * zoom_scale - static_cast(top_left_x), + rect_min.y + point.y * zoom_scale - static_cast(top_left_y))); + } + if (screen.size() >= 3 && is_convex_ring(screen)) { + draw_list->AddConvexPolyFilled(screen.data(), static_cast(screen.size()), MAP_WATER_FILL); + } + draw_list->AddPolyline(screen.data(), static_cast(screen.size()), MAP_WATER_OUTLINE, + ImDrawFlags_Closed, 1.8f); +} + +void draw_edge_fade(ImDrawList *draw_list, + const GeoBounds &bounds, + double zoom, + double top_left_x, + double top_left_y, + const ImVec2 &rect_min, + const ImVec2 &rect_max) { + if (!bounds.valid()) { + return; + } + + const float west_x = rect_min.x + static_cast(lon_to_world_x(bounds.west, zoom) - top_left_x); + const float east_x = rect_min.x + static_cast(lon_to_world_x(bounds.east, zoom) - top_left_x); + const float north_y = rect_min.y + static_cast(lat_to_world_y(bounds.north, zoom) - top_left_y); + const float south_y = rect_min.y + static_cast(lat_to_world_y(bounds.south, zoom) - top_left_y); + + const float fade_x = std::max(28.0f, (rect_max.x - rect_min.x) * MAP_EDGE_FADE_FRAC); + const float fade_y = std::max(28.0f, (rect_max.y - rect_min.y) * MAP_EDGE_FADE_FRAC); + const ImU32 solid = MAP_BG_COLOR; + const ImU32 clear = IM_COL32(244, 243, 238, 6); + + if (west_x > rect_min.x) { + const float x0 = rect_min.x; + const float x1 = std::min(rect_max.x, west_x); + const float xfade = std::max(x0, x1 - fade_x); + draw_list->AddRectFilledMultiColor(ImVec2(x0, rect_min.y), ImVec2(xfade, rect_max.y), solid, solid, solid, solid); + draw_list->AddRectFilledMultiColor(ImVec2(xfade, rect_min.y), ImVec2(x1, rect_max.y), solid, clear, clear, solid); + } + if (east_x < rect_max.x) { + const float x0 = std::max(rect_min.x, east_x); + const float x1 = rect_max.x; + const float xfade = std::min(x1, x0 + fade_x); + draw_list->AddRectFilledMultiColor(ImVec2(x0, rect_min.y), ImVec2(xfade, rect_max.y), clear, solid, solid, clear); + draw_list->AddRectFilledMultiColor(ImVec2(xfade, rect_min.y), ImVec2(x1, rect_max.y), solid, solid, solid, solid); + } + if (north_y > rect_min.y) { + const float y0 = rect_min.y; + const float y1 = std::min(rect_max.y, north_y); + const float yfade = std::max(y0, y1 - fade_y); + draw_list->AddRectFilledMultiColor(ImVec2(rect_min.x, y0), ImVec2(rect_max.x, yfade), solid, solid, solid, solid); + draw_list->AddRectFilledMultiColor(ImVec2(rect_min.x, yfade), ImVec2(rect_max.x, y1), solid, solid, clear, clear); + } + if (south_y < rect_max.y) { + const float y0 = std::max(rect_min.y, south_y); + const float y1 = rect_max.y; + const float yfade = std::min(y1, y0 + fade_y); + draw_list->AddRectFilledMultiColor(ImVec2(rect_min.x, y0), ImVec2(rect_max.x, yfade), clear, clear, solid, solid); + draw_list->AddRectFilledMultiColor(ImVec2(rect_min.x, yfade), ImVec2(rect_max.x, y1), solid, solid, solid, solid); + } +} + +} // namespace + +MapDataManager::MapDataManager() : worker_([this]() { run(); }) {} + +MapDataManager::~MapDataManager() { + { + std::lock_guard lock(mutex_); + stopping_ = true; + } + cv_.notify_all(); + if (worker_.joinable()) { + worker_.join(); + } +} + +void MapDataManager::pump() { + std::unique_ptr ready; + { + std::lock_guard lock(mutex_); + ready = std::move(completed_); + } + if (ready) { + current_ = std::move(ready); + } +} + +void MapDataManager::ensureTrace(const GpsTrace &trace) { + if (trace.points.empty()) { + return; + } + const MapRequestSpec wanted = build_request_for_trace(trace); + if (!wanted.bounds.valid()) { + return; + } + + std::lock_guard lock(mutex_); + if ((current_ && current_->key == wanted.key) || (pending_ && pending_->key == wanted.key)) { + return; + } + + if (const auto cached = load_compressed_basemap(basemap_cache_path(wanted.key), wanted.key)) { + current_ = std::make_unique(std::move(*cached)); + completed_.reset(); + pending_.reset(); + active_.reset(); + return; + } + + pending_ = std::make_unique(Request{ + .key = wanted.key, + .bounds = wanted.bounds, + .query = wanted.query, + }); + cv_.notify_one(); +} + +bool MapDataManager::loading() const { + std::lock_guard lock(mutex_); + return active_ || pending_; +} + +const RouteBasemap *MapDataManager::current() const { + return current_.get(); +} + +void MapDataManager::clearCache() { + std::lock_guard lock(mutex_); + clear_cache_directory(); +} + +MapCacheStats MapDataManager::cacheStats() const { + return MapCacheStats{ + .bytes = cache_directory_size_bytes(), + .files = cache_directory_file_count(), + }; +} + +void MapDataManager::run() { + while (true) { + Request request; + { + std::unique_lock lock(mutex_); + cv_.wait(lock, [&]() { return stopping_ || pending_ != nullptr; }); + if (stopping_) { + return; + } + request = *pending_; + active_ = std::move(pending_); + } + + std::unique_ptr parsed; + const std::string raw = load_overpass_json(request.query); + if (!raw.empty()) { + if (auto basemap = parse_basemap_json(raw, request.bounds, request.key)) { + save_compressed_basemap(basemap_cache_path(request.key), *basemap); + parsed = std::make_unique(std::move(*basemap)); + } + } + + { + std::lock_guard lock(mutex_); + if (active_ && active_->key == request.key) { + completed_ = std::move(parsed); + active_.reset(); + } + } + } +} + +void draw_map_pane(AppSession *session, UiState *state, Pane *, int pane_index) { + TabUiState *tab_state = app_active_tab_state(state); + if (tab_state == nullptr || pane_index < 0 || pane_index >= static_cast(tab_state->map_panes.size())) { + ImGui::TextUnformatted("Map unavailable"); + return; + } + if (!session->map_data) { + ImGui::TextUnformatted("Map unavailable"); + return; + } + + session->map_data->ensureTrace(session->route_data.gps_trace); + session->map_data->pump(); + + TabUiState::MapPaneState &map_state = tab_state->map_panes[static_cast(pane_index)]; + const GpsTrace &trace = session->route_data.gps_trace; + const RouteBasemap *basemap = session->map_data->current(); + const GeoBounds map_bounds = basemap != nullptr ? basemap->bounds : requested_bounds_for_trace(trace); + + const ImVec2 rect_min = ImGui::GetCursorScreenPos(); + const ImVec2 size = ImGui::GetContentRegionAvail(); + const ImVec2 input_size(std::max(1.0f, size.x - 22.0f), std::max(1.0f, size.y)); + ImGui::SetNextItemAllowOverlap(); + ImGui::InvisibleButton("##map_canvas", input_size); + const ImVec2 rect_max(rect_min.x + size.x, rect_min.y + size.y); + const float rect_width = rect_max.x - rect_min.x; + const float rect_height = rect_max.y - rect_min.y; + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + + draw_list->PushClipRect(rect_min, rect_max, true); + draw_list->AddRectFilled(rect_min, rect_max, MAP_BG_COLOR); + + if (trace.points.empty()) { + const char *label = session->async_route_loading ? "Loading map..." : "No GPS trace"; + const ImVec2 text = ImGui::CalcTextSize(label); + draw_list->AddText(ImVec2(rect_min.x + (rect_width - text.x) * 0.5f, + rect_min.y + (rect_height - text.y) * 0.5f), + IM_COL32(110, 118, 128, 255), label); + draw_list->PopClipRect(); + return; + } + + const std::optional cursor_point = state->has_tracker_time + ? interpolate_gps(trace, state->tracker_time) + : std::optional{}; + if (!map_state.initialized) { + initialize_map_pane_state(&map_state, trace, map_bounds, size, session->data_mode, cursor_point); + } + + const int min_zoom = minimum_allowed_map_zoom(map_bounds, trace, size); + if (map_state.follow && cursor_point.has_value()) { + const float follow_zoom = std::clamp(map_state.zoom, static_cast(min_zoom), static_cast(MAP_MAX_ZOOM)); + const double center_x = lon_to_world_x(map_state.center_lon, follow_zoom); + const double center_y = lat_to_world_y(map_state.center_lat, follow_zoom); + const double top_left_x = center_x - rect_width * 0.5; + const double top_left_y = center_y - rect_height * 0.5; + const ImVec2 car_screen = gps_to_screen(cursor_point->lat, cursor_point->lon, follow_zoom, top_left_x, top_left_y, rect_min); + if (!point_in_rect_with_margin(car_screen, rect_min, rect_max, 0.22f)) { + map_state.center_lat = cursor_point->lat; + map_state.center_lon = cursor_point->lon; + } + } + + map_state.zoom = std::clamp(map_state.zoom, static_cast(min_zoom), static_cast(MAP_MAX_ZOOM)); + clamp_map_center(&map_state, map_bounds, size); + + const double zoom = map_state.zoom; + const float zoom_scale = static_cast(std::exp2(zoom)); + const double center_x = lon_to_world_x(map_state.center_lon, zoom); + const double center_y = lat_to_world_y(map_state.center_lat, zoom); + const double top_left_x = center_x - rect_width * 0.5; + const double top_left_y = center_y - rect_height * 0.5; + const ProjectedBounds current_view = view_bounds(top_left_x, top_left_y, rect_width, rect_height); + + if (basemap != nullptr) { + for (const WaterPolygonFeature &water : basemap->water_polygons) { + if (feature_intersects_view(water.bounds, current_view, zoom_scale)) { + draw_water_polygon(draw_list, water, zoom_scale, top_left_x, top_left_y, rect_min); + } + } + for (const WaterLineFeature &water : basemap->water_lines) { + if (feature_intersects_view(water.bounds, current_view, zoom_scale)) { + draw_feature_polyline(draw_list, water.points, zoom_scale, top_left_x, top_left_y, rect_min, + MAP_WATER_LINE, 2.4f); + } + } + + std::array order = { + RoadClass::Local, + RoadClass::Secondary, + RoadClass::Primary, + RoadClass::Motorway, + }; + for (RoadClass road_class : order) { + const RoadPaint paint = road_paint(road_class, static_cast(zoom)); + for (const RoadFeature &road : basemap->roads) { + if (road.road_class != road_class || !feature_intersects_view(road.bounds, current_view, zoom_scale)) { + continue; + } + draw_feature_polyline(draw_list, road.points, zoom_scale, top_left_x, top_left_y, rect_min, + paint.casing, paint.casing_width); + draw_feature_polyline(draw_list, road.points, zoom_scale, top_left_x, top_left_y, rect_min, + paint.fill, paint.fill_width); + } + } + } + + if (basemap != nullptr) { + draw_edge_fade(draw_list, basemap->bounds, zoom, top_left_x, top_left_y, rect_min, rect_max); + } + + for (size_t i = 1; i < trace.points.size(); ++i) { + const GpsPoint &p0 = trace.points[i - 1]; + const GpsPoint &p1 = trace.points[i]; + const ImVec2 s0 = gps_to_screen(p0.lat, p0.lon, zoom, top_left_x, top_left_y, rect_min); + const ImVec2 s1 = gps_to_screen(p1.lat, p1.lon, zoom, top_left_x, top_left_y, rect_min); + draw_list->AddLine(s0, s1, MAP_ROUTE_HALO, 5.8f); + draw_list->AddLine(s0, s1, map_timeline_color(p1.type, 1.0f), 3.25f); + } + + if (cursor_point.has_value()) { + const ImVec2 marker = gps_to_screen(cursor_point->lat, cursor_point->lon, zoom, top_left_x, top_left_y, rect_min); + const float marker_size = std::clamp(9.0f + 1.0f * static_cast(zoom - min_zoom), 9.0f, 20.0f); + draw_car_marker(draw_list, marker, cursor_point->bearing, map_timeline_color(cursor_point->type, 1.0f), marker_size); + } + + if (session->map_data->loading()) { + const char *label = basemap != nullptr ? "Refreshing roads..." : "Loading roads..."; + const ImVec2 text = ImGui::CalcTextSize(label); + const ImVec2 pos(rect_min.x + 12.0f, rect_max.y - text.y - 12.0f); + draw_list->AddRectFilled(ImVec2(pos.x - 6.0f, pos.y - 4.0f), + ImVec2(pos.x + text.x + 6.0f, pos.y + text.y + 4.0f), + IM_COL32(255, 255, 255, 180), 4.0f); + draw_list->AddText(pos, IM_COL32(84, 93, 105, 255), label); + } + draw_list->PopClipRect(); + + const bool canvas_hovered = ImGui::IsItemHovered(); + const bool double_clicked = canvas_hovered && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left); + bool overlay_hovered = false; + if (const std::string google_maps_url = route_google_maps_url(trace); !google_maps_url.empty()) { + std::string label = std::string("Google Maps ") + icon::BOX_ARROW_UP_RIGHT; + const ImVec2 text_size = ImGui::CalcTextSize(label.c_str()); + const ImVec2 button_size(text_size.x + 20.0f, text_size.y + 10.0f); + const ImVec2 button_pos(rect_max.x - button_size.x - 28.0f, rect_min.y + 10.0f); + ImGui::SetCursorScreenPos(button_pos); + ImGui::SetNextItemAllowOverlap(); + if (ImGui::Button("##open_google_maps", button_size)) { + open_external_url(google_maps_url); + state->status_text = "Opened Google Maps"; + } + overlay_hovered = ImGui::IsItemHovered(); + draw_list->AddText(ImVec2(button_pos.x + 10.0f, button_pos.y + (button_size.y - text_size.y) * 0.5f), + ImGui::GetColorU32(ImGuiCol_Text), label.c_str()); + } + const bool hovered = canvas_hovered && !overlay_hovered; + if (hovered && ImGui::GetIO().MouseWheel != 0.0f) { + const float next_zoom = std::clamp(static_cast(zoom) + ImGui::GetIO().MouseWheel * MAP_WHEEL_ZOOM_STEP, + static_cast(min_zoom), static_cast(MAP_MAX_ZOOM)); + if (std::abs(next_zoom - zoom) > 1.0e-4f) { + const ImVec2 mouse = ImGui::GetIO().MousePos; + const double mouse_world_x = top_left_x + (mouse.x - rect_min.x); + const double mouse_world_y = top_left_y + (mouse.y - rect_min.y); + const double mouse_lon = world_x_to_lon(mouse_world_x, zoom); + const double mouse_lat = world_y_to_lat(mouse_world_y, zoom); + const double next_center_x = lon_to_world_x(mouse_lon, next_zoom) - (mouse.x - rect_min.x) + rect_width * 0.5; + const double next_center_y = lat_to_world_y(mouse_lat, next_zoom) - (mouse.y - rect_min.y) + rect_height * 0.5; + map_state.zoom = next_zoom; + map_state.center_lon = world_x_to_lon(next_center_x, next_zoom); + map_state.center_lat = world_y_to_lat(next_center_y, next_zoom); + map_state.follow = false; + clamp_map_center(&map_state, map_bounds, size); + } + } + if (hovered && ImGui::IsMouseDragging(ImGuiMouseButton_Left, 2.0f)) { + const ImVec2 delta = ImGui::GetIO().MouseDelta; + const double next_center_x = center_x - delta.x; + const double next_center_y = center_y - delta.y; + map_state.center_lon = world_x_to_lon(next_center_x, zoom); + map_state.center_lat = world_y_to_lat(next_center_y, zoom); + map_state.follow = false; + clamp_map_center(&map_state, map_bounds, size); + } else if (hovered && ImGui::IsMouseReleased(ImGuiMouseButton_Left)) { + const ImVec2 drag_delta = ImGui::GetMouseDragDelta(ImGuiMouseButton_Left); + if (drag_delta.x * drag_delta.x + drag_delta.y * drag_delta.y < 16.0f) { + const ImVec2 mouse = ImGui::GetIO().MousePos; + double best_dist = std::numeric_limits::max(); + double best_time = state->tracker_time; + for (const GpsPoint &point : trace.points) { + const ImVec2 screen = gps_to_screen(point.lat, point.lon, zoom, top_left_x, top_left_y, rect_min); + const double dx = static_cast(screen.x - mouse.x); + const double dy = static_cast(screen.y - mouse.y); + const double dist = dx * dx + dy * dy; + if (dist < best_dist) { + best_dist = dist; + best_time = point.time; + } + } + state->tracker_time = best_time; + state->has_tracker_time = true; + } + ImGui::ResetMouseDragDelta(ImGuiMouseButton_Left); + } + if (double_clicked) { + map_state.initialized = false; + } +} diff --git a/tools/jotpluggler/map.h b/tools/jotpluggler/map.h new file mode 100644 index 0000000000..97473f1ba9 --- /dev/null +++ b/tools/jotpluggler/map.h @@ -0,0 +1,61 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +struct GpsTrace; +struct GeoBounds { + double south = 0.0; + double west = 0.0; + double north = 0.0; + double east = 0.0; + + bool valid() const { + return south < north && west < east; + } +}; + +struct RouteBasemap; +struct MapCacheStats { + uint64_t bytes = 0; + size_t files = 0; +}; + +class MapDataManager { +public: + MapDataManager(); + ~MapDataManager(); + + MapDataManager(const MapDataManager &) = delete; + MapDataManager &operator=(const MapDataManager &) = delete; + + void pump(); + void ensureTrace(const GpsTrace &trace); + void clearCache(); + bool loading() const; + const RouteBasemap *current() const; + MapCacheStats cacheStats() const; + +private: + struct Request { + std::string key; + GeoBounds bounds; + std::string query; + }; + + void run(); + + mutable std::mutex mutex_; + std::condition_variable cv_; + bool stopping_ = false; + std::unique_ptr pending_; + std::unique_ptr active_; + std::unique_ptr completed_; + std::unique_ptr current_; + std::thread worker_; +}; diff --git a/tools/jotpluggler/math_eval.py b/tools/jotpluggler/math_eval.py new file mode 100755 index 0000000000..a865c88a3a --- /dev/null +++ b/tools/jotpluggler/math_eval.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 + +import json +import sys +import textwrap +import traceback + +import numpy as np + + +def _load_manifest(path: str) -> dict: + with open(path, encoding="utf-8") as f: + return json.load(f) + + +def _load_vector(path: str) -> np.ndarray: + return np.fromfile(path, dtype=np.float64) + + +def _write_vector(path: str, values: np.ndarray) -> None: + np.asarray(values, dtype=np.float64).tofile(path) + + +def _resample_to_reference(ref_t: np.ndarray, src_t: np.ndarray, src_v: np.ndarray) -> np.ndarray: + ref_t = np.asarray(ref_t, dtype=np.float64).reshape(-1) + src_t = np.asarray(src_t, dtype=np.float64).reshape(-1) + src_v = np.asarray(src_v, dtype=np.float64).reshape(-1) + if ref_t.size == 0 or src_t.size == 0 or src_v.size == 0: + return np.empty_like(ref_t) + indices = np.searchsorted(src_t, ref_t, side="right") - 1 + indices = np.clip(indices, 0, src_v.size - 1) + return src_v[indices] + + +def _evaluate_user_code(code: str, env: dict): + stripped = code.strip() + if not stripped: + raise ValueError("Function body is empty") + + expr = stripped + if expr.startswith("return "): + expr = expr[7:].strip() + try: + return eval(expr, env, env) + except SyntaxError: + pass + + function_src = "def __jotpluggler_eval__():\n" + textwrap.indent(code, " ") + exec(function_src, env, env) + return env["__jotpluggler_eval__"]() + + +def main() -> int: + if len(sys.argv) != 6: + print("usage: math_eval.py ", file=sys.stderr) + return 2 + + manifest_path, globals_path, code_path, out_t_path, out_v_path = sys.argv[1:6] + manifest = _load_manifest(manifest_path) + + series_t = {} + series_v = {} + for entry in manifest.get("series", []): + path = entry["path"] + series_t[path] = _load_vector(entry["t"]) + series_v[path] = _load_vector(entry["v"]) + + first_path = manifest.get("linked_source") or None + + def remember(path: str) -> None: + nonlocal first_path + if first_path is None: + first_path = path + + def t(path: str) -> np.ndarray: + remember(path) + return series_t[path] + + def v(path: str) -> np.ndarray: + remember(path) + return series_v[path] + + additional_sources = list(manifest.get("additional_sources", [])) + linked_source = manifest.get("linked_source") or "" + paths = list(manifest.get("paths", [])) + + env = { + "__builtins__": __builtins__, + "np": np, + "t": t, + "v": v, + "paths": paths, + "linked_source": linked_source, + "additional_sources": additional_sources, + } + + reference_time = None + if linked_source: + reference_time = series_t[linked_source] + env["time"] = reference_time + env["value"] = series_v[linked_source] + + for i, path in enumerate(additional_sources, start=1): + if reference_time is None: + env[f"t{i}"] = series_t[path] + env[f"v{i}"] = series_v[path] + else: + env[f"t{i}"] = reference_time + env[f"v{i}"] = _resample_to_reference(reference_time, series_t[path], series_v[path]) + + with open(globals_path, encoding="utf-8") as f: + globals_code = f.read() + if globals_code.strip(): + exec(globals_code, env, env) + + with open(code_path, encoding="utf-8") as f: + user_code = f.read() + result = _evaluate_user_code(user_code, env) + + if isinstance(result, tuple) and len(result) == 2: + result_t, result_v = result + else: + if first_path is None: + raise ValueError("No reference series found. Set an input timeseries or return (times, values).") + result_t = series_t[first_path] + result_v = result + + result_t = np.asarray(result_t, dtype=np.float64).reshape(-1) + result_v = np.asarray(result_v, dtype=np.float64).reshape(-1) + if result_t.size == 0 or result_v.size == 0: + raise ValueError("Custom series returned an empty result") + if result_t.shape != result_v.shape: + raise ValueError(f"Time/value arrays must have the same shape, got {result_t.shape} and {result_v.shape}") + + _write_vector(out_t_path, result_t) + _write_vector(out_v_path, result_v) + return 0 + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except Exception as err: + traceback.print_exc() + raise SystemExit(1) from err diff --git a/tools/jotpluggler/plot.cc b/tools/jotpluggler/plot.cc new file mode 100644 index 0000000000..a3c68ddcef --- /dev/null +++ b/tools/jotpluggler/plot.cc @@ -0,0 +1,1027 @@ +#include "tools/jotpluggler/internal.h" + +#include "implot.h" +#include "imgui_internal.h" + +#include +#include +#include +#include + +constexpr double PLOT_Y_PAD_FRACTION = 0.4; + +struct PlotBounds { + double x_min = 0.0; + double x_max = 1.0; + double y_min = 0.0; + double y_max = 1.0; +}; + +bool curve_has_samples(const AppSession &session, const Curve &curve) { + if (curve_has_local_samples(curve)) return true; + if (curve.name.empty() || curve.name.front() != '/') { + return false; + } + const RouteSeries *series = app_find_route_series(session, curve.name); + return series != nullptr && series->times.size() > 1 && series->times.size() == series->values.size(); +} + +void extend_range(const std::vector &values, bool *found, double *min_value, double *max_value) { + if (values.empty()) { + return; + } + const auto [min_it, max_it] = std::minmax_element(values.begin(), values.end()); + if (!*found) { + *min_value = *min_it; + *max_value = *max_it; + *found = true; + return; + } + *min_value = std::min(*min_value, *min_it); + *max_value = std::max(*max_value, *max_it); +} + +void ensure_non_degenerate_range(double *min_value, double *max_value, double pad_fraction, double fallback_pad) { + if (*max_value <= *min_value) { + const double pad = std::max(std::abs(*min_value) * 0.1, fallback_pad); + *min_value -= pad; + *max_value += pad; + return; + } + const double span = *max_value - *min_value; + const double pad = std::max(span * pad_fraction, fallback_pad); + *min_value -= pad; + *max_value += pad; +} + +struct PreparedCurve { + int pane_curve_index = -1; + std::string label; + std::array color = {160, 170, 180}; + float line_weight = 2.0f; + bool stairs = false; + const EnumInfo *enum_info = nullptr; + SeriesFormat display_info; + std::optional legend_value; + std::vector xs; + std::vector ys; +}; + +struct StateBlock { + double t0 = 0.0; + double t1 = 0.0; + int value = 0; + std::string label; +}; + +struct PaneEnumContext { + std::vector enums; +}; + +struct PaneValueFormatContext { + SeriesFormat format; + bool valid = false; +}; + +bool curves_are_bool_like(const std::vector &prepared_curves) { + if (prepared_curves.empty()) { + return false; + } + for (const PreparedCurve &curve : prepared_curves) { + if (!curve.display_info.integer_like || curve.ys.empty()) { + return false; + } + bool found_finite = false; + for (double value : curve.ys) { + if (!std::isfinite(value)) continue; + found_finite = true; + if (std::abs(value) > 0.01 && std::abs(value - 1.0) > 0.01) { + return false; + } + } + if (!found_finite) { + return false; + } + } + return true; +} + +bool curve_is_state_like(const PreparedCurve &curve) { + if (!curve.display_info.integer_like || curve.xs.size() < 2 || curve.xs.size() != curve.ys.size()) { + return false; + } + if (curve.enum_info != nullptr) { + return true; + } + std::unordered_set distinct_values; + for (double value : curve.ys) { + if (!std::isfinite(value)) { + continue; + } + distinct_values.insert(static_cast(std::llround(value))); + if (distinct_values.size() > 12) { + return false; + } + } + return !distinct_values.empty(); +} + +bool curves_use_state_blocks(const std::vector &prepared_curves) { + if (prepared_curves.empty()) { + return false; + } + for (const PreparedCurve &curve : prepared_curves) { + if (!curve_is_state_like(curve)) { + return false; + } + } + return true; +} + +ImU32 state_block_color(int value, float alpha = 1.0f) { + static constexpr std::array, 8> kPalette = {{ + {{111, 143, 175}}, + {{0, 163, 108}}, + {{255, 195, 0}}, + {{199, 0, 57}}, + {{123, 97, 255}}, + {{0, 150, 136}}, + {{214, 48, 49}}, + {{52, 73, 94}}, + }}; + const size_t index = static_cast(std::abs(value)) % kPalette.size(); + return ImGui::GetColorU32(color_rgb(kPalette[index], alpha)); +} + +std::string state_block_label(const PreparedCurve &curve, int value) { + if (curve.enum_info != nullptr && value >= 0 && static_cast(value) < curve.enum_info->names.size()) { + const std::string &name = curve.enum_info->names[static_cast(value)]; + if (!name.empty()) { + return name; + } + } + return std::to_string(value); +} + +std::vector build_state_blocks(const PreparedCurve &curve) { + std::vector blocks; + if (curve.xs.size() < 2 || curve.xs.size() != curve.ys.size()) { + return blocks; + } + + int current_value = static_cast(std::llround(curve.ys.front())); + double start_time = curve.xs.front(); + for (size_t i = 1; i < curve.xs.size(); ++i) { + const int value = static_cast(std::llround(curve.ys[i])); + if (value == current_value) { + continue; + } + const double end_time = curve.xs[i]; + if (end_time > start_time) { + blocks.push_back(StateBlock{ + .t0 = start_time, + .t1 = end_time, + .value = current_value, + .label = state_block_label(curve, current_value), + }); + } + current_value = value; + start_time = end_time; + } + + const double final_time = curve.xs.back(); + if (final_time >= start_time) { + blocks.push_back(StateBlock{ + .t0 = start_time, + .t1 = final_time, + .value = current_value, + .label = state_block_label(curve, current_value), + }); + } + return blocks; +} + +void app_decimate_samples_impl(const std::vector &xs_in, + const std::vector &ys_in, + int max_points, + std::vector *xs_out, + std::vector *ys_out) { + + const size_t bucket_count = std::max(1, static_cast(max_points / 4)); + const size_t bucket_size = std::max( + 1, + static_cast(std::ceil(static_cast(xs_in.size()) / static_cast(bucket_count)))); + xs_out->reserve(bucket_count * 4 + 2); + ys_out->reserve(bucket_count * 4 + 2); + + size_t last_index = std::numeric_limits::max(); + auto append_index = [&](size_t index) { + if (index >= xs_in.size() || index == last_index) { + return; + } + xs_out->push_back(xs_in[index]); + ys_out->push_back(ys_in[index]); + last_index = index; + }; + + for (size_t start = 0; start < xs_in.size(); start += bucket_size) { + const size_t end = std::min(xs_in.size(), start + bucket_size); + size_t min_index = start; + size_t max_index = start; + for (size_t index = start + 1; index < end; ++index) { + if (ys_in[index] < ys_in[min_index]) { + min_index = index; + } + if (ys_in[index] > ys_in[max_index]) { + max_index = index; + } + } + + std::array indices = {start, min_index, max_index, end - 1}; + std::sort(indices.begin(), indices.end()); + for (size_t index : indices) { + append_index(index); + } + } +} + +void app_decimate_samples(const std::vector &xs_in, + const std::vector &ys_in, + int max_points, + std::vector *xs_out, + std::vector *ys_out) { + xs_out->clear(); + ys_out->clear(); + if (xs_in.empty() || xs_in.size() != ys_in.size()) { + return; + } + if (max_points <= 0 || static_cast(xs_in.size()) <= max_points) { + *xs_out = xs_in; + *ys_out = ys_in; + return; + } + app_decimate_samples_impl(xs_in, ys_in, max_points, xs_out, ys_out); +} + +void app_decimate_samples(std::vector &&xs_in, + std::vector &&ys_in, + int max_points, + std::vector *xs_out, + std::vector *ys_out) { + xs_out->clear(); + ys_out->clear(); + if (xs_in.empty() || xs_in.size() != ys_in.size()) { + return; + } + if (max_points <= 0 || static_cast(xs_in.size()) <= max_points) { + *xs_out = std::move(xs_in); + *ys_out = std::move(ys_in); + return; + } + app_decimate_samples_impl(xs_in, ys_in, max_points, xs_out, ys_out); +} + +std::optional app_sample_xy_value_at_time(const std::vector &xs, + const std::vector &ys, + bool stairs, + double tm) { + if (xs.size() < 2 || xs.size() != ys.size()) { + return std::nullopt; + } + if (tm <= xs.front()) return ys.front(); + if (tm >= xs.back()) return ys.back(); + + const auto upper = std::lower_bound(xs.begin(), xs.end(), tm); + if (upper == xs.begin()) return ys.front(); + if (upper == xs.end()) return ys.back(); + + const size_t upper_index = static_cast(std::distance(xs.begin(), upper)); + const size_t lower_index = upper_index - 1; + const double x0 = xs[lower_index]; + const double x1 = xs[upper_index]; + const double y0 = ys[lower_index]; + const double y1 = ys[upper_index]; + if (std::abs(tm - x1) < 1.0e-9) return y1; + if (stairs || x1 <= x0) return y0; + const double alpha = (tm - x0) / (x1 - x0); + return y0 + (y1 - y0) * alpha; +} + +int format_enum_axis_tick(double value, char *buf, int size, void *user_data) { + const auto *ctx = static_cast(user_data); + const int idx = static_cast(std::llround(value)); + if (ctx != nullptr && idx >= 0 && std::abs(value - static_cast(idx)) < 0.01) { + std::vector names; + names.reserve(ctx->enums.size()); + for (const EnumInfo *info : ctx->enums) { + if (info == nullptr || static_cast(idx) >= info->names.size()) { + continue; + } + const std::string &name = info->names[static_cast(idx)]; + if (name.empty()) continue; + if (std::find(names.begin(), names.end(), std::string_view(name)) == names.end()) { + names.emplace_back(name); + } + } + if (!names.empty()) { + std::string joined; + for (size_t i = 0; i < names.size(); ++i) { + if (i != 0) { + joined += ", "; + } + joined += names[i]; + } + return std::snprintf(buf, size, "%d (%s)", idx, joined.c_str()); + } + } + return std::snprintf(buf, size, "%.6g", value); +} + +int format_numeric_axis_tick(double value, char *buf, int size, void *user_data) { + const auto *ctx = static_cast(user_data); + if (ctx == nullptr || !ctx->valid) { + return std::snprintf(buf, size, "%.6g", value); + } + if (ctx->format.integer_like) { + const double nearest_int = std::round(value); + if (std::abs(value - nearest_int) > 1.0e-6) { + int decimals = 1; + while (decimals < 4) { + const double scale = std::pow(10.0, decimals); + const double rounded = std::round(value * scale) / scale; + if (std::abs(value - rounded) <= 1.0e-6) { + break; + } + ++decimals; + } + return std::snprintf(buf, size, "%.*f", decimals, value); + } + } + return std::snprintf(buf, size, ctx->format.fmt, value); +} + +void merge_pane_value_format(PaneValueFormatContext *ctx, const SeriesFormat &format) { + if (!ctx->valid) { + ctx->format = format; + ctx->valid = true; + return; + } + ctx->format.has_negative = ctx->format.has_negative || format.has_negative; + ctx->format.digits_before = std::max(ctx->format.digits_before, format.digits_before); + ctx->format.decimals = std::max(ctx->format.decimals, format.decimals); + ctx->format.integer_like = ctx->format.decimals == 0; + const int sign_width = ctx->format.has_negative ? 1 : 0; + const int dot_width = ctx->format.decimals > 0 ? 1 : 0; + ctx->format.total_width = sign_width + ctx->format.digits_before + dot_width + ctx->format.decimals; + std::snprintf(ctx->format.fmt, sizeof(ctx->format.fmt), "%%%d.%df", + ctx->format.total_width, ctx->format.decimals); +} + +std::string curve_legend_label(const PreparedCurve &curve, bool has_cursor_time, size_t label_width) { + if (!has_cursor_time) return curve.label; + if (!curve.legend_value.has_value()) return curve.label; + const std::string value_text = format_display_value(*curve.legend_value, curve.display_info, curve.enum_info); + if (value_text.empty()) return curve.label; + const size_t padded_width = std::max(label_width, curve.label.size()); + return curve.label + std::string(padded_width - curve.label.size() + 2, ' ') + value_text; +} + +bool build_curve_series(const AppSession &session, + const Curve &curve, + const UiState &state, + int max_points, + PreparedCurve *prepared) { + std::vector xs; + std::vector ys; + if (curve_has_local_samples(curve)) { + xs = curve.xs; + ys = curve.ys; + } else { + const RouteSeries *series = app_find_route_series(session, curve.name); + if (series == nullptr || series->times.size() < 2 || series->times.size() != series->values.size()) { + return false; + } + + size_t begin_index = 0; + size_t end_index = series->times.size(); + if (state.has_shared_range && state.x_view_max > state.x_view_min) { + auto begin_it = std::lower_bound(series->times.begin(), series->times.end(), state.x_view_min); + auto end_it = std::upper_bound(series->times.begin(), series->times.end(), state.x_view_max); + begin_index = begin_it == series->times.begin() ? 0 : static_cast(std::distance(series->times.begin(), begin_it - 1)); + end_index = end_it == series->times.end() ? series->times.size() : static_cast(std::distance(series->times.begin(), end_it + 1)); + end_index = std::min(end_index, series->times.size()); + } + if (end_index <= begin_index + 1) return false; + xs.assign(series->times.begin() + begin_index, series->times.begin() + end_index); + ys.assign(series->values.begin() + begin_index, series->values.begin() + end_index); + } + + std::vector transformed_xs; + std::vector transformed_ys; + if (curve.derivative) { + if (xs.size() < 2) return false; + transformed_xs.reserve(xs.size() - 1); + transformed_ys.reserve(ys.size() - 1); + for (size_t i = 1; i < xs.size(); ++i) { + const double dt = curve.derivative_dt > 0.0 ? curve.derivative_dt : (xs[i] - xs[i - 1]); + if (dt <= 0.0) continue; + transformed_xs.push_back(xs[i]); + transformed_ys.push_back((ys[i] - ys[i - 1]) / dt); + } + } else { + transformed_xs = std::move(xs); + transformed_ys = std::move(ys); + } + + if (transformed_xs.size() < 2 || transformed_xs.size() != transformed_ys.size()) { + return false; + } + + for (double &value : transformed_ys) { + value = value * curve.value_scale + curve.value_offset; + } + + prepared->label = app_curve_display_name(curve); + prepared->color = curve.color; + prepared->line_weight = curve.derivative ? 1.8f : 2.25f; + if (!curve.derivative + && curve.value_scale == 1.0 + && curve.value_offset == 0.0 + && !curve_has_local_samples(curve) + && !curve.name.empty() + && curve.name.front() == '/') { + auto it = session.route_data.enum_info.find(curve.name); + if (it != session.route_data.enum_info.end()) { + prepared->enum_info = &it->second; + } + } + if (prepared->enum_info != nullptr) { + prepared->display_info = compute_series_format(transformed_ys, true); + } else if (!curve_has_local_samples(curve) + && !curve.derivative + && curve.value_scale == 1.0 + && curve.value_offset == 0.0 + && !curve.name.empty() + && curve.name.front() == '/') { + auto display_it = session.route_data.series_formats.find(curve.name); + if (display_it != session.route_data.series_formats.end()) { + prepared->display_info = display_it->second; + } else { + prepared->display_info = compute_series_format(transformed_ys, false); + } + } else { + prepared->display_info = compute_series_format(transformed_ys, false); + } + const bool stairs = !curve.derivative && prepared->display_info.integer_like; + if (state.has_tracker_time) { + prepared->legend_value = app_sample_xy_value_at_time(transformed_xs, transformed_ys, stairs, state.tracker_time); + } + if (stairs) { + prepared->xs = std::move(transformed_xs); + prepared->ys = std::move(transformed_ys); + } else { + app_decimate_samples(std::move(transformed_xs), std::move(transformed_ys), max_points, &prepared->xs, &prepared->ys); + } + prepared->stairs = stairs; + return prepared->xs.size() > 1 && prepared->xs.size() == prepared->ys.size(); +} + +bool draw_pane_close_button_overlay() { + const ImVec2 window_pos = ImGui::GetWindowPos(); + const ImVec2 content_min = ImGui::GetWindowContentRegionMin(); + const ImVec2 content_max = ImGui::GetWindowContentRegionMax(); + const ImRect rect(ImVec2(window_pos.x + content_max.x - 42.0f, window_pos.y + content_min.y + 4.0f), + ImVec2(window_pos.x + content_max.x - 4.0f, window_pos.y + content_min.y + 42.0f)); + const bool hovered = ImGui::IsMouseHoveringRect(rect.Min, rect.Max, false); + const bool held = hovered && ImGui::IsMouseDown(ImGuiMouseButton_Left); + if (hovered) { + ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + } + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + const float pad = 11.0f; + const ImU32 color = hovered || held + ? ImGui::GetColorU32(color_rgb(72, 79, 88)) + : ImGui::GetColorU32(color_rgb(138, 146, 156)); + draw_list->AddLine(ImVec2(rect.Min.x + pad, rect.Min.y + pad), + ImVec2(rect.Max.x - pad, rect.Max.y - pad), + color, + 2.4f); + draw_list->AddLine(ImVec2(rect.Min.x + pad, rect.Max.y - pad), + ImVec2(rect.Max.x - pad, rect.Min.y + pad), + color, + 2.4f); + return hovered && ImGui::IsMouseClicked(ImGuiMouseButton_Left); +} + +void draw_pane_frame_overlay() { + const ImVec2 window_pos = ImGui::GetWindowPos(); + const ImVec2 content_min = ImGui::GetWindowContentRegionMin(); + const ImVec2 content_max = ImGui::GetWindowContentRegionMax(); + const ImRect frame_rect(ImVec2(window_pos.x + content_min.x, window_pos.y + content_min.y), + ImVec2(window_pos.x + content_max.x, window_pos.y + content_max.y)); + ImGui::GetWindowDrawList()->AddRect(frame_rect.Min, + frame_rect.Max, + ImGui::GetColorU32(color_rgb(186, 190, 196)), + 0.0f, + 0, + 1.0f); +} + +PlotBounds compute_plot_bounds(const Pane &pane, + const std::vector &prepared_curves, + const UiState &state) { + PlotBounds bounds; + bounds.x_min = state.has_shared_range ? state.x_view_min : 0.0; + bounds.x_max = state.has_shared_range ? state.x_view_max : 1.0; + if (bounds.x_max <= bounds.x_min) { + bounds.x_max = bounds.x_min + 1.0; + } + + bool found = false; + double min_value = 0.0; + double max_value = 1.0; + for (const PreparedCurve &curve : prepared_curves) { + extend_range(curve.ys, &found, &min_value, &max_value); + } + if (!found) { + min_value = 0.0; + max_value = 1.0; + } + if (curves_are_bool_like(prepared_curves)) { + min_value = std::min(min_value, 0.0); + max_value = std::max(max_value, 1.0); + } + ensure_non_degenerate_range(&min_value, &max_value, PLOT_Y_PAD_FRACTION, 0.1); + if (pane.range.has_y_limit_min) { + min_value = pane.range.y_limit_min; + } + if (pane.range.has_y_limit_max) { + max_value = pane.range.y_limit_max; + } + ensure_non_degenerate_range(&min_value, &max_value, 0.0, 0.1); + bounds.y_min = min_value; + bounds.y_max = max_value; + return bounds; +} + +void draw_state_blocks_pane(const std::vector &prepared_curves, UiState *state) { + if (prepared_curves.empty() || !state->has_shared_range || state->x_view_max <= state->x_view_min) { + return; + } + + ImDrawList *draw_list = ImPlot::GetPlotDrawList(); + const ImVec2 plot_min = ImPlot::GetPlotPos(); + const ImVec2 plot_size = ImPlot::GetPlotSize(); + const int curve_count = static_cast(prepared_curves.size()); + if (plot_size.x <= 2.0f || plot_size.y <= 2.0f || curve_count <= 0) { + return; + } + + float label_width = 0.0f; + if (curve_count > 1) { + for (const PreparedCurve &curve : prepared_curves) { + label_width = std::max(label_width, ImGui::CalcTextSize(curve.label.c_str()).x); + } + label_width = std::clamp(label_width + 14.0f, 72.0f, std::min(160.0f, plot_size.x * 0.35f)); + } + + const float row_height = plot_size.y / static_cast(curve_count); + const float blocks_min_x = plot_min.x + label_width; + const float blocks_max_x = plot_min.x + plot_size.x; + const float blocks_width = std::max(1.0f, blocks_max_x - blocks_min_x); + const double x_span = std::max(1.0e-9, state->x_view_max - state->x_view_min); + + struct HoveredBlock { + int curve_index = -1; + StateBlock block; + }; + std::optional hovered; + + const ImVec2 mouse_pos = ImGui::GetMousePos(); + const bool plot_hovered = ImPlot::IsPlotHovered(); + + for (int curve_index = 0; curve_index < curve_count; ++curve_index) { + const PreparedCurve &curve = prepared_curves[static_cast(curve_index)]; + const float y0 = plot_min.y + row_height * static_cast(curve_index); + const float y1 = y0 + row_height; + const std::vector blocks = build_state_blocks(curve); + + if (curve_index > 0) { + draw_list->AddLine(ImVec2(plot_min.x, y0), ImVec2(plot_min.x + plot_size.x, y0), + IM_COL32(210, 214, 220, 255), 1.0f); + } + if (curve_count > 1) { + draw_list->AddLine(ImVec2(blocks_min_x, y0), ImVec2(blocks_min_x, y1), + IM_COL32(210, 214, 220, 255), 1.0f); + const float label_left = plot_min.x + 6.0f; + const float label_right = std::max(label_left + 12.0f, blocks_min_x - 6.0f); + ImGui::PushStyleColor(ImGuiCol_Text, color_rgb(120, 128, 138)); + ImGui::RenderTextEllipsis(draw_list, + ImVec2(label_left, y0 + 4.0f), + ImVec2(label_right, y1 - 4.0f), + label_right, + curve.label.c_str(), + nullptr, + nullptr); + ImGui::PopStyleColor(); + } + + for (const StateBlock &block : blocks) { + const double visible_t0 = std::max(block.t0, state->x_view_min); + const double visible_t1 = std::min(block.t1, state->x_view_max); + if (visible_t1 <= visible_t0) { + continue; + } + const float x0 = blocks_min_x + static_cast((visible_t0 - state->x_view_min) / x_span) * blocks_width; + const float x1 = blocks_min_x + static_cast((visible_t1 - state->x_view_min) / x_span) * blocks_width; + const ImU32 fill_color = state_block_color(block.value, 0.15f); + const ImU32 line_color = state_block_color(block.value, 0.90f); + draw_list->AddRectFilled(ImVec2(x0, y0), ImVec2(std::max(x1, x0 + 1.0f), y1), fill_color); + draw_list->AddLine(ImVec2(x0, y0), ImVec2(x0, y1), line_color, 2.0f); + + const float block_width = x1 - x0; + if (block_width > 14.0f) { + const float text_left = x0 + 6.0f; + const float text_right = x1 - 6.0f; + if (text_right > text_left) { + ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(state_block_color(block.value, 0.80f))); + ImGui::RenderTextEllipsis(draw_list, + ImVec2(text_left, y0 + 4.0f), + ImVec2(text_right, y1 - 4.0f), + text_right, + block.label.c_str(), + nullptr, + nullptr); + ImGui::PopStyleColor(); + } + } + + if (plot_hovered && mouse_pos.x >= blocks_min_x && mouse_pos.x <= blocks_max_x && mouse_pos.y >= y0 && mouse_pos.y <= y1) { + const double hover_time = state->x_view_min + static_cast((mouse_pos.x - blocks_min_x) / blocks_width) * x_span; + if (hover_time >= block.t0 && hover_time <= block.t1) { + hovered = HoveredBlock{ + .curve_index = curve_index, + .block = block, + }; + } + } + } + } + + if (hovered.has_value()) { + const HoveredBlock &info = *hovered; + ImGui::BeginTooltip(); + if (curve_count > 1) { + ImGui::Text("%s: %s (%d)", prepared_curves[static_cast(info.curve_index)].label.c_str(), + info.block.label.c_str(), info.block.value); + } else { + ImGui::Text("%s (%d)", info.block.label.c_str(), info.block.value); + } + ImGui::Separator(); + ImGui::Text("%.3fs -> %.3fs", info.block.t0, info.block.t1); + ImGui::Text("duration: %.3fs", info.block.t1 - info.block.t0); + ImGui::EndTooltip(); + } +} + +void persist_shared_range_to_tab(WorkspaceTab *tab, const UiState &state) { + if (tab == nullptr || !state.has_shared_range) { + return; + } + const double x_min = state.x_view_min; + const double x_max = state.x_view_max > state.x_view_min ? state.x_view_max : state.x_view_min + 1.0; + for (Pane &pane : tab->panes) { + pane.range.valid = true; + pane.range.left = x_min; + pane.range.right = x_max; + } +} + +void clear_pane_vertical_limits(Pane *pane) { + if (pane == nullptr) { + return; + } + pane->range.has_y_limit_min = false; + pane->range.has_y_limit_max = false; +} + +PlotBounds current_plot_bounds_for_pane(const AppSession &session, const Pane &pane, const UiState &state) { + std::vector prepared_curves; + prepared_curves.reserve(pane.curves.size()); + constexpr int kAxisEditorMaxPoints = 2048; + for (size_t curve_index = 0; curve_index < pane.curves.size(); ++curve_index) { + const Curve &curve = pane.curves[curve_index]; + if (!curve.visible || !curve_has_samples(session, curve)) continue; + PreparedCurve prepared; + if (build_curve_series(session, curve, state, kAxisEditorMaxPoints, &prepared)) { + prepared.pane_curve_index = static_cast(curve_index); + prepared_curves.push_back(std::move(prepared)); + } + } + return compute_plot_bounds(pane, prepared_curves, state); +} + +void open_axis_limits_editor(const AppSession &session, UiState *state, int pane_index) { + ensure_shared_range(state, session); + clamp_shared_range(state, session); + const WorkspaceTab *tab = app_active_tab(session.layout, *state); + if (tab == nullptr || pane_index < 0 || pane_index >= static_cast(tab->panes.size())) { + return; + } + + const Pane &pane = tab->panes[static_cast(pane_index)]; + const PlotBounds bounds = current_plot_bounds_for_pane(session, pane, *state); + AxisLimitsEditorState &editor = state->axis_limits; + editor.open = true; + editor.pane_index = pane_index; + editor.x_min = state->x_view_min; + editor.x_max = state->x_view_max; + editor.y_min_enabled = pane.range.has_y_limit_min; + editor.y_max_enabled = pane.range.has_y_limit_max; + editor.y_min = pane.range.has_y_limit_min ? pane.range.y_limit_min : bounds.y_min; + editor.y_max = pane.range.has_y_limit_max ? pane.range.y_limit_max : bounds.y_max; +} + +bool apply_axis_limits_editor(AppSession *session, UiState *state) { + WorkspaceTab *tab = app_active_tab(&session->layout, *state); + if (tab == nullptr) return false; + + AxisLimitsEditorState &editor = state->axis_limits; + if (editor.pane_index < 0 || editor.pane_index >= static_cast(tab->panes.size())) { + state->error_text = "The selected pane is no longer available."; + state->open_error_popup = true; + return false; + } + if (!std::isfinite(editor.x_min) || !std::isfinite(editor.x_max)) { + state->error_text = "Axis limits must be finite numbers."; + state->open_error_popup = true; + return false; + } + if (editor.x_max <= editor.x_min) { + state->error_text = "X max must be greater than X min."; + state->open_error_popup = true; + return false; + } + if (editor.y_min_enabled && !std::isfinite(editor.y_min)) { + state->error_text = "Y min must be a finite number."; + state->open_error_popup = true; + return false; + } + if (editor.y_max_enabled && !std::isfinite(editor.y_max)) { + state->error_text = "Y max must be a finite number."; + state->open_error_popup = true; + return false; + } + if (editor.y_min_enabled && editor.y_max_enabled && editor.y_max <= editor.y_min) { + state->error_text = "Y max must be greater than Y min."; + state->open_error_popup = true; + return false; + } + + const SketchLayout before_layout = session->layout; + state->has_shared_range = true; + state->x_view_min = editor.x_min; + state->x_view_max = editor.x_max; + if (session->data_mode == SessionDataMode::Stream) { + state->follow_latest = infer_stream_follow_state(*state, *session); + } else { + state->follow_latest = false; + } + state->suppress_range_side_effects = true; + clamp_shared_range(state, *session); + persist_shared_range_to_tab(tab, *state); + + Pane &pane = tab->panes[static_cast(editor.pane_index)]; + pane.range.has_y_limit_min = editor.y_min_enabled; + pane.range.has_y_limit_max = editor.y_max_enabled; + if (editor.y_min_enabled) { + pane.range.y_limit_min = editor.y_min; + } + if (editor.y_max_enabled) { + pane.range.y_limit_max = editor.y_max; + } + + const PlotBounds bounds = current_plot_bounds_for_pane(*session, pane, *state); + pane.range.valid = true; + pane.range.left = state->x_view_min; + pane.range.right = state->x_view_max; + pane.range.bottom = bounds.y_min; + pane.range.top = bounds.y_max; + + state->undo.push(before_layout); + const bool ok = mark_layout_dirty(session, state); + if (ok) { + state->status_text = "Axis limits updated"; + } + return ok; +} + +void draw_plot(const AppSession &session, Pane *pane, UiState *state) { + std::vector prepared_curves; + prepared_curves.reserve(pane->curves.size()); + const int max_points = std::max(256, static_cast(ImGui::GetContentRegionAvail().x) * 2); + for (size_t curve_index = 0; curve_index < pane->curves.size(); ++curve_index) { + const Curve &curve = pane->curves[curve_index]; + if (!curve.visible || !curve_has_samples(session, curve)) continue; + PreparedCurve prepared; + if (build_curve_series(session, curve, *state, max_points, &prepared)) { + prepared.pane_curve_index = static_cast(curve_index); + prepared_curves.push_back(std::move(prepared)); + } + } + + const PlotBounds bounds = compute_plot_bounds(*pane, prepared_curves, *state); + PaneEnumContext enum_context; + PaneValueFormatContext pane_value_format; + const bool state_block_mode = curves_use_state_blocks(prepared_curves); + bool all_enum_curves = !prepared_curves.empty(); + size_t max_legend_label_width = 0; + for (const PreparedCurve &curve : prepared_curves) { + max_legend_label_width = std::max(max_legend_label_width, curve.label.size()); + if (curve.enum_info != nullptr) { + enum_context.enums.push_back(curve.enum_info); + } else { + all_enum_curves = false; + merge_pane_value_format(&pane_value_format, curve.display_info); + } + } + if (prepared_curves.empty()) { + all_enum_curves = false; + } + const int supported_count = static_cast(prepared_curves.size()); + const ImVec2 plot_size = ImGui::GetContentRegionAvail(); + const bool has_cursor_time = state->has_tracker_time; + const double cursor_time = state->tracker_time; + + ImPlot::PushStyleColor(ImPlotCol_PlotBg, color_rgb(255, 255, 255)); + ImPlot::PushStyleColor(ImPlotCol_PlotBorder, color_rgb(186, 190, 196)); + ImPlot::PushStyleColor(ImPlotCol_LegendBg, color_rgb(248, 249, 251, 0.92f)); + ImPlot::PushStyleColor(ImPlotCol_LegendBorder, color_rgb(168, 175, 184)); + ImPlot::PushStyleColor(ImPlotCol_LegendText, color_rgb(57, 62, 69)); + ImPlot::PushStyleColor(ImPlotCol_TitleText, color_rgb(57, 62, 69)); + ImPlot::PushStyleColor(ImPlotCol_InlayText, color_rgb(95, 103, 112)); + ImPlot::PushStyleColor(ImPlotCol_AxisGrid, color_rgb(188, 196, 206)); + ImPlot::PushStyleColor(ImPlotCol_AxisText, color_rgb(95, 103, 112)); + ImPlot::PushStyleColor(ImPlotCol_AxisBg, color_rgb(255, 255, 255, 0.0f)); + ImPlot::PushStyleColor(ImPlotCol_AxisBgHovered, color_rgb(214, 220, 228, 0.45f)); + ImPlot::PushStyleColor(ImPlotCol_AxisBgActive, color_rgb(199, 209, 222, 0.55f)); + ImPlot::PushStyleColor(ImPlotCol_Selection, color_rgb(252, 211, 77, 0.28f)); + ImPlot::PushStyleColor(ImPlotCol_Crosshairs, color_rgb(120, 128, 138, 0.70f)); + ImPlot::PushStyleVar(ImPlotStyleVar_LegendPadding, ImVec2(56.0f, 10.0f)); + + ImPlotFlags plot_flags = ImPlotFlags_NoTitle | ImPlotFlags_NoMenus; + if (state_block_mode) { + plot_flags |= ImPlotFlags_NoLegend | ImPlotFlags_NoMouseText; + } + if (supported_count == 0) { + plot_flags |= ImPlotFlags_NoLegend; + } + + const ImPlotAxisFlags x_axis_flags = ImPlotAxisFlags_NoMenus | ImPlotAxisFlags_NoHighlight; + ImPlotAxisFlags y_axis_flags = ImPlotAxisFlags_NoMenus | ImPlotAxisFlags_NoHighlight; + if (state_block_mode) { + y_axis_flags |= ImPlotAxisFlags_NoDecorations; + } + const bool explicit_y = pane->range.has_y_limit_min || pane->range.has_y_limit_max; + if (!state_block_mode && !explicit_y && supported_count > 0) { + y_axis_flags |= ImPlotAxisFlags_AutoFit | ImPlotAxisFlags_RangeFit; + } + + const double previous_x_min = state->x_view_min; + const double previous_x_max = state->x_view_max; + app_push_mono_font(); + if (ImPlot::BeginPlot("##plot", plot_size, plot_flags)) { + ImPlot::SetupAxes(nullptr, nullptr, x_axis_flags, y_axis_flags); + ImPlot::SetupAxisFormat(ImAxis_X1, "%.1f"); + if (state_block_mode) { + ImPlot::SetupAxisLimits(ImAxis_Y1, 0.0, 1.0, ImPlotCond_Always); + } else if (all_enum_curves && !enum_context.enums.empty()) { + ImPlot::SetupAxisFormat(ImAxis_Y1, format_enum_axis_tick, &enum_context); + } else if (pane_value_format.valid) { + ImPlot::SetupAxisFormat(ImAxis_Y1, format_numeric_axis_tick, &pane_value_format); + } else { + ImPlot::SetupAxisFormat(ImAxis_Y1, "%.6g"); + } + ImPlot::SetupAxisLinks(ImAxis_X1, &state->x_view_min, &state->x_view_max); + if (state->route_x_max > state->route_x_min) { + const double x_constraint_min = session.data_mode == SessionDataMode::Stream + ? state->route_x_min - std::max(MIN_HORIZONTAL_ZOOM_SECONDS, session.stream_buffer_seconds) + : state->route_x_min; + ImPlot::SetupAxisLimitsConstraints(ImAxis_X1, x_constraint_min, state->route_x_max); + } + if (!state_block_mode) { + ImPlot::SetupMouseText(ImPlotLocation_SouthEast, ImPlotMouseTextFlags_NoAuxAxes); + } + if (!state_block_mode && (explicit_y || supported_count == 0)) { + ImPlot::SetupAxisLimits(ImAxis_Y1, bounds.y_min, bounds.y_max, ImPlotCond_Always); + } + if (!state_block_mode && supported_count > 0) { + ImPlot::SetupLegend(ImPlotLocation_NorthEast); + } + + if (state_block_mode) { + draw_state_blocks_pane(prepared_curves, state); + } else { + for (size_t i = 0; i < prepared_curves.size(); ++i) { + const PreparedCurve &curve = prepared_curves[i]; + std::string series_id = curve_legend_label(curve, has_cursor_time, max_legend_label_width) + "##curve" + std::to_string(i); + ImPlotSpec spec; + spec.LineColor = color_rgb(curve.color); + spec.LineWeight = curve.line_weight; + spec.Flags = ImPlotLineFlags_SkipNaN; + if (!curve.xs.empty() && curve.xs.size() == curve.ys.size()) { + if (curve.stairs) { + spec.Flags = ImPlotStairsFlags_PreStep; + ImPlot::PlotStairs(series_id.c_str(), curve.xs.data(), curve.ys.data(), static_cast(curve.xs.size()), spec); + } else { + ImPlot::PlotLine(series_id.c_str(), curve.xs.data(), curve.ys.data(), static_cast(curve.xs.size()), spec); + } + } + } + } + if (has_cursor_time) { + const double clamped_cursor_time = std::clamp(cursor_time, state->route_x_min, state->route_x_max); + ImPlotSpec cursor_spec; + cursor_spec.LineColor = color_rgb(108, 118, 128, 0.7f); + cursor_spec.LineWeight = 1.0f; + cursor_spec.Flags = ImPlotItemFlags_NoLegend; + ImPlot::PlotInfLines("##tracker_cursor", &clamped_cursor_time, 1, cursor_spec); + } + if (ImPlot::IsPlotHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { + state->tracker_time = std::clamp(ImPlot::GetPlotMousePos().x, state->route_x_min, state->route_x_max); + state->has_tracker_time = true; + } + ImPlot::EndPlot(); + } + app_pop_mono_font(); + clamp_shared_range(state, session); + if (std::abs(state->x_view_min - previous_x_min) > 1.0e-6 + || std::abs(state->x_view_max - previous_x_max) > 1.0e-6) { + if (!state->suppress_range_side_effects) { + if (session.data_mode == SessionDataMode::Stream) { + state->follow_latest = infer_stream_follow_state(*state, session); + } else { + state->follow_latest = false; + } + } + } + ImPlot::PopStyleVar(); + ImPlot::PopStyleColor(12); +} + +std::optional draw_pane_context_menu(const WorkspaceTab &tab, int pane_index) { + if (!ImGui::BeginPopupContextWindow("##pane_context")) return std::nullopt; + + PaneMenuAction action; + action.pane_index = pane_index; + const Pane *pane = pane_index >= 0 && pane_index < static_cast(tab.panes.size()) + ? &tab.panes[static_cast(pane_index)] + : nullptr; + const bool has_curves = pane_index >= 0 + && pane_index < static_cast(tab.panes.size()) + && !tab.panes[static_cast(pane_index)].curves.empty(); + const bool is_plot = pane != nullptr && pane->kind == PaneKind::Plot; + if (icon_menu_item(icon::SLIDERS, "Edit Axis Limits...", nullptr, false, is_plot)) { + action.kind = PaneMenuActionKind::OpenAxisLimits; + } + icon_menu_item(icon::PALETTE, "Edit Curve Style...", nullptr, false, false && is_plot); + if (action.kind == PaneMenuActionKind::None + && icon_menu_item(icon::PLUS_SLASH_MINUS, "Apply filter to data...", nullptr, false, has_curves && is_plot)) { + action.kind = PaneMenuActionKind::OpenCustomSeries; + } + ImGui::Separator(); + if (action.kind == PaneMenuActionKind::None && icon_menu_item(icon::DISTRIBUTE_HORIZONTAL, "Split Left / Right")) { + action.kind = PaneMenuActionKind::SplitRight; + } else if (action.kind == PaneMenuActionKind::None + && icon_menu_item(icon::DISTRIBUTE_VERTICAL, "Split Top / Bottom")) { + action.kind = PaneMenuActionKind::SplitBottom; + } + ImGui::Separator(); + if (icon_menu_item(icon::ZOOM_OUT, "Zoom Out", nullptr, false, is_plot)) { + action.kind = PaneMenuActionKind::ResetView; + } else if (icon_menu_item(icon::ARROW_LEFT_RIGHT, "Zoom Out Horizontally", nullptr, false, is_plot)) { + action.kind = PaneMenuActionKind::ResetHorizontal; + } else if (icon_menu_item(icon::ARROW_DOWN_UP, "Zoom Out Vertically", nullptr, false, is_plot)) { + action.kind = PaneMenuActionKind::ResetVertical; + } + ImGui::Separator(); + if (icon_menu_item(icon::TRASH, "Remove ALL curves", nullptr, false, is_plot)) { + action.kind = PaneMenuActionKind::Clear; + } + ImGui::Separator(); + icon_menu_item(icon::ARROW_LEFT_RIGHT, "Flip Horizontal Axis", nullptr, false, false); + icon_menu_item(icon::ARROW_DOWN_UP, "Flip Vertical Axis", nullptr, false, false); + ImGui::Separator(); + icon_menu_item(icon::FILES, "Copy", nullptr, false, false); + icon_menu_item(icon::CLIPBOARD2, "Paste", nullptr, false, false); + icon_menu_item(icon::FILE_EARMARK_IMAGE, "Copy image to clipboard", nullptr, false, false); + icon_menu_item(icon::SAVE, "Save plot to file", nullptr, false, false); + icon_menu_item(icon::BAR_CHART, "Show data statistics", nullptr, false, false); + ImGui::Separator(); + if (icon_menu_item(icon::X_SQUARE, "Close Pane")) { + action.kind = PaneMenuActionKind::Close; + } + ImGui::EndPopup(); + if (action.kind == PaneMenuActionKind::None) return std::nullopt; + return action; +} diff --git a/tools/jotpluggler/render.cc b/tools/jotpluggler/render.cc new file mode 100644 index 0000000000..54f0c16cc3 --- /dev/null +++ b/tools/jotpluggler/render.cc @@ -0,0 +1,173 @@ +#include "tools/jotpluggler/internal.h" + +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl3.h" +#include "imgui_impl_opengl3_loader.h" + +#include + +namespace fs = std::filesystem; + +void draw_fps_overlay(const UiState &state, float top_offset) { + if (!state.show_fps_overlay) { + return; + } + ImGuiViewport *viewport = ImGui::GetMainViewport(); + const ImGuiIO &io = ImGui::GetIO(); + const float fps = io.Framerate; + const std::string label = util::string_format("%.1f fps", fps); + + const ImVec2 padding(10.0f, 8.0f); + const ImVec2 margin(12.0f, 10.0f); + app_push_mono_font(); + ImFont *font = ImGui::GetFont(); + const float font_size = ImGui::GetFontSize(); + const ImVec2 text_size = ImGui::CalcTextSize(label.c_str()); + app_pop_mono_font(); + const ImVec2 size(text_size.x + padding.x * 2.0f, text_size.y + padding.y * 2.0f); + const ImVec2 pos(viewport->Pos.x + viewport->Size.x - size.x - margin.x, + viewport->Pos.y + top_offset + margin.y); + ImDrawList *draw_list = ImGui::GetForegroundDrawList(viewport); + const ImVec2 max(pos.x + size.x, pos.y + size.y); + draw_list->AddRectFilled(pos, max, ImGui::GetColorU32(color_rgb(248, 249, 251, 0.92f)), 4.0f); + draw_list->AddRect(pos, max, ImGui::GetColorU32(color_rgb(182, 188, 196, 0.95f)), 4.0f); + draw_list->AddText(font, font_size, ImVec2(pos.x + padding.x, pos.y + padding.y), + ImGui::GetColorU32(color_rgb(57, 62, 69)), label.c_str(), nullptr); +} + +void render_layout(AppSession *session, UiState *state, bool show_camera_feed) { + if (!state->fps_overlay_initialized) { + state->show_fps_overlay = false; + state->fps_overlay_initialized = true; + } + ensure_shared_range(state, *session); + if (state->follow_latest) { + update_follow_range(state, *session); + state->suppress_range_side_effects = true; + } else { + clamp_shared_range(state, *session); + } + const bool ctrl = ImGui::GetIO().KeyCtrl || ImGui::GetIO().KeySuper; + const bool shift = ImGui::GetIO().KeyShift; + if (!ImGui::GetIO().WantTextInput && ctrl && ImGui::IsKeyPressed(ImGuiKey_Z, false)) { + if (shift) { + apply_redo(session, state); + } else { + apply_undo(session, state); + } + } + if (!ImGui::GetIO().WantTextInput && ctrl && ImGui::IsKeyPressed(ImGuiKey_F, false)) { + state->open_find_signal = true; + } + if (ImGui::IsKeyPressed(ImGuiKey_LeftArrow, false)) { + step_tracker(state, -1.0); + } + if (ImGui::IsKeyPressed(ImGuiKey_RightArrow, false)) { + step_tracker(state, 1.0); + } + if (!ImGui::GetIO().WantTextInput && ImGui::IsKeyPressed(ImGuiKey_Space, false)) { + state->playback_playing = !state->playback_playing; + } + advance_playback(state, *session); + CameraFeedView *sidebar_camera = session->pane_camera_feeds[static_cast(sidebar_preview_camera_view(*session))].get(); + if (show_camera_feed && sidebar_camera != nullptr && state->has_tracker_time) { + sidebar_camera->update(state->tracker_time); + } + const float menu_height = draw_main_menu_bar(session, state); + UiMetrics ui = compute_ui_metrics(ImGui::GetMainViewport()->Size, menu_height, state->sidebar_width); + if (state->browser_nodes_dirty) { + rebuild_browser_nodes(session, state); + state->browser_nodes_dirty = false; + } + state->sidebar_width = ui.sidebar_width; + draw_sidebar(session, ui, state, show_camera_feed); + draw_workspace(session, ui, state); + draw_sidebar_resizer(ui, state); + if (!state->custom_series.selected && !state->logs.selected) { + draw_pane_windows(session, state); + } + draw_status_bar(*session, ui, state); + draw_popups(session, state); + draw_fps_overlay(*state, menu_height); +} + +void save_framebuffer_png(const fs::path &output_path, int width, int height) { + ensure_parent_dir(output_path); + if (width <= 0 || height <= 0) throw std::runtime_error("Invalid framebuffer size"); + + std::vector pixels(static_cast(width) * static_cast(height) * 4U, 0); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels.data()); + + const fs::path ppm_path = output_path.parent_path() / (output_path.stem().string() + ".ppm"); + std::string ppm = util::string_format("P6\n%d %d\n255\n", width, height); + ppm.reserve(ppm.size() + static_cast(width) * static_cast(height) * 3U); + for (int y = height - 1; y >= 0; --y) { + for (int x = 0; x < width; ++x) { + const size_t index = static_cast((y * width + x) * 4); + ppm.append(reinterpret_cast(&pixels[index]), 3); + } + } + write_file_or_throw(ppm_path, ppm.data(), ppm.size()); + + const std::string command = "convert " + shell_quote(ppm_path.string()) + " " + shell_quote(output_path.string()); + run_system_or_throw(command, "image conversion"); + fs::remove(ppm_path); +} + +void render_frame(GLFWwindow *window, AppSession *session, UiState *state, const fs::path *capture_path) { + glfwPollEvents(); + + int framebuffer_width = 0; + int framebuffer_height = 0; + glfwGetFramebufferSize(window, &framebuffer_width, &framebuffer_height); + + ImGui_ImplOpenGL3_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + if (state->request_save_layout) { + if (session->layout_path.empty()) { + state->open_save_layout = true; + } else { + save_layout(session, state, session->layout_path.string()); + } + state->request_save_layout = false; + } + if (state->request_reset_layout) { + reset_layout(session, state); + state->request_reset_layout = false; + } + poll_async_route_load(session, state); + if (session->data_mode == SessionDataMode::Stream && session->stream_poller) { + StreamExtractBatch batch; + std::string error_text; + if (session->stream_poller->consume(&batch, &error_text)) { + if (!error_text.empty()) { + state->error_text = error_text; + state->open_error_popup = true; + state->status_text = "Stream disconnected"; + } else { + apply_stream_batch(session, state, std::move(batch)); + } + } + } + + const bool show_camera = capture_path == nullptr && session->data_mode != SessionDataMode::Stream; + render_layout(session, state, show_camera); + ImGui::Render(); + if (state->request_close) { + glfwSetWindowShouldClose(window, GLFW_TRUE); + state->request_close = false; + } + + glViewport(0, 0, framebuffer_width, framebuffer_height); + glClearColor(227.0f / 255.0f, 229.0f / 255.0f, 233.0f / 255.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); + if (capture_path != nullptr) { + save_framebuffer_png(*capture_path, framebuffer_width, framebuffer_height); + } + glfwSwapBuffers(window); + state->suppress_range_side_effects = false; +} diff --git a/tools/jotpluggler/runtime.cc b/tools/jotpluggler/runtime.cc new file mode 100644 index 0000000000..47344c5519 --- /dev/null +++ b/tools/jotpluggler/runtime.cc @@ -0,0 +1,1280 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/common.h" + +#include "cereal/services.h" +#include "common/timing.h" +#include "imgui_impl_glfw.h" +#include "imgui_impl_opengl3.h" +#include "imgui_impl_opengl3_loader.h" +#include "implot.h" +#include "libyuv.h" +#include "msgq_repo/msgq/ipc.h" +#include "tools/replay/framereader.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "system/camerad/cameras/nv12_info.h" + +namespace { + +std::atomic g_glfw_alive{false}; +const bool kLogCameraTimings = env_flag_enabled("JOTP_CAMERA_TIMINGS"); + +CameraType decoder_camera_type(CameraViewKind view) { + switch (view) { + case CameraViewKind::Driver: return DriverCam; + case CameraViewKind::WideRoad: return WideRoadCam; + case CameraViewKind::QRoad: return RoadCam; + case CameraViewKind::Road: + default: return RoadCam; + } +} + +bool stream_batch_has_data(const StreamExtractBatch &batch) { + return !batch.series.empty() + || !batch.can_messages.empty() + || !batch.logs.empty() + || !batch.timeline.empty() + || !batch.enum_info.empty() + || !batch.car_fingerprint.empty() + || !batch.dbc_name.empty(); +} + +bool should_subscribe_stream_service(const std::string &name) { + static const std::array kSkippedServices = {{ + "roadEncodeIdx", + "driverEncodeIdx", + "wideRoadEncodeIdx", + "qRoadEncodeIdx", + "roadEncodeData", + "driverEncodeData", + "wideRoadEncodeData", + "qRoadEncodeData", + "livestreamWideRoadEncodeIdx", + "livestreamRoadEncodeIdx", + "livestreamDriverEncodeIdx", + "thumbnail", + "navThumbnail", + }}; + if (name == "rawAudioData") return false; + for (std::string_view skipped : kSkippedServices) { + if (name == skipped) return false; + } + return true; +} + +void glfw_error_callback(int error, const char *description) { + const std::string_view desc = description != nullptr ? description : "unknown"; + if (error == 65539 && desc.find("Invalid window attribute 0x0002000D") != std::string_view::npos) { + return; + } + std::cerr << "GLFW error " << error << ": " << desc << "\n"; +} + +} // namespace + +GlfwRuntime::GlfwRuntime(const Options &options) { + glfwSetErrorCallback(glfw_error_callback); + if (!glfwInit()) throw std::runtime_error("glfwInit failed"); + g_glfw_alive.store(true); + + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#ifdef __APPLE__ + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE); +#endif + const bool fixed_size = !options.show; + glfwWindowHint(GLFW_RESIZABLE, fixed_size ? GLFW_FALSE : GLFW_TRUE); + glfwWindowHint(GLFW_VISIBLE, options.show ? GLFW_TRUE : GLFW_FALSE); + + window_ = glfwCreateWindow(options.width, options.height, "jotpluggler", nullptr, nullptr); + if (window_ == nullptr) { + glfwTerminate(); + throw std::runtime_error("glfwCreateWindow failed"); + } + + if (fixed_size) { + glfwSetWindowSizeLimits(window_, options.width, options.height, options.width, options.height); + } + glfwMakeContextCurrent(window_); + glfwSwapInterval(options.show ? 1 : 0); +} + +GlfwRuntime::~GlfwRuntime() { + if (window_ != nullptr) { + glfwDestroyWindow(window_); + } + g_glfw_alive.store(false); + glfwTerminate(); +} + +GLFWwindow *GlfwRuntime::window() const { + return window_; +} + +ImGuiRuntime::ImGuiRuntime(GLFWwindow *window) { + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImPlot::CreateContext(); + + ImGuiIO &io = ImGui::GetIO(); + io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; + io.IniFilename = nullptr; + io.LogFilename = nullptr; + + if (!ImGui_ImplGlfw_InitForOpenGL(window, true)) { + ImPlot::DestroyContext(); + ImGui::DestroyContext(); + throw std::runtime_error("ImGui_ImplGlfw_InitForOpenGL failed"); + } + if (!ImGui_ImplOpenGL3_Init("#version 330")) { + ImGui_ImplGlfw_Shutdown(); + ImPlot::DestroyContext(); + ImGui::DestroyContext(); + throw std::runtime_error("ImGui_ImplOpenGL3_Init failed"); + } +} + +ImGuiRuntime::~ImGuiRuntime() { + ImGui_ImplOpenGL3_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImPlot::DestroyContext(); + ImGui::DestroyContext(); +} + +struct TerminalRouteProgress::Impl { + explicit Impl(bool enabled) : enabled_(enabled) {} + + void update(const RouteLoadProgress &progress) { + std::lock_guard lock(mutex_); + if (!enabled_) { + return; + } + + double overall = 0.0; + std::string detail = "Resolving route"; + if (progress.stage == RouteLoadStage::Finished) { + overall = 1.0; + detail = "Ready"; + } else if (progress.total_segments > 0) { + const bool finalizing = progress.segments_downloaded >= progress.total_segments + && progress.segments_parsed >= progress.total_segments; + if (finalizing) { + overall = 0.99; + detail = "Finalizing route data"; + } else { + const double total_work = static_cast(progress.total_segments) * 2.0; + const double complete_work = static_cast(progress.segments_downloaded + progress.segments_parsed); + overall = total_work <= 0.0 ? 0.0 : std::clamp(complete_work / total_work, 0.0, 0.99); + std::ostringstream desc; + desc << "Downloaded " << progress.segments_downloaded << "/" << progress.total_segments + << " Parsed " << progress.segments_parsed << "/" << progress.total_segments; + detail = desc.str(); + } + } + + render(overall, detail); + } + + void finish() { + std::lock_guard lock(mutex_); + if (!enabled_ || !rendered_) { + return; + } + render(1.0, "Ready"); + std::fputc('\n', stderr); + std::fflush(stderr); + rendered_ = false; + } + + void render(double progress, const std::string &detail) { + const int percent = std::clamp(static_cast(std::round(progress * 100.0)), 0, 100); + if (percent == last_percent_ && detail == last_detail_) { + return; + } + + constexpr int kWidth = 20; + const int filled = std::clamp(static_cast(std::round(progress * kWidth)), 0, kWidth); + const std::string bar = std::string(static_cast(filled), '=') + std::string(static_cast(kWidth - filled), ' '); + std::ostringstream line; + line << "\r[" << bar << "] " << percent << "% " << detail; + + const std::string text = line.str(); + std::fprintf(stderr, "%s", text.c_str()); + if (text.size() < last_line_width_) { + std::fprintf(stderr, "%s", std::string(last_line_width_ - text.size(), ' ').c_str()); + } + std::fflush(stderr); + + rendered_ = true; + last_percent_ = percent; + last_detail_ = detail; + last_line_width_ = text.size(); + } + + bool enabled_ = false; + bool rendered_ = false; + int last_percent_ = -1; + size_t last_line_width_ = 0; + std::string last_detail_; + std::mutex mutex_; +}; + +TerminalRouteProgress::TerminalRouteProgress(bool enabled) + : impl_(std::make_unique(enabled)) {} + +TerminalRouteProgress::~TerminalRouteProgress() { + finish(); +} + +void TerminalRouteProgress::update(const RouteLoadProgress &progress) { + impl_->update(progress); +} + +void TerminalRouteProgress::finish() { + impl_->finish(); +} + +struct AsyncRouteLoader::Impl { + explicit Impl(bool enable_terminal_progress) + : terminal_progress(enable_terminal_progress) {} + + ~Impl() { + join(); + } + + void start(const std::string &route_name_value, const std::string &data_dir_value, const std::string &dbc_name_value) { + join(); + { + std::lock_guard lock(mutex); + route_name = route_name_value; + data_dir = data_dir_value; + dbc_name = dbc_name_value; + result.reset(); + error_text.clear(); + } + active.store(!route_name_value.empty()); + completed.store(route_name_value.empty()); + success.store(route_name_value.empty()); + total_segments.store(0); + segments_downloaded.store(0); + segments_parsed.store(0); + if (route_name_value.empty()) { + return; + } + + worker = std::thread([this]() { + try { + RouteData route_data = load_route_data(route_name, data_dir, dbc_name, [this](const RouteLoadProgress &progress) { + total_segments.store(progress.total_segments > 0 ? progress.total_segments : progress.segment_count); + segments_downloaded.store(progress.segments_downloaded); + segments_parsed.store(progress.segments_parsed); + terminal_progress.update(progress); + }); + { + std::lock_guard lock(mutex); + result = std::make_unique(std::move(route_data)); + error_text.clear(); + } + success.store(true); + } catch (const std::exception &err) { + std::lock_guard lock(mutex); + result.reset(); + error_text = err.what(); + success.store(false); + } + active.store(false); + completed.store(true); + terminal_progress.finish(); + }); + } + + RouteLoadSnapshot snapshot() const { + RouteLoadSnapshot snapshot; + snapshot.active = active.load(); + snapshot.total_segments = total_segments.load(); + snapshot.segments_downloaded = segments_downloaded.load(); + snapshot.segments_parsed = segments_parsed.load(); + return snapshot; + } + + bool consume(RouteData *route_data, std::string *error_text_out) { + if (!completed.load()) return false; + join(); + std::lock_guard lock(mutex); + completed.store(false); + if (result) { + *route_data = std::move(*result); + result.reset(); + if (error_text_out != nullptr) { + error_text_out->clear(); + } + return true; + } + if (error_text_out != nullptr) { + *error_text_out = error_text; + } + return true; + } + + void join() { + if (worker.joinable()) { + worker.join(); + } + } + + mutable std::mutex mutex; + std::thread worker; + std::unique_ptr result; + std::string route_name; + std::string data_dir; + std::string dbc_name; + std::string error_text; + std::atomic active{false}; + std::atomic completed{false}; + std::atomic success{false}; + std::atomic total_segments{0}; + std::atomic segments_downloaded{0}; + std::atomic segments_parsed{0}; + TerminalRouteProgress terminal_progress; +}; + +AsyncRouteLoader::AsyncRouteLoader(bool enable_terminal_progress) + : impl_(std::make_unique(enable_terminal_progress)) {} + +AsyncRouteLoader::~AsyncRouteLoader() = default; + +void AsyncRouteLoader::start(const std::string &route_name, const std::string &data_dir, const std::string &dbc_name) { + impl_->start(route_name, data_dir, dbc_name); +} + +RouteLoadSnapshot AsyncRouteLoader::snapshot() const { + return impl_->snapshot(); +} + +bool AsyncRouteLoader::consume(RouteData *route_data, std::string *error_text) { + return impl_->consume(route_data, error_text); +} + +struct StreamPoller::Impl { + ~Impl() { + stop(); + } + + void start(const StreamSourceConfig &requested_source, + double requested_buffer_seconds, + const std::string &dbc_name, + std::optional time_offset) { + stop(); + { + std::lock_guard lock(mutex); + pending = {}; + pending_series_slots.clear(); + pending_can_slots.clear(); + error_text.clear(); + source = requested_source; + if (source.kind == StreamSourceKind::CerealLocal) { + source.address = "127.0.0.1"; + } else if (source.kind == StreamSourceKind::CerealRemote) { + source.address = normalize_stream_address(source.address); + } + buffer_seconds = std::max(1.0, requested_buffer_seconds); + latest_dbc_name = dbc_name; + latest_car_fingerprint.clear(); + } + received_messages.store(0); + connected.store(false); + paused.store(false); + running.store(true); + worker = std::thread([this, dbc_name, time_offset]() { + try { + StreamAccumulator accumulator(dbc_name, time_offset); + switch (source.kind) { + case StreamSourceKind::CerealLocal: + case StreamSourceKind::CerealRemote: + run_cereal_source(&accumulator); + break; + } + } catch (const std::exception &err) { + std::lock_guard lock(mutex); + error_text = err.what(); + } + connected.store(false); + running.store(false); + }); + } + + void setPaused(bool paused_value) { + paused.store(paused_value); + if (paused_value) { + std::lock_guard lock(mutex); + pending = {}; + pending_series_slots.clear(); + pending_can_slots.clear(); + error_text.clear(); + } + } + + void set_error_text(std::string text) { + std::lock_guard lock(mutex); + error_text = std::move(text); + } + + void clear_error_text() { + std::lock_guard lock(mutex); + error_text.clear(); + } + + void stop() { + running.store(false); + paused.store(false); + if (worker.joinable()) { + worker.join(); + } + connected.store(false); + } + + StreamPollSnapshot snapshot() const { + StreamPollSnapshot out; + out.active = running.load(); + out.connected = connected.load(); + out.paused = paused.load(); + out.source_kind = source.kind; + out.source_label = stream_source_target_label(source); + out.buffer_seconds = buffer_seconds; + out.received_messages = received_messages.load(); + std::lock_guard lock(mutex); + out.dbc_name = latest_dbc_name; + out.car_fingerprint = latest_car_fingerprint; + return out; + } + + bool consume(StreamExtractBatch *batch, std::string *out_error_text) { + std::lock_guard lock(mutex); + const bool has_error = !error_text.empty(); + const bool has_batch = stream_batch_has_data(pending); + if (!has_error && !has_batch) return false; + if (batch != nullptr) { + *batch = std::move(pending); + pending = {}; + pending_series_slots.clear(); + pending_can_slots.clear(); + } + if (out_error_text != nullptr) { + *out_error_text = error_text; + error_text.clear(); + } + return true; + } + + static void merge_route_series(RouteSeries *dst, RouteSeries *src) { + if (src->times.empty()) { + return; + } + if (dst->path.empty()) { + dst->path = src->path; + } + dst->times.insert(dst->times.end(), src->times.begin(), src->times.end()); + dst->values.insert(dst->values.end(), src->values.begin(), src->values.end()); + } + + static void merge_can_message_data(CanMessageData *dst, CanMessageData *src) { + if (src->samples.empty()) { + return; + } + if (dst->samples.empty()) { + *dst = std::move(*src); + return; + } + dst->samples.insert(dst->samples.end(), + std::make_move_iterator(src->samples.begin()), + std::make_move_iterator(src->samples.end())); + } + + static void merge_batch(StreamExtractBatch *dst, + std::unordered_map *series_slots, + std::unordered_map *can_slots, + StreamExtractBatch *src) { + for (RouteSeries &series : src->series) { + auto [it, inserted] = series_slots->try_emplace(series.path, dst->series.size()); + if (inserted) { + dst->series.push_back(RouteSeries{.path = series.path}); + } + merge_route_series(&dst->series[it->second], &series); + } + for (CanMessageData &message : src->can_messages) { + auto [it, inserted] = can_slots->try_emplace(message.id, dst->can_messages.size()); + if (inserted) { + dst->can_messages.push_back(CanMessageData{.id = message.id}); + } + merge_can_message_data(&dst->can_messages[it->second], &message); + } + if (!src->logs.empty()) { + dst->logs.insert(dst->logs.end(), + std::make_move_iterator(src->logs.begin()), + std::make_move_iterator(src->logs.end())); + } + if (!src->timeline.empty()) { + dst->timeline.insert(dst->timeline.end(), + std::make_move_iterator(src->timeline.begin()), + std::make_move_iterator(src->timeline.end())); + } + for (auto &[path, info] : src->enum_info) { + dst->enum_info[path] = std::move(info); + } + if (!src->car_fingerprint.empty()) { + dst->car_fingerprint = src->car_fingerprint; + } + if (!src->dbc_name.empty()) { + dst->dbc_name = src->dbc_name; + } + } + + void publish_batch(StreamAccumulator *accumulator) { + StreamExtractBatch batch = accumulator->takeBatch(); + if (!stream_batch_has_data(batch)) { + return; + } + std::lock_guard lock(mutex); + merge_batch(&pending, &pending_series_slots, &pending_can_slots, &batch); + latest_dbc_name = pending.dbc_name; + latest_car_fingerprint = pending.car_fingerprint; + } + + void run_cereal_source(StreamAccumulator *accumulator) { + if (source.kind == StreamSourceKind::CerealRemote) { + setenv("ZMQ", "1", 1); + } else { + unsetenv("ZMQ"); + } + + std::unique_ptr context(Context::create()); + std::unique_ptr poller(Poller::create()); + std::vector> sockets; + sockets.reserve(services.size()); + for (const auto &[name, info] : services) { + if (!should_subscribe_stream_service(name)) continue; + std::unique_ptr socket( + SubSocket::create(context.get(), name.c_str(), source.address.c_str(), false, true, info.queue_size)); + if (socket == nullptr) continue; + socket->setTimeout(0); + poller->registerSocket(socket.get()); + sockets.push_back(std::move(socket)); + } + if (sockets.empty()) throw std::runtime_error("Failed to connect to any cereal service"); + connected.store(true); + + while (running.load()) { + std::vector ready = poller->poll(1); + for (SubSocket *socket : ready) { + while (running.load()) { + std::unique_ptr msg(socket->receive(true)); + if (!msg) break; + const size_t size = msg->getSize(); + if (size < sizeof(capnp::word) || (size % sizeof(capnp::word)) != 0) { + continue; + } + if (paused.load()) { + received_messages.fetch_add(1); + continue; + } + kj::ArrayPtr data(reinterpret_cast(msg->getData()), + size / sizeof(capnp::word)); + capnp::FlatArrayMessageReader event_reader(data); + const cereal::Event::Reader event = event_reader.getRoot(); + accumulator->appendEvent(event.which(), data); + received_messages.fetch_add(1); + } + } + publish_batch(accumulator); + } + } + + mutable std::mutex mutex; + std::thread worker; + std::atomic running{false}; + std::atomic connected{false}; + std::atomic paused{false}; + std::atomic received_messages{0}; + StreamExtractBatch pending; + std::unordered_map pending_series_slots; + std::unordered_map pending_can_slots; + std::string error_text; + StreamSourceConfig source; + std::string latest_dbc_name; + std::string latest_car_fingerprint; + double buffer_seconds = 30.0; +}; + +StreamPoller::StreamPoller() + : impl_(std::make_unique()) {} + +StreamPoller::~StreamPoller() = default; + +void StreamPoller::start(const StreamSourceConfig &source, + double buffer_seconds, + const std::string &dbc_name, + std::optional time_offset) { + impl_->start(source, buffer_seconds, dbc_name, time_offset); +} + +void StreamPoller::setPaused(bool paused) { + impl_->setPaused(paused); +} + +void StreamPoller::stop() { + impl_->stop(); +} + +StreamPollSnapshot StreamPoller::snapshot() const { + return impl_->snapshot(); +} + +bool StreamPoller::consume(StreamExtractBatch *batch, std::string *error_text) { + return impl_->consume(batch, error_text); +} + +struct CameraFeedView::Impl { + struct RequestKey { + int segment = -1; + int decode_index = -1; + }; + + struct DecodeRequest { + RequestKey key; + std::string path; + uint64_t serial = 0; + uint64_t generation = 0; + }; + + struct PreloadTask { + int segment = -1; + std::string path; + uint64_t generation = 0; + }; + + struct DecodeResult { + RequestKey key; + bool success = false; + int width = 0; + int height = 0; + double decode_ms = 0.0; + std::vector rgba; + }; + + static constexpr float kDefaultAspect = 1208.0f / 1928.0f; + static constexpr size_t kCachedFrames = 8; + static constexpr int kPrefetchAhead = 2; + static constexpr int kImmediateNearbyFrameDistance = 8; + static constexpr int kPreloadWorkerCount = 2; + + Impl() { + demand_worker = std::thread([this]() { demand_worker_loop(); }); + for (int i = 0; i < kPreloadWorkerCount; ++i) { + preload_workers.emplace_back([this]() { preload_worker_loop(); }); + } + } + + ~Impl() { + stop.store(true); + cv.notify_all(); + if (demand_worker.joinable()) { + demand_worker.join(); + } + for (std::thread &worker : preload_workers) { + if (worker.joinable()) { + worker.join(); + } + } + destroy_texture(); + } + + void setRouteData(const RouteData &route_data) { + setCameraIndex(route_data.road_camera, CameraViewKind::Road); + } + + void setCameraIndex(const CameraFeedIndex &camera_index, CameraViewKind view) { + destroy_texture(); + { + std::lock_guard lock(mutex); + route_index = camera_index; + camera_view = view; + pending_request.reset(); + pending_result.reset(); + cached_results.clear(); + preload_queue.clear(); + preload_focus_segment = -1; + ++route_generation; + latest_request_serial = 0; + int initial_focus_segment = -1; + if (!route_index.entries.empty()) { + initial_focus_segment = route_index.entries.front().segment; + } else { + for (const CameraSegmentFile &segment_file : route_index.segment_files) { + if (!segment_file.path.empty()) { + initial_focus_segment = segment_file.segment; + break; + } + } + } + if (initial_focus_segment >= 0) { + rebuild_preload_queue_locked(initial_focus_segment); + } + } + abort_demand_work.store(true); + abort_preload_work.store(true); + active_request.reset(); + displayed_request.reset(); + failed_request.reset(); + frame_width = 0; + frame_height = 0; + cv.notify_all(); + } + + void update(double tracker_time) { + upload_pending_result(); + std::optional request = request_for_time(tracker_time); + if (!request.has_value()) { + return; + } + if (same_request(active_request, request->key) || same_request(displayed_request, request->key) || + same_request(failed_request, request->key)) { + return; + } + if (try_upload_cached_result(request->key)) { + return; + } + try_upload_nearby_cached_result(request->key); + + bool focus_changed = false; + { + std::lock_guard lock(mutex); + if (preload_focus_segment != request->key.segment) { + rebuild_preload_queue_locked(request->key.segment); + focus_changed = true; + } + request->serial = ++latest_request_serial; + request->generation = route_generation; + pending_request = request; + } + abort_demand_work.store(true); + if (focus_changed) { + abort_preload_work.store(true); + } + active_request = request->key; + failed_request.reset(); + cv.notify_all(); + } + + void draw(float width, bool loading) { + const float preview_width = std::max(1.0f, width); + const float preview_height = preview_width * preview_aspect(); + drawSized(ImVec2(preview_width, preview_height), loading, false); + ImGui::Spacing(); + } + + void drawSized(ImVec2 size, bool loading, bool fit_to_pane) { + size.x = std::max(1.0f, size.x); + size.y = std::max(1.0f, size.y); + const float aspect = preview_aspect(); + ImVec2 frame_size = size; + ImVec2 top_left = ImGui::GetCursorScreenPos(); + ImVec2 uv0(0.0f, 0.0f); + ImVec2 uv1(1.0f, 1.0f); + if (aspect > 0.0f && !fit_to_pane) { + frame_size.y = std::min(size.y, size.x * aspect); + frame_size.x = std::min(size.x, frame_size.y / aspect); + top_left = ImVec2(top_left.x + (size.x - frame_size.x) * 0.5f, + top_left.y + (size.y - frame_size.y) * 0.5f); + } else if (aspect > 0.0f && fit_to_pane) { + const float src_aspect = 1.0f / aspect; + const float dst_aspect = size.x / size.y; + if (dst_aspect > src_aspect) { + const float visible_v = std::clamp(src_aspect / dst_aspect, 0.0f, 1.0f); + const float v_pad = (1.0f - visible_v) * 0.5f; + uv0.y = v_pad; + uv1.y = 1.0f - v_pad; + } else if (dst_aspect < src_aspect) { + const float visible_u = std::clamp(dst_aspect / src_aspect, 0.0f, 1.0f); + const float u_pad = (1.0f - visible_u) * 0.5f; + uv0.x = u_pad; + uv1.x = 1.0f - u_pad; + } + } + ImGui::InvisibleButton("##camera_feed_sized", size); + if (texture != 0) { + ImGui::GetWindowDrawList()->AddImage(static_cast(texture), + top_left, + ImVec2(top_left.x + frame_size.x, top_left.y + frame_size.y), + uv0, + uv1); + } else { + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + draw_list->AddRectFilled(top_left, ImVec2(top_left.x + frame_size.x, top_left.y + frame_size.y), IM_COL32(45, 47, 50, 255)); + draw_list->AddRect(top_left, ImVec2(top_left.x + frame_size.x, top_left.y + frame_size.y), IM_COL32(95, 100, 106, 255)); + + const char *label = (loading || has_video_source()) ? "loading" : "no video"; + const ImVec2 text_size = ImGui::CalcTextSize(label); + const ImVec2 text_pos(top_left.x + (frame_size.x - text_size.x) * 0.5f, + top_left.y + (frame_size.y - text_size.y) * 0.5f); + draw_list->AddText(text_pos, IM_COL32(187, 187, 187, 255), label); + } + } + + static bool same_request(const std::optional &lhs, const RequestKey &rhs) { + return lhs.has_value() && lhs->segment == rhs.segment && lhs->decode_index == rhs.decode_index; + } + + bool has_video_source() const { + std::lock_guard lock(mutex); + return !route_index.entries.empty() && !route_index.segment_files.empty(); + } + + float preview_aspect() const { + if (frame_width > 0 && frame_height > 0) return static_cast(frame_height) / static_cast(frame_width); + return kDefaultAspect; + } + + std::optional request_for_time(double tracker_time) const { + std::lock_guard lock(mutex); + if (route_index.entries.empty()) return std::nullopt; + + auto it = std::lower_bound(route_index.entries.begin(), route_index.entries.end(), tracker_time, + [](const CameraFrameIndexEntry &entry, double tm) { + return entry.timestamp < tm; + }); + if (it == route_index.entries.end()) { + it = std::prev(route_index.entries.end()); + } else if (it != route_index.entries.begin()) { + const auto prev = std::prev(it); + if (std::abs(prev->timestamp - tracker_time) <= std::abs(it->timestamp - tracker_time)) { + it = prev; + } + } + + auto path_it = std::find_if(route_index.segment_files.begin(), route_index.segment_files.end(), + [&](const CameraSegmentFile &segment) { + return segment.segment == it->segment && !segment.path.empty(); + }); + if (path_it == route_index.segment_files.end()) return std::nullopt; + + return DecodeRequest{ + .key = RequestKey{.segment = it->segment, .decode_index = it->decode_index}, + .path = path_it->path, + }; + } + + void upload_pending_result() { + std::optional result; + { + std::lock_guard lock(mutex); + if (!pending_result.has_value()) { + return; + } + result = std::move(pending_result); + pending_result.reset(); + } + + active_request.reset(); + if (!result->success || result->rgba.empty() || result->width <= 0 || result->height <= 0) { + failed_request = result->key; + return; + } + + upload_result(*result); + } + + void upload_result(const DecodeResult &result) { + remember_cached_result(result); + + const bool new_size = texture_width != result.width || texture_height != result.height; + if (texture == 0) { + glGenTextures(1, &texture); + } + glBindTexture(GL_TEXTURE_2D, texture); + if (new_size) { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, result.width, result.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, result.rgba.data()); + texture_width = result.width; + texture_height = result.height; + } else { + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, result.width, result.height, GL_RGBA, GL_UNSIGNED_BYTE, result.rgba.data()); + } + glBindTexture(GL_TEXTURE_2D, 0); + + frame_width = result.width; + frame_height = result.height; + displayed_request = result.key; + failed_request.reset(); + } + + bool try_upload_cached_result(const RequestKey &key) { + std::optional result; + { + std::lock_guard lock(mutex); + auto it = std::find_if(cached_results.begin(), cached_results.end(), [&](const DecodeResult &cached) { + return cached.key.segment == key.segment && cached.key.decode_index == key.decode_index; + }); + if (it == cached_results.end()) { + return false; + } + result = *it; + } + active_request.reset(); + upload_result(*result); + return true; + } + + bool try_upload_nearby_cached_result(const RequestKey &key) { + std::optional result; + int best_distance = std::numeric_limits::max(); + { + std::lock_guard lock(mutex); + for (const DecodeResult &cached : cached_results) { + if (cached.key.segment != key.segment) continue; + const int distance = std::abs(cached.key.decode_index - key.decode_index); + if (distance == 0 || distance > kImmediateNearbyFrameDistance || distance >= best_distance) continue; + best_distance = distance; + result = cached; + } + } + if (!result.has_value()) { + return false; + } + upload_result(*result); + return true; + } + + void remember_cached_result(const DecodeResult &result) { + std::lock_guard lock(mutex); + auto it = std::find_if(cached_results.begin(), cached_results.end(), [&](const DecodeResult &cached) { + return cached.key.segment == result.key.segment && cached.key.decode_index == result.key.decode_index; + }); + if (it != cached_results.end()) { + cached_results.erase(it); + } + cached_results.push_front(result); + while (cached_results.size() > kCachedFrames) { + cached_results.pop_back(); + } + } + + void destroy_texture() { + if (texture != 0 && g_glfw_alive.load() && glfwGetCurrentContext() != nullptr) { + glDeleteTextures(1, &texture); + } + texture = 0; + texture_width = 0; + texture_height = 0; + frame_width = 0; + frame_height = 0; + } + + static bool ensure_decode_buffer(FrameReader *reader, VisionBuf *buf, bool &allocated, int &w, int &h) { + if (!reader) return false; + if (allocated && w == reader->width && h == reader->height) return true; + if (allocated) { buf->free(); allocated = false; } + const auto [stride, y_height, _uv_height, size] = get_nv12_info(reader->width, reader->height); + buf->allocate(size); + buf->init_yuv(reader->width, reader->height, stride, stride * y_height); + w = reader->width; + h = reader->height; + allocated = true; + return true; + } + + void publish_result(const DecodeRequest &request, DecodeResult result) { + std::lock_guard lock(mutex); + if (!pending_request.has_value() || pending_request->serial != request.serial || + pending_request->generation != request.generation) { + return; + } + pending_result = std::move(result); + } + + bool has_newer_pending_request(uint64_t serial) const { + std::lock_guard lock(mutex); + return pending_request.has_value() && pending_request->serial != serial; + } + + void rebuild_preload_queue_locked(int focus_segment) { + std::vector ordered; + ordered.reserve(route_index.segment_files.size()); + for (const CameraSegmentFile &segment_file : route_index.segment_files) { + if (segment_file.path.empty()) continue; + if (segment_file.segment == focus_segment) continue; + ordered.push_back(PreloadTask{ + .segment = segment_file.segment, + .path = segment_file.path, + .generation = route_generation, + }); + } + std::sort(ordered.begin(), ordered.end(), [&](const PreloadTask &a, const PreloadTask &b) { + const int distance_a = std::abs(a.segment - focus_segment); + const int distance_b = std::abs(b.segment - focus_segment); + if (distance_a != distance_b) return distance_a < distance_b; + return a.segment < b.segment; + }); + preload_queue.assign(ordered.begin(), ordered.end()); + preload_focus_segment = focus_segment; + } + + std::shared_ptr find_loaded_reader_locked(int segment, uint64_t generation) { + if (readers_generation != generation) { + readers.clear(); + loading_segments.clear(); + readers_generation = generation; + } + auto it = readers.find(segment); + return it != readers.end() ? it->second : nullptr; + } + + std::shared_ptr ensure_reader_loaded(int segment, + const std::string &path, + uint64_t generation, + const char *reason, + std::atomic *abort_flag, + bool wait_for_inflight) { + while (!stop.load()) { + { + std::unique_lock lock(readers_mutex); + if (std::shared_ptr cached = find_loaded_reader_locked(segment, generation)) { + return cached; + } + if (loading_segments.find(segment) != loading_segments.end()) { + if (!wait_for_inflight) { + return nullptr; + } + readers_cv.wait(lock, [&]() { + return stop.load() + || readers_generation != generation + || loading_segments.find(segment) == loading_segments.end(); + }); + continue; + } + loading_segments.insert(segment); + } + + auto reader = std::make_shared(); + const auto load_begin = std::chrono::steady_clock::now(); + const bool loaded = reader->load(decoder_camera_type(camera_view), path, false, abort_flag, true); + + { + std::lock_guard lock(readers_mutex); + if (readers_generation != generation) { + readers.clear(); + loading_segments.clear(); + readers_generation = generation; + } + loading_segments.erase(segment); + if (loaded) { + readers[segment] = reader; + } + } + readers_cv.notify_all(); + + if (!loaded) { + return nullptr; + } + if (kLogCameraTimings) { + const double load_ms = std::chrono::duration(std::chrono::steady_clock::now() - load_begin).count(); + std::fprintf(stderr, "camera[%s] %s-load seg=%d %.1fms\n", + camera_view_spec(camera_view).runtime_name, reason, segment, load_ms); + } + return reader; + } + return nullptr; + } + + void preload_worker_loop() { + while (true) { + std::optional preload; + { + std::unique_lock lock(mutex); + cv.wait(lock, [&]() { return stop.load() || !preload_queue.empty(); }); + if (stop.load()) { + break; + } + preload = preload_queue.front(); + preload_queue.pop_front(); + } + + abort_preload_work.store(false); + { + std::lock_guard lock(readers_mutex); + if (find_loaded_reader_locked(preload->segment, preload->generation)) { + continue; + } + } + ensure_reader_loaded(preload->segment, preload->path, preload->generation, "preload", + &abort_preload_work, false); + } + } + + void demand_worker_loop() { + uint64_t handled_serial = 0; + VisionBuf decode_buffer; + bool buffer_allocated = false; + int buffer_width = 0; + int buffer_height = 0; + + while (true) { + std::optional request; + { + std::unique_lock lock(mutex); + cv.wait(lock, [&]() { + return stop.load() || (pending_request.has_value() && pending_request->serial != handled_serial); + }); + if (stop.load()) break; + request = *pending_request; + handled_serial = request->serial; + } + + abort_demand_work.store(false); + + DecodeResult result{.key = request->key}; + std::shared_ptr reader = ensure_reader_loaded(request->key.segment, request->path, + request->generation, "demand", + &abort_demand_work, true); + if (!reader) { + publish_result(*request, std::move(result)); + continue; + } + if (has_newer_pending_request(request->serial)) { + continue; + } + + const auto decode_begin = std::chrono::steady_clock::now(); + if (!ensure_decode_buffer(reader.get(), &decode_buffer, buffer_allocated, buffer_width, buffer_height) || + !reader->get(request->key.decode_index, &decode_buffer)) { + publish_result(*request, std::move(result)); + continue; + } + + result.width = reader->width; + result.height = reader->height; + result.rgba.resize(static_cast(result.width) * static_cast(result.height) * 4U, 0); + libyuv::NV12ToABGR(decode_buffer.y, + static_cast(decode_buffer.stride), + decode_buffer.uv, + static_cast(decode_buffer.stride), + result.rgba.data(), + result.width * 4, + result.width, + result.height); + result.success = true; + result.decode_ms = std::chrono::duration(std::chrono::steady_clock::now() - decode_begin).count(); + publish_result(*request, std::move(result)); + + for (int offset = 1; offset <= kPrefetchAhead; ++offset) { + if (stop.load() || has_newer_pending_request(request->serial)) { + break; + } + const int next_index = request->key.decode_index + offset; + if (next_index < 0 || next_index >= static_cast(reader->getFrameCount())) { + break; + } + if (!reader->get(next_index, &decode_buffer)) { + break; + } + DecodeResult prefetched{ + .key = RequestKey{.segment = request->key.segment, .decode_index = next_index}, + .success = true, + .width = reader->width, + .height = reader->height, + }; + prefetched.rgba.resize(static_cast(prefetched.width) * static_cast(prefetched.height) * 4U, 0); + libyuv::NV12ToABGR(decode_buffer.y, + static_cast(decode_buffer.stride), + decode_buffer.uv, + static_cast(decode_buffer.stride), + prefetched.rgba.data(), + prefetched.width * 4, + prefetched.width, + prefetched.height); + remember_cached_result(prefetched); + } + } + + if (buffer_allocated) { + decode_buffer.free(); + } + } + + mutable std::mutex mutex; + std::condition_variable cv; + std::thread demand_worker; + std::vector preload_workers; + std::atomic stop{false}; + std::atomic abort_demand_work{false}; + std::atomic abort_preload_work{false}; + CameraFeedIndex route_index; + CameraViewKind camera_view = CameraViewKind::Road; + std::optional pending_request; + std::optional pending_result; + std::deque preload_queue; + int preload_focus_segment = -1; + std::deque cached_results; + uint64_t latest_request_serial = 0; + uint64_t route_generation = 1; + std::optional active_request; + std::optional displayed_request; + std::optional failed_request; + std::mutex readers_mutex; + std::condition_variable readers_cv; + std::unordered_map> readers; + std::unordered_set loading_segments; + uint64_t readers_generation = 0; + GLuint texture = 0; + int texture_width = 0; + int texture_height = 0; + int frame_width = 0; + int frame_height = 0; +}; + +CameraFeedView::CameraFeedView() + : impl_(std::make_unique()) {} + +CameraFeedView::~CameraFeedView() = default; + +void CameraFeedView::setRouteData(const RouteData &route_data) { + impl_->setRouteData(route_data); +} + +void CameraFeedView::setCameraIndex(const CameraFeedIndex &camera_index, CameraViewKind view) { + impl_->setCameraIndex(camera_index, view); +} + +void CameraFeedView::update(double tracker_time) { + impl_->update(tracker_time); +} + +void CameraFeedView::draw(float width, bool loading) { + impl_->draw(width, loading); +} + +void CameraFeedView::drawSized(ImVec2 size, bool loading, bool fit_to_pane) { + impl_->drawSized(size, loading, fit_to_pane); +} diff --git a/tools/jotpluggler/session.cc b/tools/jotpluggler/session.cc new file mode 100644 index 0000000000..22dd7dd463 --- /dev/null +++ b/tools/jotpluggler/session.cc @@ -0,0 +1,773 @@ +#include "tools/jotpluggler/internal.h" + +#include "imgui_internal.h" + +#include +#include +#include + +namespace fs = std::filesystem; + +const RouteSeries *app_find_route_series(const AppSession &session, const std::string &path) { + auto it = session.series_by_path.find(path); + return it == session.series_by_path.end() ? nullptr : it->second; +} + +void sync_camera_feeds(AppSession *session) { + for (size_t i = 0; i < kCameraViewSpecs.size(); ++i) { + if (session->pane_camera_feeds[i]) { + session->pane_camera_feeds[i]->setCameraIndex(session->route_data.*(kCameraViewSpecs[i].route_member), kCameraViewSpecs[i].view); + } + } +} + +void apply_route_data(AppSession *session, UiState *state, RouteData route_data) { + if (!route_data.route_id.empty()) { + session->route_id = route_data.route_id; + } else if (session->route_name.empty() && session->data_mode == SessionDataMode::Route) { + session->route_id = {}; + } + session->route_data = std::move(route_data); + rebuild_route_index(session); + rebuild_browser_nodes(session, state); + state->browser_nodes_dirty = false; + refresh_all_custom_curves(session, state); + sync_camera_feeds(session); + state->has_shared_range = false; + state->has_tracker_time = false; + reset_shared_range(state, *session); +} + +bool restore_undo_layout(AppSession *session, UiState *state, const SketchLayout &layout, const char *status_text) { + session->layout = layout; + cancel_rename_tab(state); + state->custom_series.request_select = false; + state->active_tab_index = std::clamp(layout.current_tab_index, 0, std::max(0, static_cast(layout.tabs.size()) - 1)); + state->requested_tab_index = state->active_tab_index; + sync_ui_state(state, session->layout); + mark_all_docks_dirty(state); + const bool autosave_ok = autosave_layout(session, state); + if (autosave_ok) { + state->status_text = status_text; + } + return autosave_ok; +} + +bool apply_undo(AppSession *session, UiState *state) { + if (!state->undo.can_undo()) { + return false; + } + return restore_undo_layout(session, state, state->undo.undo(), "Undo"); +} + +bool apply_redo(AppSession *session, UiState *state) { + if (!state->undo.can_redo()) { + return false; + } + return restore_undo_layout(session, state, state->undo.redo(), "Redo"); +} + +std::optional> tab_default_x_range(const WorkspaceTab &tab) { + bool found = false; + double min_value = 0.0; + double max_value = 1.0; + for (const Pane &pane : tab.panes) { + if (!pane.range.valid || pane.range.right <= pane.range.left) continue; + if (!found) { + min_value = pane.range.left; + max_value = pane.range.right; + found = true; + } else { + min_value = std::min(min_value, pane.range.left); + max_value = std::max(max_value, pane.range.right); + } + } + if (!found) return std::nullopt; + return std::make_pair(min_value, max_value); +} + +bool infer_stream_follow_state(const UiState &state, const AppSession &session) { + if (session.data_mode != SessionDataMode::Stream || !state.has_shared_range || !session.route_data.has_time_range) { + return false; + } + const double target_span = std::max(MIN_HORIZONTAL_ZOOM_SECONDS, session.stream_buffer_seconds); + const double current_span = std::max(0.0, state.x_view_max - state.x_view_min); + const double edge_epsilon = std::max(0.05, target_span * 0.02); + return std::abs(state.x_view_max - state.route_x_max) <= edge_epsilon + && std::abs(current_span - target_span) <= edge_epsilon; +} + +void ensure_shared_range(UiState *state, const AppSession &session) { + if (session.route_data.has_time_range) { + state->route_x_min = session.route_data.x_min; + state->route_x_max = session.route_data.x_max; + } else { + state->route_x_min = 0.0; + state->route_x_max = 1.0; + } + + if (state->has_shared_range) { + return; + } + + if (session.data_mode == SessionDataMode::Stream) { + const double target_span = std::max(MIN_HORIZONTAL_ZOOM_SECONDS, session.stream_buffer_seconds); + if (session.route_data.has_time_range) { + state->x_view_max = state->route_x_max; + state->x_view_min = state->x_view_max - target_span; + } else { + state->x_view_min = 0.0; + state->x_view_max = target_span; + } + if (state->x_view_max <= state->x_view_min) { + state->x_view_max = state->x_view_min + 1.0; + } + state->has_shared_range = true; + if (!state->has_tracker_time || state->tracker_time < state->route_x_min || state->tracker_time > state->route_x_max) { + state->tracker_time = state->route_x_max; + state->has_tracker_time = session.route_data.has_time_range; + } + return; + } + + if (const WorkspaceTab *tab = app_active_tab(session.layout, *state); tab != nullptr) { + if (std::optional> tab_range = tab_default_x_range(*tab); tab_range.has_value()) { + state->x_view_min = tab_range->first; + state->x_view_max = tab_range->second; + state->has_shared_range = true; + if (!state->has_tracker_time || state->tracker_time < state->route_x_min || state->tracker_time > state->route_x_max) { + state->tracker_time = state->route_x_min; + state->has_tracker_time = true; + } + return; + } + } + + state->x_view_min = state->route_x_min; + state->x_view_max = state->route_x_max; + if (state->x_view_max <= state->x_view_min) { + state->x_view_max = state->x_view_min + 1.0; + } + state->has_shared_range = true; + if (!state->has_tracker_time || state->tracker_time < state->route_x_min || state->tracker_time > state->route_x_max) { + state->tracker_time = state->route_x_min; + state->has_tracker_time = true; + } +} + +void clamp_shared_range(UiState *state, const AppSession &session) { + if (!state->has_shared_range) { + return; + } + const double min_span = MIN_HORIZONTAL_ZOOM_SECONDS; + double span = state->x_view_max - state->x_view_min; + if (span < min_span) { + const double center = 0.5 * (state->x_view_min + state->x_view_max); + span = min_span; + state->x_view_min = center - span * 0.5; + state->x_view_max = center + span * 0.5; + } + if (session.data_mode == SessionDataMode::Stream) { + if (session.route_data.has_time_range && state->x_view_max > state->route_x_max) { + state->x_view_min -= state->x_view_max - state->route_x_max; + state->x_view_max = state->route_x_max; + } + if (state->x_view_max <= state->x_view_min) { + state->x_view_max = state->x_view_min + min_span; + } + if (state->has_tracker_time && session.route_data.has_time_range) { + state->tracker_time = std::clamp(state->tracker_time, state->route_x_min, state->route_x_max); + } + if (session.route_data.has_time_range) { + state->follow_latest = infer_stream_follow_state(*state, session); + } + return; + } + if (state->route_x_max > state->route_x_min) { + if (state->x_view_min < state->route_x_min) { + state->x_view_max += state->route_x_min - state->x_view_min; + state->x_view_min = state->route_x_min; + } + if (state->x_view_max > state->route_x_max) { + state->x_view_min -= state->x_view_max - state->route_x_max; + state->x_view_max = state->route_x_max; + } + if (state->x_view_min < state->route_x_min) { + state->x_view_min = state->route_x_min; + } + if (state->x_view_max <= state->x_view_min) { + state->x_view_max = std::min(state->route_x_max, state->x_view_min + min_span); + } + } + if (state->has_tracker_time) { + state->tracker_time = std::clamp(state->tracker_time, state->route_x_min, state->route_x_max); + } +} + +void reset_shared_range(UiState *state, const AppSession &session) { + state->has_shared_range = false; + ensure_shared_range(state, session); + clamp_shared_range(state, session); +} + +void update_follow_range(UiState *state, const AppSession &session) { + if (!state->follow_latest || !state->has_shared_range) { + return; + } + const double span = session.data_mode == SessionDataMode::Stream + ? std::max(MIN_HORIZONTAL_ZOOM_SECONDS, session.stream_buffer_seconds) + : std::max(MIN_HORIZONTAL_ZOOM_SECONDS, state->x_view_max - state->x_view_min); + const double route_span = state->route_x_max - state->route_x_min; + if (route_span <= 0.0) { + return; + } + state->x_view_max = state->route_x_max; + state->x_view_min = state->x_view_max - span; + clamp_shared_range(state, session); +} + +void advance_playback(UiState *state, const AppSession &session) { + if (!state->playback_playing || !state->has_shared_range || state->route_x_max <= state->route_x_min) { + return; + } + + const double delta = std::max(0.0, static_cast(ImGui::GetIO().DeltaTime)) * state->playback_rate; + const double view_span = std::max(MIN_HORIZONTAL_ZOOM_SECONDS, state->x_view_max - state->x_view_min); + const double loop_min = state->playback_loop + ? std::clamp(state->x_view_min, state->route_x_min, state->route_x_max) + : state->route_x_min; + const double loop_max = state->playback_loop + ? std::clamp(state->x_view_max, state->route_x_min, state->route_x_max) + : state->route_x_max; + + state->tracker_time += delta; + if (state->tracker_time >= loop_max) { + if (state->playback_loop) { + state->tracker_time = loop_min; + } else { + state->tracker_time = state->route_x_max; + state->playback_playing = false; + } + } + + if (!state->playback_loop) { + constexpr double kScrollStartFraction = 0.70; + const double scroll_anchor = state->x_view_min + view_span * kScrollStartFraction; + if (state->tracker_time > scroll_anchor && state->x_view_max < state->route_x_max) { + state->x_view_min = state->tracker_time - view_span * kScrollStartFraction; + state->x_view_max = state->x_view_min + view_span; + clamp_shared_range(state, session); + } else if (state->tracker_time < state->x_view_min || state->tracker_time > state->x_view_max) { + state->x_view_min = state->tracker_time - view_span * 0.5; + state->x_view_max = state->x_view_min + view_span; + clamp_shared_range(state, session); + } + } +} + +void step_tracker(UiState *state, double direction) { + if (!state->has_shared_range) { + return; + } + state->tracker_time += direction * std::max(0.001, state->playback_step); + state->tracker_time = std::clamp(state->tracker_time, state->route_x_min, state->route_x_max); +} + +const char *log_selector_name(LogSelector selector) { + static constexpr const char *kLabels[] = {"a", "r", "q"}; + const size_t index = static_cast(selector); + return index < std::size(kLabels) ? kLabels[index] : kLabels[0]; +} + +const char *log_selector_description(LogSelector selector) { + static constexpr const char *kLabels[] = { + "any of rlog or qlog", + "rlog only", + "qlog only", + }; + const size_t index = static_cast(selector); + return index < std::size(kLabels) ? kLabels[index] : kLabels[0]; +} + +std::string shorten_route_part(std::string_view text, size_t keep) { + if (text.size() <= keep) { + return std::string(text); + } + return std::string(text.substr(0, keep)); +} + +bool parse_slice_spec(std::string_view text, int *begin, int *end) { + const auto parse_nonnegative = [](std::string_view value, int *out) { + if (value.empty()) return false; + char *end_ptr = nullptr; + const long parsed = std::strtol(std::string(value).c_str(), &end_ptr, 10); + if (end_ptr == nullptr || *end_ptr != '\0' || parsed < 0) { + return false; + } + *out = static_cast(parsed); + return true; + }; + const std::string trimmed = util::strip(std::string(text)); + if (trimmed.empty()) { + return false; + } + const size_t colon = trimmed.find(':'); + int parsed_begin = 0; + if (!parse_nonnegative(trimmed.substr(0, colon), &parsed_begin)) { + return false; + } + int parsed_end = parsed_begin; + if (colon != std::string::npos) { + const std::string end_text = trimmed.substr(colon + 1); + if (end_text.empty()) { + parsed_end = -1; + } else if (!parse_nonnegative(end_text, &parsed_end) || parsed_end < parsed_begin) { + return false; + } + } + *begin = parsed_begin; + *end = parsed_end; + return true; +} + +std::string format_duration_short(double seconds) { + const double clamped = std::max(0.0, seconds); + const int total_ms = static_cast(std::round(clamped * 1000.0)); + const int minutes = total_ms / 60000; + const int rem_ms = total_ms % 60000; + const int secs = rem_ms / 1000; + const int millis = rem_ms % 1000; + return util::string_format("%d:%02d.%03d", minutes, secs, millis); +} + +bool apply_route_identifier(AppSession *session, UiState *state, const RouteIdentifier &route_id, const char *status_text) { + if (route_id.empty()) { + return false; + } + if (!reload_session(session, state, route_id.full_spec(), session->data_dir)) { + return false; + } + state->status_text = status_text; + return true; +} + +bool apply_route_slice_change(AppSession *session, UiState *state, std::string_view slice_text) { + int begin = 0; + int end = 0; + if (!parse_slice_spec(slice_text, &begin, &end)) { + state->error_text = "Slice must be N or N:M."; + state->open_error_popup = true; + return false; + } + RouteIdentifier next = session->route_id; + next.slice_begin = begin; + next.slice_end = end; + next.slice_explicit = true; + return apply_route_identifier(session, state, next, "Updated route slice"); +} + +bool apply_route_selector_change(AppSession *session, UiState *state, LogSelector selector) { + RouteIdentifier next = session->route_id; + next.selector = selector; + next.selector_explicit = true; + return apply_route_identifier(session, state, next, "Updated log selector"); +} + +ImU32 route_chip_part_color(int part_index, bool explicit_part) { + constexpr std::array, 4> BASE = {{ + {70, 96, 126}, // dongle + {100, 86, 148}, // log id + {72, 112, 86}, // slice + {156, 104, 38}, // selector + }}; + const std::array &base = BASE[static_cast(std::clamp(part_index, 0, 3))]; + if (explicit_part) { + return ImGui::GetColorU32(color_rgb(base[0], base[1], base[2])); + } + const int gray = 144; + return ImGui::GetColorU32(color_rgb((base[0] + gray) / 2, (base[1] + gray) / 2, (base[2] + gray) / 2)); +} + +bool draw_route_chip_text_button(const char *id, + std::string_view text, + ImVec2 pos, + ImU32 color, + ImDrawList *draw_list, + const char *tooltip = nullptr) { + const ImVec2 size = ImGui::CalcTextSize(text.data(), text.data() + text.size()); + ImGui::SetCursorScreenPos(pos); + ImGui::InvisibleButton(id, size); + const bool hovered = ImGui::IsItemHovered(); + if (hovered) { + ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + draw_list->AddRectFilled(ImVec2(pos.x - 5.0f, pos.y - 1.0f), + ImVec2(pos.x + size.x + 5.0f, pos.y + size.y + 2.0f), + ImGui::GetColorU32(color_rgb(225, 231, 239, 0.95f)), 0.0f); + } + draw_list->AddText(pos, color, text.data(), text.data() + text.size()); + if (tooltip != nullptr && ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) { + ImGui::BeginTooltip(); + ImGui::TextUnformatted(tooltip); + ImGui::EndTooltip(); + } + return ImGui::IsItemClicked(ImGuiMouseButton_Left); +} + +void draw_route_copy_feedback(UiState *state, ImDrawList *draw_list, ImVec2 chip_max) { + if (state->route_copy_feedback_text.empty()) { + return; + } + const double now = ImGui::GetTime(); + if (now >= state->route_copy_feedback_until) { + state->route_copy_feedback_text.clear(); + state->route_copy_feedback_until = 0.0; + return; + } + + const float alpha = static_cast(std::clamp((state->route_copy_feedback_until - now) / 1.1, 0.0, 1.0)); + const ImVec2 text_size = ImGui::CalcTextSize(state->route_copy_feedback_text.c_str()); + const ImVec2 pad(9.0f, 5.0f); + const ImVec2 bubble_min(chip_max.x - text_size.x - pad.x * 2.0f, chip_max.y + 7.0f); + const ImVec2 bubble_max(chip_max.x, bubble_min.y + text_size.y + pad.y * 2.0f); + draw_list->AddRectFilled(bubble_min, bubble_max, + ImGui::GetColorU32(color_rgb(46, 125, 80, 0.96f * alpha)), 7.0f); + draw_list->AddRect(bubble_min, bubble_max, + ImGui::GetColorU32(color_rgb(35, 96, 61, 0.9f * alpha)), 7.0f, 0, 1.0f); + draw_list->AddText(ImVec2(std::floor(bubble_min.x + pad.x), std::floor(bubble_min.y + pad.y)), + ImGui::GetColorU32(color_rgb(247, 251, 248, alpha)), + state->route_copy_feedback_text.c_str()); +} + +void draw_route_info_popup(AppSession *session, UiState *state, ImVec2 anchor) { + if (session->route_id.empty()) { + return; + } + ImGui::SetNextWindowPos(anchor, ImGuiCond_Appearing); + ImGui::SetNextWindowSizeConstraints(ImVec2(300.0f, 0.0f), ImVec2(420.0f, FLT_MAX)); + if (!ImGui::BeginPopup("##route_info_popup", + ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings)) { + return; + } + + ImGui::TextUnformatted("Route Info"); + ImGui::Separator(); + app_push_mono_font(); + ImGui::TextUnformatted(session->route_id.canonical().c_str()); + app_pop_mono_font(); + + const char *copy_icon = icon::CLIPBOARD; + const char *link_icon = icon::BOX_ARROW_UP_RIGHT; + const std::string useradmin_label = std::string("Useradmin ") + link_icon; + const std::string connect_label = std::string("comma connect ") + link_icon; + if (ImGui::Button(copy_icon, ImVec2(34.0f, 26.0f))) { + ImGui::SetClipboardText(session->route_id.canonical().c_str()); + state->status_text = "Copied route to clipboard"; + state->route_copy_feedback_text = "Copied"; + state->route_copy_feedback_until = ImGui::GetTime() + 1.1; + } + if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) { + ImGui::BeginTooltip(); + ImGui::TextUnformatted("Copy route"); + ImGui::EndTooltip(); + } + ImGui::SameLine(); + if (ImGui::Button(useradmin_label.c_str(), ImVec2(132.0f, 26.0f))) { + open_external_url(route_useradmin_url(session->route_id)); + state->status_text = "Opened useradmin"; + } + ImGui::SameLine(); + if (ImGui::Button(connect_label.c_str(), ImVec2(156.0f, 26.0f))) { + open_external_url(route_connect_url(session->route_id)); + state->status_text = "Opened comma connect"; + } + + ImGui::Spacing(); + const int loaded_begin = session->route_id.available_begin; + const int loaded_end = session->route_id.available_end; + const int loaded_count = loaded_end >= loaded_begin ? (loaded_end - loaded_begin + 1) : 0; + ImGui::Text("Duration %s", format_duration_short(session->route_data.x_max - session->route_data.x_min).c_str()); + ImGui::Text("Segments %s (%d)", session->route_id.display_slice().c_str(), loaded_count); + ImGui::Text("Selector %s", log_selector_description(session->route_id.selector)); + if (!session->route_data.car_fingerprint.empty()) { + ImGui::TextWrapped("Car %s", session->route_data.car_fingerprint.c_str()); + } + if (!session->route_data.dbc_name.empty()) { + ImGui::TextWrapped("DBC %s", session->route_data.dbc_name.c_str()); + } + + ImGui::EndPopup(); +} + +void draw_route_id_chip(AppSession *session, UiState *state) { + if (session->data_mode != SessionDataMode::Route || session->route_id.empty()) { + return; + } + + ImGuiWindow *window = ImGui::GetCurrentWindow(); + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + const RouteIdentifier &route_id = session->route_id; + app_push_bold_font(); + const std::string dongle_text = shorten_route_part(route_id.dongle_id, 8); + const std::string log_text = shorten_route_part(route_id.log_id, 16); + const std::string slice_text = route_id.display_slice(); + const std::string selector_text(1, route_id.selector_char()); + const std::string sep_text = " / "; + + const ImVec2 dongle_size = ImGui::CalcTextSize(dongle_text.c_str()); + const ImVec2 log_size = ImGui::CalcTextSize(log_text.c_str()); + const ImVec2 slice_size = state->editing_route_slice + ? ImVec2(68.0f, ImGui::GetFrameHeight()) + : ImGui::CalcTextSize(slice_text.c_str()); + const ImVec2 selector_size = ImGui::CalcTextSize(selector_text.c_str()); + const ImVec2 sep_size = ImGui::CalcTextSize(sep_text.c_str()); + constexpr float chip_pad_x = 12.0f; + constexpr float info_size = 18.0f; + const float chip_h = 28.0f; + const float chip_w = chip_pad_x * 2.0f + dongle_size.x + sep_size.x + log_size.x + sep_size.x + + slice_size.x + sep_size.x + selector_size.x + 10.0f + info_size; + const float menu_right = window->Pos.x + window->Size.x - 8.0f; + const float cursor_x = ImGui::GetCursorScreenPos().x + 4.0f; + const float chip_x = std::clamp(cursor_x, window->Pos.x + 48.0f, std::max(window->Pos.x + 48.0f, menu_right - chip_w)); + const float chip_y = std::floor(window->Pos.y + std::max(0.0f, (window->Size.y - chip_h) * 0.5f)); + const ImVec2 chip_min(chip_x, chip_y); + const ImVec2 chip_max(chip_x + chip_w, chip_y + chip_h); + const float text_y = std::floor(chip_y + std::max(0.0f, (chip_h - ImGui::GetTextLineHeight()) * 0.5f)); + const ImU32 chip_bg = ImGui::GetColorU32(color_rgb(247, 249, 252)); + const ImU32 chip_border = ImGui::GetColorU32(color_rgb(184, 191, 200)); + const ImU32 sep = ImGui::GetColorU32(color_rgb(162, 170, 178)); + draw_list->AddRectFilled(chip_min, chip_max, chip_bg, 0.0f); + draw_list->AddRect(chip_min, chip_max, chip_border, 0.0f, 0, 1.0f); + + float x = chip_x + chip_pad_x; + const bool dongle_click = draw_route_chip_text_button( + "##route_dongle", dongle_text, ImVec2(x, text_y), route_chip_part_color(0, true), draw_list, + "Device identifier"); + x += dongle_size.x; + draw_list->AddText(ImVec2(x, text_y), sep, sep_text.c_str()); + x += sep_size.x; + const bool log_click = draw_route_chip_text_button( + "##route_log", log_text, ImVec2(x, text_y), route_chip_part_color(1, true), draw_list, + "Route identifier"); + x += log_size.x; + draw_list->AddText(ImVec2(x, text_y), sep, sep_text.c_str()); + x += sep_size.x; + + if (state->editing_route_slice) { + ImGui::SetCursorScreenPos(ImVec2(x - 4.0f, chip_y + 1.0f)); + ImGui::SetNextItemWidth(76.0f); + if (state->focus_route_slice_input) { + ImGui::SetKeyboardFocusHere(); + state->focus_route_slice_input = false; + } + const bool applied = input_text_string("##route_slice_edit", &state->route_slice_buffer, + ImGuiInputTextFlags_EnterReturnsTrue); + const bool deactivated = ImGui::IsItemDeactivated(); + const bool clicked_elsewhere = ImGui::IsMouseClicked(ImGuiMouseButton_Left) + && !ImGui::IsItemHovered() + && !ImGui::IsItemActive(); + if (applied) { + if (apply_route_slice_change(session, state, state->route_slice_buffer)) { + state->editing_route_slice = false; + } + } else if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + state->editing_route_slice = false; + } else if (deactivated || clicked_elsewhere) { + const std::string trimmed = util::strip(state->route_slice_buffer); + if (trimmed != route_id.display_slice()) { + int begin = 0; + int end = 0; + if (parse_slice_spec(trimmed, &begin, &end)) { + apply_route_slice_change(session, state, trimmed); + } else { + state->status_text = "Canceled route slice edit"; + } + } + state->editing_route_slice = false; + } + x += slice_size.x; + } else { + const bool slice_click = draw_route_chip_text_button( + "##route_slice", slice_text, ImVec2(x, text_y), + route_chip_part_color(2, route_id.slice_explicit), draw_list, + "Segment range"); + if (slice_click) { + state->editing_route_slice = true; + state->focus_route_slice_input = true; + state->route_slice_buffer = route_id.display_slice(); + } + x += slice_size.x; + } + + draw_list->AddText(ImVec2(x, text_y), sep, sep_text.c_str()); + x += sep_size.x; + const bool selector_click = draw_route_chip_text_button( + "##route_selector", selector_text, ImVec2(x, text_y), + route_chip_part_color(3, route_id.selector_explicit), draw_list, + "Log selector"); + if (selector_click) { + ImGui::OpenPopup("##route_selector_popup"); + } + x += selector_size.x + 10.0f; + + const ImVec2 info_center(x + info_size * 0.5f, chip_y + chip_h * 0.5f); + ImGui::SetCursorScreenPos(ImVec2(x, chip_y + (chip_h - info_size) * 0.5f)); + ImGui::InvisibleButton("##route_info_button", ImVec2(info_size, info_size)); + const bool info_hovered = ImGui::IsItemHovered(); + if (info_hovered) { + ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + } + draw_list->AddCircleFilled(info_center, info_size * 0.5f, + ImGui::GetColorU32(info_hovered ? color_rgb(220, 229, 240) : color_rgb(239, 243, 248))); + draw_list->AddCircle(info_center, info_size * 0.5f, chip_border, 20, 1.0f); + const char *info_text = icon::INFO_CIRCLE; + const ImVec2 info_text_size = ImGui::CalcTextSize(info_text); + draw_list->AddText(ImVec2(std::floor(info_center.x - info_text_size.x * 0.5f), + std::floor(info_center.y - info_text_size.y * 0.5f)), + route_chip_part_color(0, true), info_text); + if (ImGui::IsItemHovered(ImGuiHoveredFlags_DelayShort)) { + ImGui::BeginTooltip(); + ImGui::TextUnformatted("Route details"); + ImGui::EndTooltip(); + } + if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) { + ImGui::OpenPopup("##route_info_popup"); + } + + app_pop_bold_font(); + + if (dongle_click || log_click) { + ImGui::SetClipboardText(route_id.canonical().c_str()); + state->status_text = "Copied route to clipboard"; + state->route_copy_feedback_text = "Copied"; + state->route_copy_feedback_until = ImGui::GetTime() + 1.1; + } + + ImGui::SetNextWindowPos(ImVec2(chip_max.x - 60.0f, chip_max.y + 4.0f), ImGuiCond_Appearing); + if (ImGui::BeginPopup("##route_selector_popup")) { + for (LogSelector selector : {LogSelector::Auto, LogSelector::RLog, LogSelector::QLog}) { + const bool selected = route_id.selector == selector; + const std::string label = std::string(log_selector_name(selector)) + " " + log_selector_description(selector); + if (ImGui::Selectable(label.c_str(), selected) && !selected) { + apply_route_selector_change(session, state, selector); + } + if (selected) { + ImGui::SetItemDefaultFocus(); + } + } + ImGui::EndPopup(); + } + + draw_route_copy_feedback(state, draw_list, chip_max); + draw_route_info_popup(session, state, ImVec2(std::max(window->Pos.x + 16.0f, chip_max.x - 360.0f), chip_max.y + 6.0f)); +} + +std::string format_cache_bytes(uint64_t bytes) { + if (bytes >= (1ULL << 30)) { + return util::string_format("%.1f GiB", static_cast(bytes) / static_cast(1ULL << 30)); + } else if (bytes >= (1ULL << 20)) { + return util::string_format("%.1f MiB", static_cast(bytes) / static_cast(1ULL << 20)); + } else if (bytes >= (1ULL << 10)) { + return util::string_format("%.1f KiB", static_cast(bytes) / static_cast(1ULL << 10)); + } + return util::string_format("%llu B", static_cast(bytes)); +} + +MapCacheStats directory_cache_stats(const fs::path &root) { + MapCacheStats stats; + std::error_code ec; + if (!fs::exists(root, ec)) { + return stats; + } + fs::recursive_directory_iterator it(root, fs::directory_options::skip_permission_denied, ec); + for (const fs::directory_entry &entry : it) { + if (ec) { + ec.clear(); + continue; + } + const fs::file_status status = entry.symlink_status(ec); + if (ec || !fs::is_regular_file(status)) { + ec.clear(); + continue; + } + const uintmax_t size = entry.file_size(ec); + if (!ec) { + stats.bytes += static_cast(size); + ++stats.files; + } else { + ec.clear(); + } + } + return stats; +} + +float draw_main_menu_bar(AppSession *session, UiState *state) { + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(7.0f, 5.0f)); + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(9.0f, 6.0f)); + float height = ImGui::GetFrameHeight(); + if (ImGui::BeginMainMenuBar()) { + if (ImGui::BeginMenu("File")) { + if (ImGui::MenuItem("Undo", "Ctrl+Z", false, state->undo.can_undo())) { + apply_undo(session, state); + } + if (ImGui::MenuItem("Redo", "Ctrl+Shift+Z", false, state->undo.can_redo())) { + apply_redo(session, state); + } + ImGui::Separator(); + if (ImGui::MenuItem("Open Route...")) { + state->open_open_route = true; + } + if (ImGui::MenuItem("Stream...")) { + state->open_stream = true; + } + if (ImGui::MenuItem("Find Signal...", "Ctrl+F")) { + state->open_find_signal = true; + } + ImGui::Separator(); + if (ImGui::MenuItem("New Layout")) { + start_new_layout(session, state); + } + if (ImGui::MenuItem("Load Layout...")) { + state->open_load_layout = true; + } + if (ImGui::MenuItem("Save Layout")) { + state->request_save_layout = true; + } + if (ImGui::MenuItem("Save Layout As...")) { + state->open_save_layout = true; + } + if (ImGui::MenuItem("Reset Layout")) { + state->request_reset_layout = true; + } + ImGui::Separator(); + if (ImGui::MenuItem("Show DEPRECATED Fields", nullptr, state->show_deprecated_fields)) { + state->show_deprecated_fields = !state->show_deprecated_fields; + rebuild_browser_nodes(session, state); + } + if (ImGui::MenuItem("Show FPS", nullptr, state->show_fps_overlay)) { + state->show_fps_overlay = !state->show_fps_overlay; + } + if (ImGui::MenuItem("Preferences...")) { + state->open_preferences = true; + } + ImGui::Separator(); + if (ImGui::MenuItem("Reset Plot View")) { + reset_shared_range(state, *session); + state->follow_latest = session->data_mode == SessionDataMode::Stream; + clamp_shared_range(state, *session); + state->suppress_range_side_effects = true; + state->status_text = "Plot view reset"; + } + ImGui::Separator(); + if (ImGui::MenuItem("Close")) { + state->request_close = true; + } + ImGui::EndMenu(); + } + ImGui::SameLine(0.0f, 8.0f); + draw_route_id_chip(session, state); + height = ImGui::GetWindowSize().y; + ImGui::EndMainMenuBar(); + } + ImGui::PopStyleVar(2); + return height; +} diff --git a/tools/jotpluggler/sidebar.cc b/tools/jotpluggler/sidebar.cc new file mode 100644 index 0000000000..c120b47908 --- /dev/null +++ b/tools/jotpluggler/sidebar.cc @@ -0,0 +1,215 @@ +#include "tools/jotpluggler/internal.h" + +std::string dbc_combo_label(const AppSession &session) { + if (!session.dbc_override.empty()) return session.dbc_override; + if (!session.route_data.dbc_name.empty()) return "Auto: " + session.route_data.dbc_name; + return "Auto"; +} + +float timeline_time_to_x(double time_value, double route_min, double route_max, float x_min, float x_max) { + const double span = route_max - route_min; + if (span <= 0.0) { + return x_min; + } + const double ratio = (time_value - route_min) / span; + return x_min + static_cast(ratio * static_cast(x_max - x_min)); +} + +double timeline_x_to_time(float x, double route_min, double route_max, float x_min, float x_max) { + const float width = std::max(1.0f, x_max - x_min); + const float clamped_x = std::clamp(x, x_min, x_max); + const double ratio = static_cast((clamped_x - x_min) / width); + return route_min + ratio * (route_max - route_min); +} + +void reset_timeline_view(UiState *state, const AppSession &session) { + state->follow_latest = session.data_mode == SessionDataMode::Stream; + reset_shared_range(state, session); +} + +void draw_timeline_bar_contents(const AppSession &session, UiState *state, float width) { + if (!session.route_data.has_time_range) { + ImGui::Dummy(ImVec2(width, TIMELINE_BAR_HEIGHT)); + return; + } + + const ImVec2 cursor = ImGui::GetCursorScreenPos(); + const ImVec2 size(width, TIMELINE_BAR_HEIGHT); + const ImVec2 bar_min(cursor.x + 1.0f, cursor.y + 1.0f); + const ImVec2 bar_max(cursor.x + size.x - 1.0f, cursor.y + size.y - 1.0f); + const double route_min = state->route_x_min; + const double route_max = state->route_x_max; + const float vp_left = timeline_time_to_x(std::clamp(state->x_view_min, route_min, route_max), + route_min, route_max, bar_min.x, bar_max.x); + const float vp_right = timeline_time_to_x(std::clamp(state->x_view_max, route_min, route_max), + route_min, route_max, bar_min.x, bar_max.x); + + ImGui::InvisibleButton("##timeline_button", size); + const bool hovered = ImGui::IsItemHovered(); + const bool active = ImGui::IsItemActive(); + const bool double_clicked = hovered && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left); + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + + draw_list->AddRectFilled(bar_min, bar_max, timeline_entry_color(TimelineEntry::Type::None, 0.2f)); + if (session.route_data.timeline.empty()) { + draw_list->AddRectFilled(ImVec2(vp_left, bar_min.y), ImVec2(vp_right, bar_max.y), + timeline_entry_color(TimelineEntry::Type::None, 1.0f)); + } else { + for (const TimelineEntry &entry : session.route_data.timeline) { + float x0 = timeline_time_to_x(entry.start_time, route_min, route_max, bar_min.x, bar_max.x); + float x1 = timeline_time_to_x(entry.end_time, route_min, route_max, bar_min.x, bar_max.x); + x1 = std::max(x1, x0 + 1.0f); + draw_list->AddRectFilled(ImVec2(x0, bar_min.y), ImVec2(x1, bar_max.y), + timeline_entry_color(entry.type, 0.25f)); + } + for (const TimelineEntry &entry : session.route_data.timeline) { + float x0 = std::max(timeline_time_to_x(entry.start_time, route_min, route_max, bar_min.x, bar_max.x), vp_left); + float x1 = std::min(std::max(timeline_time_to_x(entry.end_time, route_min, route_max, bar_min.x, bar_max.x), x0 + 1.0f), vp_right); + if (x1 <= x0) { + continue; + } + draw_list->AddRectFilled(ImVec2(x0, bar_min.y), ImVec2(x1, bar_max.y), + timeline_entry_color(entry.type, 1.0f)); + } + } + + draw_list->AddLine(ImVec2(vp_left, bar_min.y), ImVec2(vp_left, bar_max.y), IM_COL32(60, 70, 80, 200), 1.0f); + draw_list->AddLine(ImVec2(vp_right, bar_min.y), ImVec2(vp_right, bar_max.y), IM_COL32(60, 70, 80, 200), 1.0f); + if (state->has_tracker_time) { + const float cx = timeline_time_to_x(std::clamp(state->tracker_time, route_min, route_max), + route_min, route_max, bar_min.x, bar_max.x); + draw_list->AddLine(ImVec2(cx, bar_min.y), ImVec2(cx, bar_max.y), IM_COL32(220, 60, 50, 255), 1.5f); + } + draw_list->AddRect(bar_min, bar_max, IM_COL32(170, 178, 186, 255), 0.0f, 0, 1.0f); + + const float edge_grab = 4.0f; + const float mouse_x = ImGui::GetIO().MousePos.x; + const double mouse_time = timeline_x_to_time(mouse_x, route_min, route_max, bar_min.x, bar_max.x); + if (double_clicked) { + reset_timeline_view(state, session); + } else if (hovered && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { + state->timeline_drag_anchor_time = mouse_time; + state->timeline_drag_anchor_x_min = state->x_view_min; + state->timeline_drag_anchor_x_max = state->x_view_max; + if (std::abs(mouse_x - vp_left) <= edge_grab) { + state->timeline_drag_mode = TimelineDragMode::ResizeLeft; + } else if (std::abs(mouse_x - vp_right) <= edge_grab) { + state->timeline_drag_mode = TimelineDragMode::ResizeRight; + } else if (mouse_x >= vp_left && mouse_x <= vp_right) { + state->timeline_drag_mode = TimelineDragMode::PanViewport; + } else { + state->timeline_drag_mode = TimelineDragMode::ScrubCursor; + state->tracker_time = std::clamp(mouse_time, route_min, route_max); + state->has_tracker_time = true; + } + } + + if (!ImGui::IsMouseDown(ImGuiMouseButton_Left)) { + state->timeline_drag_mode = TimelineDragMode::None; + } else if (active || state->timeline_drag_mode != TimelineDragMode::None) { + switch (state->timeline_drag_mode) { + case TimelineDragMode::ScrubCursor: + state->tracker_time = std::clamp(mouse_time, route_min, route_max); + state->has_tracker_time = true; + break; + case TimelineDragMode::PanViewport: { + const double delta = mouse_time - state->timeline_drag_anchor_time; + state->x_view_min = state->timeline_drag_anchor_x_min + delta; + state->x_view_max = state->timeline_drag_anchor_x_max + delta; + clamp_shared_range(state, session); + break; + } + case TimelineDragMode::ResizeLeft: + state->x_view_min = std::min(mouse_time, state->x_view_max - MIN_HORIZONTAL_ZOOM_SECONDS); + clamp_shared_range(state, session); + break; + case TimelineDragMode::ResizeRight: + state->x_view_max = std::max(mouse_time, state->x_view_min + MIN_HORIZONTAL_ZOOM_SECONDS); + clamp_shared_range(state, session); + break; + case TimelineDragMode::None: + break; + } + } + + if (hovered) { + if (std::abs(mouse_x - vp_left) <= edge_grab || std::abs(mouse_x - vp_right) <= edge_grab) { + ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); + } else if (mouse_x >= vp_left && mouse_x <= vp_right) { + ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + } + ImGui::BeginTooltip(); + ImGui::Text("t=%.1fs — %s", mouse_time, timeline_entry_label(timeline_type_at_time(session.route_data.timeline, mouse_time))); + ImGui::EndTooltip(); + } +} + +void draw_status_bar(const AppSession &session, const UiMetrics &ui, UiState *state) { + ImGui::SetNextWindowPos(ImVec2(ui.content_x, ui.status_bar_y)); + ImGui::SetNextWindowSize(ImVec2(ui.content_w, STATUS_BAR_HEIGHT)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); + ImGui::PushStyleColor(ImGuiCol_WindowBg, color_rgb(247, 248, 250)); + ImGui::PushStyleColor(ImGuiCol_Border, color_rgb(188, 193, 199)); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | + ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoSavedSettings; + if (ImGui::Begin("##status_bar", nullptr, flags)) { + draw_timeline_bar_contents(session, state, ui.content_w); + const float row_y = TIMELINE_BAR_HEIGHT + 8.0f; + ImGui::SetCursorPos(ImVec2(8.0f, row_y)); + ImGui::BeginDisabled(!session.route_data.has_time_range); + ImGui::Checkbox("Loop", &state->playback_loop); + ImGui::SameLine(0.0f, 10.0f); + if (ImGui::Button(state->playback_playing ? "Pause" : "Play", ImVec2(56.0f, 0.0f))) { + state->playback_playing = !state->playback_playing; + } + ImGui::SameLine(0.0f, 10.0f); + if (ImGui::Button("Reset View", ImVec2(86.0f, 0.0f))) { + reset_timeline_view(state, session); + } + const float controls_end_x = ImGui::GetItemRectMax().x - ImGui::GetWindowPos().x; + ImGui::EndDisabled(); + + const char *status_text = state->status_text.empty() ? "Ready" : state->status_text.c_str(); + const float status_x = controls_end_x + 16.0f; + ImGui::SetCursorPos(ImVec2(status_x, row_y + 2.0f)); + ImGui::PushStyleColor(ImGuiCol_Text, color_rgb(102, 110, 118)); + ImGui::TextUnformatted(status_text); + ImGui::PopStyleColor(); + + } + ImGui::End(); + ImGui::PopStyleColor(2); + ImGui::PopStyleVar(); +} + +void draw_sidebar_resizer(const UiMetrics &ui, UiState *state) { + constexpr float kHandleWidth = 14.0f; + ImGui::SetNextWindowPos(ImVec2(ui.sidebar_width - kHandleWidth * 0.5f, ui.top_offset)); + ImGui::SetNextWindowSize(ImVec2(kHandleWidth, std::max(1.0f, ui.height - ui.top_offset))); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | + ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoSavedSettings | + ImGuiWindowFlags_NoBackground; + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); + if (ImGui::Begin("##sidebar_resizer", nullptr, flags)) { + ImGui::InvisibleButton("##sidebar_resizer_button", ImVec2(kHandleWidth, std::max(1.0f, ui.height - ui.top_offset))); + if (ImGui::IsItemHovered() || ImGui::IsItemActive()) { + ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); + } + if (ImGui::IsItemActive()) { + const float max_width = std::min(SIDEBAR_MAX_WIDTH, ui.width * 0.6f); + state->sidebar_width = std::clamp(ImGui::GetIO().MousePos.x, SIDEBAR_MIN_WIDTH, max_width); + } + + ImDrawList *draw_list = ImGui::GetWindowDrawList(); + const ImVec2 origin = ImGui::GetWindowPos(); + draw_list->AddLine(ImVec2(origin.x + kHandleWidth * 0.5f, origin.y), + ImVec2(origin.x + kHandleWidth * 0.5f, origin.y + std::max(1.0f, ui.height - ui.top_offset)), + IM_COL32(194, 198, 204, 255)); + } + ImGui::End(); + ImGui::PopStyleVar(); +} diff --git a/tools/jotpluggler/sketch_layout.cc b/tools/jotpluggler/sketch_layout.cc new file mode 100644 index 0000000000..cd0bf51015 --- /dev/null +++ b/tools/jotpluggler/sketch_layout.cc @@ -0,0 +1,2202 @@ +#include "tools/jotpluggler/app.h" +#include "tools/jotpluggler/car_fingerprint_to_dbc.h" +#include "tools/jotpluggler/common.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/util.h" +#include "third_party/json11/json11.hpp" +#include "tools/replay/logreader.h" +#include "tools/replay/py_downloader.h" + +namespace fs = std::filesystem; + +namespace { + +struct RouteSelection { + std::string dongle_id; + std::string timestamp; + int begin_segment = 0; + int end_segment = -1; + bool slice_explicit = false; + LogSelector selector = LogSelector::Auto; + bool selector_explicit = false; + std::string canonical_name; +}; + +struct SegmentLogs { + std::string rlog; + std::string qlog; + std::string fcamera; + std::string dcamera; + std::string ecamera; + std::string qcamera; +}; + +enum class ScalarKind { + None, + Bool, + Int, + UInt, + Float, + Enum, +}; + +enum class ResolvedNodeKind { + Ignore, + Scalar, + Struct, + List, +}; + +struct ResolvedNode { + ResolvedNodeKind kind = ResolvedNodeKind::Ignore; + ScalarKind scalar_kind = ScalarKind::None; + int fixed_slot = -1; + bool has_field = false; + capnp::StructSchema::Field field; + std::string segment; + std::string path; + bool skip_large_scalar_list = false; + std::vector children; + std::unique_ptr element; +}; + +struct ResolvedService { + uint16_t event_which = 0; + capnp::StructSchema::Field union_field; + std::string service_name; + int valid_slot = -1; + int log_mono_time_slot = -1; + int seconds_slot = -1; + ResolvedNode payload; +}; + +struct SchemaIndex { + std::vector> by_which; + size_t fixed_series_count = 0; + std::vector fixed_paths; + + static const SchemaIndex &instance(); +}; + +constexpr size_t INVALID_DYNAMIC_SLOT = std::numeric_limits::max(); + +struct SeriesAccumulator { + explicit SeriesAccumulator(size_t fixed_count = 0) : fixed_series(fixed_count) {} + + std::vector fixed_series; + std::vector dynamic_series; + std::vector can_messages; + std::unordered_map dynamic_slots; + std::unordered_map> list_scalar_slots; + std::unordered_map can_message_slots; + std::unordered_map enum_info; +}; + +struct LoadedRouteArtifacts { + std::vector series; + std::vector can_messages; + std::vector logs; + std::vector timeline; + std::unordered_map enum_info; +}; + +struct RouteMetadata { + std::string car_fingerprint; +}; + +struct LoadStats { + using Clock = std::chrono::steady_clock; + using TimePoint = Clock::time_point; + + struct SegmentStats { + int segment_number = -1; + std::string log_path; + double download_seconds = 0.0; + double decompress_seconds = 0.0; + double parse_seconds = 0.0; + double extract_seconds = 0.0; + size_t compressed_bytes = 0; + size_t decompressed_bytes = 0; + size_t event_count = 0; + size_t series_count = 0; + bool failed = false; + }; + + explicit LoadStats(const RouteLoadProgressCallback &callback) : progress(callback) {} + + void publish(RouteLoadStage stage, size_t segment_index, const std::string &segment_name) { + if (!progress) { + return; + } + RouteLoadProgress update; + update.stage = stage; + update.segment_index = segment_index; + update.segment_count = segment_count; + update.current = stage == RouteLoadStage::DownloadingSegment + ? segments_downloaded.load() + : segments_parsed.load(); + update.total = total_segments.load(); + update.segments_downloaded = segments_downloaded.load(); + update.segments_parsed = segments_parsed.load(); + update.total_segments = total_segments.load(); + update.bytes_downloaded = bytes_downloaded.load(); + update.num_workers = num_workers; + update.segment_name = segment_name; + std::lock_guard lock(progress_mutex); + progress(update); + } + + void print_summary(size_t final_series_count) const { + const auto secs = [](TimePoint a, TimePoint b) { return std::chrono::duration(b - a).count(); }; + const auto mb = [](size_t bytes) { return static_cast(bytes) / (1024.0 * 1024.0); }; + double dl = 0, dc = 0, pa = 0, ex = 0; + size_t ev = 0, cb = 0, db = 0; + for (const auto &s : segments) { + dl += s.download_seconds; dc += s.decompress_seconds; + pa += s.parse_seconds; ex += s.extract_seconds; + ev += s.event_count; cb += s.compressed_bytes; db += s.decompressed_bytes; + } + std::cerr << std::fixed << std::setprecision(1) + << "route loaded in " << secs(load_start, load_end) << "s (" << segment_count << " segments, " << num_workers << " workers)\n" + << " resolve: " << secs(load_start, resolve_end) << "s fetch: " << dl << "s (" << mb(cb) << " MB)" + << " decompress: " << dc << "s (" << mb(db) << " MB)\n" + << " parse: " << pa << "s (" << ev << " events) extract: " << ex << "s merge: " << secs(merge_start, merge_end) << "s" + << " series: " << final_series_count << " paths\n"; + for (const auto &s : segments) { + std::cerr << " seg " << std::setw(2) << s.segment_number << ": " + << (s.failed ? "FAILED" : std::to_string(s.download_seconds) + "s + " + std::to_string(s.parse_seconds) + + "s (" + std::to_string(s.event_count) + " ev, " + std::to_string(s.series_count) + " series)") << "\n"; + } + std::cerr.unsetf(std::ios::floatfield); + } + + TimePoint load_start; + TimePoint resolve_end; + TimePoint merge_start; + TimePoint merge_end; + TimePoint load_end; + size_t segment_count = 0; + int num_workers = 1; + std::vector segments; + std::atomic segments_downloaded{0}; + std::atomic segments_parsed{0}; + std::atomic total_segments{0}; + std::atomic bytes_downloaded{0}; + RouteLoadProgressCallback progress; + mutable std::mutex progress_mutex; +}; + +std::string curve_label(std::string_view series_name) { + return std::string(series_name.empty() ? std::string_view{"plot"} : series_name); +} + +bool parse_segment_number(std::string_view value, int *out) { + if (value.empty()) return false; + char *end = nullptr; + const long parsed = std::strtol(std::string(value).c_str(), &end, 10); + if (end == nullptr || *end != '\0') return false; + *out = static_cast(parsed); + return true; +} + +bool is_log_selector_char(char c) { + return c == 'a' || c == 'r' || c == 'q'; +} + +LogSelector parse_log_selector_char(char c) { + switch (c) { + case 'r': return LogSelector::RLog; + case 'q': return LogSelector::QLog; + case 'a': + default: return LogSelector::Auto; + } +} + +const std::string &selected_log_path(const SegmentLogs &segment, LogSelector selector) { + switch (selector) { + case LogSelector::RLog: + return segment.rlog; + case LogSelector::QLog: + return segment.qlog; + case LogSelector::Auto: + default: + return !segment.rlog.empty() ? segment.rlog : segment.qlog; + } +} + +RouteSelection parse_route_selection(std::string route_name) { + RouteSelection route = {}; + route_name = util::strip(route_name); + if (route_name.size() >= 2 && route_name[route_name.size() - 2] == '/' + && is_log_selector_char(static_cast(std::tolower(route_name.back())))) { + route.selector = parse_log_selector_char(static_cast(std::tolower(route_name.back()))); + route.selector_explicit = true; + route_name.resize(route_name.size() - 2); + } + static const std::regex pattern(R"(^(([a-z0-9]{16})[|_/])?(.{20})((--|/)((-?\d+(:(-?\d+)?)?)|(:-?\d+)))?$)"); + std::smatch match; + if (!std::regex_match(route_name, match, pattern)) return route; + + route.dongle_id = match[2].str(); + route.timestamp = match[3].str(); + route.canonical_name = route.dongle_id + "|" + route.timestamp; + + const std::string separator = match[5].str(); + const std::string range_str = match[6].str(); + if (!range_str.empty()) { + route.slice_explicit = true; + if (separator == "/") { + size_t pos = range_str.find(':'); + int begin_segment = 0; + if (!parse_segment_number(range_str.substr(0, pos), &begin_segment)) { + return {}; + } + route.begin_segment = begin_segment; + route.end_segment = begin_segment; + if (pos != std::string::npos) { + int end_segment = -1; + const std::string end_str = range_str.substr(pos + 1); + if (!end_str.empty() && !parse_segment_number(end_str, &end_segment)) { + return {}; + } + route.end_segment = end_str.empty() ? -1 : end_segment; + } + } else if (separator == "--") { + int begin_segment = 0; + if (!parse_segment_number(range_str, &begin_segment)) return {}; + route.begin_segment = begin_segment; + } + } + return route; +} + +void add_log_file_to_segments(std::map *segments, int segment_number, const std::string &file) { + std::string name = extractFileName(file); + const size_t pos = name.find_last_of("--"); + name = pos != std::string::npos ? name.substr(pos + 2) : name; + SegmentLogs &segment = (*segments)[segment_number]; + if (name == "rlog.bz2" || name == "rlog.zst" || name == "rlog") { + segment.rlog = file; + } else if (name == "qlog.bz2" || name == "qlog.zst" || name == "qlog") { + segment.qlog = file; + } else if (name == "fcamera.hevc") { + segment.fcamera = file; + } else if (name == "dcamera.hevc") { + segment.dcamera = file; + } else if (name == "ecamera.hevc") { + segment.ecamera = file; + } else if (name == "qcamera.ts") { + segment.qcamera = file; + } +} + +std::map trim_segments(std::map segments, const RouteSelection &route) { + if (route.begin_segment > 0) { + segments.erase(segments.begin(), segments.lower_bound(route.begin_segment)); + } + if (route.end_segment >= 0) { + segments.erase(segments.upper_bound(route.end_segment), segments.end()); + } + return segments; +} + +std::map load_segments_from_json(const json11::Json &json) { + std::map segments; + static const std::regex rx(R"(\/(\d+)\/)"); + for (const auto &value : json.object_items()) { + for (const auto &url : value.second.array_items()) { + const std::string url_str = url.string_value(); + std::smatch match; + if (!std::regex_search(url_str, match, rx)) continue; + add_log_file_to_segments(&segments, std::stoi(match[1].str()), url_str); + } + } + return segments; +} + +std::map load_segments_from_server(const RouteSelection &route) { + const std::string result = PyDownloader::getRouteFiles(route.canonical_name); + if (result.empty()) throw std::runtime_error("Failed to fetch route files for " + route.canonical_name); + + std::string parse_error; + const auto json = json11::Json::parse(result, parse_error); + if (!parse_error.empty()) throw std::runtime_error("Failed to parse route file list for " + route.canonical_name); + if (json.is_object() && json["error"].is_string()) { + throw std::runtime_error("Route API error for " + route.canonical_name + ": " + json["error"].string_value()); + } + return load_segments_from_json(json); +} + +std::map load_segments_from_local(const RouteSelection &route, const std::string &data_dir) { + std::map segments; + const std::string pattern = route.timestamp + "--"; + for (const auto &entry : fs::directory_iterator(data_dir)) { + if (!entry.is_directory()) continue; + const std::string dirname = entry.path().filename().string(); + if (dirname.find(pattern) == std::string::npos) continue; + const size_t marker = dirname.rfind("--"); + if (marker == std::string::npos) continue; + int segment_number = 0; + if (!parse_segment_number(dirname.substr(marker + 2), &segment_number)) { + continue; + } + for (const auto &file : fs::directory_iterator(entry.path())) { + if (file.is_regular_file()) { + add_log_file_to_segments(&segments, segment_number, file.path().string()); + } + } + } + return segments; +} + +RouteIdentifier make_route_identifier(const RouteSelection &route, const std::map &segments) { + RouteIdentifier route_id; + route_id.dongle_id = route.dongle_id; + route_id.log_id = route.timestamp; + route_id.slice_begin = route.begin_segment; + route_id.slice_end = route.end_segment; + route_id.slice_explicit = route.slice_explicit; + route_id.selector = route.selector; + route_id.selector_explicit = route.selector_explicit; + if (!segments.empty()) { + route_id.available_begin = segments.begin()->first; + route_id.available_end = segments.rbegin()->first; + } + return route_id; +} + +std::string detect_dbc_for_fingerprint(std::string_view car_fingerprint) { + return std::string(dbc_for_car_fingerprint(car_fingerprint)); +} + +std::vector available_dbc_names_impl() { + std::set names; + for (const fs::path &dbc_dir : { + repo_root() / "opendbc" / "dbc", + repo_root() / "tools" / "jotpluggler" / "generated_dbcs", + }) { + if (fs::exists(dbc_dir) && fs::is_directory(dbc_dir)) { + for (const auto &entry : fs::directory_iterator(dbc_dir)) { + if (!entry.is_regular_file() || entry.path().extension() != ".dbc") { + continue; + } + names.insert(entry.path().stem().string()); + } + } + } + for (const auto &[_, dbc_name] : kCarFingerprintToDbc) { + if (!dbc_name.empty()) { + names.insert(std::string(dbc_name)); + } + } + return std::vector(names.begin(), names.end()); +} + +fs::path resolve_dbc_path(const std::string &dbc_name) { + for (const fs::path &candidate : { + repo_root() / "opendbc" / "dbc" / (dbc_name + ".dbc"), + repo_root() / "tools" / "jotpluggler" / "generated_dbcs" / (dbc_name + ".dbc"), + }) { + if (fs::exists(candidate)) return candidate; + } + throw std::runtime_error("DBC not found: " + dbc_name); +} + +std::array parse_color(std::string_view color) { + if (!color.empty() && color.front() == '#') { + color.remove_prefix(1); + } + if (color.size() != 6) return {160, 170, 180}; + + std::array out = {}; + for (size_t i = 0; i < 3; ++i) { + const std::string byte(color.substr(i * 2, 2)); + char *end = nullptr; + const long parsed = std::strtol(byte.c_str(), &end, 16); + if (end == nullptr || *end != '\0' || parsed < 0 || parsed > 255) return {160, 170, 180}; + out[i] = static_cast(parsed); + } + return out; +} + +uint8_t android_priority_to_level(uint8_t priority) { + switch (priority) { + case 2: + case 3: + return 10; + case 4: + return 20; + case 5: + return 30; + case 6: + return 40; + case 7: + default: + return 50; + } +} + +uint8_t alert_status_to_level(cereal::SelfdriveState::AlertStatus status) { + switch (status) { + case cereal::SelfdriveState::AlertStatus::NORMAL: + return 20; + case cereal::SelfdriveState::AlertStatus::USER_PROMPT: + return 30; + case cereal::SelfdriveState::AlertStatus::CRITICAL: + return 40; + } + return 20; +} + +TimelineEntry::Type alert_status_to_timeline_type(cereal::SelfdriveState::AlertStatus status, bool enabled) { + if (!enabled) { + return TimelineEntry::Type::None; + } + switch (status) { + case cereal::SelfdriveState::AlertStatus::NORMAL: + return TimelineEntry::Type::Engaged; + case cereal::SelfdriveState::AlertStatus::USER_PROMPT: + return TimelineEntry::Type::AlertInfo; + case cereal::SelfdriveState::AlertStatus::CRITICAL: + return TimelineEntry::Type::AlertCritical; + } + return TimelineEntry::Type::Engaged; +} + +void append_timeline_entry(std::vector *timeline, double mono_time, TimelineEntry::Type type) { + if (timeline == nullptr) { + return; + } + if (!timeline->empty() && timeline->back().type == type) { + timeline->back().end_time = std::max(timeline->back().end_time, mono_time); + return; + } + timeline->push_back(TimelineEntry{ + .start_time = mono_time, + .end_time = mono_time, + .type = type, + }); +} + +double android_wall_time_seconds(uint64_t timestamp) { + if (timestamp == 0) return 0.0; + if (timestamp > 1000000000000ULL) return static_cast(timestamp) / 1.0e9; + if (timestamp > 1000000000ULL) return static_cast(timestamp) / 1.0e6; + return static_cast(timestamp); +} + +std::optional json_u64_value(const json11::Json &value) { + if (value.is_number()) { + const double number = value.number_value(); + if (number >= 0.0) return static_cast(number); + } + if (value.is_string()) { + try { + return static_cast(std::stoull(value.string_value())); + } catch (...) { + } + } + return std::nullopt; +} + +std::optional json_int_value(const json11::Json &value) { + if (value.is_number()) return value.int_value(); + if (value.is_string()) { + try { + return std::stoi(value.string_value()); + } catch (...) { + } + } + return std::nullopt; +} + +std::string json_value_for_log(const json11::Json &value) { + if (value.is_string()) return value.string_value(); + if (value.is_bool()) return value.bool_value() ? "true" : "false"; + return value.dump(); +} + +std::string format_journal_context(const json11::Json &parsed, int pid, int tid) { + std::vector lines; + if (pid != 0 || tid != 0) { + lines.push_back("pid=" + std::to_string(pid) + ", tid=" + std::to_string(tid)); + } + + const std::array preferred_keys = { + "_HOSTNAME", + "_TRANSPORT", + "PRIORITY", + "SYSLOG_FACILITY", + "__MONOTONIC_TIMESTAMP", + }; + for (const char *key : preferred_keys) { + const json11::Json &value = parsed[key]; + if (!value.is_null()) { + lines.push_back(std::string(key) + "=" + json_value_for_log(value)); + } + } + return join(lines, "\n"); +} + +std::string alert_message_text(const cereal::SelfdriveState::Reader &state) { + std::string text = state.getAlertText1().cStr(); + const std::string text2 = state.getAlertText2().cStr(); + if (!text2.empty()) { + text += " - " + text2; + } + return text; +} + +bool same_log_entry(const LogEntry &a, const LogEntry &b) { + return a.mono_time == b.mono_time + && a.level == b.level + && a.source == b.source + && a.func == b.func + && a.message == b.message + && a.context == b.context + && a.origin == b.origin; +} + +void append_log_event(cereal::Event::Which which, + const cereal::Event::Reader &event, + double time_offset, + std::vector *logs, + std::string *last_alert_key) { + const double boot_time = static_cast(event.getLogMonoTime()) / 1.0e9; + const double mono_time = boot_time - time_offset; + + auto make_entry = [&](LogOrigin origin, uint8_t level = 20) { + LogEntry e; + e.mono_time = mono_time; + e.boot_time = boot_time; + e.origin = origin; + e.level = level; + return e; + }; + + switch (which) { + case cereal::Event::Which::LOG_MESSAGE: + case cereal::Event::Which::ERROR_LOG_MESSAGE: { + const std::string raw = which == cereal::Event::Which::LOG_MESSAGE + ? event.getLogMessage().cStr() : event.getErrorLogMessage().cStr(); + auto entry = make_entry(LogOrigin::Log, which == cereal::Event::Which::ERROR_LOG_MESSAGE ? 40 : 20); + entry.source = "log"; + entry.message = raw; + std::string err; + if (const auto p = json11::Json::parse(raw, err); err.empty() && p.is_object()) { + entry.wall_time = p["created"].number_value(); + if (p["levelnum"].is_number()) entry.level = static_cast(p["levelnum"].int_value()); + const std::string fn = p["filename"].string_value(); + const int ln = p["lineno"].is_number() ? p["lineno"].int_value() : 0; + entry.source = fn.empty() ? "log" : fn + (ln > 0 ? ":" + std::to_string(ln) : ""); + entry.func = p["funcname"].string_value(); + if (p["msg"].is_string()) entry.message = p["msg"].string_value(); + if (!p["ctx"].is_null()) entry.context = p["ctx"].dump(); + } + logs->push_back(std::move(entry)); + break; + } + case cereal::Event::Which::ANDROID_LOG: { + const auto android = event.getAndroidLog(); + auto entry = make_entry(LogOrigin::Android, android_priority_to_level(android.getPriority())); + entry.wall_time = android_wall_time_seconds(android.getTs()); + entry.source = android.hasTag() ? android.getTag().cStr() : "android"; + entry.message = android.hasMessage() ? android.getMessage().cStr() : std::string(); + entry.context = "pid=" + std::to_string(android.getPid()) + ", tid=" + std::to_string(android.getTid()); + if (!entry.message.empty()) { + std::string err; + if (const auto p = json11::Json::parse(entry.message, err); err.empty() && p.is_object()) { + if (p["MESSAGE"].is_string()) entry.message = p["MESSAGE"].string_value(); + if (p["SYSLOG_IDENTIFIER"].is_string() && !p["SYSLOG_IDENTIFIER"].string_value().empty()) + entry.source = p["SYSLOG_IDENTIFIER"].string_value(); + if (auto pri = json_int_value(p["PRIORITY"]); pri.has_value()) + entry.level = android_priority_to_level(*pri); + if (auto ts = json_u64_value(p["__REALTIME_TIMESTAMP"]); ts.has_value()) + entry.wall_time = android_wall_time_seconds(*ts); + entry.context = format_journal_context(p, android.getPid(), android.getTid()); + } + } + logs->push_back(std::move(entry)); + break; + } + case cereal::Event::Which::SELFDRIVE_STATE: { + const auto sd = event.getSelfdriveState(); + const std::string alert_type = sd.getAlertType().cStr(); + const std::string alert_text1 = sd.getAlertText1().cStr(); + if (alert_text1.empty() && alert_type.empty()) break; + const std::string key = alert_type + "\n" + alert_text1 + "\n" + std::string(sd.getAlertText2().cStr()); + if (last_alert_key != nullptr && key == *last_alert_key) break; + if (last_alert_key != nullptr) *last_alert_key = key; + auto entry = make_entry(LogOrigin::Alert, alert_status_to_level(sd.getAlertStatus())); + entry.source = "alert"; + entry.func = alert_type; + entry.message = alert_message_text(sd); + logs->push_back(std::move(entry)); + break; + } + default: + break; + } +} + +std::vector extract_segment_timeline(const std::vector &events) { + std::vector timeline; + timeline.reserve(events.size() / 16); + + for (const Event &event_record : events) { + if (event_record.which != cereal::Event::Which::SELFDRIVE_STATE) { + continue; + } + capnp::FlatArrayMessageReader event_reader(event_record.data); + const cereal::Event::Reader event = event_reader.getRoot(); + const auto sd = event.getSelfdriveState(); + const double mono_time = static_cast(event.getLogMonoTime()) / 1.0e9; + append_timeline_entry(&timeline, mono_time, alert_status_to_timeline_type(sd.getAlertStatus(), sd.getEnabled())); + } + + return timeline; +} + +std::vector extract_segment_logs(const std::vector &events) { + std::vector logs; + logs.reserve(events.size() / 8); + std::string last_alert_key; + + for (const Event &event_record : events) { + capnp::FlatArrayMessageReader event_reader(event_record.data); + const cereal::Event::Reader event = event_reader.getRoot(); + append_log_event(event_record.which, event, 0.0, &logs, &last_alert_key); + } + + return logs; +} + +RouteMetadata extract_segment_metadata(const std::vector &events) { + RouteMetadata metadata; + for (const Event &event_record : events) { + if (event_record.which != cereal::Event::Which::CAR_PARAMS) continue; + capnp::FlatArrayMessageReader event_reader(event_record.data); + const cereal::Event::Reader event = event_reader.getRoot(); + metadata.car_fingerprint = event.getCarParams().getCarFingerprint().cStr(); + if (!metadata.car_fingerprint.empty()) break; + } + return metadata; +} + +RouteMetadata detect_route_metadata(const std::map &segments, LogSelector selector) { + for (const auto &[_, segment] : segments) { + const std::string &log_path = selector == LogSelector::Auto + ? (!segment.qlog.empty() ? segment.qlog : segment.rlog) + : selected_log_path(segment, selector); + if (log_path.empty()) { + continue; + } + LogReader reader; + if (!reader.load(log_path, nullptr, true)) continue; + RouteMetadata metadata = extract_segment_metadata(reader.events); + if (!metadata.car_fingerprint.empty()) return metadata; + } + return {}; +} + +std::vector normalize_sizes(const json11::Json &sizes_json, size_t child_count) { + std::vector parsed; + if (sizes_json.is_array()) { + for (const json11::Json &value : sizes_json.array_items()) { + if (value.is_number()) { + parsed.push_back(std::max(value.number_value(), 0.0)); + } + } + } + + if (parsed.size() != child_count || child_count == 0) return std::vector(child_count, child_count == 0 ? 0.0 : 1.0 / static_cast(child_count)); + + const double total = std::accumulate(parsed.begin(), parsed.end(), 0.0); + if (total <= 0.0) return std::vector(child_count, 1.0 / static_cast(child_count)); + for (double &value : parsed) { + value /= total; + } + return parsed; +} + +PlotRange parse_range(const json11::Json &pane_node) { + PlotRange range; + const json11::Json &range_node = pane_node["range"]; + if (range_node.is_object()) { + range.valid = true; + range.left = range_node["left"].number_value(); + range.right = range_node["right"].number_value(); + range.bottom = range_node["bottom"].number_value(); + range.top = range_node["top"].is_number() ? range_node["top"].number_value() : 1.0; + } + const json11::Json &limit_y_node = pane_node["y_limits"]; + if (limit_y_node.is_object()) { + if (limit_y_node["min"].is_number()) { + range.has_y_limit_min = true; + range.y_limit_min = limit_y_node["min"].number_value(); + } + if (limit_y_node["max"].is_number()) { + range.has_y_limit_max = true; + range.y_limit_max = limit_y_node["max"].number_value(); + } + } + return range; +} + +Curve parse_curve(const json11::Json &curve_node) { + Curve curve; + curve.name = curve_node["name"].string_value(); + curve.label = curve_label(curve.name); + curve.color = parse_color(curve_node["color"].string_value()); + + const std::string transform_name = curve_node["transform"].string_value(); + if (transform_name == "derivative") { + curve.derivative = true; + curve.derivative_dt = curve_node["derivative_dt"].is_number() ? curve_node["derivative_dt"].number_value() : 0.0; + } else if (transform_name == "scale") { + curve.value_scale = curve_node["scale"].is_number() ? curve_node["scale"].number_value() : 1.0; + curve.value_offset = curve_node["offset"].is_number() ? curve_node["offset"].number_value() : 0.0; + } + const json11::Json &custom_node = curve_node["custom_python"]; + if (custom_node.is_object()) { + CustomPythonSeries spec; + spec.linked_source = custom_node["linked_source"].string_value(); + spec.globals_code = custom_node["globals_code"].string_value(); + spec.function_code = custom_node["function_code"].string_value(); + for (const json11::Json &source : custom_node["additional_sources"].array_items()) { + if (source.is_string()) { + spec.additional_sources.push_back(source.string_value()); + } + } + curve.custom_python = std::move(spec); + } + return curve; +} + +std::string pane_title(const json11::Json &dock_area_node) { + const std::string raw = dock_area_node["title"].string_value(); + return raw.empty() ? "..." : raw; +} + +Pane parse_dock_area(const json11::Json &dock_area_node) { + Pane pane; + const std::string kind = dock_area_node["kind"].string_value(); + if (kind == "map") { + pane.kind = PaneKind::Map; + } else if (kind == "camera") { + pane.kind = PaneKind::Camera; + const std::string camera_view = dock_area_node["camera_view"].string_value(); + if (const CameraViewSpec *spec = camera_view_spec_from_layout_name(camera_view)) { + pane.camera_view = spec->view; + } else { + pane.camera_view = CameraViewKind::Road; + } + } + pane.range = parse_range(dock_area_node); + const json11::Json &curves_node = dock_area_node["curves"]; + if (curves_node.is_array()) { + for (const json11::Json &curve_node : curves_node.array_items()) { + if (curve_node.is_object()) { + pane.curves.push_back(parse_curve(curve_node)); + } + } + } + pane.title = pane_title(dock_area_node); + return pane; +} + +WorkspaceNode parse_workspace_node(const json11::Json &node, WorkspaceTab *tab) { + WorkspaceNode workspace_node; + if (!node.is_object()) return workspace_node; + + if (node["curves"].is_array()) { + workspace_node.is_pane = true; + workspace_node.pane_index = static_cast(tab->panes.size()); + tab->panes.push_back(parse_dock_area(node)); + return workspace_node; + } + + const json11::Json &children_node = node["children"]; + if (!children_node.is_array()) return workspace_node; + + const std::vector children = children_node.array_items(); + if (children.empty()) return workspace_node; + + const std::string split = node["split"].string_value(); + workspace_node.orientation = split == "vertical" ? SplitOrientation::Vertical : SplitOrientation::Horizontal; + const std::vector sizes = normalize_sizes(node["sizes"], children.size()); + workspace_node.sizes.reserve(sizes.size()); + workspace_node.children.reserve(children.size()); + for (size_t i = 0; i < children.size(); ++i) { + workspace_node.sizes.push_back(static_cast(sizes[i])); + workspace_node.children.push_back(parse_workspace_node(children[i], tab)); + } + return workspace_node; +} + +WorkspaceTab parse_tab(const json11::Json &tab, const fs::path &layout_path) { + WorkspaceTab workspace_tab; + workspace_tab.tab_name = tab["name"].string_value().empty() ? "tab1" : tab["name"].string_value(); + const json11::Json &dock_root = tab["root"]; + if (!dock_root.is_object()) throw std::runtime_error("Layout tab has no dock content: " + layout_path.string()); + workspace_tab.root = parse_workspace_node(dock_root, &workspace_tab); + return workspace_tab; +} + +SketchLayout parse_layout(const fs::path &layout_path) { + const std::string text = util::read_file(layout_path.string()); + if (text.empty()) throw std::runtime_error("Failed to read layout JSON: " + layout_path.string()); + + std::string parse_error; + const json11::Json root = json11::Json::parse(text, parse_error); + if (!parse_error.empty() || !root.is_object()) { + throw std::runtime_error("Failed to parse layout JSON: " + layout_path.string()); + } + SketchLayout layout; + for (const json11::Json &tab : root["tabs"].array_items()) { + if (tab.is_object()) { + layout.tabs.push_back(parse_tab(tab, layout_path)); + } + } + if (layout.tabs.empty()) throw std::runtime_error("Layout has no tabs: " + layout_path.string()); + const json11::Json &tab_index = root["current_tab_index"].is_number() ? root["current_tab_index"] : root["currentTabIndex"]; + layout.current_tab_index = std::clamp(tab_index.is_number() ? tab_index.int_value() : 0, + 0, + static_cast(layout.tabs.size()) - 1); + return layout; +} + +ScalarKind scalar_kind_for_type(const capnp::Type &type) { + if (type.isBool()) return ScalarKind::Bool; + if (type.isInt8() || type.isInt16() || type.isInt32() || type.isInt64()) { + return ScalarKind::Int; + } + if (type.isUInt8() || type.isUInt16() || type.isUInt32() || type.isUInt64()) { + return ScalarKind::UInt; + } + if (type.isFloat32() || type.isFloat64()) { + return ScalarKind::Float; + } + if (type.isEnum()) return ScalarKind::Enum; + return ScalarKind::None; +} + +ResolvedNode build_resolved_type(const capnp::Type &type, + bool has_field, + capnp::StructSchema::Field field, + std::string segment, + std::string path, + size_t *next_fixed_slot, + std::vector *fixed_paths, + bool dynamic_path = false) { + ResolvedNode node; + node.has_field = has_field; + node.field = field; + node.segment = std::move(segment); + node.path = std::move(path); + node.scalar_kind = scalar_kind_for_type(type); + if (node.scalar_kind != ScalarKind::None) { + node.kind = ResolvedNodeKind::Scalar; + if (!dynamic_path) { + node.fixed_slot = static_cast((*next_fixed_slot)++); + fixed_paths->push_back(node.path); + } + return node; + } + + if (type.isStruct()) { + node.kind = ResolvedNodeKind::Struct; + for (auto child : type.asStruct().getFields()) { + const std::string child_segment = child.getProto().getName().cStr(); + node.children.push_back(build_resolved_type( + child.getType(), + true, + child, + child_segment, + node.path + "/" + child_segment, + next_fixed_slot, + fixed_paths, + dynamic_path)); + } + return node; + } + + if (type.isList()) { + const capnp::Type element_type = type.asList().getElementType(); + if (element_type.isText() || element_type.isData() || element_type.isInterface() || element_type.isAnyPointer()) { + node.kind = ResolvedNodeKind::Ignore; + return node; + } + node.kind = ResolvedNodeKind::List; + node.skip_large_scalar_list = scalar_kind_for_type(element_type) != ScalarKind::None; + node.element = std::make_unique( + build_resolved_type(element_type, + false, + capnp::StructSchema::Field(), + "", + node.path, + next_fixed_slot, + fixed_paths, + true)); + return node; + } + + node.kind = ResolvedNodeKind::Ignore; + return node; +} + +int register_fixed_series_path(const std::string &path, + size_t *next_fixed_slot, + std::vector *fixed_paths) { + const int slot = static_cast((*next_fixed_slot)++); + fixed_paths->push_back(path); + return slot; +} + +const SchemaIndex &SchemaIndex::instance() { + static const SchemaIndex index = [] { + SchemaIndex out; + const auto event_schema = capnp::Schema::from().asStruct(); + uint16_t max_discriminant = 0; + for (auto union_field : event_schema.getUnionFields()) { + max_discriminant = std::max(max_discriminant, union_field.getProto().getDiscriminantValue()); + } + out.by_which.resize(static_cast(max_discriminant) + 1); + size_t next_fixed_slot = 0; + for (auto union_field : event_schema.getUnionFields()) { + ResolvedService service; + service.event_which = union_field.getProto().getDiscriminantValue(); + service.union_field = union_field; + service.service_name = union_field.getProto().getName().cStr(); + service.valid_slot = register_fixed_series_path( + "/" + service.service_name + "/valid", &next_fixed_slot, &out.fixed_paths); + service.log_mono_time_slot = register_fixed_series_path( + "/" + service.service_name + "/logMonoTime", &next_fixed_slot, &out.fixed_paths); + service.seconds_slot = register_fixed_series_path( + "/" + service.service_name + "/t", &next_fixed_slot, &out.fixed_paths); + service.payload = build_resolved_type( + union_field.getType(), + false, + capnp::StructSchema::Field(), + service.service_name, + "/" + service.service_name, + &next_fixed_slot, + &out.fixed_paths); + out.by_which[service.event_which] = std::move(service); + } + out.fixed_series_count = next_fixed_slot; + return out; + }(); + return index; +} + +bool is_absolute_curve(const std::string &name) { + return !name.empty() && name.front() == '/'; +} + +std::optional scalar_value_to_double(const capnp::DynamicValue::Reader &value, ScalarKind kind) { + switch (kind) { + case ScalarKind::Bool: + return value.as() ? 1.0 : 0.0; + case ScalarKind::Int: + return static_cast(value.as()); + case ScalarKind::UInt: + return static_cast(value.as()); + case ScalarKind::Float: + return value.as(); + case ScalarKind::Enum: + return static_cast(value.as().getRaw()); + case ScalarKind::None: + return std::nullopt; + } + return std::nullopt; +} + +void capture_enum_info(const std::string &path, + const capnp::DynamicValue::Reader &value, + SeriesAccumulator *series) { + if (series->enum_info.find(path) != series->enum_info.end()) { + return; + } + + const auto dynamic_enum = value.as(); + EnumInfo info; + for (auto enumerant : dynamic_enum.getSchema().getEnumerants()) { + const uint16_t ordinal = enumerant.getOrdinal(); + if (ordinal >= info.names.size()) { + info.names.resize(static_cast(ordinal) + 1); + } + info.names[ordinal] = enumerant.getProto().getName().cStr(); + } + if (!info.names.empty()) { + series->enum_info.emplace(path, std::move(info)); + } +} + +void append_scalar_point(RouteSeries *series, + const std::string &path, + double tm, + double value) { + if (series->path.empty()) { + series->path = path; + } + series->times.push_back(tm); + series->values.push_back(value); +} + +void append_fixed_scalar_point(RouteSeries *series, double tm, double value) { + series->times.push_back(tm); + series->values.push_back(value); +} + +CanMessageData *ensure_can_message(CanServiceKind service, uint8_t bus, uint32_t address, SeriesAccumulator *series) { + const CanMessageId id{service, bus, address}; + auto [it, inserted] = series->can_message_slots.try_emplace(id, series->can_messages.size()); + if (inserted) { + series->can_messages.push_back(CanMessageData{.id = id}); + } + return &series->can_messages[it->second]; +} + +void append_can_frame(CanServiceKind service, + uint8_t bus, + uint32_t address, + uint16_t bus_time, + capnp::Data::Reader dat, + double tm, + SeriesAccumulator *series) { + CanMessageData *message = ensure_can_message(service, bus, address, series); + message->samples.push_back(CanFrameSample{ + .mono_time = tm, + .bus_time = bus_time, + .data = std::string(reinterpret_cast(dat.begin()), dat.size()), + }); +} + +void append_dynamic_scalar_point(const std::string &path, double tm, double value, SeriesAccumulator *series); + +void decode_can_frame(const dbc::Database *can_dbc, + const std::string &service_name, + uint8_t bus, + uint32_t address, + const uint8_t *raw, + size_t data_size, + double tm, + SeriesAccumulator *series) { + if (can_dbc == nullptr) { + return; + } + const dbc::Message *message = can_dbc->message(address); + if (message == nullptr) { + return; + } + const std::string base_path = "/" + service_name + "/" + std::to_string(bus) + "/" + message->name; + for (const dbc::Signal &signal : message->signals) { + std::optional value = dbc::signalValue(signal, *message, raw, data_size); + if (!value.has_value()) continue; + const std::string path = base_path + "/" + signal.name; + append_dynamic_scalar_point(path, tm, *value, series); + if (series->enum_info.find(path) == series->enum_info.end()) { + std::vector enum_names = can_dbc->enumNames(signal); + if (!enum_names.empty()) { + series->enum_info.emplace(path, EnumInfo{.names = std::move(enum_names)}); + } + } + } +} + +void append_live_can_frame(CanServiceKind service, + const LiveCanFrame &frame, + double time_offset, + const dbc::Database *can_dbc, + SeriesAccumulator *series) { + const double tm = frame.mono_time - time_offset; + CanMessageData *message = ensure_can_message(service, frame.bus, frame.address, series); + message->samples.push_back(CanFrameSample{ + .mono_time = tm, + .bus_time = frame.bus_time, + .data = frame.data, + }); + decode_can_frame(can_dbc, + service == CanServiceKind::Can ? "can" : "sendcan", + frame.bus, + frame.address, + reinterpret_cast(frame.data.data()), + frame.data.size(), + tm, + series); +} + +SeriesAccumulator make_series_accumulator(const SchemaIndex &schema) { + SeriesAccumulator out(schema.fixed_series_count); + for (size_t i = 0; i < schema.fixed_paths.size(); ++i) { + out.fixed_series[i].path = schema.fixed_paths[i]; + } + return out; +} + +size_t ensure_dynamic_slot(const std::string &path, SeriesAccumulator *series) { + auto [it, inserted] = series->dynamic_slots.try_emplace(path, series->dynamic_series.size()); + if (inserted) { + series->dynamic_series.push_back(RouteSeries{it->first}); + } + return it->second; +} + +RouteSeries *ensure_dynamic_series(const std::string &path, SeriesAccumulator *series) { + return &series->dynamic_series[ensure_dynamic_slot(path, series)]; +} + +RouteSeries *ensure_list_scalar_series(const std::string &base_path, size_t index, SeriesAccumulator *series) { + auto [it, _] = series->list_scalar_slots.try_emplace(base_path); + std::vector &slots = it->second; + if (slots.size() <= index) { + slots.resize(index + 1, INVALID_DYNAMIC_SLOT); + } + if (slots[index] == INVALID_DYNAMIC_SLOT) { + slots[index] = ensure_dynamic_slot(base_path + "/" + std::to_string(index), series); + } + return &series->dynamic_series[slots[index]]; +} + +void append_dynamic_scalar_point(const std::string &path, double tm, double value, SeriesAccumulator *series) { + append_scalar_point(ensure_dynamic_series(path, series), path, tm, value); +} + +void append_scalar_value(const ResolvedNode &node, + const std::string *path_override, + const capnp::DynamicValue::Reader &raw_value, + double tm, + double value, + SeriesAccumulator *series) { + if (path_override == nullptr && node.fixed_slot >= 0) { + if (node.scalar_kind == ScalarKind::Enum) { + capture_enum_info(node.path, raw_value, series); + } + append_fixed_scalar_point(&series->fixed_series[static_cast(node.fixed_slot)], tm, value); + return; + } + + const std::string &path = path_override != nullptr ? *path_override : node.path; + if (node.scalar_kind == ScalarKind::Enum) { + capture_enum_info(path, raw_value, series); + } + append_dynamic_scalar_point(path, tm, value, series); +} + +void append_fast_node(const ResolvedNode &node, + const capnp::DynamicValue::Reader &value, + double tm, + SeriesAccumulator *series, + const std::string *path_override = nullptr) { + switch (node.kind) { + case ResolvedNodeKind::Scalar: { + if (std::optional scalar = scalar_value_to_double(value, node.scalar_kind); scalar.has_value()) { + append_scalar_value(node, path_override, value, tm, *scalar, series); + } + return; + } + case ResolvedNodeKind::Struct: { + const capnp::DynamicStruct::Reader reader = value.as(); + for (const ResolvedNode &child : node.children) { + if (!child.has_field || !reader.has(child.field)) continue; + if (path_override == nullptr) { + append_fast_node(child, reader.get(child.field), tm, series, nullptr); + } else { + const std::string child_path = child.segment.empty() ? *path_override : (*path_override + "/" + child.segment); + append_fast_node(child, reader.get(child.field), tm, series, &child_path); + } + } + return; + } + case ResolvedNodeKind::List: { + if (!node.element) { + return; + } + const capnp::DynamicList::Reader list = value.as(); + if (list.size() == 0) { + return; + } + if (node.skip_large_scalar_list && list.size() > 16) { + return; + } + const std::string &base_path = path_override != nullptr ? *path_override : node.path; + if (node.element->kind == ResolvedNodeKind::Scalar) { + for (uint i = 0; i < list.size(); ++i) { + if (std::optional scalar = scalar_value_to_double(list[i], node.element->scalar_kind); scalar.has_value()) { + RouteSeries *item_series = ensure_list_scalar_series(base_path, i, series); + if (node.element->scalar_kind == ScalarKind::Enum && !item_series->path.empty()) { + capture_enum_info(item_series->path, list[i], series); + } + append_fixed_scalar_point(item_series, tm, *scalar); + } + } + return; + } + for (uint i = 0; i < list.size(); ++i) { + const std::string item_path = base_path + "/" + std::to_string(i); + append_fast_node(*node.element, list[i], tm, series, &item_path); + } + return; + } + case ResolvedNodeKind::Ignore: + return; + } +} + +void append_event_fast(cereal::Event::Which which, + int32_t eidx_segnum, + kj::ArrayPtr data, + const SchemaIndex &schema, + const dbc::Database *can_dbc, + bool skip_raw_can, + double time_offset, + SeriesAccumulator *series) { + if (eidx_segnum != -1) { + return; + } + const uint16_t which_index = static_cast(which); + if (which_index >= schema.by_which.size() || !schema.by_which[which_index].has_value()) { + return; + } + const ResolvedService &service = *schema.by_which[which_index]; + capnp::FlatArrayMessageReader event_reader(data); + const cereal::Event::Reader event = event_reader.getRoot(); + const double tm = static_cast(event.getLogMonoTime()) / 1.0e9 - time_offset; + append_fixed_scalar_point(&series->fixed_series[static_cast(service.valid_slot)], + tm, + event.getValid() ? 1.0 : 0.0); + append_fixed_scalar_point(&series->fixed_series[static_cast(service.log_mono_time_slot)], + tm, + static_cast(event.getLogMonoTime())); + append_fixed_scalar_point(&series->fixed_series[static_cast(service.seconds_slot)], + tm, + tm); + if (service.service_name == "can" || service.service_name == "sendcan") { + const CanServiceKind can_service = service.service_name == "can" + ? CanServiceKind::Can + : CanServiceKind::Sendcan; + auto decode_message = [&](uint8_t bus, uint32_t address, const auto &dat_reader) { + const auto bytes = dat_reader.begin(); + decode_can_frame(can_dbc, service.service_name, bus, address, bytes, dat_reader.size(), tm, series); + }; + if (service.service_name == "can") { + for (const auto &msg : event.getCan()) { + append_can_frame(can_service, + static_cast(msg.getSrc()), + msg.getAddress(), + msg.getBusTimeDEPRECATED(), + msg.getDat(), + tm, + series); + if (!skip_raw_can) continue; + decode_message(static_cast(msg.getSrc()), msg.getAddress(), msg.getDat()); + } + } else { + for (const auto &msg : event.getSendcan()) { + append_can_frame(can_service, + static_cast(msg.getSrc()), + msg.getAddress(), + msg.getBusTimeDEPRECATED(), + msg.getDat(), + tm, + series); + if (!skip_raw_can) continue; + decode_message(static_cast(msg.getSrc()), msg.getAddress(), msg.getDat()); + } + } + if (skip_raw_can) { + return; + } + } + + const capnp::DynamicStruct::Reader dynamic_event(event); + append_fast_node(service.payload, dynamic_event.get(service.union_field), tm, series); +} + +void append_events_fast_range(const std::vector &events, + size_t begin, + size_t end, + const SchemaIndex &schema, + const dbc::Database *can_dbc, + bool skip_raw_can, + SeriesAccumulator *series) { + for (size_t i = begin; i < end; ++i) { + const Event &event_record = events[i]; + append_event_fast(event_record.which, + event_record.eidx_segnum, + event_record.data, + schema, + can_dbc, + skip_raw_can, + 0.0, + series); + } +} + +void merge_route_series(RouteSeries *dst, RouteSeries *src) { + if (src->times.empty()) { + return; + } + if (dst->times.empty()) { + *dst = std::move(*src); + return; + } + + dst->times.reserve(dst->times.size() + src->times.size()); + dst->values.reserve(dst->values.size() + src->values.size()); + dst->times.insert(dst->times.end(), src->times.begin(), src->times.end()); + dst->values.insert(dst->values.end(), src->values.begin(), src->values.end()); +} + +void merge_can_message_data(CanMessageData *dst, CanMessageData *src) { + if (src->samples.empty()) { + return; + } + if (dst->samples.empty()) { + *dst = std::move(*src); + return; + } + dst->samples.reserve(dst->samples.size() + src->samples.size()); + dst->samples.insert(dst->samples.end(), + std::make_move_iterator(src->samples.begin()), + std::make_move_iterator(src->samples.end())); +} + +void merge_series_accumulator(SeriesAccumulator *dst, SeriesAccumulator *src) { + if (dst->fixed_series.size() != src->fixed_series.size()) { + throw std::runtime_error("Fixed-series slot count mismatch during merge"); + } + + for (size_t i = 0; i < dst->fixed_series.size(); ++i) { + merge_route_series(&dst->fixed_series[i], &src->fixed_series[i]); + } + for (auto &series : src->dynamic_series) { + if (series.path.empty()) continue; + RouteSeries &dst_series = dst->dynamic_series[ensure_dynamic_slot(series.path, dst)]; + merge_route_series(&dst_series, &series); + } + for (auto &message : src->can_messages) { + CanMessageData &dst_message = *ensure_can_message(message.id.service, message.id.bus, message.id.address, dst); + merge_can_message_data(&dst_message, &message); + } + for (auto &[path, info] : src->enum_info) { + dst->enum_info.try_emplace(path, std::move(info)); + } +} + +size_t populated_series_count(const SeriesAccumulator &series) { + size_t count = 0; + for (const RouteSeries &fixed : series.fixed_series) { + count += !fixed.times.empty(); + } + for (const RouteSeries &dynamic : series.dynamic_series) { + count += !dynamic.times.empty(); + } + return count; +} + +bool series_is_sorted(const RouteSeries &series) { + for (size_t i = 1; i < series.times.size(); ++i) { + if (series.times[i] < series.times[i - 1]) return false; + } + return true; +} + +void sort_series_by_time(RouteSeries *series) { + if (series->times.size() <= 1 || series_is_sorted(*series)) { + return; + } + std::vector order(series->times.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), [&](size_t a, size_t b) { + return series->times[a] < series->times[b]; + }); + + std::vector sorted_times(series->times.size()); + std::vector sorted_values(series->values.size()); + for (size_t i = 0; i < order.size(); ++i) { + sorted_times[i] = series->times[order[i]]; + sorted_values[i] = series->values[order[i]]; + } + series->times = std::move(sorted_times); + series->values = std::move(sorted_values); +} + +std::vector collect_series(SeriesAccumulator &&series) { + std::vector out; + out.reserve(series.fixed_series.size() + series.dynamic_series.size()); + for (auto &fixed : series.fixed_series) { + sort_series_by_time(&fixed); + if (!fixed.times.empty()) { + out.push_back(std::move(fixed)); + } + } + for (auto &dynamic : series.dynamic_series) { + sort_series_by_time(&dynamic); + if (!dynamic.times.empty()) { + out.push_back(std::move(dynamic)); + } + } + return out; +} + +RouteData build_route_data(std::vector &&series_list, + std::vector &&can_messages, + std::vector &&logs, + std::vector &&timeline, + std::unordered_map &&enum_info, + std::string car_fingerprint, + std::string dbc_name) { + RouteData route_data; + route_data.series.reserve(series_list.size()); + route_data.paths.reserve(series_list.size()); + for (RouteSeries &series : series_list) { + if (series.times.empty()) continue; + route_data.has_time_range = true; + route_data.x_min = route_data.series.empty() ? series.times.front() : std::min(route_data.x_min, series.times.front()); + route_data.x_max = route_data.series.empty() ? series.times.back() : std::max(route_data.x_max, series.times.back()); + route_data.paths.push_back(series.path); + route_data.series.push_back(std::move(series)); + } + + std::sort(route_data.paths.begin(), route_data.paths.end()); + std::sort(route_data.series.begin(), route_data.series.end(), [](const RouteSeries &a, const RouteSeries &b) { + return a.path < b.path; + }); + std::sort(logs.begin(), logs.end(), [](const LogEntry &a, const LogEntry &b) { + return a.mono_time < b.mono_time; + }); + logs.erase(std::unique(logs.begin(), logs.end(), [](const LogEntry &a, const LogEntry &b) { + return same_log_entry(a, b); + }), + logs.end()); + + std::vector deduped_logs; + deduped_logs.reserve(logs.size()); + for (LogEntry &entry : logs) { + if (!deduped_logs.empty() + && entry.origin == LogOrigin::Alert + && deduped_logs.back().origin == LogOrigin::Alert + && deduped_logs.back().func == entry.func + && deduped_logs.back().message == entry.message) { + continue; + } + deduped_logs.push_back(std::move(entry)); + } + route_data.logs = std::move(deduped_logs); + + if (!route_data.has_time_range && !route_data.logs.empty()) { + route_data.has_time_range = true; + route_data.x_min = route_data.logs.front().mono_time; + route_data.x_max = route_data.logs.back().mono_time; + } + if (!route_data.has_time_range) { + bool initialized = false; + for (const CanMessageData &message : can_messages) { + if (message.samples.empty()) continue; + if (!initialized) { + route_data.x_min = message.samples.front().mono_time; + route_data.x_max = message.samples.back().mono_time; + initialized = true; + } else { + route_data.x_min = std::min(route_data.x_min, message.samples.front().mono_time); + route_data.x_max = std::max(route_data.x_max, message.samples.back().mono_time); + } + } + route_data.has_time_range = initialized; + } + if (!route_data.has_time_range && !timeline.empty()) { + route_data.has_time_range = true; + route_data.x_min = timeline.front().start_time; + route_data.x_max = timeline.back().end_time; + } + + if (route_data.has_time_range) { + const double time_offset = route_data.x_min; + for (RouteSeries &series : route_data.series) { + for (double &tm : series.times) { + tm -= time_offset; + } + } + for (LogEntry &entry : route_data.logs) { + entry.boot_time = entry.mono_time; + entry.mono_time -= time_offset; + } + for (CanMessageData &message : can_messages) { + for (CanFrameSample &sample : message.samples) { + sample.mono_time -= time_offset; + } + } + for (TimelineEntry &entry : timeline) { + entry.start_time -= time_offset; + entry.end_time -= time_offset; + } + route_data.x_max -= time_offset; + route_data.x_min = 0.0; + } + + std::sort(timeline.begin(), timeline.end(), [](const TimelineEntry &a, const TimelineEntry &b) { + return a.start_time < b.start_time; + }); + std::vector merged_timeline; + merged_timeline.reserve(timeline.size()); + for (TimelineEntry &entry : timeline) { + if (!merged_timeline.empty() && merged_timeline.back().type == entry.type) { + merged_timeline.back().end_time = std::max(merged_timeline.back().end_time, entry.end_time); + continue; + } + merged_timeline.push_back(std::move(entry)); + } + route_data.timeline = std::move(merged_timeline); + std::sort(can_messages.begin(), can_messages.end(), [](const CanMessageData &a, const CanMessageData &b) { + return std::make_tuple(a.id.service, a.id.bus, a.id.address) + < std::make_tuple(b.id.service, b.id.bus, b.id.address); + }); + route_data.can_messages = std::move(can_messages); + + route_data.enum_info = std::move(enum_info); + route_data.car_fingerprint = std::move(car_fingerprint); + route_data.dbc_name = std::move(dbc_name); + rebuild_gps_trace(&route_data); + route_data.roots = collect_route_roots_for_paths(route_data.paths); + return route_data; +} + +const RouteSeries *find_route_series(const RouteData &route_data, std::string_view path) { + auto it = std::lower_bound(route_data.series.begin(), route_data.series.end(), path, + [](const RouteSeries &series, std::string_view target) { + return series.path < target; + }); + if (it == route_data.series.end() || it->path != path) return nullptr; + return &(*it); +} + +std::optional sample_series_at_time(const RouteSeries &series, double tm) { + if (series.times.empty() || series.times.size() != series.values.size()) { + return std::nullopt; + } + if (tm <= series.times.front()) { + return series.values.front(); + } + if (tm >= series.times.back()) { + return series.values.back(); + } + auto upper = std::lower_bound(series.times.begin(), series.times.end(), tm); + if (upper == series.times.begin()) { + return series.values.front(); + } + if (upper == series.times.end()) { + return series.values.back(); + } + const size_t upper_index = static_cast(std::distance(series.times.begin(), upper)); + const size_t lower_index = upper_index - 1; + const double t0 = series.times[lower_index]; + const double t1 = series.times[upper_index]; + const double v0 = series.values[lower_index]; + const double v1 = series.values[upper_index]; + if (t1 <= t0) { + return v0; + } + const double alpha = (tm - t0) / (t1 - t0); + return v0 + (v1 - v0) * alpha; +} + +} // namespace + +void rebuild_gps_trace(RouteData *route_data) { + route_data->gps_trace = {}; + const RouteSeries *latitude = find_route_series(*route_data, "/gpsLocationExternal/latitude"); + const RouteSeries *longitude = find_route_series(*route_data, "/gpsLocationExternal/longitude"); + const RouteSeries *has_fix = find_route_series(*route_data, "/gpsLocationExternal/hasFix"); + if (latitude == nullptr || longitude == nullptr || has_fix == nullptr) { + return; + } + + const RouteSeries *bearing = find_route_series(*route_data, "/gpsLocationExternal/bearingDeg"); + size_t count = std::min({latitude->times.size(), latitude->values.size(), + longitude->times.size(), longitude->values.size(), + has_fix->times.size(), has_fix->values.size()}); + if (count == 0) { + return; + } + + bool found = false; + route_data->gps_trace.points.reserve(count); + for (size_t i = 0; i < count; ++i) { + if (has_fix->values[i] < 0.5) { + continue; + } + const double lat = latitude->values[i]; + const double lon = longitude->values[i]; + if (!std::isfinite(lat) || !std::isfinite(lon)) { + continue; + } + const double tm = latitude->times[i]; + const float bearing_value = bearing != nullptr + ? static_cast(sample_series_at_time(*bearing, tm).value_or(0.0)) + : 0.0f; + route_data->gps_trace.points.push_back(GpsPoint{ + .time = tm, + .lat = lat, + .lon = lon, + .bearing = bearing_value, + .type = timeline_type_at_time(route_data->timeline, tm), + }); + if (!found) { + route_data->gps_trace.min_lat = route_data->gps_trace.max_lat = lat; + route_data->gps_trace.min_lon = route_data->gps_trace.max_lon = lon; + found = true; + } else { + route_data->gps_trace.min_lat = std::min(route_data->gps_trace.min_lat, lat); + route_data->gps_trace.max_lat = std::max(route_data->gps_trace.max_lat, lat); + route_data->gps_trace.min_lon = std::min(route_data->gps_trace.min_lon, lon); + route_data->gps_trace.max_lon = std::max(route_data->gps_trace.max_lon, lon); + } + } + if (!found) { + route_data->gps_trace = {}; + } +} + +namespace { + +void build_camera_index(const std::map &segments, + const RouteData &route_data, + std::string SegmentLogs::*file_member, + std::string_view index_name, + CameraFeedIndex *out) { + *out = {}; + out->segment_files.reserve(segments.size()); + + std::unordered_set available_segments; + available_segments.reserve(segments.size()); + for (const auto &[segment_number, segment] : segments) { + const std::string &path = segment.*file_member; + if (path.empty()) continue; + out->segment_files.push_back(CameraSegmentFile{ + .segment = segment_number, + .path = path, + }); + available_segments.insert(segment_number); + } + if (out->segment_files.empty()) { + return; + } + + const std::string prefix = "/" + std::string(index_name); + const RouteSeries *segment_numbers = find_route_series(route_data, prefix + "/segmentNum"); + const RouteSeries *decode_indices = find_route_series(route_data, prefix + "/segmentId"); + if (decode_indices == nullptr) { + decode_indices = find_route_series(route_data, prefix + "/segmentIdEncode"); + } + const RouteSeries *frame_ids = find_route_series(route_data, prefix + "/frameId"); + if (segment_numbers == nullptr || decode_indices == nullptr) { + return; + } + + size_t count = std::min(segment_numbers->times.size(), segment_numbers->values.size()); + count = std::min(count, decode_indices->values.size()); + if (frame_ids != nullptr) { + count = std::min(count, frame_ids->values.size()); + } + out->entries.reserve(count); + for (size_t i = 0; i < count; ++i) { + const int segment_number = static_cast(std::llround(segment_numbers->values[i])); + if (available_segments.find(segment_number) == available_segments.end()) { + continue; + } + const int decode_index = static_cast(std::llround(decode_indices->values[i])); + const uint32_t frame_id = frame_ids != nullptr + ? static_cast(std::llround(frame_ids->values[i])) + : static_cast(std::max(0, decode_index)); + out->entries.push_back(CameraFrameIndexEntry{ + .timestamp = segment_numbers->times[i], + .segment = segment_number, + .decode_index = decode_index, + .frame_id = frame_id, + }); + } + + std::sort(out->entries.begin(), out->entries.end(), + [](const CameraFrameIndexEntry &a, const CameraFrameIndexEntry &b) { + return a.timestamp < b.timestamp; + }); +} + +size_t load_worker_budget() { + size_t worker_count = std::thread::hardware_concurrency(); + if (worker_count == 0) { + worker_count = 1; + } + if (const char *raw = std::getenv("JOTP_LOAD_WORKERS"); raw != nullptr && std::strlen(raw) > 0) { + char *end = nullptr; + const unsigned long parsed = std::strtoul(raw, &end, 10); + if (end != nullptr && *end == '\0' && parsed > 0) { + worker_count = static_cast(parsed); + } + } + return std::max(1, worker_count); +} + +size_t segment_worker_count(size_t segment_count, size_t worker_budget) { + return std::max(1, std::min(worker_budget, segment_count)); +} + +size_t extract_chunk_count(size_t event_count, size_t worker_budget, size_t segment_workers) { + if (event_count < 4096) return 1; + const size_t per_segment_budget = std::max(1, worker_budget / std::max(1, segment_workers)); + const size_t chunk_target = std::max(1, (event_count + 14999) / 15000); + return std::max(1, std::min({per_segment_budget, chunk_target, static_cast(8)})); +} + +SeriesAccumulator extract_segment_series(const std::vector &events, + const SchemaIndex &schema, + const dbc::Database *can_dbc, + bool skip_raw_can, + size_t worker_budget, + size_t segment_workers) { + const size_t chunk_count = extract_chunk_count(events.size(), worker_budget, segment_workers); + if (chunk_count <= 1 || events.empty()) { + SeriesAccumulator series = make_series_accumulator(schema); + append_events_fast_range(events, 0, events.size(), schema, can_dbc, skip_raw_can, &series); + return series; + } + + const size_t events_per_chunk = (events.size() + chunk_count - 1) / chunk_count; + std::vector chunk_results; + chunk_results.reserve(chunk_count); + for (size_t i = 0; i < chunk_count; ++i) { + chunk_results.push_back(make_series_accumulator(schema)); + } + + std::vector workers; + workers.reserve(chunk_count > 0 ? chunk_count - 1 : 0); + for (size_t chunk = 1; chunk < chunk_count; ++chunk) { + workers.emplace_back([&, chunk]() { + const size_t begin = chunk * events_per_chunk; + const size_t end = std::min(events.size(), begin + events_per_chunk); + append_events_fast_range(events, begin, end, schema, can_dbc, skip_raw_can, &chunk_results[chunk]); + }); + } + append_events_fast_range(events, 0, std::min(events.size(), events_per_chunk), schema, can_dbc, skip_raw_can, &chunk_results[0]); + for (std::thread &worker : workers) { + worker.join(); + } + + SeriesAccumulator merged = make_series_accumulator(schema); + for (SeriesAccumulator &chunk : chunk_results) { + merge_series_accumulator(&merged, &chunk); + } + return merged; +} + +LoadedRouteArtifacts load_route_series_parallel( + const std::map &segments, + const SchemaIndex &schema, + const dbc::Database *can_dbc, + LogSelector selector, + bool skip_raw_can, + LoadStats *stats) { + struct SegmentResult { + SeriesAccumulator series; + std::vector logs; + std::vector timeline; + }; + + const std::vector> segment_list(segments.begin(), segments.end()); + std::vector results; + results.reserve(segment_list.size()); + for (size_t i = 0; i < segment_list.size(); ++i) { + results.emplace_back(SegmentResult{make_series_accumulator(schema)}); + } + std::atomic next_segment{0}; + std::mutex error_mutex; + std::string first_error; + const size_t worker_budget = static_cast(stats->num_workers); + const size_t segment_workers = segment_worker_count(segment_list.size(), worker_budget); + + auto worker = [&]() { + while (true) { + const size_t index = next_segment.fetch_add(1); + if (index >= segment_list.size()) { + return; + } + + const auto &[segment_number, segment] = segment_list[index]; + const std::string &log_path = selected_log_path(segment, selector); + LoadStats::SegmentStats &segment_stats = stats->segments[index]; + segment_stats.segment_number = segment_number; + segment_stats.log_path = log_path; + if (log_path.empty()) { + segment_stats.failed = true; + std::lock_guard lock(error_mutex); + if (first_error.empty()) { + first_error = "Missing log path for segment " + std::to_string(segment_number); + } + stats->publish(RouteLoadStage::DownloadingSegment, index, std::to_string(segment_number)); + stats->publish(RouteLoadStage::ParsingSegment, index, std::to_string(segment_number)); + continue; + } + + LogReader reader; + if (!reader.load(log_path, nullptr, true)) { + segment_stats.failed = true; + std::lock_guard lock(error_mutex); + if (first_error.empty()) { + first_error = "Failed to load log segment: " + log_path; + } + stats->publish(RouteLoadStage::DownloadingSegment, index, std::to_string(segment_number)); + stats->publish(RouteLoadStage::ParsingSegment, index, std::to_string(segment_number)); + continue; + } + + segment_stats.download_seconds = reader.download_seconds(); + segment_stats.decompress_seconds = reader.decompress_seconds(); + segment_stats.parse_seconds = reader.parse_seconds(); + segment_stats.compressed_bytes = reader.compressed_size(); + segment_stats.decompressed_bytes = reader.decompressed_size(); + stats->bytes_downloaded.fetch_add(reader.compressed_size()); + stats->segments_downloaded.fetch_add(1); + stats->publish(RouteLoadStage::DownloadingSegment, index, std::to_string(segment_number)); + + const auto extract_start = LoadStats::Clock::now(); + results[index].series = extract_segment_series(reader.events, schema, can_dbc, skip_raw_can, worker_budget, segment_workers); + results[index].logs = extract_segment_logs(reader.events); + results[index].timeline = extract_segment_timeline(reader.events); + segment_stats.extract_seconds = std::chrono::duration(LoadStats::Clock::now() - extract_start).count(); + segment_stats.event_count = reader.events.size(); + segment_stats.series_count = populated_series_count(results[index].series); + stats->segments_parsed.fetch_add(1); + stats->publish(RouteLoadStage::ParsingSegment, index, std::to_string(segment_number)); + } + }; + + std::vector workers; + workers.reserve(segment_workers); + for (size_t i = 0; i < segment_workers; ++i) { + workers.emplace_back(worker); + } + for (std::thread &thread : workers) { + thread.join(); + } + + if (!first_error.empty()) throw std::runtime_error(first_error); + + stats->merge_start = LoadStats::Clock::now(); + SeriesAccumulator merged = make_series_accumulator(schema); + for (size_t i = 0; i < results.size(); ++i) { + merge_series_accumulator(&merged, &results[i].series); + } + std::vector logs; + std::vector timeline; + for (SegmentResult &result : results) { + if (!result.logs.empty()) { + logs.insert(logs.end(), + std::make_move_iterator(result.logs.begin()), + std::make_move_iterator(result.logs.end())); + } + if (!result.timeline.empty()) { + timeline.insert(timeline.end(), + std::make_move_iterator(result.timeline.begin()), + std::make_move_iterator(result.timeline.end())); + } + } + LoadedRouteArtifacts artifacts; + artifacts.series = collect_series(std::move(merged)); + artifacts.can_messages = std::move(merged.can_messages); + artifacts.logs = std::move(logs); + artifacts.timeline = std::move(timeline); + artifacts.enum_info = std::move(merged.enum_info); + stats->merge_end = LoadStats::Clock::now(); + return artifacts; +} + +std::vector collect_layout_roots(const SketchLayout &layout) { + std::vector roots; + for (const auto &tab : layout.tabs) { + for (const auto &pane : tab.panes) { + for (const auto &curve : pane.curves) { + std::string root = "custom"; + if (is_absolute_curve(curve.name)) { + const size_t slash = curve.name.find('/', 1); + root = curve.name.substr(1, slash == std::string::npos ? std::string::npos : slash - 1); + } + if (std::find(roots.begin(), roots.end(), root) == roots.end()) { + roots.push_back(root); + } + } + } + } + if (roots.empty()) { + roots.push_back("layout"); + } + return roots; +} + +} // namespace + +std::vector collect_route_roots_for_paths(const std::vector &paths) { + std::vector roots; + for (const std::string &path : paths) { + if (!is_absolute_curve(path)) continue; + const size_t slash = path.find('/', 1); + const std::string root = path.substr(1, slash == std::string::npos ? std::string::npos : slash - 1); + if (!root.empty() && std::find(roots.begin(), roots.end(), root) == roots.end()) { + roots.push_back(root); + } + } + std::sort(roots.begin(), roots.end()); + return roots; +} + +struct StreamAccumulator::Impl { + const SchemaIndex &schema = SchemaIndex::instance(); + SeriesAccumulator series = make_series_accumulator(schema); + std::vector logs; + std::vector timeline; + std::string last_alert_key; + std::string manual_dbc_name; + std::string detected_dbc_name; + std::string car_fingerprint; + std::optional can_dbc; + std::optional time_offset; + + void refresh_dbc() { + const std::string next_dbc = !manual_dbc_name.empty() ? manual_dbc_name : detect_dbc_for_fingerprint(car_fingerprint); + if (next_dbc == detected_dbc_name) { + return; + } + detected_dbc_name = next_dbc; + can_dbc.reset(); + if (!detected_dbc_name.empty()) { + can_dbc.emplace(resolve_dbc_path(detected_dbc_name)); + } + } +}; + +StreamAccumulator::StreamAccumulator(const std::string &dbc_name, std::optional time_offset) + : impl_(std::make_unique()) { + impl_->manual_dbc_name = dbc_name; + impl_->time_offset = time_offset; + impl_->refresh_dbc(); +} + +StreamAccumulator::~StreamAccumulator() = default; + +void StreamAccumulator::setDbcName(const std::string &dbc_name) { + impl_->manual_dbc_name = dbc_name; + impl_->refresh_dbc(); +} + +void StreamAccumulator::appendEvent(cereal::Event::Which which, kj::ArrayPtr data) { + capnp::FlatArrayMessageReader event_reader(data); + const cereal::Event::Reader event = event_reader.getRoot(); + const double boot_time = static_cast(event.getLogMonoTime()) / 1.0e9; + if (!impl_->time_offset.has_value()) { + impl_->time_offset = boot_time; + } + if (which == cereal::Event::Which::CAR_PARAMS) { + const std::string fingerprint = event.getCarParams().getCarFingerprint().cStr(); + if (!fingerprint.empty() && fingerprint != impl_->car_fingerprint) { + impl_->car_fingerprint = fingerprint; + impl_->refresh_dbc(); + } + } + + append_event_fast(which, + -1, + data, + impl_->schema, + impl_->can_dbc ? &*impl_->can_dbc : nullptr, + true, + *impl_->time_offset, + &impl_->series); + append_log_event(which, event, *impl_->time_offset, &impl_->logs, &impl_->last_alert_key); + if (which == cereal::Event::Which::SELFDRIVE_STATE) { + const auto sd = event.getSelfdriveState(); + append_timeline_entry(&impl_->timeline, boot_time - *impl_->time_offset, + alert_status_to_timeline_type(sd.getAlertStatus(), sd.getEnabled())); + } +} + +void StreamAccumulator::appendCanFrames(CanServiceKind service, const std::vector &frames) { + if (frames.empty()) { + return; + } + if (!impl_->time_offset.has_value()) { + impl_->time_offset = frames.front().mono_time; + } + for (const LiveCanFrame &frame : frames) { + append_live_can_frame(service, + frame, + *impl_->time_offset, + impl_->can_dbc ? &*impl_->can_dbc : nullptr, + &impl_->series); + } +} + +StreamExtractBatch StreamAccumulator::takeBatch() { + StreamExtractBatch batch; + batch.car_fingerprint = impl_->car_fingerprint; + batch.dbc_name = impl_->detected_dbc_name; + if (impl_->time_offset.has_value()) { + batch.has_time_offset = true; + batch.time_offset = *impl_->time_offset; + } + if (impl_->logs.empty() && impl_->timeline.empty() + && populated_series_count(impl_->series) == 0 + && impl_->series.enum_info.empty() + && impl_->series.can_messages.empty()) { + return batch; + } + + SeriesAccumulator emitted = std::move(impl_->series); + batch.can_messages = std::move(emitted.can_messages); + batch.enum_info = std::move(emitted.enum_info); + batch.series = collect_series(std::move(emitted)); + batch.logs = std::move(impl_->logs); + batch.timeline = std::move(impl_->timeline); + impl_->series = make_series_accumulator(impl_->schema); + impl_->logs.clear(); + impl_->timeline.clear(); + return batch; +} + +const std::string &StreamAccumulator::carFingerprint() const { + return impl_->car_fingerprint; +} + +const std::string &StreamAccumulator::dbc_name() const { + return impl_->detected_dbc_name; +} + +std::optional StreamAccumulator::timeOffset() const { + return impl_->time_offset; +} + +SketchLayout load_sketch_layout(const fs::path &layout_path) { + SketchLayout layout = parse_layout(layout_path); + layout.roots = collect_layout_roots(layout); + return layout; +} + +RouteData load_route_data(const std::string &route_name, + const std::string &data_dir, + const std::string &dbc_name, + const RouteLoadProgressCallback &progress) { + if (route_name.empty()) return RouteData{}; + + const RouteSelection route = parse_route_selection(route_name); + if (route.canonical_name.empty() || (data_dir.empty() && route.dongle_id.empty())) { + throw std::runtime_error("Invalid route format: " + route_name); + } + LoadStats stats(progress); + stats.load_start = LoadStats::Clock::now(); + std::map segments = data_dir.empty() + ? load_segments_from_server(route) + : load_segments_from_local(route, data_dir); + segments = trim_segments(std::move(segments), route); + if (segments.empty()) throw std::runtime_error("No log segments found for " + route_name); + stats.resolve_end = LoadStats::Clock::now(); + stats.segment_count = segments.size(); + stats.total_segments.store(segments.size()); + stats.num_workers = static_cast(load_worker_budget()); + stats.segments.resize(segments.size()); + stats.publish(RouteLoadStage::Resolving, 0, {}); + + const RouteMetadata metadata = detect_route_metadata(segments, route.selector); + const std::string resolved_dbc = !dbc_name.empty() ? dbc_name : detect_dbc_for_fingerprint(metadata.car_fingerprint); + const std::optional can_dbc = resolved_dbc.empty() + ? std::nullopt + : std::optional(std::in_place, resolve_dbc_path(resolved_dbc)); + + const SchemaIndex &schema = SchemaIndex::instance(); + LoadedRouteArtifacts artifacts = load_route_series_parallel(segments, schema, can_dbc ? &*can_dbc : nullptr, + route.selector, !resolved_dbc.empty(), &stats); + RouteData route_data = build_route_data(std::move(artifacts.series), + std::move(artifacts.can_messages), + std::move(artifacts.logs), + std::move(artifacts.timeline), + std::move(artifacts.enum_info), + metadata.car_fingerprint, + resolved_dbc); + route_data.route_id = make_route_identifier(route, segments); + build_camera_index(segments, route_data, &SegmentLogs::fcamera, "roadEncodeIdx", &route_data.road_camera); + build_camera_index(segments, route_data, &SegmentLogs::dcamera, "driverEncodeIdx", &route_data.driver_camera); + build_camera_index(segments, route_data, &SegmentLogs::ecamera, "wideRoadEncodeIdx", &route_data.wide_road_camera); + build_camera_index(segments, route_data, &SegmentLogs::qcamera, "qRoadEncodeIdx", &route_data.qroad_camera); + stats.load_end = LoadStats::Clock::now(); + stats.publish(RouteLoadStage::Finished, segments.size(), {}); + stats.print_summary(route_data.series.size()); + return route_data; +} + +RouteIdentifier parse_route_identifier(std::string_view route_name) { + return make_route_identifier(parse_route_selection(std::string(route_name)), {}); +} + +std::vector available_dbc_names() { + return available_dbc_names_impl(); +} + +std::optional load_dbc_by_name(const std::string &dbc_name) { + if (dbc_name.empty()) { + return std::nullopt; + } + try { + return std::optional(std::in_place, resolve_dbc_path(dbc_name)); + } catch (...) { + return std::nullopt; + } +} + +std::vector decode_can_messages(const std::vector &can_messages, + const std::string &dbc_name, + std::unordered_map *enum_info) { + if (enum_info != nullptr) { + enum_info->clear(); + } + const std::optional can_dbc = load_dbc_by_name(dbc_name); + if (!can_dbc.has_value()) { + return {}; + } + + SeriesAccumulator series; + for (const CanMessageData &message : can_messages) { + const char *service_name = message.id.service == CanServiceKind::Can ? "can" : "sendcan"; + for (const CanFrameSample &sample : message.samples) { + decode_can_frame(&*can_dbc, + service_name, + message.id.bus, + message.id.address, + reinterpret_cast(sample.data.data()), + sample.data.size(), + sample.mono_time, + &series); + } + } + if (enum_info != nullptr) { + *enum_info = std::move(series.enum_info); + } + return collect_series(std::move(series)); +} diff --git a/tools/jotpluggler/stream.cc b/tools/jotpluggler/stream.cc new file mode 100644 index 0000000000..fcfa6585bb --- /dev/null +++ b/tools/jotpluggler/stream.cc @@ -0,0 +1,207 @@ +#include "tools/jotpluggler/internal.h" + +#include + +template +std::optional stream_batch_extreme_time(const StreamExtractBatch &batch, + Cmp cmp, + SeriesAccessor series_time, + LogAccessor log_time_fn) { + std::optional result; + for (const RouteSeries &series : batch.series) { + if (!series.times.empty()) { + const double t = series_time(series); + result = result.has_value() ? cmp(*result, t) : t; + } + } + if (!batch.logs.empty()) { + const double t = log_time_fn(batch); + result = result.has_value() ? cmp(*result, t) : t; + } + if (!batch.timeline.empty()) { + const double t = cmp(batch.timeline.front().start_time, batch.timeline.back().end_time); + result = result.has_value() ? cmp(*result, t) : t; + } + for (const CanMessageData &message : batch.can_messages) { + if (!message.samples.empty()) { + const double t = cmp(message.samples.front().mono_time, message.samples.back().mono_time); + result = result.has_value() ? cmp(*result, t) : t; + } + } + return result; +} + +std::optional earliest_stream_batch_time(const StreamExtractBatch &batch) { + return stream_batch_extreme_time(batch, + [](double a, double b) { return std::min(a, b); }, + [](const RouteSeries &s) { return s.times.front(); }, + [](const StreamExtractBatch &b) { return b.logs.front().mono_time; }); +} + +std::optional latest_stream_batch_time(const StreamExtractBatch &batch) { + return stream_batch_extreme_time(batch, + [](double a, double b) { return std::max(a, b); }, + [](const RouteSeries &s) { return s.times.back(); }, + [](const StreamExtractBatch &b) { return b.logs.back().mono_time; }); +} + +bool layout_has_custom_curves(const SketchLayout &layout) { + for (const WorkspaceTab &tab : layout.tabs) { + for (const Pane &pane : tab.panes) { + for (const Curve &curve : pane.curves) { + if (curve.custom_python.has_value()) return true; + } + } + } + return false; +} + +void append_stream_timeline_entries(std::vector *timeline, std::vector entries) { + for (TimelineEntry &entry : entries) { + if (!timeline->empty() && timeline->back().type == entry.type) { + timeline->back().end_time = std::max(timeline->back().end_time, entry.end_time); + } else { + timeline->push_back(std::move(entry)); + } + } +} + +bool can_message_less(const CanMessageData &a, const CanMessageData &b) { + return std::make_tuple(a.id.service, a.id.bus, a.id.address) + < std::make_tuple(b.id.service, b.id.bus, b.id.address); +} + +void apply_stream_batch(AppSession *session, UiState *state, StreamExtractBatch batch) { + if (batch.has_time_offset) { + session->stream_time_offset = batch.time_offset; + } + if (!batch.car_fingerprint.empty()) { + session->route_data.car_fingerprint = batch.car_fingerprint; + } + if (!batch.dbc_name.empty()) { + session->route_data.dbc_name = batch.dbc_name; + } + if (!batch.enum_info.empty()) { + for (auto &[path, info] : batch.enum_info) { + session->route_data.enum_info[path] = std::move(info); + } + } + + bool new_paths = false; + std::vector new_series; + std::vector touched_paths; + touched_paths.reserve(batch.series.size()); + for (RouteSeries &incoming : batch.series) { + touched_paths.push_back(incoming.path); + auto existing_it = session->series_by_path.find(incoming.path); + if (existing_it == session->series_by_path.end()) { + new_series.push_back(std::move(incoming)); + new_paths = true; + continue; + } + RouteSeries &existing = *existing_it->second; + existing.times.insert(existing.times.end(), incoming.times.begin(), incoming.times.end()); + existing.values.insert(existing.values.end(), incoming.values.begin(), incoming.values.end()); + } + for (RouteSeries &series : new_series) { + session->route_data.paths.push_back(series.path); + session->route_data.series.push_back(std::move(series)); + } + + if (!batch.logs.empty()) { + std::sort(batch.logs.begin(), batch.logs.end(), [](const LogEntry &a, const LogEntry &b) { + return a.mono_time < b.mono_time; + }); + const size_t old_size = session->route_data.logs.size(); + session->route_data.logs.insert(session->route_data.logs.end(), + std::make_move_iterator(batch.logs.begin()), + std::make_move_iterator(batch.logs.end())); + if (old_size > 0 && session->route_data.logs.size() > old_size + && session->route_data.logs[old_size - 1].mono_time > session->route_data.logs[old_size].mono_time) { + std::inplace_merge(session->route_data.logs.begin(), + session->route_data.logs.begin() + static_cast(old_size), + session->route_data.logs.end(), + [](const LogEntry &a, const LogEntry &b) { + return a.mono_time < b.mono_time; + }); + } + } + if (!batch.timeline.empty()) { + append_stream_timeline_entries(&session->route_data.timeline, std::move(batch.timeline)); + } + + for (CanMessageData &incoming : batch.can_messages) { + auto it = std::lower_bound(session->route_data.can_messages.begin(), + session->route_data.can_messages.end(), + incoming, + can_message_less); + if (it == session->route_data.can_messages.end() + || can_message_less(incoming, *it) + || can_message_less(*it, incoming)) { + session->route_data.can_messages.insert(it, std::move(incoming)); + } else { + it->samples.insert(it->samples.end(), + std::make_move_iterator(incoming.samples.begin()), + std::make_move_iterator(incoming.samples.end())); + } + } + + if (new_paths) { + const size_t old_path_count = session->route_data.paths.size() - new_series.size(); + std::sort(session->route_data.paths.begin() + static_cast(old_path_count), session->route_data.paths.end()); + std::inplace_merge(session->route_data.paths.begin(), + session->route_data.paths.begin() + static_cast(old_path_count), + session->route_data.paths.end()); + const size_t old_series_count = session->route_data.series.size() - new_series.size(); + auto series_cmp = [](const RouteSeries &a, const RouteSeries &b) { return a.path < b.path; }; + std::sort(session->route_data.series.begin() + static_cast(old_series_count), + session->route_data.series.end(), series_cmp); + std::inplace_merge(session->route_data.series.begin(), + session->route_data.series.begin() + static_cast(old_series_count), + session->route_data.series.end(), series_cmp); + session->route_data.roots = collect_route_roots_for_paths(session->route_data.paths); + rebuild_route_index(session); + rebuild_browser_nodes(session, state); + state->browser_nodes_dirty = false; + } else { + for (const std::string &path : touched_paths) { + auto series_it = session->series_by_path.find(path); + if (series_it == session->series_by_path.end() || series_it->second == nullptr) continue; + const bool enum_like = session->route_data.enum_info.find(path) != session->route_data.enum_info.end(); + session->route_data.series_formats[path] = compute_series_format(series_it->second->values, enum_like); + } + } + const std::optional earliest_time = earliest_stream_batch_time(batch); + const std::optional latest_time = latest_stream_batch_time(batch); + if (earliest_time.has_value() && latest_time.has_value()) { + if (!session->route_data.has_time_range) { + session->route_data.x_min = *earliest_time; + session->route_data.x_max = *latest_time; + } else { + session->route_data.x_min = std::min(session->route_data.x_min, *earliest_time); + session->route_data.x_max = std::max(session->route_data.x_max, *latest_time); + } + session->route_data.has_time_range = true; + } + + if (new_paths + || std::find(touched_paths.begin(), touched_paths.end(), "/gpsLocationExternal/latitude") != touched_paths.end() + || std::find(touched_paths.begin(), touched_paths.end(), "/gpsLocationExternal/longitude") != touched_paths.end() + || std::find(touched_paths.begin(), touched_paths.end(), "/gpsLocationExternal/hasFix") != touched_paths.end() + || std::find(touched_paths.begin(), touched_paths.end(), "/gpsLocationExternal/bearingDeg") != touched_paths.end()) { + rebuild_gps_trace(&session->route_data); + } + + if (latest_time.has_value() && layout_has_custom_curves(session->layout) + && *latest_time >= session->next_stream_custom_refresh_time) { + refresh_all_custom_curves(session, state); + session->next_stream_custom_refresh_time = *latest_time + 0.1; + } + if (state->follow_latest || !state->has_tracker_time) { + state->tracker_time = session->route_data.x_max; + state->has_tracker_time = session->route_data.has_time_range; + } + if (!state->has_shared_range) { + reset_shared_range(state, *session); + } +} diff --git a/tools/jotpluggler/util.cc b/tools/jotpluggler/util.cc new file mode 100644 index 0000000000..5c20e795f6 --- /dev/null +++ b/tools/jotpluggler/util.cc @@ -0,0 +1,59 @@ +#include "tools/jotpluggler/util.h" + +#include +#include +#include +#include + +std::string read_file_or_throw(const std::filesystem::path &path) { + const std::string contents = util::read_file(path.string()); + if (!contents.empty() || std::filesystem::exists(path)) { + return contents; + } + throw std::runtime_error("Failed to read " + path.string()); +} + +void write_file_or_throw(const std::filesystem::path &path, const void *data, size_t size) { + ensure_parent_dir(path); + const std::string path_string = path.string(); + const void *bytes = size == 0 ? static_cast("") : data; + if (util::write_file(path_string.c_str(), bytes, size, O_WRONLY | O_CREAT | O_TRUNC) != 0) { + throw std::runtime_error("Failed to write " + path_string); + } +} + +void write_file_or_throw(const std::filesystem::path &path, std::string_view contents) { + write_file_or_throw(path, contents.data(), contents.size()); +} + +void run_system_or_throw(const std::string &command, std::string_view action) { + const int ret = std::system(command.c_str()); + if (ret != 0) { + throw std::runtime_error(util::string_format("%.*s failed with exit code %d", + static_cast(action.size()), action.data(), ret)); + } +} + +CommandResult run_process_capture_output(const std::vector &args) { + std::string command; + for (const std::string &arg : args) { + if (!command.empty()) command += ' '; + command += shell_quote(arg); + } + command += " 2>&1"; + + FILE *pipe = popen(command.c_str(), "r"); + if (pipe == nullptr) { + throw std::runtime_error("popen() failed"); + } + + CommandResult result; + std::array buf = {}; + while (fgets(buf.data(), static_cast(buf.size()), pipe) != nullptr) { + result.output += buf.data(); + } + + const int status = pclose(pipe); + result.exit_code = WIFEXITED(status) ? WEXITSTATUS(status) : 1; + return result; +} diff --git a/tools/jotpluggler/util.h b/tools/jotpluggler/util.h new file mode 100644 index 0000000000..ea77a236f0 --- /dev/null +++ b/tools/jotpluggler/util.h @@ -0,0 +1,103 @@ +#pragma once + +#include "common/util.h" +#include "imgui.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +inline ImVec4 color_rgb(int r, int g, int b, float alpha = 1.0f) { + return ImVec4(static_cast(r) / 255.0f, + static_cast(g) / 255.0f, + static_cast(b) / 255.0f, + alpha); +} + +inline ImVec4 color_rgb(const std::array &color, float alpha = 1.0f) { + return color_rgb(color[0], color[1], color[2], alpha); +} + +inline std::string lowercase_copy(std::string_view value) { + std::string out(value); + std::transform(out.begin(), out.end(), out.begin(), [](unsigned char c) { + return static_cast(std::tolower(c)); + }); + return out; +} + +inline int imgui_resize_callback(ImGuiInputTextCallbackData *data) { + if (data->EventFlag != ImGuiInputTextFlags_CallbackResize || data->UserData == nullptr) return 0; + auto *text = static_cast(data->UserData); + text->resize(static_cast(data->BufTextLen)); + data->Buf = text->data(); + return 0; +} + +inline bool input_text_string(const char *label, + std::string *text, + ImGuiInputTextFlags flags = 0) { + flags |= ImGuiInputTextFlags_CallbackResize; + return ImGui::InputText(label, text->data(), text->capacity() + 1, + flags, imgui_resize_callback, text); +} + +inline bool input_text_with_hint_string(const char *label, + const char *hint, + std::string *text, + ImGuiInputTextFlags flags = 0) { + flags |= ImGuiInputTextFlags_CallbackResize; + return ImGui::InputTextWithHint(label, hint, text->data(), text->capacity() + 1, + flags, imgui_resize_callback, text); +} + +inline bool input_text_multiline_string(const char *label, + std::string *text, + const ImVec2 &size = ImVec2(0.0f, 0.0f), + ImGuiInputTextFlags flags = 0) { + flags |= ImGuiInputTextFlags_CallbackResize; + return ImGui::InputTextMultiline(label, text->data(), text->capacity() + 1, + size, flags, imgui_resize_callback, text); +} + +inline bool is_local_stream_address(std::string_view address) { + return address.empty() || address == "127.0.0.1" || address == "localhost"; +} + +inline void ensure_parent_dir(const std::filesystem::path &path) { + if (path.has_parent_path()) { + std::filesystem::create_directories(path.parent_path()); + } +} + +inline std::string shell_quote(std::string_view value) { + std::string quoted; + quoted.reserve(value.size() + 8); + quoted.push_back('\''); + for (char c : value) { + if (c == '\'') { + quoted += "'\\''"; + } else { + quoted.push_back(c); + } + } + quoted.push_back('\''); + return quoted; +} + +struct CommandResult { + int exit_code = 0; + std::string output; +}; + +std::string read_file_or_throw(const std::filesystem::path &path); +void write_file_or_throw(const std::filesystem::path &path, std::string_view contents); +void write_file_or_throw(const std::filesystem::path &path, const void *data, size_t size); +void run_system_or_throw(const std::string &command, std::string_view action); +CommandResult run_process_capture_output(const std::vector &args); diff --git a/tools/replay/logreader.cc b/tools/replay/logreader.cc index 997a4bc00f..aba67bcdf8 100644 --- a/tools/replay/logreader.cc +++ b/tools/replay/logreader.cc @@ -1,31 +1,68 @@ #include "tools/replay/logreader.h" #include +#include #include #include "tools/replay/filereader.h" +#include "tools/replay/py_downloader.h" #include "tools/replay/util.h" #include "common/util.h" -bool LogReader::load(const std::string &url, std::atomic *abort, bool local_cache) { +bool LogReader::load(const std::string &url, std::atomic *abort, bool local_cache, + const ProgressCallback &progress) { + using Clock = std::chrono::steady_clock; + compressed_size_ = 0; + decompressed_size_ = 0; + download_seconds_ = 0.0; + decompress_seconds_ = 0.0; + parse_seconds_ = 0.0; + + if (progress) { + installDownloadProgressHandler([progress](uint64_t cur, uint64_t total, bool success) { + if (success) { + progress(ProgressStage::Downloading, cur, total); + } + }); + } + const auto download_start = Clock::now(); std::string data = FileReader(local_cache).read(url, abort); + const auto download_end = Clock::now(); + if (progress) { + installDownloadProgressHandler(nullptr); + } + compressed_size_ = data.size(); + download_seconds_ = std::chrono::duration(download_end - download_start).count(); if (!data.empty()) { + const auto decompress_start = Clock::now(); if (url.find(".bz2") != std::string::npos || util::starts_with(data, "BZh9")) { data = decompressBZ2(data, abort); } else if (url.find(".zst") != std::string::npos || util::starts_with(data, "\x28\xB5\x2F\xFD")) { data = decompressZST(data, abort); } + const auto decompress_end = Clock::now(); + decompress_seconds_ = std::chrono::duration(decompress_end - decompress_start).count(); } + decompressed_size_ = data.size(); - bool success = !data.empty() && load(data.data(), data.size(), abort); + bool success = !data.empty() && load(data.data(), data.size(), abort, progress); if (filters_.empty()) raw_ = std::move(data); return success; } -bool LogReader::load(const char *data, size_t size, std::atomic *abort) { +bool LogReader::load(const char *data, size_t size, std::atomic *abort, + const ProgressCallback &progress) { + using Clock = std::chrono::steady_clock; + const auto parse_start = Clock::now(); try { events.reserve(65000); kj::ArrayPtr words((const capnp::word *)data, size / sizeof(capnp::word)); + const uint64_t total_bytes = size; + const uint64_t report_step = std::max(1, total_bytes / 200); + uint64_t last_reported = 0; + if (progress) { + progress(ProgressStage::Parsing, 0, total_bytes); + } while (words.size() > 0 && !(abort && *abort)) { capnp::FlatArrayMessageReader reader(words); auto event = reader.getRoot(); @@ -56,15 +93,30 @@ bool LogReader::load(const char *data, size_t size, std::atomic *abort) { events.emplace_back(which, sof ? sof : mono_time, event_data, idx.getSegmentNum()); } } + + if (progress) { + const uint64_t current_bytes = + total_bytes - static_cast(words.size() * sizeof(capnp::word)); + if (current_bytes >= total_bytes || current_bytes - last_reported >= report_step) { + progress(ProgressStage::Parsing, current_bytes, total_bytes); + last_reported = current_bytes; + } + } } } catch (const kj::Exception &e) { rWarning("Failed to parse log : %s.\nRetrieved %zu events from corrupt log", e.getDescription().cStr(), events.size()); } + if (progress) { + progress(ProgressStage::Parsing, size, size); + } + if (requires_migration) { migrateOldEvents(); } + parse_seconds_ = std::chrono::duration(Clock::now() - parse_start).count(); + if (!events.empty() && !(abort && *abort)) { events.shrink_to_fit(); std::sort(events.begin(), events.end()); diff --git a/tools/replay/logreader.h b/tools/replay/logreader.h index 9219878ace..fe11ab0f77 100644 --- a/tools/replay/logreader.h +++ b/tools/replay/logreader.h @@ -1,5 +1,7 @@ #pragma once +#include +#include #include #include @@ -26,12 +28,26 @@ public: class LogReader { public: + enum class ProgressStage { + Downloading, + Parsing, + }; + + using ProgressCallback = std::function; + LogReader(const std::vector &filters = {}) { filters_ = filters; } bool load(const std::string &url, std::atomic *abort = nullptr, - bool local_cache = false); - bool load(const char *data, size_t size, std::atomic *abort = nullptr); + bool local_cache = false, const ProgressCallback &progress = {}); + bool load(const char *data, size_t size, std::atomic *abort = nullptr, + const ProgressCallback &progress = {}); std::vector events; + uint64_t compressed_size() const { return compressed_size_; } + uint64_t decompressed_size() const { return decompressed_size_; } + double download_seconds() const { return download_seconds_; } + double decompress_seconds() const { return decompress_seconds_; } + double parse_seconds() const { return parse_seconds_; } + private: void migrateOldEvents(); @@ -39,4 +55,9 @@ private: bool requires_migration = true; std::vector filters_; MonotonicBuffer buffer_{1024 * 1024}; + uint64_t compressed_size_ = 0; + uint64_t decompressed_size_ = 0; + double download_seconds_ = 0.0; + double decompress_seconds_ = 0.0; + double parse_seconds_ = 0.0; }; diff --git a/tools/replay/py_downloader.cc b/tools/replay/py_downloader.cc index efaf3c93a2..5063d6947c 100644 --- a/tools/replay/py_downloader.cc +++ b/tools/replay/py_downloader.cc @@ -149,11 +149,16 @@ std::string runPython(const std::vector &args, std::atomic *a int status; waitpid(pid, &status, 0); - bool failed = (abort && *abort) || + const bool aborted = abort && *abort; + const bool expected_sigterm = aborted && WIFSIGNALED(status) && WTERMSIG(status) == SIGTERM; + bool failed = aborted || (WIFEXITED(status) && WEXITSTATUS(status) != 0) || WIFSIGNALED(status); if (failed) { - if (WIFEXITED(status) && WEXITSTATUS(status) != 0) { + if (expected_sigterm) { + // Route/camera teardown cancels outstanding downloader subprocesses. + // Keep that expected shutdown path quiet. + } else if (WIFEXITED(status) && WEXITSTATUS(status) != 0) { rWarning("py_downloader: process exited with code %d", WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { rWarning("py_downloader: process killed by signal %d", WTERMSIG(status)); From 6b94c47c6aa68a71ee24c9300ce094a97d7acef2 Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Fri, 27 Mar 2026 13:31:00 -0700 Subject: [PATCH 25/33] Lateral maneuver report (#37562) * lateral report * mutually exclude buttons * gating * set maneuver * add timer * timer text * fix plot * use curvature * more curves * fix gating * rm delay * highway speed only * msg * add sine * add step-down * use relative * text * stabilize * tuning * windup * text * winddown * no windup * tuning * more tuning * more * formatting * test faster * extend sine * report crossings * add readme * clean report * fix lint * gating * fix * straighter * compensate roll * rm abs roll * len * Revert "rm abs roll" This reverts commit a22d6bb136f90d2bf997e6b9aeee2f784398ef42. * Revert "compensate roll" This reverts commit dfda52119cc4a2e29ac2854b9154c08459086fea. * print actuators * show curve and roll * tune roll * text * slower * timer * too much banked streets in US * readme * filter incomplete * plot jerk * plot angle jerk * lil edits * fix lint * apply suggestions * better table * apply comments * clean * shane comments * deflicker --------- Co-authored-by: Adeeb Shihadeh --- cereal/log.capnp | 7 + cereal/services.py | 1 + common/params_keys.h | 1 + selfdrive/controls/controlsd.py | 7 +- selfdrive/selfdrived/events.py | 5 + selfdrive/selfdrived/selfdrived.py | 10 +- selfdrive/ui/layouts/settings/developer.py | 27 +- .../ui/mici/layouts/settings/developer.py | 26 +- system/manager/process_config.py | 4 + tools/lateral_maneuvers/.gitignore | 1 + tools/lateral_maneuvers/README.md | 42 +++ tools/lateral_maneuvers/generate_report.py | 249 ++++++++++++++++++ tools/lateral_maneuvers/lateral_maneuversd.py | 180 +++++++++++++ tools/longitudinal_maneuvers/maneuversd.py | 40 +-- 14 files changed, 577 insertions(+), 23 deletions(-) create mode 100644 tools/lateral_maneuvers/.gitignore create mode 100644 tools/lateral_maneuvers/README.md create mode 100755 tools/lateral_maneuvers/generate_report.py create mode 100755 tools/lateral_maneuvers/lateral_maneuversd.py diff --git a/cereal/log.capnp b/cereal/log.capnp index c26c1f9d3a..d8e9f56316 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -88,6 +88,7 @@ struct OnroadEvent @0xc4fa6047f024e718 { lowMemory @51; stockAeb @52; stockLkas @98; + lateralManeuver @99; ldw @53; carUnrecognized @54; invalidLkasSetting @55; @@ -1241,6 +1242,10 @@ struct DriverAssistance { # FCW, AEB, etc. will go here } +struct LateralManeuverPlan { + desiredCurvature @0 :Float32; # 1/m +} + struct LongitudinalPlan @0xe00b5b3eba12876c { modelMonoTime @9 :UInt64; hasLead @7 :Bool; @@ -2612,6 +2617,8 @@ struct Event { bookmarkButton @148 :UserBookmark; audioFeedback @149 :AudioFeedback; + lateralManeuverPlan @150 :LateralManeuverPlan; + # *********** debug *********** testJoystick @52 :Joystick; roadEncodeData @86 :EncodeData; diff --git a/cereal/services.py b/cereal/services.py index e7350aceac..6b98128d64 100755 --- a/cereal/services.py +++ b/cereal/services.py @@ -49,6 +49,7 @@ _services: dict[str, tuple] = { "carControl": (True, 100., 10), "carOutput": (True, 100., 10), "longitudinalPlan": (True, 20., 10), + "lateralManeuverPlan": (True, 20.), "driverAssistance": (True, 20., 20), "procLog": (True, 0.5, 15, QueueSize.BIG), "gpsLocationExternal": (True, 10., 10), diff --git a/common/params_keys.h b/common/params_keys.h index d6104e7497..b81a373d08 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -82,6 +82,7 @@ inline static std::unordered_map keys = { {"LiveParametersV2", {PERSISTENT, BYTES}}, {"LiveTorqueParameters", {PERSISTENT | DONT_LOG, BYTES}}, {"LocationFilterInitialState", {PERSISTENT, BYTES}}, + {"LateralManeuverMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}}, {"LongitudinalManeuverMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}}, {"LongitudinalPersonality", {PERSISTENT, INT, std::to_string(static_cast(cereal::LongitudinalPersonality::STANDARD))}}, {"NetworkMetered", {PERSISTENT, BOOL}}, diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 9e31ac1526..b49e46604a 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -37,7 +37,7 @@ class Controls: self.CI = interfaces[self.CP.carFingerprint](self.CP) self.sm = messaging.SubMaster(['liveDelay', 'liveParameters', 'liveTorqueParameters', 'modelV2', 'selfdriveState', - 'liveCalibration', 'livePose', 'longitudinalPlan', 'carState', 'carOutput', + 'liveCalibration', 'livePose', 'longitudinalPlan', 'lateralManeuverPlan', 'carState', 'carOutput', 'driverMonitoringState', 'onroadEvents', 'driverAssistance'], poll='selfdriveState') self.pm = messaging.PubMaster(['carControl', 'controlsState']) @@ -116,7 +116,10 @@ class Controls: # Steering PID loop and lateral MPC # Reset desired curvature to current to avoid violating the limits on engage - new_desired_curvature = model_v2.action.desiredCurvature if CC.latActive else self.curvature + if self.sm.valid['lateralManeuverPlan']: + new_desired_curvature = self.sm['lateralManeuverPlan'].desiredCurvature if CC.latActive else self.curvature + else: + new_desired_curvature = model_v2.action.desiredCurvature if CC.latActive else self.curvature self.desired_curvature, curvature_limited = clip_curvature(CS.vEgo, self.desired_curvature, new_desired_curvature, lp.roll) lat_delay = self.sm["liveDelay"].lateralDelay + LAT_SMOOTH_SECONDS diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index e10f67fa45..55af93c42b 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -409,6 +409,11 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { "Ensure road ahead is clear"), }, + EventName.lateralManeuver: { + ET.WARNING: longitudinal_maneuver_alert, + ET.PERMANENT: NormalPermanentAlert("Lateral Maneuver Mode"), + }, + EventName.selfdriveInitializing: { ET.NO_ENTRY: NoEntryAlert("System Initializing"), }, diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index 997c7e3770..6a294ca8d8 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -74,7 +74,7 @@ class SelfdriveD: # TODO: de-couple selfdrived with card/conflate on carState without introducing controls mismatches self.car_state_sock = messaging.sub_sock('carState', timeout=20) - ignore = self.sensor_packets + self.gps_packets + ['alertDebug'] + ignore = self.sensor_packets + self.gps_packets + ['alertDebug', 'lateralManeuverPlan'] if SIMULATION: ignore += ['driverCameraState', 'managerState'] if REPLAY: @@ -83,7 +83,8 @@ class SelfdriveD: self.sm = messaging.SubMaster(['deviceState', 'pandaStates', 'peripheralState', 'modelV2', 'liveCalibration', 'carOutput', 'driverMonitoringState', 'longitudinalPlan', 'livePose', 'liveDelay', 'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters', - 'controlsState', 'carControl', 'driverAssistance', 'alertDebug', 'userBookmark', 'audioFeedback'] + \ + 'controlsState', 'carControl', 'driverAssistance', 'alertDebug', 'userBookmark', 'audioFeedback', + 'lateralManeuverPlan'] + \ self.camera_packets + self.sensor_packets + self.gps_packets, ignore_alive=ignore, ignore_avg_freq=ignore, ignore_valid=ignore, frequency=int(1/DT_CTRL)) @@ -148,7 +149,10 @@ class SelfdriveD: self.events.add(EventName.joystickDebug) self.startup_event = None - if self.sm.recv_frame['alertDebug'] > 0: + if self.sm.recv_frame['lateralManeuverPlan'] > 0: + self.events.add(EventName.lateralManeuver) + self.startup_event = None + elif self.sm.recv_frame['alertDebug'] > 0: self.events.add(EventName.longitudinalManeuver) self.startup_event = None diff --git a/selfdrive/ui/layouts/settings/developer.py b/selfdrive/ui/layouts/settings/developer.py index bd064ab834..c61a406858 100644 --- a/selfdrive/ui/layouts/settings/developer.py +++ b/selfdrive/ui/layouts/settings/developer.py @@ -67,6 +67,13 @@ class DeveloperLayout(Widget): callback=self._on_long_maneuver_mode, ) + self._lat_maneuver_toggle = toggle_item( + lambda: tr("Lateral Maneuver Mode"), + description="", + initial_state=self._params.get_bool("LateralManeuverMode"), + callback=self._on_lat_maneuver_mode, + ) + self._alpha_long_toggle = toggle_item( lambda: tr("openpilot Longitudinal Control (Alpha)"), description=lambda: tr(DESCRIPTIONS["alpha_longitudinal"]), @@ -89,6 +96,7 @@ class DeveloperLayout(Widget): self._ssh_keys, self._joystick_toggle, self._long_maneuver_toggle, + self._lat_maneuver_toggle, self._alpha_long_toggle, self._ui_debug_toggle, ], line_separator=True, spacing=0) @@ -109,7 +117,7 @@ class DeveloperLayout(Widget): # Hide non-release toggles on release builds # TODO: we can do an onroad cycle, but alpha long toggle requires a deinit function to re-enable radar and not fault - for item in (self._joystick_toggle, self._long_maneuver_toggle, self._alpha_long_toggle): + for item in (self._joystick_toggle, self._long_maneuver_toggle, self._lat_maneuver_toggle, self._alpha_long_toggle): item.set_visible(not self._is_release) # CP gating @@ -126,8 +134,12 @@ class DeveloperLayout(Widget): if not long_man_enabled: self._long_maneuver_toggle.action_item.set_state(False) self._params.put_bool("LongitudinalManeuverMode", False) + + lat_man_enabled = ui_state.is_offroad() + self._lat_maneuver_toggle.action_item.set_enabled(lat_man_enabled) else: self._long_maneuver_toggle.action_item.set_enabled(False) + self._lat_maneuver_toggle.action_item.set_enabled(False) self._alpha_long_toggle.set_visible(False) # TODO: make a param control list item so we don't need to manage internal state as much here @@ -137,6 +149,7 @@ class DeveloperLayout(Widget): ("SshEnabled", self._ssh_toggle), ("JoystickDebugMode", self._joystick_toggle), ("LongitudinalManeuverMode", self._long_maneuver_toggle), + ("LateralManeuverMode", self._lat_maneuver_toggle), ("AlphaLongitudinalEnabled", self._alpha_long_toggle), ("ShowDebugInfo", self._ui_debug_toggle), ): @@ -157,11 +170,23 @@ class DeveloperLayout(Widget): self._params.put_bool("JoystickDebugMode", state) self._params.put_bool("LongitudinalManeuverMode", False) self._long_maneuver_toggle.action_item.set_state(False) + self._params.put_bool("LateralManeuverMode", False) + self._lat_maneuver_toggle.action_item.set_state(False) def _on_long_maneuver_mode(self, state: bool): self._params.put_bool("LongitudinalManeuverMode", state) self._params.put_bool("JoystickDebugMode", False) self._joystick_toggle.action_item.set_state(False) + self._params.put_bool("LateralManeuverMode", False) + self._lat_maneuver_toggle.action_item.set_state(False) + + def _on_lat_maneuver_mode(self, state: bool): + self._params.put_bool("LateralManeuverMode", state) + self._params.put_bool("ExperimentalMode", False) + self._params.put_bool("JoystickDebugMode", False) + self._joystick_toggle.action_item.set_state(False) + self._params.put_bool("LongitudinalManeuverMode", False) + self._long_maneuver_toggle.action_item.set_state(False) def _on_alpha_long_enabled(self, state: bool): if state: diff --git a/selfdrive/ui/mici/layouts/settings/developer.py b/selfdrive/ui/mici/layouts/settings/developer.py index 386b468928..f47614c073 100644 --- a/selfdrive/ui/mici/layouts/settings/developer.py +++ b/selfdrive/ui/mici/layouts/settings/developer.py @@ -55,6 +55,9 @@ class DeveloperLayoutMici(NavScroller): self._long_maneuver_toggle = BigToggle("longitudinal maneuver mode", initial_state=ui_state.params.get_bool("LongitudinalManeuverMode"), toggle_callback=self._on_long_maneuver_mode) + self._lat_maneuver_toggle = BigToggle("lateral maneuver mode", + initial_state=ui_state.params.get_bool("LateralManeuverMode"), + toggle_callback=self._on_lat_maneuver_mode) self._alpha_long_toggle = BigToggle("alpha longitudinal", initial_state=ui_state.params.get_bool("AlphaLongitudinalEnabled"), toggle_callback=self._on_alpha_long_enabled) @@ -68,6 +71,7 @@ class DeveloperLayoutMici(NavScroller): self._ssh_keys_btn, self._joystick_toggle, self._long_maneuver_toggle, + self._lat_maneuver_toggle, self._alpha_long_toggle, self._debug_mode_toggle, ]) @@ -78,12 +82,13 @@ class DeveloperLayoutMici(NavScroller): ("SshEnabled", self._ssh_toggle), ("JoystickDebugMode", self._joystick_toggle), ("LongitudinalManeuverMode", self._long_maneuver_toggle), + ("LateralManeuverMode", self._lat_maneuver_toggle), ("AlphaLongitudinalEnabled", self._alpha_long_toggle), ("ShowDebugInfo", self._debug_mode_toggle), ) onroad_blocked_toggles = (self._adb_toggle, self._joystick_toggle) - release_blocked_toggles = (self._joystick_toggle, self._long_maneuver_toggle, self._alpha_long_toggle) - engaged_blocked_toggles = (self._long_maneuver_toggle, self._alpha_long_toggle) + release_blocked_toggles = (self._joystick_toggle, self._long_maneuver_toggle, self._lat_maneuver_toggle, self._alpha_long_toggle) + engaged_blocked_toggles = (self._long_maneuver_toggle, self._lat_maneuver_toggle, self._alpha_long_toggle) # Hide non-release toggles on release builds for item in release_blocked_toggles: @@ -129,8 +134,12 @@ class DeveloperLayoutMici(NavScroller): if not long_man_enabled: self._long_maneuver_toggle.set_checked(False) ui_state.params.put_bool("LongitudinalManeuverMode", False) + + lat_man_enabled = ui_state.is_offroad() + self._lat_maneuver_toggle.set_enabled(lat_man_enabled) else: self._long_maneuver_toggle.set_enabled(False) + self._lat_maneuver_toggle.set_enabled(False) self._alpha_long_toggle.set_visible(False) # Refresh toggles from params to mirror external changes @@ -141,11 +150,24 @@ class DeveloperLayoutMici(NavScroller): ui_state.params.put_bool("JoystickDebugMode", state) ui_state.params.put_bool("LongitudinalManeuverMode", False) self._long_maneuver_toggle.set_checked(False) + ui_state.params.put_bool("LateralManeuverMode", False) + self._lat_maneuver_toggle.set_checked(False) def _on_long_maneuver_mode(self, state: bool): ui_state.params.put_bool("LongitudinalManeuverMode", state) ui_state.params.put_bool("JoystickDebugMode", False) self._joystick_toggle.set_checked(False) + ui_state.params.put_bool("LateralManeuverMode", False) + self._lat_maneuver_toggle.set_checked(False) + restart_needed_callback(state) + + def _on_lat_maneuver_mode(self, state: bool): + ui_state.params.put_bool("LateralManeuverMode", state) + ui_state.params.put_bool("ExperimentalMode", False) + ui_state.params.put_bool("JoystickDebugMode", False) + self._joystick_toggle.set_checked(False) + ui_state.params.put_bool("LongitudinalManeuverMode", False) + self._long_maneuver_toggle.set_checked(False) restart_needed_callback(state) def _on_alpha_long_enabled(self, state: bool): diff --git a/system/manager/process_config.py b/system/manager/process_config.py index 0b99183193..7e96b7776a 100644 --- a/system/manager/process_config.py +++ b/system/manager/process_config.py @@ -40,6 +40,9 @@ def not_joystick(started: bool, params: Params, CP: car.CarParams) -> bool: def long_maneuver(started: bool, params: Params, CP: car.CarParams) -> bool: return started and params.get_bool("LongitudinalManeuverMode") +def lat_maneuver(started: bool, params: Params, CP: car.CarParams) -> bool: + return started and params.get_bool("LateralManeuverMode") + def not_long_maneuver(started: bool, params: Params, CP: car.CarParams) -> bool: return started and not params.get_bool("LongitudinalManeuverMode") @@ -100,6 +103,7 @@ procs = [ PythonProcess("pigeond", "system.ubloxd.pigeond", ublox, enabled=TICI), PythonProcess("plannerd", "selfdrive.controls.plannerd", not_long_maneuver), PythonProcess("maneuversd", "tools.longitudinal_maneuvers.maneuversd", long_maneuver), + PythonProcess("lateral_maneuversd", "tools.lateral_maneuvers.lateral_maneuversd", lat_maneuver), PythonProcess("radard", "selfdrive.controls.radard", only_onroad), PythonProcess("hardwared", "system.hardware.hardwared", always_run), PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC), diff --git a/tools/lateral_maneuvers/.gitignore b/tools/lateral_maneuvers/.gitignore new file mode 100644 index 0000000000..a0b6efe6b3 --- /dev/null +++ b/tools/lateral_maneuvers/.gitignore @@ -0,0 +1 @@ +/lateral_reports/ diff --git a/tools/lateral_maneuvers/README.md b/tools/lateral_maneuvers/README.md new file mode 100644 index 0000000000..3a54bc7409 --- /dev/null +++ b/tools/lateral_maneuvers/README.md @@ -0,0 +1,42 @@ +# Lateral Maneuvers Testing Tool + +> [!WARNING] +> Use caution when using this tool. + +Test your vehicle's lateral control tuning with this tool. The tool will test the vehicle's ability to follow a few lateral maneuvers and includes a tool to generate a report from the route. + +## Instructions + +1. Check out a development branch such as `master` on your comma device. +2. The full maneuver suite runs at 20 and 30 mph. +3. Enable "Lateral Maneuver Mode" in Settings > Developer on the device while offroad. Alternatively, set the parameter manually: + + ```sh + echo -n 1 > /data/params/d/LateralManeuverMode + ``` + +4. Turn your vehicle back on. You will see "Lateral Maneuver Mode". + +5. Ensure the area ahead is clear, as openpilot will command lateral acceleration steps in this mode. Once you are ready, set ACC manually to the target speed shown on screen and let openpilot stabilize lateral. After 1 seconds of steady straight driving, the maneuver will begin automatically. openpilot lateral control stays engaged between maneuvers normally while waiting for the next maneuver's readiness conditions. The maneuver will be aborted and repeated if speed is out of range, steering is touched or openpilot disengages. + +6. When the testing is complete, you'll see an alert that says "Maneuvers Finished." Complete the route by pulling over and turning off the vehicle. + +7. Visit https://connect.comma.ai and locate the route(s). They will stand out with lots of orange intervals in their timeline. Ensure "All logs" show as "uploaded." + + ![image](https://github.com/user-attachments/assets/cfe4c6d9-752f-4b24-b421-4b90a01933dc) + +8. Gather the route ID and then run the report generator. The file will be exported to the same directory: + + ```sh + $ python tools/lateral_maneuvers/generate_report.py 98395b7c5b27882e/000001cc--5a73bde686 + + processing report for KIA_EV6 + plotting maneuver: step right 20mph, runs: 3 + plotting maneuver: step left 20mph, runs: 3 + plotting maneuver: sine 0.5Hz 20mph, runs: 3 + plotting maneuver: step right 30mph, runs: 3 + + Opening report: /home/batman/openpilot/tools/lateral_maneuvers/lateral_reports/KIA_EV6_98395b7c5b27882e_000001cc--5a73bde686.html + ``` + +You can reach out on [Discord](https://discord.comma.ai) if you have any questions about these instructions or the tool itself. diff --git a/tools/lateral_maneuvers/generate_report.py b/tools/lateral_maneuvers/generate_report.py new file mode 100755 index 0000000000..9a6fe1b979 --- /dev/null +++ b/tools/lateral_maneuvers/generate_report.py @@ -0,0 +1,249 @@ +#!/usr/bin/env python3 +import argparse +import base64 +import io +import math +import numpy as np +import os +import webbrowser +from collections import defaultdict +from pathlib import Path +import matplotlib.pyplot as plt +from openpilot.common.utils import tabulate + +from cereal import car +from openpilot.common.filter_simple import FirstOrderFilter +from openpilot.selfdrive.controls.lib.latcontrol_torque import LP_FILTER_CUTOFF_HZ +from openpilot.tools.lib.logreader import LogReader +from openpilot.system.hardware.hw import Paths +from openpilot.common.constants import CV +from openpilot.tools.longitudinal_maneuvers.generate_report import format_car_params + + +def lat_accel(curvature, v): + return curvature * max(v, 1.0) ** 2 + + +def report(platform, route, _description, CP, ID, maneuvers): + output_path = Path(__file__).resolve().parent / "lateral_reports" + output_fn = output_path / f"{platform}_{route.replace('/', '_')}.html" + output_path.mkdir(exist_ok=True) + target_cross_times = defaultdict(list) + + builder = [ + "\n", + "

Lateral maneuver report

\n", + f"

{platform}

\n", + f"

{route}

\n", + f"

{ID.gitCommit}, {ID.gitBranch}, {ID.gitRemote}

\n", + ] + if _description is not None: + builder.append(f"

Description: {_description}

\n") + builder.append(f"

CarParams

{format_car_params(CP)}
\n") + builder.append('{ summary }') # to be replaced below + for description, runs in maneuvers: + # filter incomplete runs + completed_runs = [msgs for msgs in runs + if any(m.alertDebug.alertText1 == 'Complete' for m in msgs if m.which() == 'alertDebug')] + print(f'plotting maneuver: {description}') + if not completed_runs: + continue + builder.append("
\n") + builder.append(f"

{description}

\n") + for run, msgs in enumerate(completed_runs): + t_carControl, carControl = zip(*[(m.logMonoTime, m.carControl) for m in msgs if m.which() == 'carControl'], strict=True) + t_carState, carState = zip(*[(m.logMonoTime, m.carState) for m in msgs if m.which() == 'carState'], strict=True) + t_controlsState, controlsState = zip(*[(m.logMonoTime, m.controlsState) for m in msgs if m.which() == 'controlsState'], strict=True) + t_lateralPlan, lateralPlan = zip(*[(m.logMonoTime, m.lateralManeuverPlan) for m in msgs if m.which() == 'lateralManeuverPlan' and m.valid], strict=True) + t_carOutput, carOutput = zip(*[(m.logMonoTime, m.carOutput) for m in msgs if m.which() == 'carOutput'], strict=True) + + # make time relative seconds + t_carControl = [(t - t_carControl[0]) / 1e9 for t in t_carControl] + t_carState = [(t - t_carState[0]) / 1e9 for t in t_carState] + t_controlsState = [(t - t_controlsState[0]) / 1e9 for t in t_controlsState] + t_lateralPlan = [(t - t_lateralPlan[0]) / 1e9 for t in t_lateralPlan] + t_carOutput = [(t - t_carOutput[0]) / 1e9 for t in t_carOutput] + + # maneuver validity + latActive = [m.latActive for m in carControl] + maneuver_valid = all(latActive) and not any(cs.steeringPressed for cs in carState) + + _open = 'open' if maneuver_valid else '' + title = f'Run #{int(run)+1}' + (' (invalid maneuver!)' if not maneuver_valid else '') + + builder.append(f"

{title}

\n") + + baseline_accel = lat_accel(controlsState[0].curvature, carState[0].vEgo) + v_ego = [m.vEgo for m in carState] + cross_markers = [] + + if description.startswith('sine'): + amplitude = max(abs(lat_accel(lp.desiredCurvature, v) - baseline_accel) + for lp, v in zip(lateralPlan, v_ego, strict=False)) + threshold = amplitude * 0.5 + builder.append('

50% peak') + for t, cs, v in zip(t_controlsState, controlsState, v_ego, strict=False): + actual = lat_accel(cs.curvature, v) - baseline_accel + if abs(actual) > threshold: + builder.append(f', crossed in {t:.3f}s') + cross_markers.append((t, actual + baseline_accel)) + if maneuver_valid: + target_cross_times[description].append(t) + break + else: + builder.append(', not crossed') + builder.append('

') + if maneuver_valid: + target_cross_times.setdefault(description, []) + else: + action_targets = [(0, lat_accel(lateralPlan[0].desiredCurvature, v_ego[0]) - baseline_accel)] + for i in range(1, min(len(lateralPlan), len(v_ego))): + if abs(lateralPlan[i].desiredCurvature - lateralPlan[i - 1].desiredCurvature) > 0.001: + desired = lat_accel(lateralPlan[i].desiredCurvature, v_ego[i]) - baseline_accel + action_targets.append((i, desired)) + + for j, (start_i, act_target) in enumerate(action_targets): + start_time = t_lateralPlan[start_i] + end_time = t_lateralPlan[action_targets[j + 1][0]] if j + 1 < len(action_targets) else t_controlsState[-1] + + builder.append(f'

aTarget: {round(act_target, 1)} m/s^2') + prev_crossed = False + for t, cs, v in zip(t_controlsState, controlsState, v_ego, strict=False): + if not (start_time <= t <= end_time): + continue + actual_accel = lat_accel(cs.curvature, v) - baseline_accel + crossed = (0 < act_target < actual_accel) or (0 > act_target > actual_accel) + if crossed and prev_crossed: + cross_time = t - start_time + builder.append(f', crossed in {cross_time:.3f}s') + cross_markers.append((t, act_target + baseline_accel)) + if maneuver_valid: + target_cross_times[description].append(cross_time) + break + prev_crossed = crossed + else: + builder.append(', not crossed') + builder.append('

') + if maneuver_valid: + target_cross_times.setdefault(description, []) + + plt.rcParams['font.size'] = 40 + fig = plt.figure(figsize=(30, 30)) + ax = fig.subplots(4, 1, sharex=True, gridspec_kw={'height_ratios': [5, 3, 3, 3]}) + + ax[0].grid(linewidth=4) + desired_lat_accel = [lat_accel(m.desiredCurvature, v) for m, v in zip(lateralPlan, v_ego, strict=False)] + if description.startswith('sine'): + ax[0].plot(t_lateralPlan[:len(desired_lat_accel)], desired_lat_accel, label='desired lat accel', linewidth=6) + else: + t_desired = [t_lateralPlan[0]] + t_lateralPlan[:len(desired_lat_accel)] + desired_lat_accel = [baseline_accel] + desired_lat_accel + ax[0].step(t_desired, desired_lat_accel, label='desired lat accel', linewidth=6, where='post') + actual_lat_accel = [lat_accel(cs.curvature, v) for cs, v in zip(controlsState, v_ego, strict=False)] + ax[0].plot(t_controlsState[:len(actual_lat_accel)], actual_lat_accel, label='actual lat accel', linewidth=6) + ax[0].set_ylabel('Lateral Accel (m/s^2)') + + for ct, cv in cross_markers: + ax[0].plot(ct, cv, marker='o', markersize=50, markeredgewidth=7, markeredgecolor='black', markerfacecolor='None') + + ax2 = ax[0].twinx() + if CP.steerControlType == car.CarParams.SteerControlType.angle: + ax2.plot(t_carOutput, [-m.actuatorsOutput.steeringAngleDeg for m in carOutput], 'C2', label='steer angle', linewidth=6) + else: + ax2.plot(t_carOutput, [-m.actuatorsOutput.torque for m in carOutput], 'C2', label='steer torque', linewidth=6) + + h1, l1 = ax[0].get_legend_handles_labels() + h2, l2 = ax2.get_legend_handles_labels() + ax[0].legend(h1 + h2, l1 + l2, prop={'size': 30}) + + ax[1].grid(linewidth=4) + ax[1].plot(t_carState, [v * CV.MS_TO_MPH for v in v_ego], label='vEgo', linewidth=6) + ax[1].set_ylabel('Velocity (mph)') + ax[1].yaxis.set_major_formatter(plt.FormatStrFormatter('%.1f')) + ax[1].legend() + + t_accel = np.array(t_controlsState[:len(actual_lat_accel)]) + raw_jerk = np.gradient(actual_lat_accel, t_accel) + dt_avg = np.mean(np.diff(t_accel)) + jerk_filter = FirstOrderFilter(0.0, 1 / (2 * np.pi * LP_FILTER_CUTOFF_HZ), dt_avg) + filtered_jerk = [jerk_filter.update(j) for j in raw_jerk] + ax[2].grid(linewidth=4) + ax[2].plot(t_accel, filtered_jerk, label='actual jerk', linewidth=6) + if CP.steerControlType == car.CarParams.SteerControlType.torque: + desired_jerk = [cs.lateralControlState.torqueState.desiredLateralJerk for cs in controlsState] + ax[2].plot(t_controlsState[:len(controlsState)], desired_jerk, label='desired jerk', linewidth=6) + ax[2].set_ylabel('Jerk (m/s^3)') + ax[2].legend() + + ax[3].grid(linewidth=4) + ax[3].plot(t_carControl, [math.degrees(m.orientationNED[0]) for m in carControl], label='roll', linewidth=6) + ax[3].set_ylabel('Roll (deg)') + ax[3].legend() + + ax[-1].set_xlabel("Time (s)") + fig.tight_layout() + + buffer = io.BytesIO() + fig.savefig(buffer, format='webp') + plt.close(fig) + buffer.seek(0) + builder.append(f"\n") + builder.append("
\n") + + summary = ["

Summary

\n"] + cols = ['maneuver', 'crossed', 'mean', 'min', 'max'] + table = [] + for description, times in target_cross_times.items(): + l = [description, len(times)] + if len(times): + l.extend([round(sum(times) / len(times), 2), round(min(times), 2), round(max(times), 2)]) + table.append(l) + summary.append(tabulate(table, headers=cols, tablefmt='html', numalign='left') + '\n') + + sum_idx = builder.index('{ summary }') + builder[sum_idx:sum_idx + 1] = summary + + with open(output_fn, "w") as f: + f.write(''.join(builder)) + + print(f"\nOpening report: {output_fn}\n") + webbrowser.open_new_tab(str(output_fn)) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Generate lateral maneuver report from route') + parser.add_argument('route', type=str, help='Route name (e.g. 00000000--5f742174be)') + parser.add_argument('description', type=str, nargs='?') + + args = parser.parse_args() + + if '/' in args.route or '|' in args.route: + lr = LogReader(args.route, only_union_types=True) + else: + segs = [seg for seg in os.listdir(Paths.log_root()) if args.route in seg] + lr = LogReader([os.path.join(Paths.log_root(), seg, 'rlog.zst') for seg in segs], only_union_types=True) + + CP = lr.first('carParams') + ID = lr.first('initData') + platform = CP.carFingerprint + print('processing report for', platform) + + maneuvers: list[tuple[str, list[list]]] = [] + active_prev = False + description_prev = None + + for msg in lr: + if msg.which() == 'alertDebug': + active = 'Active' in msg.alertDebug.alertText1 or msg.alertDebug.alertText1 == 'Complete' + if active and not active_prev: + if msg.alertDebug.alertText2 == description_prev: + maneuvers[-1][1].append([]) + else: + maneuvers.append((msg.alertDebug.alertText2, [[]])) + description_prev = maneuvers[-1][0] + active_prev = active + + if active_prev: + maneuvers[-1][1][-1].append(msg) + + report(platform, args.route, args.description, CP, ID, maneuvers) diff --git a/tools/lateral_maneuvers/lateral_maneuversd.py b/tools/lateral_maneuvers/lateral_maneuversd.py new file mode 100755 index 0000000000..d8a7185410 --- /dev/null +++ b/tools/lateral_maneuvers/lateral_maneuversd.py @@ -0,0 +1,180 @@ +#!/usr/bin/env python3 +import numpy as np +from dataclasses import dataclass + +from cereal import messaging, car +from openpilot.common.constants import CV +from openpilot.common.realtime import DT_MDL +from openpilot.common.params import Params +from openpilot.common.swaglog import cloudlog +from openpilot.selfdrive.controls.lib.drive_helpers import MIN_SPEED +from openpilot.tools.longitudinal_maneuvers.maneuversd import Action, Maneuver as _Maneuver + +# thresholds for starting maneuvers +MAX_SPEED_DEV = 0.7 # deviation in m/s +MAX_CURV = 0.002 # 500 m radius +MAX_ROLL = 0.08 # 4.56° +TIMER = 2.0 # sec stable conditions before starting maneuver + +@dataclass +class Maneuver(_Maneuver): + _baseline_curvature: float = 0.0 + + def get_accel(self, v_ego: float, lat_active: bool, curvature: float, roll: float) -> float: + self._run_completed = False + # only start maneuver on straight, flat roads + ready = abs(v_ego - self.initial_speed) < MAX_SPEED_DEV and lat_active and abs(curvature) < MAX_CURV and abs(roll) < MAX_ROLL + self._ready_cnt = (self._ready_cnt + 1) if ready else max(self._ready_cnt - 1, 0) + + if self._ready_cnt > (TIMER / DT_MDL): + if not self._active: + self._baseline_curvature = curvature + self._active = True + + if not self._active: + return 0.0 + + return self._step() + + def reset(self): + super().reset() + self._ready_cnt = 0 + + +def _sine_action(amplitude, period, duration): + t = np.linspace(0, duration, int(duration / DT_MDL) + 1) + a = amplitude * np.sin(2 * np.pi * t / period) + return Action(a.tolist(), t.tolist()) + + +MANEUVERS = [ + Maneuver( + "step right 20mph", + [Action([0.5], [1.0]), Action([-0.5], [1.5])], + repeat=2, + initial_speed=20. * CV.MPH_TO_MS, + ), + Maneuver( + "step left 20mph", + [Action([-0.5], [1.0]), Action([0.5], [1.5])], + repeat=2, + initial_speed=20. * CV.MPH_TO_MS, + ), + Maneuver( + "sine 0.5Hz 20mph", + [_sine_action(1.0, 2.0, 2.0), Action([0.0], [0.5])], + repeat=2, + initial_speed=20. * CV.MPH_TO_MS, + ), + Maneuver( + "step right 30mph", + [Action([0.5], [1.0]), Action([-0.5], [1.5])], + repeat=2, + initial_speed=30. * CV.MPH_TO_MS, + ), + Maneuver( + "step left 30mph", + [Action([-0.5], [1.0]), Action([0.5], [1.5])], + repeat=2, + initial_speed=30. * CV.MPH_TO_MS, + ), + Maneuver( + "sine 0.5Hz 30mph", + [_sine_action(1.0, 2.0, 2.0), Action([0.0], [0.5])], + repeat=2, + initial_speed=30. * CV.MPH_TO_MS, + ), +] + + +def main(): + params = Params() + cloudlog.info("lateral_maneuversd is waiting for CarParams") + messaging.log_from_bytes(params.get("CarParams", block=True), car.CarParams) + + sm = messaging.SubMaster(['carState', 'carControl', 'controlsState', 'selfdriveState', 'modelV2'], poll='modelV2') + pm = messaging.PubMaster(['lateralManeuverPlan', 'alertDebug']) + + maneuvers = iter(MANEUVERS) + maneuver = None + complete_cnt = 0 + display_holdoff = 0 + prev_text = '' + + while True: + sm.update() + + if maneuver is None: + maneuver = next(maneuvers, None) + + alert_msg = messaging.new_message('alertDebug') + alert_msg.valid = True + + plan_send = messaging.new_message('lateralManeuverPlan') + + accel = 0 + v_ego = max(sm['carState'].vEgo, 0) + curvature = sm['controlsState'].desiredCurvature + + if complete_cnt > 0: + complete_cnt -= 1 + alert_msg.alertDebug.alertText1 = 'Completed' + alert_msg.alertDebug.alertText2 = maneuver.description + elif maneuver is not None: + # reset maneuver on steering override or out of range speed + if sm['carState'].steeringPressed or (maneuver.active and abs(v_ego - maneuver.initial_speed) > MAX_SPEED_DEV): + maneuver.reset() + + roll = sm['carControl'].orientationNED[0] if len(sm['carControl'].orientationNED) == 3 else 0.0 + accel = maneuver.get_accel(v_ego, sm['carControl'].latActive, curvature, roll) + + if maneuver._run_completed: + complete_cnt = int(1.0 / DT_MDL) + alert_msg.alertDebug.alertText1 = 'Complete' + alert_msg.alertDebug.alertText2 = maneuver.description + elif maneuver.active: + action_remaining = maneuver.actions[maneuver._action_index].time_bp[-1] - maneuver._action_frames * DT_MDL + if maneuver.description.startswith('sine'): + freq = maneuver.description.split()[1] + alert_msg.alertDebug.alertText1 = f'Active sine {freq} {max(action_remaining, 0):.1f}s' + else: + alert_msg.alertDebug.alertText1 = f'Active {accel:+.1f}m/s² {max(action_remaining, 0):.1f}s' + alert_msg.alertDebug.alertText2 = maneuver.description + elif not (abs(v_ego - maneuver.initial_speed) < MAX_SPEED_DEV and sm['carControl'].latActive): + alert_msg.alertDebug.alertText1 = f'Set speed to {maneuver.initial_speed * CV.MS_TO_MPH:0.0f} mph' + elif maneuver._ready_cnt > 0: + ready_time = max(TIMER - maneuver._ready_cnt * DT_MDL, 0) + alert_msg.alertDebug.alertText1 = f'Starting: {int(ready_time) + 1}' + alert_msg.alertDebug.alertText2 = maneuver.description + else: + curv_ok = abs(curvature) < MAX_CURV + reason = 'road not straight' if not curv_ok else 'road not flat' + alert_msg.alertDebug.alertText1 = f'Waiting: {reason}' + alert_msg.alertDebug.alertText2 = maneuver.description + else: + alert_msg.alertDebug.alertText1 = 'Maneuvers Finished' + + # prevent flickering text + setup = ('Set speed', 'Starting', 'Waiting') + text = alert_msg.alertDebug.alertText1 + same = text == prev_text or (text.startswith('Starting') and prev_text.startswith('Starting')) + if not same and text.startswith(setup) and prev_text.startswith(setup) and display_holdoff > 0: + alert_msg.alertDebug.alertText1 = prev_text + display_holdoff -= 1 + else: + prev_text = text + display_holdoff = int(0.5 / DT_MDL) if text.startswith(setup) else 0 + + pm.send('alertDebug', alert_msg) + + plan_send.valid = maneuver is not None and maneuver.active and complete_cnt == 0 + if plan_send.valid: + plan_send.lateralManeuverPlan.desiredCurvature = maneuver._baseline_curvature + accel / max(v_ego, MIN_SPEED) ** 2 + pm.send('lateralManeuverPlan', plan_send) + + if maneuver is not None and maneuver.finished and complete_cnt == 0: + maneuver = None + + +if __name__ == "__main__": + main() diff --git a/tools/longitudinal_maneuvers/maneuversd.py b/tools/longitudinal_maneuvers/maneuversd.py index c17ae23757..f8dc6787cc 100755 --- a/tools/longitudinal_maneuvers/maneuversd.py +++ b/tools/longitudinal_maneuvers/maneuversd.py @@ -27,23 +27,14 @@ class Maneuver: _active: bool = False _finished: bool = False + _run_completed: bool = False _action_index: int = 0 _action_frames: int = 0 _ready_cnt: int = 0 _repeated: int = 0 - def get_accel(self, v_ego: float, long_active: bool, standstill: bool, cruise_standstill: bool) -> float: - ready = abs(v_ego - self.initial_speed) < 0.3 and long_active and not cruise_standstill - if self.initial_speed < 0.01: - ready = ready and standstill - self._ready_cnt = (self._ready_cnt + 1) if ready else 0 - - if self._ready_cnt > (3. / DT_MDL): - self._active = True - - if not self._active: - return min(max(self.initial_speed - v_ego, -2.), 2.) - + def _step(self) -> float: + self._run_completed = False action = self.actions[self._action_index] action_accel = np.interp(self._action_frames * DT_MDL, action.time_bp, action.accel_bp) @@ -58,15 +49,34 @@ class Maneuver: # repeat maneuver elif self._repeated < self.repeat: self._repeated += 1 - self._action_index = 0 - self._action_frames = 0 - self._active = False + self._run_completed = True + self.reset() # finish maneuver else: + self._run_completed = True self._finished = True return float(action_accel) + def get_accel(self, v_ego: float, long_active: bool, standstill: bool, cruise_standstill: bool) -> float: + ready = abs(v_ego - self.initial_speed) < 0.3 and long_active and not cruise_standstill + if self.initial_speed < 0.01: + ready = ready and standstill + self._ready_cnt = (self._ready_cnt + 1) if ready else 0 + + if self._ready_cnt > (3. / DT_MDL): + self._active = True + + if not self._active: + return min(max(self.initial_speed - v_ego, -2.), 2.) + + return self._step() + + def reset(self): + self._active = False + self._action_frames = 0 + self._action_index = 0 + @property def finished(self): return self._finished From 9be7a48ccd4dca7c59c5e107ca0d8a5baaee8a7b Mon Sep 17 00:00:00 2001 From: Jason Young <46612682+jyoung8607@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:45:34 -0700 Subject: [PATCH 26/33] bump opendbc (#37738) * bump opendbc * regen CARS.md * bump opendbc * regen CARS.md --- docs/CARS.md | 127 ++++++++++++++++++++++++++------------------------- opendbc_repo | 2 +- 2 files changed, 65 insertions(+), 64 deletions(-) diff --git a/docs/CARS.md b/docs/CARS.md index 097f45e34f..56f80d1606 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -13,14 +13,14 @@ A supported vehicle is one that just works when you install a comma device. All |Acura|MDX 2025-26|All except Type S|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Honda Bosch C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Acura|RDX 2016-18|AcuraWatch Plus or Advance Package|openpilot|26 mph|12 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 Honda Nidec connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Acura|RDX 2019-21|All|openpilot available[1](#footnotes)|0 mph|3 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Honda Bosch A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|Acura|TLX 2021|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Honda Bosch A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| +|Acura|TLX 2021-22|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Honda Bosch A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Acura|TLX 2025|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Honda Bosch C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|Audi|A3 2014-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Audi|A3 Sportback e-tron 2017-18|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Audi|Q2 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Audi|Q3 2019-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Audi|RS3 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Audi|S3 2015-17|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|A3 2014-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|A3 Sportback e-tron 2017-18|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|Q2 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|Q3 2019-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|RS3 2018|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Audi[11](#footnotes)|S3 2015-17|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Chevrolet|Bolt EUV 2022-23|Premier or Premier Redline Trim, without Super Cruise Package|openpilot available[1](#footnotes)|3 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 GM connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 harness box
- 1 mount
Buy Here
||| |Chevrolet|Bolt EV 2022-23|2LT Trim with Adaptive Cruise Control Package|openpilot available[1](#footnotes)|3 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 GM connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 harness box
- 1 mount
Buy Here
||| |Chevrolet|Equinox 2019-22|Adaptive Cruise Control (ACC)|openpilot available[1](#footnotes)|3 mph|6 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 GM connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 harness box
- 1 mount
Buy Here
||| @@ -32,7 +32,7 @@ A supported vehicle is one that just works when you install a comma device. All |Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Chrysler|Pacifica Hybrid 2019-25|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |comma|body|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|None||| -|CUPRA|Ateca 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|CUPRA[11](#footnotes)|Ateca 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Dodge|Durango 2020-21|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 FCA connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Ford|Bronco Sport 2021-24|Co-Pilot360 Assist+|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Ford Q3 connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Ford|Escape 2020-22|Co-Pilot360 Assist+|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Ford Q3 connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| @@ -176,7 +176,7 @@ A supported vehicle is one that just works when you install a comma device. All |Kia|Niro Hybrid 2018|Smart Cruise Control (SCC)|Stock|10 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 Hyundai C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Hybrid 2021|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai D connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Hybrid 2022|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai F connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|Kia|Niro Hybrid 2023|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| +|Kia|Niro Hybrid 2023-24|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai A connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Plug-in Hybrid 2018-19|All|Stock|10 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 Hyundai C connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Plug-in Hybrid 2020|Smart Cruise Control (SCC)|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai D connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Kia|Niro Plug-in Hybrid 2021|Smart Cruise Control (SCC)|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Hyundai D connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| @@ -220,8 +220,8 @@ A supported vehicle is one that just works when you install a comma device. All |Lexus|UX Hybrid 2019-24|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Toyota A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Lincoln|Aviator 2020-24|Co-Pilot360 Plus|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Ford Q3 connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Lincoln|Aviator Plug-in Hybrid 2020-24|Co-Pilot360 Plus|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Ford Q3 connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|MAN|eTGE 2020-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|MAN|TGE 2017-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|MAN[11](#footnotes)|eTGE 2020-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|MAN[11](#footnotes)|TGE 2017-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Mazda|CX-5 2022-25|All|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Mazda connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Mazda|CX-9 2021-23|All|Stock|0 mph|28 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 Mazda connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Nissan[5](#footnotes)|Altima 2019-20, 2024|ProPILOT Assist|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 Nissan B connector
- 1 OBD-C cable (2 ft)
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| @@ -231,8 +231,8 @@ A supported vehicle is one that just works when you install a comma device. All |Ram|1500 2019-24|Adaptive Cruise Control (ACC)|Stock|0 mph|32 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Ram connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Rivian|R1S 2022-24|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Rivian A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Rivian|R1T 2022-24|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Rivian A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|SEAT|Ateca 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|SEAT|Leon 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|SEAT[11](#footnotes)|Ateca 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|SEAT[11](#footnotes)|Leon 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Subaru|Ascent 2019-21|All[6](#footnotes)|openpilot available[1,7](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| |Subaru|Crosstrek 2018-19|EyeSight Driver Assistance[6](#footnotes)|openpilot available[1,7](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| |Subaru|Crosstrek 2020-23|EyeSight Driver Assistance[6](#footnotes)|openpilot available[1,7](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| @@ -243,15 +243,15 @@ A supported vehicle is one that just works when you install a comma device. All |Subaru|Outback 2020-22|All[6](#footnotes)|Stock|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru B connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| |Subaru|XV 2018-19|EyeSight Driver Assistance[6](#footnotes)|openpilot available[1,7](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| |Subaru|XV 2020-21|EyeSight Driver Assistance[6](#footnotes)|openpilot available[1,7](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Subaru A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
Tools- 1 Pry Tool
- 1 Socket Wrench 8mm or 5/16" (deep)
||| -|Škoda|Fabia 2022-23[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Škoda|Kamiq 2021-23[11,13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Škoda|Karoq 2019-23[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Škoda|Kodiaq 2017-23[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Škoda|Octavia 2015-19[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Škoda|Octavia RS 2016[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Škoda|Octavia Scout 2017-19[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Škoda|Scala 2020-23[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Škoda|Superb 2015-22[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda|Fabia 2022-23[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Škoda|Kamiq 2021-23[12,14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Škoda[11](#footnotes)|Karoq 2019-23[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda[11](#footnotes)|Kodiaq 2017-23[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda[11](#footnotes)|Octavia 2015-19[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda[11](#footnotes)|Octavia RS 2016[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda[11](#footnotes)|Octavia Scout 2017-19[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Škoda|Scala 2020-23[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Škoda[11](#footnotes)|Superb 2015-22[14](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Tesla[9](#footnotes)|Model 3 (with HW3) 2019-23[8](#footnotes)|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Tesla A connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Tesla[9](#footnotes)|Model 3 (with HW4) 2024-25[8](#footnotes)|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Tesla B connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| |Tesla[9](#footnotes)|Model Y (with HW3) 2020-23[8](#footnotes)|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Tesla A connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| @@ -301,42 +301,42 @@ A supported vehicle is one that just works when you install a comma device. All |Toyota|RAV4 Hybrid 2022|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Toyota A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Toyota|RAV4 Hybrid 2023-25|All|openpilot available[1](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Toyota A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| |Toyota|Sienna 2018-20|All|Stock|19 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 Toyota A connector
- 1 comma four
- 1 comma power v3
- 1 harness box
- 1 mount
Buy Here
||| -|Volkswagen|Arteon 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Arteon eHybrid 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Arteon R 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Arteon Shooting Brake 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Atlas 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Atlas Cross Sport 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|California 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Caravelle 2020|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|CC 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Crafter 2017-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|e-Crafter 2018-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|e-Golf 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf Alltrack 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf GTD 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf GTE 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf GTI 2015-21|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf R 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Golf SportsVan 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Grand California 2019-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Jetta 2019-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Jetta GLI 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Passat 2015-22[12](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Passat Alltrack 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Passat GTE 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Polo 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Volkswagen|Polo GTI 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Volkswagen|T-Cross 2021|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[15](#footnotes)||| -|Volkswagen|T-Roc 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Taos 2022-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Teramont 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Teramont Cross Sport 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Teramont X 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Tiguan 2018-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Tiguan eHybrid 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| -|Volkswagen|Touran 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,14](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Arteon 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Arteon eHybrid 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Arteon R 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Arteon Shooting Brake 2020-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Atlas 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Atlas Cross Sport 2020-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|California 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Caravelle 2020|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|CC 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Crafter 2017-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|e-Crafter 2018-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|e-Golf 2014-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf Alltrack 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf GTD 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf GTE 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf GTI 2015-21|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-empty.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf R 2015-19|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Golf SportsVan 2015-20|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Grand California 2019-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|31 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Jetta 2019-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Jetta GLI 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen|Passat 2015-22[13](#footnotes)|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Passat Alltrack 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Passat GTE 2015-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen|Polo 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Volkswagen|Polo GTI 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Volkswagen|T-Cross 2021|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
[16](#footnotes)||| +|Volkswagen[11](#footnotes)|T-Roc 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Taos 2022-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Teramont 2018-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Teramont Cross Sport 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Teramont X 2021-22|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Tiguan 2018-24|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Tiguan eHybrid 2021-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| +|Volkswagen[11](#footnotes)|Touran 2016-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[1,15](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
Parts- 1 OBD-C cable (2 ft)
- 1 VW J533 connector
- 1 comma four
- 1 harness box
- 1 long OBD-C cable (9.5 ft)
- 1 mount
Buy Here
||| ### Footnotes 1openpilot Longitudinal Control (Alpha) is available behind a toggle; the toggle is only available in non-release branches such as `nightly-dev`.
@@ -349,11 +349,12 @@ A supported vehicle is one that just works when you install a comma device. All 8Some 2023 model years have HW4. To check which hardware type your vehicle has, look for Autopilot computer under Software -> Additional Vehicle Information on your vehicle's touchscreen. See this page for more information.
9See more setup details for Tesla.
10openpilot operates above 28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control.
-11Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform.
-12Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets.
-13Some Škoda vehicles are equipped with heated windshields, which are known to block GPS signal needed for some comma four functionality.
-14Only available for vehicles using a gateway (J533) harness. At this time, vehicles using a camera harness are limited to using stock ACC.
-15Model-years 2022 and beyond may have a combined CAN gateway and BCM, which is supported by openpilot in software, but doesn't yet have a harness available from the comma store.
+11The J533 harness plugs in at the CAN gateway under the dashboard, just above the steering column. More information can be found at this guide.
+12Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform.
+13Refers only to the MQB-based European B8 Passat, not the NMS Passat in the USA/China/Mideast markets.
+14Some Škoda vehicles are equipped with heated windshields, which are known to block GPS signal needed for some comma four functionality.
+15Only available for vehicles using a gateway (J533) harness. At this time, vehicles using a camera harness are limited to using stock ACC.
+16Model-years 2022 and beyond may have a combined CAN gateway and BCM, which is supported by openpilot in software, but doesn't yet have a harness available from the comma store.
## Community Maintained Cars Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make [on our wiki](https://wiki.comma.ai/). diff --git a/opendbc_repo b/opendbc_repo index e72e18e113..00431e091f 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit e72e18e113b8649fdda3e78b85110586751f1a81 +Subproject commit 00431e091fdbd2301a0104a44a40e5bffe37b917 From 8badc7d8133497f8b89e57e1e3afae454bb4f32f Mon Sep 17 00:00:00 2001 From: Jason Young <46612682+jyoung8607@users.noreply.github.com> Date: Sat, 28 Mar 2026 21:20:35 -0700 Subject: [PATCH 27/33] controls: HKG angle control saturation from car port safety (#37746) --- selfdrive/controls/lib/latcontrol_angle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/latcontrol_angle.py b/selfdrive/controls/lib/latcontrol_angle.py index 808c9a659a..a7d0403248 100644 --- a/selfdrive/controls/lib/latcontrol_angle.py +++ b/selfdrive/controls/lib/latcontrol_angle.py @@ -11,7 +11,7 @@ class LatControlAngle(LatControl): def __init__(self, CP, CI, dt): super().__init__(CP, CI, dt) self.sat_check_min_speed = 5. - self.use_steer_limited_by_safety = CP.brand == "tesla" + self.use_steer_limited_by_safety = CP.brand in ("tesla", "hyundai") def update(self, active, CS, VM, params, steer_limited_by_safety, desired_curvature, curvature_limited, lat_delay): angle_log = log.ControlsState.LateralAngleState.new_message() From 1dec68014f73eccb4570821d6bfe2a1f6f8126e4 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 30 Mar 2026 15:12:34 -0700 Subject: [PATCH 28/33] rivian gen2! --- RELEASES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index a3a95ae6a8..55141710d0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,7 +1,8 @@ -Version 0.11.1 (2026-04-08) +Version 0.11.1 (2026-04-22) ======================== * New driver monitoring model * Improved image processing pipeline for driver camera +* Rivian R1S and R1T 2025 support thanks to lukasloetkolben! Version 0.11.0 (2026-03-17) ======================== From bf43c7e8c7f3033786c91ba49dacfa524badf127 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 31 Mar 2026 18:22:56 -0700 Subject: [PATCH 29/33] fix scaled exclamation point --- selfdrive/ui/mici/onroad/hud_renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/mici/onroad/hud_renderer.py b/selfdrive/ui/mici/onroad/hud_renderer.py index 35d04fe702..56d83992ff 100644 --- a/selfdrive/ui/mici/onroad/hud_renderer.py +++ b/selfdrive/ui/mici/onroad/hud_renderer.py @@ -120,7 +120,7 @@ class HudRenderer(Widget): self._txt_wheel: rl.Texture = gui_app.texture('icons_mici/wheel.png', 50, 50) self._txt_wheel_critical: rl.Texture = gui_app.texture('icons_mici/wheel_critical.png', 50, 50) - self._txt_exclamation_point: rl.Texture = gui_app.texture('icons_mici/exclamation_point.png', 44, 44) + self._txt_exclamation_point: rl.Texture = gui_app.texture('icons_mici/exclamation_point.png', 9, 44) self._wheel_alpha_filter = FirstOrderFilter(0, 0.05, 1 / gui_app.target_fps) self._wheel_y_filter = FirstOrderFilter(0, 0.1, 1 / gui_app.target_fps) From 5dcaf3bef877a5ddc9fa7f89f185624b81a82ab7 Mon Sep 17 00:00:00 2001 From: ZwX1616 Date: Wed, 1 Apr 2026 00:40:13 -0700 Subject: [PATCH 30/33] DM: fewer alerts during maneuvers (#37751) * 2in1 * clip * drop aodm lowspeed * cleanup * add lower bd * that was random --- selfdrive/monitoring/helpers.py | 29 +++++++++++++++++-------- selfdrive/monitoring/test_monitoring.py | 8 +++---- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/selfdrive/monitoring/helpers.py b/selfdrive/monitoring/helpers.py index 0b54504b64..19d169da42 100644 --- a/selfdrive/monitoring/helpers.py +++ b/selfdrive/monitoring/helpers.py @@ -1,4 +1,4 @@ -from math import atan2 +from math import atan2, radians import numpy as np from cereal import car, log @@ -43,6 +43,9 @@ class DRIVER_MONITOR_SETTINGS: self._POSE_YAW_THRESHOLD = 0.4020 self._POSE_YAW_THRESHOLD_SLACK = 0.5042 self._POSE_YAW_THRESHOLD_STRICT = self._POSE_YAW_THRESHOLD + self._POSE_YAW_MIN_STEER_DEG = 30 + self._POSE_YAW_STEER_FACTOR = 0.15 + self._POSE_YAW_STEER_MAX_OFFSET = 0.3927 self._PITCH_NATURAL_OFFSET = 0.011 # initial value before offset is learned self._PITCH_NATURAL_THRESHOLD = 0.449 self._YAW_NATURAL_OFFSET = 0.075 # initial value before offset is learned @@ -59,7 +62,6 @@ class DRIVER_MONITOR_SETTINGS: self._POSESTD_THRESHOLD = 0.3 self._HI_STD_FALLBACK_TIME = int(10 / self._DT_DMON) # fall back to wheel touch if model is uncertain for 10s self._DISTRACTED_FILTER_TS = 0.25 # 0.6Hz - self._ALWAYS_ON_ALERT_MIN_SPEED = 11 self._POSE_CALIB_MIN_SPEED = 13 # 30 mph self._POSE_OFFSET_MIN_COUNT = int(60 / self._DT_DMON) # valid data counts before calibration completes, 1min cumulative @@ -101,6 +103,7 @@ class DriverPose: self.low_std = True self.cfactor_pitch = 1. self.cfactor_yaw = 1. + self.steer_yaw_offset = 0. class DriverProb: def __init__(self, raw_priors, max_trackable): @@ -238,7 +241,11 @@ class DriverMonitoring: yaw_error = self.pose.yaw - min(max(self.pose.yaw_offseter.filtered_stat.mean(), self.settings._YAW_MIN_OFFSET), self.settings._YAW_MAX_OFFSET) pitch_error = 0 if pitch_error > 0 else abs(pitch_error) # no positive pitch limit - yaw_error = abs(yaw_error) + + if yaw_error * self.pose.steer_yaw_offset > 0: # unidirectional + yaw_error = max(abs(yaw_error) - min(abs(self.pose.steer_yaw_offset), self.settings._POSE_YAW_STEER_MAX_OFFSET), 0.) + else: + yaw_error = abs(yaw_error) pitch_threshold = self.settings._POSE_PITCH_THRESHOLD * self.pose.cfactor_pitch if self.pose.calibrated else self.settings._PITCH_NATURAL_THRESHOLD yaw_threshold = self.settings._POSE_YAW_THRESHOLD * self.pose.cfactor_yaw @@ -254,7 +261,7 @@ class DriverMonitoring: return distracted_types - def _update_states(self, driver_state, cal_rpy, car_speed, op_engaged, standstill, demo_mode=False): + def _update_states(self, driver_state, cal_rpy, car_speed, op_engaged, standstill, demo_mode=False, steering_angle_deg=0.): rhd_pred = driver_state.wheelOnRightProb # calibrates only when there's movement and either face detected if car_speed > self.settings._WHEELPOS_CALIB_MIN_SPEED and (driver_state.leftDriverData.faceProb > self.settings._FACE_THRESHOLD or @@ -277,8 +284,11 @@ class DriverMonitoring: self.face_detected = driver_data.faceProb > self.settings._FACE_THRESHOLD self.pose.roll, self.pose.pitch, self.pose.yaw = face_orientation_from_net(driver_data.faceOrientation, driver_data.facePosition, cal_rpy) + steer_d = max(abs(steering_angle_deg) - self.settings._POSE_YAW_MIN_STEER_DEG, 0.) + self.pose.steer_yaw_offset = radians(steer_d) * -np.sign(steering_angle_deg) * self.settings._POSE_YAW_STEER_FACTOR if self.wheel_on_right: self.pose.yaw *= -1 + self.pose.steer_yaw_offset *= -1 self.wheel_on_right_last = self.wheel_on_right self.pose.pitch_std = driver_data.faceOrientationStd[0] self.pose.yaw_std = driver_data.faceOrientationStd[1] @@ -360,19 +370,19 @@ class DriverMonitoring: if self.awareness > self.threshold_prompt: return + _reaching_pre = self.awareness - self.step_change <= self.threshold_pre _reaching_audible = self.awareness - self.step_change <= self.threshold_prompt _reaching_terminal = self.awareness - self.step_change <= 0 - standstill_orange_exemption = standstill and _reaching_audible + standstill_exemption = standstill and _reaching_pre always_on_red_exemption = always_on_valid and not op_engaged and _reaching_terminal - always_on_lowspeed_exemption = always_on_valid and not op_engaged and car_speed < self.settings._ALWAYS_ON_ALERT_MIN_SPEED certainly_distracted = self.driver_distraction_filter.x > 0.63 and self.driver_distracted and self.face_detected maybe_distracted = self.hi_stds > self.settings._HI_STD_FALLBACK_TIME or not self.face_detected if certainly_distracted or maybe_distracted: - # should always be counting if distracted unless at standstill (lowspeed for always-on) and reaching orange + # should always be counting if distracted unless at standstill and reaching green # also will not be reaching 0 if DM is active when not engaged - if not (standstill_orange_exemption or always_on_red_exemption or (always_on_lowspeed_exemption and _reaching_audible)): + if not (standstill_exemption or always_on_red_exemption): self.awareness = max(self.awareness - self.step_change, -0.1) alert = None @@ -385,7 +395,7 @@ class DriverMonitoring: elif self.awareness <= self.threshold_prompt: # prompt orange alert alert = EventName.promptDriverDistracted if self.active_monitoring_mode else EventName.promptDriverUnresponsive - elif self.awareness <= self.threshold_pre and not always_on_lowspeed_exemption: + elif self.awareness <= self.threshold_pre: # pre green alert alert = EventName.preDriverDistracted if self.active_monitoring_mode else EventName.preDriverUnresponsive @@ -451,6 +461,7 @@ class DriverMonitoring: op_engaged=enabled, standstill=standstill, demo_mode=demo, + steering_angle_deg=sm['carState'].steeringAngleDeg, ) # Update distraction events diff --git a/selfdrive/monitoring/test_monitoring.py b/selfdrive/monitoring/test_monitoring.py index 6ea9b80283..15eb2c8605 100644 --- a/selfdrive/monitoring/test_monitoring.py +++ b/selfdrive/monitoring/test_monitoring.py @@ -186,10 +186,10 @@ class TestMonitoring: standstill_vector = always_true[:] standstill_vector[int(_redlight_time/DT_DMON):] = [False] * int((TEST_TIMESPAN-_redlight_time)/DT_DMON) events, d_status = self._run_seq(always_distracted, always_false, always_true, standstill_vector) - assert events[int((d_status.settings._DISTRACTED_TIME-d_status.settings._DISTRACTED_PRE_TIME_TILL_TERMINAL+1)/DT_DMON)].names[0] == \ - EventName.preDriverDistracted - assert events[int((_redlight_time-0.1)/DT_DMON)].names[0] == EventName.preDriverDistracted - assert events[int((_redlight_time+0.5)/DT_DMON)].names[0] == EventName.promptDriverDistracted + assert len(events[int((_redlight_time-0.1)/DT_DMON)]) == 0 + _pre_to_prompt = d_status.settings._DISTRACTED_PRE_TIME_TILL_TERMINAL - d_status.settings._DISTRACTED_PROMPT_TIME_TILL_TERMINAL + assert events[int((_redlight_time+0.5)/DT_DMON)].names[0] == EventName.preDriverDistracted + assert events[int((_redlight_time+_pre_to_prompt+0.5)/DT_DMON)].names[0] == EventName.promptDriverDistracted # engaged, model is somehow uncertain and driver is distracted # - should fall back to wheel touch after uncertain alert From efd5301f6534d6dcb8bcc22bda462450c7afc8d7 Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Wed, 1 Apr 2026 16:11:07 -0700 Subject: [PATCH 31/33] bump opendbc (#37750) * bump opendbc --- opendbc_repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc_repo b/opendbc_repo index 00431e091f..ef70686afe 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit 00431e091fdbd2301a0104a44a40e5bffe37b917 +Subproject commit ef70686afee3e0fe5e6be4938eaafc52e9e77935 From d8569b07ebeed5fcb2b466fcd3824b968b4a8271 Mon Sep 17 00:00:00 2001 From: ZwX1616 Date: Wed, 1 Apr 2026 16:14:15 -0700 Subject: [PATCH 32/33] DM: Lancia Delta HF Integrale model (#37696) * 00c00ac7-7b6e-4546-b86f-7ddd5f0596b4 * mici cleanup * update msg * rename --- cereal/log.capnp | 12 +++++----- .../assets/icons_mici/onroad/glasses.png | 3 --- selfdrive/modeld/dmonitoringmodeld.py | 9 +++----- .../modeld/models/dmonitoring_model.onnx | 4 ++-- selfdrive/monitoring/helpers.py | 19 +++++----------- selfdrive/monitoring/test_monitoring.py | 6 ++--- selfdrive/test/process_replay/model_replay.py | 2 +- .../ui/mici/onroad/driver_camera_dialog.py | 22 ++++--------------- 8 files changed, 24 insertions(+), 53 deletions(-) delete mode 100644 selfdrive/assets/icons_mici/onroad/glasses.png diff --git a/cereal/log.capnp b/cereal/log.capnp index d8e9f56316..56af5ae5f6 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -2176,12 +2176,14 @@ struct DriverStateV2 { facePosition @2 :List(Float32); facePositionStd @3 :List(Float32); faceProb @4 :Float32; - leftEyeProb @5 :Float32; - rightEyeProb @6 :Float32; - leftBlinkProb @7 :Float32; - rightBlinkProb @8 :Float32; - sunglassesProb @9 :Float32; + eyesVisibleProb @14 :Float32; + eyesClosedProb @15 :Float32; phoneProb @13 :Float32; + leftEyeProbDEPRECATED @5 :Float32; + rightEyeProbDEPRECATED @6 :Float32; + leftBlinkProbDEPRECATED @7 :Float32; + rightBlinkProbDEPRECATED @8 :Float32; + sunglassesProbDEPRECATED @9 :Float32; notReadyProbDEPRECATED @12 :List(Float32); occludedProbDEPRECATED @10 :Float32; readyProbDEPRECATED @11 :List(Float32); diff --git a/selfdrive/assets/icons_mici/onroad/glasses.png b/selfdrive/assets/icons_mici/onroad/glasses.png deleted file mode 100644 index 006972fd39..0000000000 --- a/selfdrive/assets/icons_mici/onroad/glasses.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56de402482b5987ed9a0ff3f793a1c89f857304b34fbb8a3deb5b5d4a332be1c -size 3688 diff --git a/selfdrive/modeld/dmonitoringmodeld.py b/selfdrive/modeld/dmonitoringmodeld.py index 28190db3e6..efd8214b9f 100755 --- a/selfdrive/modeld/dmonitoringmodeld.py +++ b/selfdrive/modeld/dmonitoringmodeld.py @@ -80,7 +80,7 @@ def parse_model_output(model_output): face_descs = model_output[f'face_descs_{ds_suffix}'] parsed[f'face_descs_{ds_suffix}'] = face_descs[:, :-6] parsed[f'face_descs_{ds_suffix}_std'] = safe_exp(face_descs[:, -6:]) - for key in ['face_prob', 'left_eye_prob', 'right_eye_prob','left_blink_prob', 'right_blink_prob', 'sunglasses_prob', 'using_phone_prob']: + for key in ['face_prob', 'eyes_visible_prob', 'eyes_closed_prob', 'using_phone_prob']: parsed[f'{key}_{ds_suffix}'] = sigmoid(model_output[f'{key}_{ds_suffix}']) return parsed @@ -90,11 +90,8 @@ def fill_driver_data(msg, model_output, ds_suffix): msg.facePosition = model_output[f'face_descs_{ds_suffix}'][0, 3:5].tolist() msg.facePositionStd = model_output[f'face_descs_{ds_suffix}_std'][0, 3:5].tolist() msg.faceProb = model_output[f'face_prob_{ds_suffix}'][0, 0].item() - msg.leftEyeProb = model_output[f'left_eye_prob_{ds_suffix}'][0, 0].item() - msg.rightEyeProb = model_output[f'right_eye_prob_{ds_suffix}'][0, 0].item() - msg.leftBlinkProb = model_output[f'left_blink_prob_{ds_suffix}'][0, 0].item() - msg.rightBlinkProb = model_output[f'right_blink_prob_{ds_suffix}'][0, 0].item() - msg.sunglassesProb = model_output[f'sunglasses_prob_{ds_suffix}'][0, 0].item() + msg.eyesVisibleProb = model_output[f'eyes_visible_prob_{ds_suffix}'][0, 0].item() + msg.eyesClosedProb = model_output[f'eyes_closed_prob_{ds_suffix}'][0, 0].item() msg.phoneProb = model_output[f'using_phone_prob_{ds_suffix}'][0, 0].item() def get_driverstate_packet(model_output, frame_id: int, location_ts: int, exec_time: float, gpu_exec_time: float): diff --git a/selfdrive/modeld/models/dmonitoring_model.onnx b/selfdrive/modeld/models/dmonitoring_model.onnx index dc621bed03..628f385796 100644 --- a/selfdrive/modeld/models/dmonitoring_model.onnx +++ b/selfdrive/modeld/models/dmonitoring_model.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7aff7ff1dc08bbaf562a8f77380ab5e5914f8557dba2f760d87e4d953f5604b0 -size 7307246 +oid sha256:2fd471febb6e973313ac0d0c6755f6410c1937ba92230b58a433761e8c883072 +size 7364290 diff --git a/selfdrive/monitoring/helpers.py b/selfdrive/monitoring/helpers.py index 19d169da42..90cc565802 100644 --- a/selfdrive/monitoring/helpers.py +++ b/selfdrive/monitoring/helpers.py @@ -32,9 +32,8 @@ class DRIVER_MONITOR_SETTINGS: self._DISTRACTED_PROMPT_TIME_TILL_TERMINAL = 6. self._FACE_THRESHOLD = 0.7 - self._EYE_THRESHOLD = 0.65 - self._SG_THRESHOLD = 0.9 - self._BLINK_THRESHOLD = 0.865 + self._EYE_THRESHOLD = 0.5 + self._BLINK_THRESHOLD = 0.5 self._PHONE_THRESH = 0.5 self._POSE_PITCH_THRESHOLD = 0.3133 @@ -111,11 +110,6 @@ class DriverProb: self.prob_offseter = RunningStatFilter(raw_priors=raw_priors, max_trackable=max_trackable) self.prob_calibrated = False -class DriverBlink: - def __init__(self): - self.left = 0. - self.right = 0. - # model output refers to center of undistorted+leveled image EFL = 598.0 # focal length in K @@ -150,7 +144,7 @@ class DriverMonitoring: wheelpos_filter_raw_priors = (self.settings._WHEELPOS_DATA_AVG, self.settings._WHEELPOS_DATA_VAR, 2) self.wheelpos = DriverProb(raw_priors=wheelpos_filter_raw_priors, max_trackable=self.settings._WHEELPOS_MAX_COUNT) self.pose = DriverPose(settings=self.settings) - self.blink = DriverBlink() + self.blink_prob = 0. self.phone_prob = 0. self.always_on = always_on @@ -253,7 +247,7 @@ class DriverMonitoring: if pitch_error > pitch_threshold or yaw_error > yaw_threshold: distracted_types.append(DistractedType.DISTRACTED_POSE) - if (self.blink.left + self.blink.right)*0.5 > self.settings._BLINK_THRESHOLD: + if self.blink_prob > self.settings._BLINK_THRESHOLD: distracted_types.append(DistractedType.DISTRACTED_BLINK) if self.phone_prob > self.settings._PHONE_THRESH: @@ -294,10 +288,7 @@ class DriverMonitoring: self.pose.yaw_std = driver_data.faceOrientationStd[1] model_std_max = max(self.pose.pitch_std, self.pose.yaw_std) self.pose.low_std = model_std_max < self.settings._POSESTD_THRESHOLD - self.blink.left = driver_data.leftBlinkProb * (driver_data.leftEyeProb > self.settings._EYE_THRESHOLD) \ - * (driver_data.sunglassesProb < self.settings._SG_THRESHOLD) - self.blink.right = driver_data.rightBlinkProb * (driver_data.rightEyeProb > self.settings._EYE_THRESHOLD) \ - * (driver_data.sunglassesProb < self.settings._SG_THRESHOLD) + self.blink_prob = driver_data.eyesClosedProb * (driver_data.eyesVisibleProb > self.settings._EYE_THRESHOLD) self.phone_prob = driver_data.phoneProb self.distracted_types = self._get_distracted_types() diff --git a/selfdrive/monitoring/test_monitoring.py b/selfdrive/monitoring/test_monitoring.py index 15eb2c8605..733ea85bc0 100644 --- a/selfdrive/monitoring/test_monitoring.py +++ b/selfdrive/monitoring/test_monitoring.py @@ -19,10 +19,8 @@ def make_msg(face_detected, distracted=False, model_uncertain=False): ds.leftDriverData.faceOrientation = [0., 0., 0.] ds.leftDriverData.facePosition = [0., 0.] ds.leftDriverData.faceProb = 1. * face_detected - ds.leftDriverData.leftEyeProb = 1. - ds.leftDriverData.rightEyeProb = 1. - ds.leftDriverData.leftBlinkProb = 1. * distracted - ds.leftDriverData.rightBlinkProb = 1. * distracted + ds.leftDriverData.eyesVisibleProb = 1. + ds.leftDriverData.eyesClosedProb = 1. * distracted ds.leftDriverData.faceOrientationStd = [1.*model_uncertain, 1.*model_uncertain, 1.*model_uncertain] ds.leftDriverData.facePositionStd = [1.*model_uncertain, 1.*model_uncertain] # TODO: test both separately when e2e is used diff --git a/selfdrive/test/process_replay/model_replay.py b/selfdrive/test/process_replay/model_replay.py index a6ccaa1047..eb7cdbe34a 100755 --- a/selfdrive/test/process_replay/model_replay.py +++ b/selfdrive/test/process_replay/model_replay.py @@ -76,7 +76,7 @@ def generate_report(proposed, master, tmp, commit): (lambda x: get_idx_if_non_empty(x.wheelOnRightProb), "wheelOnRightProb"), (lambda x: get_idx_if_non_empty(x.leftDriverData.faceProb), "leftDriverData.faceProb"), (lambda x: get_idx_if_non_empty(x.leftDriverData.faceOrientation, 0), "leftDriverData.faceOrientation0"), - (lambda x: get_idx_if_non_empty(x.leftDriverData.leftBlinkProb), "leftDriverData.leftBlinkProb"), + (lambda x: get_idx_if_non_empty(x.leftDriverData.eyesClosedProb), "leftDriverData.eyesClosedProb"), (lambda x: get_idx_if_non_empty(x.leftDriverData.phoneProb), "leftDriverData.phoneProb"), (lambda x: get_idx_if_non_empty(x.rightDriverData.faceProb), "rightDriverData.faceProb"), ], "driverStateV2") diff --git a/selfdrive/ui/mici/onroad/driver_camera_dialog.py b/selfdrive/ui/mici/onroad/driver_camera_dialog.py index e8321b099c..e8b8abb7f5 100644 --- a/selfdrive/ui/mici/onroad/driver_camera_dialog.py +++ b/selfdrive/ui/mici/onroad/driver_camera_dialog.py @@ -39,8 +39,6 @@ class BaseDriverCameraDialog(Widget): self._eye_fill_texture = None self._eye_orange_texture = None self._eye_size = 74 - self._glasses_texture = None - self._glasses_size = 171 self._load_eye_textures() @@ -154,8 +152,6 @@ class BaseDriverCameraDialog(Widget): self._eye_fill_texture = gui_app.texture("icons_mici/onroad/eye_fill.png", self._eye_size, self._eye_size) if self._eye_orange_texture is None: self._eye_orange_texture = gui_app.texture("icons_mici/onroad/eye_orange.png", self._eye_size, self._eye_size) - if self._glasses_texture is None: - self._glasses_texture = gui_app.texture("icons_mici/onroad/glasses.png", self._glasses_size, self._glasses_size) def _draw_face_detection(self, rect: rl.Rectangle): dm_state = ui_state.sm["driverMonitoringState"] @@ -202,31 +198,21 @@ class BaseDriverCameraDialog(Widget): eye_offset_x = 10 eye_offset_y = 10 eye_spacing = self._eye_size + 15 + eyes_prob = driver_data.eyesVisibleProb left_eye_x = rect.x + eye_offset_x left_eye_y = rect.y + eye_offset_y - left_eye_prob = driver_data.leftEyeProb right_eye_x = rect.x + eye_offset_x + eye_spacing right_eye_y = rect.y + eye_offset_y - right_eye_prob = driver_data.rightEyeProb # Draw eyes with opacity based on probability - for eye_x, eye_y, eye_prob in [(left_eye_x, left_eye_y, left_eye_prob), (right_eye_x, right_eye_y, right_eye_prob)]: - fill_opacity = eye_prob - orange_opacity = 1.0 - eye_prob - + fill_opacity = eyes_prob + orange_opacity = 1.0 - eyes_prob + for eye_x, eye_y in [(left_eye_x, left_eye_y), (right_eye_x, right_eye_y)]: rl.draw_texture_v(self._eye_orange_texture, (eye_x, eye_y), rl.Color(255, 255, 255, int(255 * orange_opacity))) rl.draw_texture_v(self._eye_fill_texture, (eye_x, eye_y), rl.Color(255, 255, 255, int(255 * fill_opacity))) - # Draw sunglasses indicator based on sunglasses probability - # Position glasses centered between the two eyes at top left - glasses_x = rect.x + eye_offset_x - 4 - glasses_y = rect.y - glasses_pos = rl.Vector2(glasses_x, glasses_y) - glasses_prob = driver_data.sunglassesProb - rl.draw_texture_v(self._glasses_texture, glasses_pos, rl.Color(70, 80, 161, int(255 * glasses_prob))) - class DriverCameraDialog(NavWidget, BaseDriverCameraDialog): def __init__(self): From cb327933002bc1a00bf60a3c20af2eb7a5f653e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Sch=C3=A4fer?= Date: Wed, 1 Apr 2026 16:24:50 -0700 Subject: [PATCH 33/33] OP model (#37740) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Off policy model * 2f70b996-c604-4a46-9ac9-13ce7534605b/100 * misc fixes * 1cc1791b-4555-41ce-a5cb-ce046967075a/100 * fix model * 6ab6fae5-fbbd-4ad0-928a-b33794f60dba/100 * recomp * update models * qxfinally correct * b8b96ac6-7918-401a-a862-eaf1fdbba88d/100 * wrong plan * wrong plan * Vf9b3fb5f-4d0d-4dcb-bc3a-5e94d1fdcdaa/200 * bump dbc * ready to merge * rename to on-policy * Just cleanup big models for now --------- Co-authored-by: Kacper Rączy --- scripts/reporter.py | 9 +++-- selfdrive/modeld/SConscript | 18 ++-------- selfdrive/modeld/modeld.py | 34 ++++++++++++++----- .../modeld/models/big_driving_policy.onnx | 1 - .../modeld/models/big_driving_vision.onnx | 1 - .../modeld/models/driving_off_policy.onnx | 3 ++ .../modeld/models/driving_on_policy.onnx | 3 ++ selfdrive/modeld/models/driving_policy.onnx | 3 -- selfdrive/modeld/models/driving_vision.onnx | 4 +-- selfdrive/modeld/parse_model_outputs.py | 11 ++++-- 10 files changed, 52 insertions(+), 35 deletions(-) delete mode 120000 selfdrive/modeld/models/big_driving_policy.onnx delete mode 120000 selfdrive/modeld/models/big_driving_vision.onnx create mode 100644 selfdrive/modeld/models/driving_off_policy.onnx create mode 100644 selfdrive/modeld/models/driving_on_policy.onnx delete mode 100644 selfdrive/modeld/models/driving_policy.onnx diff --git a/scripts/reporter.py b/scripts/reporter.py index d894b8af48..64f6cb99b8 100755 --- a/scripts/reporter.py +++ b/scripts/reporter.py @@ -38,6 +38,11 @@ if __name__ == "__main__": continue fn = os.path.basename(f) - master = get_checkpoint(MASTER_PATH + MODEL_PATH + fn) + master_path = MASTER_PATH + MODEL_PATH + fn + if os.path.exists(master_path): + master = get_checkpoint(master_path) + master_col = f"[{master}](https://reporter.comma.life/experiment/{master})" + else: + master_col = "N/A (new model)" pr = get_checkpoint(BASEDIR + MODEL_PATH + fn) - print("|", fn, "|", f"[{master}](https://reporter.comma.life/experiment/{master})", "|", f"[{pr}](https://reporter.comma.life/experiment/{pr})", "|") + print("|", fn, "|", master_col, "|", f"[{pr}](https://reporter.comma.life/experiment/{pr})", "|") diff --git a/selfdrive/modeld/SConscript b/selfdrive/modeld/SConscript index 3f38324a6e..7a82ff88b8 100644 --- a/selfdrive/modeld/SConscript +++ b/selfdrive/modeld/SConscript @@ -21,7 +21,7 @@ tg_flags = { }.get(arch, 'DEV=CPU CPU_LLVM=1 THREADS=0') # Get model metadata -for model_name in ['driving_vision', 'driving_policy', 'dmonitoring_model']: +for model_name in ['driving_vision', 'driving_off_policy', 'driving_on_policy', 'dmonitoring_model']: fn = File(f"models/{model_name}").abspath script_files = [File(Dir("#selfdrive/modeld").File("get_model_metadata.py").abspath)] cmd = f'{tg_flags} python3 {Dir("#selfdrive/modeld").abspath}/get_model_metadata.py {fn}.onnx' @@ -59,19 +59,5 @@ def tg_compile(flags, model_name): ) # Compile small models -for model_name in ['driving_vision', 'driving_policy', 'dmonitoring_model']: +for model_name in ['driving_vision', 'driving_off_policy', 'driving_on_policy', 'dmonitoring_model']: tg_compile(tg_flags, model_name) - -# Compile BIG model if USB GPU is available -if "USBGPU" in os.environ: - import subprocess - # because tg doesn't support multi-process - devs = subprocess.check_output('python3 -c "from tinygrad import Device; print(list(Device.get_available_devices()))"', shell=True, cwd=env.Dir('#').abspath) - if b"AMD" in devs: - print("USB GPU detected... building") - flags = "DEV=AMD AMD_IFACE=USB AMD_LLVM=1 NOLOCALS=0 IMAGE=0" - bp = tg_compile(flags, "big_driving_policy") - bv = tg_compile(flags, "big_driving_vision") - lenv.SideEffect('lock', [bp, bv]) # tg doesn't support multi-process so build serially - else: - print("USB GPU not detected... skipping") diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index bff59366d6..6421ecfd21 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -34,11 +34,13 @@ from openpilot.selfdrive.modeld.constants import ModelConstants, Plan PROCESS_NAME = "selfdrive.modeld.modeld" SEND_RAW_PRED = os.getenv('SEND_RAW_PRED') -VISION_PKL_PATH = Path(__file__).parent / 'models/driving_vision_tinygrad.pkl' -POLICY_PKL_PATH = Path(__file__).parent / 'models/driving_policy_tinygrad.pkl' -VISION_METADATA_PATH = Path(__file__).parent / 'models/driving_vision_metadata.pkl' -POLICY_METADATA_PATH = Path(__file__).parent / 'models/driving_policy_metadata.pkl' MODELS_DIR = Path(__file__).parent / 'models' +VISION_PKL_PATH = MODELS_DIR / 'driving_vision_tinygrad.pkl' +VISION_METADATA_PATH = MODELS_DIR / 'driving_vision_metadata.pkl' +ON_POLICY_PKL_PATH = MODELS_DIR / 'driving_on_policy_tinygrad.pkl' +ON_POLICY_METADATA_PATH = MODELS_DIR / 'driving_on_policy_metadata.pkl' +OFF_POLICY_PKL_PATH = MODELS_DIR / 'driving_off_policy_tinygrad.pkl' +OFF_POLICY_METADATA_PATH = MODELS_DIR / 'driving_off_policy_metadata.pkl' LAT_SMOOTH_SECONDS = 0.0 LONG_SMOOTH_SECONDS = 0.3 @@ -151,7 +153,13 @@ class ModelState: self.vision_output_slices = vision_metadata['output_slices'] vision_output_size = vision_metadata['output_shapes']['outputs'][1] - with open(POLICY_METADATA_PATH, 'rb') as f: + with open(OFF_POLICY_METADATA_PATH, 'rb') as f: + off_policy_metadata = pickle.load(f) + self.off_policy_input_shapes = off_policy_metadata['input_shapes'] + self.off_policy_output_slices = off_policy_metadata['output_slices'] + off_policy_output_size = off_policy_metadata['output_shapes']['outputs'][1] + + with open(ON_POLICY_METADATA_PATH, 'rb') as f: policy_metadata = pickle.load(f) self.policy_input_shapes = policy_metadata['input_shapes'] self.policy_output_slices = policy_metadata['output_slices'] @@ -175,11 +183,13 @@ class ModelState: self.vision_output = np.zeros(vision_output_size, dtype=np.float32) self.policy_inputs = {k: Tensor(v, device='NPY').realize() for k,v in self.numpy_inputs.items()} self.policy_output = np.zeros(policy_output_size, dtype=np.float32) + self.off_policy_output = np.zeros(off_policy_output_size, dtype=np.float32) self.parser = Parser() self.frame_buf_params : dict[str, tuple[int, int, int, int]] = {} self.update_imgs = None self.vision_run = pickle.loads(read_file_chunked(str(VISION_PKL_PATH))) - self.policy_run = pickle.loads(read_file_chunked(str(POLICY_PKL_PATH))) + self.policy_run = pickle.loads(read_file_chunked(str(ON_POLICY_PKL_PATH))) + self.off_policy_run = pickle.loads(read_file_chunked(str(OFF_POLICY_PKL_PATH))) def slice_outputs(self, model_outputs: np.ndarray, output_slices: dict[str, slice]) -> dict[str, np.ndarray]: parsed_model_outputs = {k: model_outputs[np.newaxis, v] for k,v in output_slices.items()} @@ -228,9 +238,17 @@ class ModelState: self.policy_output = self.policy_run(**self.policy_inputs).contiguous().realize().uop.base.buffer.numpy().flatten() policy_outputs_dict = self.parser.parse_policy_outputs(self.slice_outputs(self.policy_output, self.policy_output_slices)) - combined_outputs_dict = {**vision_outputs_dict, **policy_outputs_dict} + + self.off_policy_output = self.off_policy_run(**self.policy_inputs).contiguous().realize().uop.base.buffer.numpy() + off_policy_outputs_dict = self.parser.parse_off_policy_outputs(self.slice_outputs(self.off_policy_output, self.off_policy_output_slices)) + off_policy_outputs_dict.pop('plan') + + + combined_outputs_dict = {**vision_outputs_dict, **off_policy_outputs_dict, **policy_outputs_dict} + if 'planplus' in combined_outputs_dict and 'plan' in combined_outputs_dict: + combined_outputs_dict['plan'] = combined_outputs_dict['plan'] + combined_outputs_dict['planplus'] if SEND_RAW_PRED: - combined_outputs_dict['raw_pred'] = np.concatenate([self.vision_output.copy(), self.policy_output.copy()]) + combined_outputs_dict['raw_pred'] = np.concatenate([self.vision_output.copy(), self.policy_output.copy(), self.off_policy_output.copy()]) return combined_outputs_dict diff --git a/selfdrive/modeld/models/big_driving_policy.onnx b/selfdrive/modeld/models/big_driving_policy.onnx deleted file mode 120000 index e1b653a14a..0000000000 --- a/selfdrive/modeld/models/big_driving_policy.onnx +++ /dev/null @@ -1 +0,0 @@ -driving_policy.onnx \ No newline at end of file diff --git a/selfdrive/modeld/models/big_driving_vision.onnx b/selfdrive/modeld/models/big_driving_vision.onnx deleted file mode 120000 index 28ee71dd74..0000000000 --- a/selfdrive/modeld/models/big_driving_vision.onnx +++ /dev/null @@ -1 +0,0 @@ -driving_vision.onnx \ No newline at end of file diff --git a/selfdrive/modeld/models/driving_off_policy.onnx b/selfdrive/modeld/models/driving_off_policy.onnx new file mode 100644 index 0000000000..33f6e0a2c1 --- /dev/null +++ b/selfdrive/modeld/models/driving_off_policy.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb6992bd60bada6162fea298e1a414b6b3d6a326db4eda46b9de62bcd8554754 +size 13393859 diff --git a/selfdrive/modeld/models/driving_on_policy.onnx b/selfdrive/modeld/models/driving_on_policy.onnx new file mode 100644 index 0000000000..cbc072409a --- /dev/null +++ b/selfdrive/modeld/models/driving_on_policy.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86680a657bbb34f997034d1930bb2cb65c38b9222cea199732f72bd45791cfad +size 13022803 diff --git a/selfdrive/modeld/models/driving_policy.onnx b/selfdrive/modeld/models/driving_policy.onnx deleted file mode 100644 index 7c71bc9471..0000000000 --- a/selfdrive/modeld/models/driving_policy.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:853c6634746ff439a848349d00e4d5581cd941f13f7c1862c31b72a31cc24858 -size 14061595 diff --git a/selfdrive/modeld/models/driving_vision.onnx b/selfdrive/modeld/models/driving_vision.onnx index afd617667c..383cde35e4 100644 --- a/selfdrive/modeld/models/driving_vision.onnx +++ b/selfdrive/modeld/models/driving_vision.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:940e9006a25f27f0b6e85da798e6a8fd1f6dd492dd7d0b9ff1a9436460f46129 -size 46887794 +oid sha256:7af05e03fd170653ff5771baf373a2c57b363da12c4c411cd416dee067b4cf58 +size 23266366 diff --git a/selfdrive/modeld/parse_model_outputs.py b/selfdrive/modeld/parse_model_outputs.py index 5c11e8ca18..802f0ad859 100644 --- a/selfdrive/modeld/parse_model_outputs.py +++ b/selfdrive/modeld/parse_model_outputs.py @@ -96,11 +96,17 @@ class Parser: self.parse_mdn('pose', outs, in_N=0, out_N=0, out_shape=(ModelConstants.POSE_WIDTH,)) self.parse_mdn('wide_from_device_euler', outs, in_N=0, out_N=0, out_shape=(ModelConstants.WIDE_FROM_DEVICE_WIDTH,)) self.parse_mdn('road_transform', outs, in_N=0, out_N=0, out_shape=(ModelConstants.POSE_WIDTH,)) + self.parse_categorical_crossentropy('desire_pred', outs, out_shape=(ModelConstants.DESIRE_PRED_LEN,ModelConstants.DESIRE_PRED_WIDTH)) + self.parse_binary_crossentropy('meta', outs) + return outs + + def parse_off_policy_outputs(self, outs: dict[str, np.ndarray]) -> dict[str, np.ndarray]: + plan_mhp = self.is_mhp(outs, 'plan', ModelConstants.IDX_N * ModelConstants.PLAN_WIDTH) + plan_in_N, plan_out_N = (ModelConstants.PLAN_MHP_N, ModelConstants.PLAN_MHP_SELECTION) if plan_mhp else (0, 0) + self.parse_mdn('plan', outs, in_N=plan_in_N, out_N=plan_out_N, out_shape=(ModelConstants.IDX_N, ModelConstants.PLAN_WIDTH)) self.parse_mdn('lane_lines', outs, in_N=0, out_N=0, out_shape=(ModelConstants.NUM_LANE_LINES,ModelConstants.IDX_N,ModelConstants.LANE_LINES_WIDTH)) self.parse_mdn('road_edges', outs, in_N=0, out_N=0, out_shape=(ModelConstants.NUM_ROAD_EDGES,ModelConstants.IDX_N,ModelConstants.LANE_LINES_WIDTH)) self.parse_binary_crossentropy('lane_lines_prob', outs) - self.parse_categorical_crossentropy('desire_pred', outs, out_shape=(ModelConstants.DESIRE_PRED_LEN,ModelConstants.DESIRE_PRED_WIDTH)) - self.parse_binary_crossentropy('meta', outs) self.parse_binary_crossentropy('lead_prob', outs) lead_mhp = self.is_mhp(outs, 'lead', ModelConstants.LEAD_MHP_SELECTION * ModelConstants.LEAD_TRAJ_LEN * ModelConstants.LEAD_WIDTH) lead_in_N, lead_out_N = (ModelConstants.LEAD_MHP_N, ModelConstants.LEAD_MHP_SELECTION) if lead_mhp else (0, 0) @@ -120,5 +126,6 @@ class Parser: def parse_outputs(self, outs: dict[str, np.ndarray]) -> dict[str, np.ndarray]: outs = self.parse_vision_outputs(outs) + outs = self.parse_off_policy_outputs(outs) outs = self.parse_policy_outputs(outs) return outs