repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/watch3.py
selfdrive/ui/watch3.py
#!/usr/bin/env python3 import pyray as rl from msgq.visionipc import VisionStreamType from openpilot.system.ui.lib.application import gui_app from openpilot.selfdrive.ui.onroad.cameraview import CameraView if __name__ == "__main__": gui_app.init_window("watch3") road = CameraView("camerad", VisionStreamType.VISI...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/ui.py
selfdrive/ui/ui.py
#!/usr/bin/env python3 import os import pyray as rl from openpilot.system.hardware import TICI from openpilot.common.realtime import config_realtime_process, set_core_affinity from openpilot.system.ui.lib.application import gui_app from openpilot.selfdrive.ui.layouts.main import MainLayout from openpilot.selfdrive.ui....
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/update_translations.py
selfdrive/ui/update_translations.py
#!/usr/bin/env python3 from itertools import chain import os from openpilot.common.basedir import BASEDIR from openpilot.system.ui.lib.multilang import SYSTEM_UI_DIR, UI_DIR, TRANSLATIONS_DIR, multilang LANGUAGES_FILE = os.path.join(str(TRANSLATIONS_DIR), "languages.json") POT_FILE = os.path.join(str(TRANSLATIONS_DIR)...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/__init__.py
selfdrive/ui/__init__.py
UI_BORDER_SIZE = 30
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/ui_state.py
selfdrive/ui/ui_state.py
import pyray as rl import numpy as np import time import threading from collections.abc import Callable from enum import Enum from cereal import messaging, car, log from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from o...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/soundd.py
selfdrive/ui/soundd.py
import math import numpy as np import time import wave from cereal import car, messaging from openpilot.common.basedir import BASEDIR from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.realtime import Ratekeeper from openpilot.common.utils import retry from openpilot.common.swaglog impo...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/cameraview.py
selfdrive/ui/onroad/cameraview.py
import platform import numpy as np import pyray as rl from msgq.visionipc import VisionIpcClient, VisionStreamType, VisionBuf from openpilot.common.swaglog import cloudlog from openpilot.system.hardware import TICI from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.lib.egl import init_egl...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/model_renderer.py
selfdrive/ui/onroad/model_renderer.py
import colorsys import numpy as np import pyray as rl from cereal import messaging, car from dataclasses import dataclass, field from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.params import Params from openpilot.selfdrive.locationd.calibrationd import HEIGHT_INIT from openpilot.selfdr...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/hud_renderer.py
selfdrive/ui/onroad/hud_renderer.py
import pyray as rl from dataclasses import dataclass from openpilot.common.constants import CV from openpilot.selfdrive.ui.onroad.exp_button import ExpButton from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.mu...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/alert_renderer.py
selfdrive/ui/onroad/alert_renderer.py
import time import pyray as rl from dataclasses import dataclass from cereal import messaging, log from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.hardware import TICI from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.multilang import tr from ope...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/driver_camera_dialog.py
selfdrive/ui/onroad/driver_camera_dialog.py
import numpy as np import pyray as rl from msgq.visionipc import VisionStreamType from openpilot.selfdrive.ui.onroad.cameraview import CameraView from openpilot.selfdrive.ui.onroad.driver_state import DriverStateRenderer from openpilot.selfdrive.ui.ui_state import ui_state, device from openpilot.system.ui.lib.applicati...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/__init__.py
selfdrive/ui/onroad/__init__.py
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/exp_button.py
selfdrive/ui/onroad/exp_button.py
import time import pyray as rl from openpilot.common.params import Params from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.widgets import Widget class ExpButton(Widget): def __init__(self, button_size: int, icon_size: int): sup...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/augmented_road_view.py
selfdrive/ui/onroad/augmented_road_view.py
import time import numpy as np import pyray as rl from cereal import log, messaging from msgq.visionipc import VisionStreamType from openpilot.selfdrive.ui import UI_BORDER_SIZE from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.selfdrive.ui.onroad.alert_renderer import AlertRenderer from ope...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/onroad/driver_state.py
selfdrive/ui/onroad/driver_state.py
import numpy as np import pyray as rl from cereal import log from dataclasses import dataclass from openpilot.selfdrive.ui import UI_BORDER_SIZE from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.widgets import Widget AlertSize = log.Se...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/cameraview.py
selfdrive/ui/mici/onroad/cameraview.py
import platform import numpy as np import pyray as rl from msgq.visionipc import VisionIpcClient, VisionStreamType, VisionBuf from openpilot.common.swaglog import cloudlog from openpilot.system.hardware import TICI from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.lib.egl import init_egl...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/model_renderer.py
selfdrive/ui/mici/onroad/model_renderer.py
import colorsys import numpy as np import pyray as rl from cereal import messaging, car from dataclasses import dataclass, field from openpilot.common.params import Params from openpilot.common.filter_simple import FirstOrderFilter from openpilot.selfdrive.locationd.calibrationd import HEIGHT_INIT from openpilot.selfdr...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/confidence_ball.py
selfdrive/ui/mici/onroad/confidence_ball.py
import math import pyray as rl from openpilot.selfdrive.ui.mici.onroad import SIDE_PANEL_WIDTH from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.system.ui.widgets import Widget from openpilot.system.ui.lib.application import gui_app from openpilot.common.filter_simple import FirstOrderFilter...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/hud_renderer.py
selfdrive/ui/mici/onroad/hud_renderer.py
import pyray as rl from dataclasses import dataclass from openpilot.common.constants import CV from openpilot.selfdrive.ui.mici.onroad.torque_bar import TorqueBar from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.l...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/alert_renderer.py
selfdrive/ui/mici/onroad/alert_renderer.py
import time from enum import StrEnum from typing import NamedTuple import pyray as rl import random import string from dataclasses import dataclass from cereal import messaging, log, car from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.common.filter_simple import BounceFilter, FirstOrderFilter from o...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/driver_camera_dialog.py
selfdrive/ui/mici/onroad/driver_camera_dialog.py
import pyray as rl from cereal import log, messaging from msgq.visionipc import VisionStreamType from openpilot.selfdrive.ui.mici.onroad.cameraview import CameraView from openpilot.selfdrive.ui.mici.onroad.driver_state import DriverStateRenderer from openpilot.selfdrive.ui.ui_state import ui_state, device from openpilo...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/__init__.py
selfdrive/ui/mici/onroad/__init__.py
import pyray as rl SIDE_PANEL_WIDTH = 60 def blend_colors(a: rl.Color, b: rl.Color, f: float) -> rl.Color: h0, s0, v0 = (hsv0 := rl.color_to_hsv(a)).x, hsv0.y, hsv0.z h1, s1, v1 = (hsv1 := rl.color_to_hsv(b)).x, hsv1.y, hsv1.z dh = ((h1 - h0 + 180) % 360) - 180 # shortest hue delta return rl.color_from_hsv(...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/augmented_road_view.py
selfdrive/ui/mici/onroad/augmented_road_view.py
import time import numpy as np import pyray as rl from cereal import messaging, car, log from msgq.visionipc import VisionStreamType from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.selfdrive.ui.mici.onroad import SIDE_PANEL_WIDTH from openpilot.selfdrive.ui.mici.onroad.alert_renderer impor...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/driver_state.py
selfdrive/ui/mici/onroad/driver_state.py
import pyray as rl import numpy as np import math from cereal import log from openpilot.common.filter_simple import FirstOrderFilter from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.widgets import Widget from openpilot.selfdrive.ui.ui_state import ui_state AlertSize = log.SelfdriveState...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/onroad/torque_bar.py
selfdrive/ui/mici/onroad/torque_bar.py
import math import time from functools import wraps from collections import OrderedDict import numpy as np import pyray as rl from opendbc.car import ACCELERATION_DUE_TO_GRAVITY from openpilot.selfdrive.ui.mici.onroad import blend_colors from openpilot.selfdrive.ui.ui_state import ui_state, UIStatus from openpilot.sys...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/widgets/pairing_dialog.py
selfdrive/ui/mici/widgets/pairing_dialog.py
import pyray as rl import qrcode import numpy as np import time from openpilot.common.api import Api from openpilot.common.swaglog import cloudlog from openpilot.common.params import Params from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.widgets import NavWidget from openpilot.system.ui.l...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/widgets/dialog.py
selfdrive/ui/mici/widgets/dialog.py
import abc import math import pyray as rl from typing import Union from collections.abc import Callable from typing import cast from openpilot.system.ui.widgets import Widget, NavWidget, DialogResult from openpilot.system.ui.widgets.label import UnifiedLabel, gui_label from openpilot.system.ui.widgets.mici_keyboard imp...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/widgets/side_button.py
selfdrive/ui/mici/widgets/side_button.py
import pyray as rl from openpilot.system.ui.widgets import Widget from openpilot.system.ui.lib.application import gui_app # --------------------------------------------------------------------------- # Constants extracted from the original Qt style # -------------------------------------------------------------------...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/widgets/button.py
selfdrive/ui/mici/widgets/button.py
import pyray as rl from typing import Union from enum import Enum from collections.abc import Callable from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.label import MiciLabel from openpilot.system.ui.widgets.scroller import DO_ZOOM from openpilot.system.ui.lib.text_measure import measure_...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/offroad_alerts.py
selfdrive/ui/mici/layouts/offroad_alerts.py
import pyray as rl import re import time from dataclasses import dataclass from enum import IntEnum from openpilot.common.params import Params from openpilot.selfdrive.selfdrived.alertmanager import OFFROAD_ALERTS from openpilot.system.hardware import HARDWARE from openpilot.system.ui.widgets import Widget from openpil...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/home.py
selfdrive/ui/mici/layouts/home.py
import time from cereal import log import pyray as rl from collections.abc import Callable from openpilot.system.ui.widgets.label import gui_label, MiciLabel, UnifiedLabel from openpilot.system.ui.widgets import Widget from openpilot.system.ui.lib.application import gui_app, FontWeight, DEFAULT_TEXT_COLOR, MousePos fr...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/main.py
selfdrive/ui/mici/layouts/main.py
import pyray as rl from enum import IntEnum import cereal.messaging as messaging from openpilot.selfdrive.ui.mici.layouts.home import MiciHomeLayout from openpilot.selfdrive.ui.mici.layouts.settings.settings import SettingsLayout from openpilot.selfdrive.ui.mici.layouts.offroad_alerts import MiciOffroadAlerts from open...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/onboarding.py
selfdrive/ui/mici/layouts/onboarding.py
from enum import IntEnum import weakref import math import numpy as np import pyray as rl from openpilot.common.filter_simple import FirstOrderFilter from openpilot.system.hardware import HARDWARE from openpilot.system.ui.lib.application import FontWeight, gui_app from openpilot.system.ui.widgets import Widget from op...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/__init__.py
selfdrive/ui/mici/layouts/__init__.py
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/toggles.py
selfdrive/ui/mici/layouts/settings/toggles.py
import pyray as rl from collections.abc import Callable from cereal import log from openpilot.system.ui.widgets.scroller import Scroller from openpilot.selfdrive.ui.mici.widgets.button import BigParamControl, BigMultiParamToggle from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.widgets i...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/developer.py
selfdrive/ui/mici/layouts/settings/developer.py
import pyray as rl from collections.abc import Callable from openpilot.common.time_helpers import system_time_valid from openpilot.system.ui.widgets.scroller import Scroller from openpilot.selfdrive.ui.mici.widgets.button import BigButton, BigToggle, BigParamControl from openpilot.selfdrive.ui.mici.widgets.dialog impo...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/settings.py
selfdrive/ui/mici/layouts/settings/settings.py
import pyray as rl from dataclasses import dataclass from enum import IntEnum from collections.abc import Callable from openpilot.common.params import Params from openpilot.system.ui.widgets.scroller import Scroller from openpilot.selfdrive.ui.mici.widgets.button import BigButton from openpilot.selfdrive.ui.mici.layou...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/firehose.py
selfdrive/ui/mici/layouts/settings/firehose.py
import requests import threading import time import pyray as rl from openpilot.common.api import api_get from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from openpilot.selfdrive.ui.lib.api_helpers import get_token from openpilot.selfdrive.ui.ui_state import ui_state, device fro...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/device.py
selfdrive/ui/mici/layouts/settings/device.py
import os import threading import json import pyray as rl from enum import IntEnum from collections.abc import Callable from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params from openpilot.common.time_helpers import system_time_valid from openpilot.system.ui.widgets.scroller import Sc...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/network/wifi_ui.py
selfdrive/ui/mici/layouts/settings/network/wifi_ui.py
import math import numpy as np import pyray as rl from collections.abc import Callable from openpilot.common.swaglog import cloudlog from openpilot.system.ui.widgets.label import UnifiedLabel from openpilot.selfdrive.ui.mici.widgets.dialog import BigMultiOptionDialog, BigInputDialog, BigDialogOptionButton, BigConfirma...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/mici/layouts/settings/network/__init__.py
selfdrive/ui/mici/layouts/settings/network/__init__.py
import pyray as rl from enum import IntEnum from collections.abc import Callable from openpilot.system.ui.widgets.scroller import Scroller from openpilot.selfdrive.ui.mici.layouts.settings.network.wifi_ui import WifiUIMici from openpilot.selfdrive.ui.mici.widgets.button import BigButton, BigMultiToggle, BigToggle, Big...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/feedback/feedbackd.py
selfdrive/ui/feedback/feedbackd.py
#!/usr/bin/env python3 import cereal.messaging as messaging from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from cereal import car from openpilot.system.micd import SAMPLE_RATE, SAMPLE_BUFFER FEEDBACK_MAX_DURATION = 10.0 ButtonType = car.CarState.ButtonEvent.Type def main(): ...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_soundd.py
selfdrive/ui/tests/test_soundd.py
from cereal import car from cereal import messaging from cereal.messaging import SubMaster, PubMaster from openpilot.selfdrive.ui.soundd import SELFDRIVE_STATE_TIMEOUT, check_selfdrive_timeout_alert import time AudibleAlert = car.CarControl.HUDControl.AudibleAlert class TestSoundd: def test_check_selfdrive_timeou...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/cycle_offroad_alerts.py
selfdrive/ui/tests/cycle_offroad_alerts.py
#!/usr/bin/env python3 import os import sys import time import json from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert from openpilot.system.updated.updated import parse_release_notes if __name__ == "__main_...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_raylib_ui.py
selfdrive/ui/tests/test_raylib_ui.py
import time from openpilot.selfdrive.test.helpers import with_processes @with_processes(["ui"]) def test_raylib_ui(): """Test initialization of the UI widgets is successful.""" time.sleep(1)
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_feedbackd.py
selfdrive/ui/tests/test_feedbackd.py
import pytest import cereal.messaging as messaging from cereal import car from openpilot.common.params import Params from openpilot.system.manager.process_config import managed_processes @pytest.mark.skip("tmp disabled") class TestFeedbackd: def setup_method(self): self.pm = messaging.PubMaster(['carState', 'ra...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_translations.py
selfdrive/ui/tests/test_translations.py
import pytest import json import os import re import xml.etree.ElementTree as ET import string import requests from parameterized import parameterized_class from openpilot.system.ui.lib.multilang import TRANSLATIONS_DIR, LANGUAGES_FILE with open(str(LANGUAGES_FILE)) as f: translation_files = json.load(f) UNFINISHED...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/__init__.py
selfdrive/ui/tests/__init__.py
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/profile_onroad.py
selfdrive/ui/tests/profile_onroad.py
#!/usr/bin/env python3 import os import time import cProfile import pyray as rl import numpy as np from msgq.visionipc import VisionIpcServer, VisionStreamType from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.selfdrive.ui.mici.layouts.main import MiciMainLayout from openpilot.system.ui.lib.applicati...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/body.py
selfdrive/ui/tests/body.py
#!/usr/bin/env python3 import time import cereal.messaging as messaging if __name__ == "__main__": while True: pm = messaging.PubMaster(['carParams', 'carState']) batt = 1. while True: msg = messaging.new_message('carParams') msg.carParams.brand = "body" msg.carParams.notCar = True ...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/diff/diff.py
selfdrive/ui/tests/diff/diff.py
#!/usr/bin/env python3 import os import sys import subprocess import tempfile import base64 import webbrowser import argparse from pathlib import Path from openpilot.common.basedir import BASEDIR DIFF_OUT_DIR = Path(BASEDIR) / "selfdrive" / "ui" / "tests" / "diff" / "report" def extract_frames(video_path, output_dir...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/diff/replay.py
selfdrive/ui/tests/diff/replay.py
#!/usr/bin/env python3 import os import time import coverage import pyray as rl from dataclasses import dataclass from openpilot.selfdrive.ui.tests.diff.diff import DIFF_OUT_DIR os.environ["RECORD"] = "1" if "RECORD_OUTPUT" not in os.environ: os.environ["RECORD_OUTPUT"] = "mici_ui_replay.mp4" os.environ["RECORD_OUT...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_ui/raylib_screenshots.py
selfdrive/ui/tests/test_ui/raylib_screenshots.py
#!/usr/bin/env python3 import os import sys import shutil import time import pathlib from collections import namedtuple import pyautogui import pywinctl from cereal import car, log from cereal import messaging from cereal.messaging import PubMaster from openpilot.common.basedir import BASEDIR from openpilot.common.pa...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/tests/test_ui/print_mouse_coords.py
selfdrive/ui/tests/test_ui/print_mouse_coords.py
#!/usr/bin/env python3 """ Simple script to print mouse coordinates on Ubuntu. Run with: python print_mouse_coords.py Press Ctrl+C to exit. """ from pynput import mouse print("Mouse coordinate printer - Press Ctrl+C to exit") print("Click to set the top left origin") origin: tuple[int, int] | None = None clicks: lis...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/translations/auto_translate.py
selfdrive/ui/translations/auto_translate.py
#!/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.en...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/translations/create_badges.py
selfdrive/ui/translations/create_badges.py
#!/usr/bin/env python3 import json import os import requests import xml.etree.ElementTree as ET from openpilot.common.basedir import BASEDIR from openpilot.selfdrive.ui.update_translations import LANGUAGES_FILE, TRANSLATIONS_DIR BADGE_HEIGHT = 20 + 8 SHIELDS_URL = "https://img.shields.io/badge" def parse_po_file(fil...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/offroad_alerts.py
selfdrive/ui/widgets/offroad_alerts.py
import pyray as rl from enum import IntEnum from abc import ABC, abstractmethod from collections.abc import Callable from dataclasses import dataclass from openpilot.common.params import Params from openpilot.system.hardware import HARDWARE from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/ssh_key.py
selfdrive/ui/widgets/ssh_key.py
import pyray as rl import requests import threading import copy from collections.abc import Callable from enum import Enum from openpilot.common.params import Params from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.multilang import tr, tr_noop from openpilot.system.ui.li...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/prime.py
selfdrive/ui/widgets/prime.py
import pyray as rl from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app, FontWeight from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.lib.wrap_text import wrap_text from ...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/pairing_dialog.py
selfdrive/ui/widgets/pairing_dialog.py
import pyray as rl import qrcode import numpy as np import time from openpilot.common.api import Api from openpilot.common.swaglog import cloudlog from openpilot.common.params import Params from openpilot.system.ui.widgets import Widget from openpilot.system.ui.lib.application import FontWeight, gui_app from openpilot...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/setup.py
selfdrive/ui/widgets/setup.py
import pyray as rl from openpilot.common.time_helpers import system_time_valid from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.selfdrive.ui.widgets.pairing_dialog import PairingDialog from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE from openpilot.system.ui.lib.multila...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/exp_mode_button.py
selfdrive/ui/widgets/exp_mode_button.py
import pyray as rl from openpilot.common.params import Params from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget class ExperimentalModeButton(Widget): def __init__(self): super().__init__...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/widgets/__init__.py
selfdrive/ui/widgets/__init__.py
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/sidebar.py
selfdrive/ui/layouts/sidebar.py
import pyray as rl import time from dataclasses import dataclass from collections.abc import Callable from cereal import log from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app, FontWeight, MousePos, FONT_SCALE from openpilot.system.ui.lib.multilang import tr, tr...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/home.py
selfdrive/ui/layouts/home.py
import time import pyray as rl from collections.abc import Callable from enum import IntEnum from openpilot.common.params import Params from openpilot.selfdrive.ui.widgets.offroad_alerts import UpdateAlert, OffroadAlert from openpilot.selfdrive.ui.widgets.exp_mode_button import ExperimentalModeButton from openpilot.sel...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/main.py
selfdrive/ui/layouts/main.py
import pyray as rl from enum import IntEnum import cereal.messaging as messaging from openpilot.system.ui.lib.application import gui_app from openpilot.selfdrive.ui.layouts.sidebar import Sidebar, SIDEBAR_WIDTH from openpilot.selfdrive.ui.layouts.home import HomeLayout from openpilot.selfdrive.ui.layouts.settings.setti...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/onboarding.py
selfdrive/ui/layouts/onboarding.py
import os import re import threading from enum import IntEnum import pyray as rl from openpilot.common.basedir import BASEDIR from openpilot.system.ui.lib.application import FontWeight, gui_app from openpilot.system.ui.lib.multilang import tr from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widg...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/__init__.py
selfdrive/ui/layouts/__init__.py
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/common.py
selfdrive/ui/layouts/settings/common.py
from openpilot.selfdrive.ui.ui_state import ui_state def restart_needed_callback(_): ui_state.params.put_bool("OnroadCycleRequested", True)
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/toggles.py
selfdrive/ui/layouts/settings/toggles.py
from cereal import log from openpilot.common.params import Params, UnknownKeyName from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.list_view import multiple_button_item, toggle_item from openpilot.system.ui.widgets.scroller_tici import Scroller from openpilot.system.ui.widgets.confirm_dia...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/developer.py
selfdrive/ui/layouts/settings/developer.py
from openpilot.common.params import Params from openpilot.selfdrive.ui.widgets.ssh_key import ssh_key_item from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.widgets import Widget from openpilot.system.ui.widgets.list_view import toggle_item from openpilot.system.ui.widgets.scroller_tici impo...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/settings.py
selfdrive/ui/layouts/settings/settings.py
import pyray as rl from dataclasses import dataclass from enum import IntEnum from collections.abc import Callable from openpilot.selfdrive.ui.layouts.settings.developer import DeveloperLayout from openpilot.selfdrive.ui.layouts.settings.device import DeviceLayout from openpilot.selfdrive.ui.layouts.settings.firehose i...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/software.py
selfdrive/ui/layouts/settings/software.py
import os import time import datetime from openpilot.common.time_helpers import system_time_valid from openpilot.selfdrive.ui.ui_state import ui_state from openpilot.system.ui.lib.application import gui_app from openpilot.system.ui.lib.multilang import tr, trn from openpilot.system.ui.widgets import Widget, DialogResul...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/firehose.py
selfdrive/ui/layouts/settings/firehose.py
import pyray as rl from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE from openpilot.system.ui.lib.multilang import tr, trn, tr_noop from openpilot.system.ui.lib.text_measure import measure_text_cached from openpilot.system.ui.lib.scroll_panel import GuiScrollPanel from openpilot.system.ui...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/layouts/settings/device.py
selfdrive/ui/layouts/settings/device.py
import os import math from cereal import messaging, log from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from openpilot.selfdrive.ui.onroad.driver_camera_dialog import DriverCameraDialog from openpilot.selfdrive.ui.ui_state import ui_...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/lib/api_helpers.py
selfdrive/ui/lib/api_helpers.py
import time from functools import lru_cache from openpilot.common.api import Api from openpilot.common.time_helpers import system_time_valid TOKEN_EXPIRY_HOURS = 2 @lru_cache(maxsize=1) def _get_token(dongle_id: str, t: int): if not system_time_valid(): raise RuntimeError("System time is not valid, cannot gene...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/ui/lib/prime_state.py
selfdrive/ui/lib/prime_state.py
from enum import IntEnum import os import requests import threading import time from openpilot.common.api import api_get from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from openpilot.system.athena.registration import UNREGISTERED_DONGLE_ID from openpilot.selfdrive.ui.lib.api_h...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/qlog_size.py
selfdrive/debug/qlog_size.py
#!/usr/bin/env python3 import argparse import zstandard as zstd from collections import defaultdict import matplotlib.pyplot as plt from cereal.services import SERVICE_LIST from openpilot.common.utils import LOG_COMPRESSION_LEVEL from openpilot.tools.lib.logreader import LogReader from tqdm import tqdm MIN_SIZE = 0....
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/analyze-msg-size.py
selfdrive/debug/analyze-msg-size.py
#!/usr/bin/env python3 import argparse from tqdm import tqdm from cereal.services import SERVICE_LIST, QueueSize from openpilot.tools.lib.logreader import LogReader if __name__ == "__main__": parser = argparse.ArgumentParser(description="Analyze message sizes from a log route") parser.add_argument("route", nargs...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/cpu_usage_stat.py
selfdrive/debug/cpu_usage_stat.py
#!/usr/bin/env python3 # type: ignore ''' System tools like top/htop can only show current cpu usage values, so I write this script to do statistics jobs. Features: Use psutil library to sample cpu usage(avergage for all cores) of openpilot processes, at a rate of 5 samples/sec. Do cpu usage statistics period...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/check_freq.py
selfdrive/debug/check_freq.py
#!/usr/bin/env python3 import argparse import numpy as np import time from collections import defaultdict, deque from collections.abc import MutableSequence import cereal.messaging as messaging if __name__ == "__main__": context = messaging.Context() poller = messaging.Poller() parser = argparse.ArgumentParse...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/filter_log_message.py
selfdrive/debug/filter_log_message.py
#!/usr/bin/env python3 import argparse import json import cereal.messaging as messaging from openpilot.tools.lib.logreader import LogReader LEVELS = { "DEBUG": 10, "INFO": 20, "WARNING": 30, "ERROR": 40, "CRITICAL": 50, } ANDROID_LOG_SOURCE = { 0: "MAIN", 1: "RADIO", 2: "EVENTS", 3: "SYSTEM", 4: ...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/uiview.py
selfdrive/debug/uiview.py
#!/usr/bin/env python3 import time from cereal import car, log, messaging from openpilot.common.params import Params from openpilot.system.manager.process_config import managed_processes from openpilot.system.hardware import HARDWARE if __name__ == "__main__": CP = car.CarParams(notCar=True, wheelbase=1, steerRatio...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/live_cpu_and_temp.py
selfdrive/debug/live_cpu_and_temp.py
#!/usr/bin/env python3 import argparse import numpy as np import capnp from collections import defaultdict from cereal.messaging import SubMaster def cputime_total(ct): return ct.user + ct.nice + ct.system + ct.idle + ct.iowait + ct.irq + ct.softirq def cputime_busy(ct): return ct.user + ct.nice + ct.system + c...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/fingerprint_from_route.py
selfdrive/debug/fingerprint_from_route.py
#!/usr/bin/env python3 import sys from openpilot.tools.lib.logreader import LogReader, ReadMode def get_fingerprint(lr): # TODO: make this a nice tool for car ports. should also work with qlogs for FW fw = None vin = None msgs = {} for msg in lr: if msg.which() == 'carParams': fw = msg.carParams...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/measure_torque_time_to_max.py
selfdrive/debug/measure_torque_time_to_max.py
#!/usr/bin/env python3 # type: ignore import os import argparse import struct from collections import deque from statistics import mean from cereal import log import cereal.messaging as messaging if __name__ == "__main__": parser = argparse.ArgumentParser(description='Sniff a communication socket') parser.add_a...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/fuzz_fw_fingerprint.py
selfdrive/debug/fuzz_fw_fingerprint.py
#!/usr/bin/env python3 # type: ignore import random from collections import defaultdict from tqdm import tqdm from opendbc.car.fw_versions import match_fw_to_car_fuzzy from opendbc.car.toyota.values import FW_VERSIONS as TOYOTA_FW_VERSIONS from opendbc.car.honda.values import FW_VERSIONS as HONDA_FW_VERSIONS from ope...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/test_fw_query_on_routes.py
selfdrive/debug/test_fw_query_on_routes.py
#!/usr/bin/env python3 # type: ignore from collections import defaultdict import argparse import os import traceback from tqdm import tqdm from opendbc.car.car_helpers import interface_names from opendbc.car.fingerprints import MIGRATION from opendbc.car.fw_versions import VERSIONS, match_fw_to_car from openpilot.tool...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/debug_fw_fingerprinting_offline.py
selfdrive/debug/debug_fw_fingerprinting_offline.py
#!/usr/bin/env python3 import argparse from opendbc.car import uds from openpilot.tools.lib.live_logreader import live_logreader from openpilot.tools.lib.logreader import LogReader, ReadMode def main(route: str | None, addrs: list[int], rxoffset: int | None): """ TODO: - highlight TX vs RX clearly - disambig...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/run_process_on_route.py
selfdrive/debug/run_process_on_route.py
#!/usr/bin/env python3 import argparse from openpilot.selfdrive.test.process_replay.process_replay import CONFIGS, replay_process from openpilot.selfdrive.test.process_replay.test_processes import EXCLUDED_PROCS from openpilot.tools.lib.logreader import LogReader, save_log ALLOW_PROCS = {c.proc_name for c in CONFIGS}...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/read_dtc_status.py
selfdrive/debug/read_dtc_status.py
#!/usr/bin/env python3 import sys import argparse from subprocess import check_output, CalledProcessError from opendbc.car.carlog import carlog from opendbc.car.uds import UdsClient, SESSION_TYPE, DTC_REPORT_TYPE, DTC_STATUS_MASK_TYPE, get_dtc_num_as_str, get_dtc_status_names from opendbc.car.structs import CarParams f...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/can_table.py
selfdrive/debug/can_table.py
#!/usr/bin/env python3 import argparse import pandas as pd import cereal.messaging as messaging def can_table(dat): rows = [] for b in dat: r = list(bin(b).lstrip('0b').zfill(8)) r += [hex(b)] rows.append(r) df = pd.DataFrame(data=rows) df.columns = [str(n) for n in range(7, -1, -1)] + [' '] t...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/dump.py
selfdrive/debug/dump.py
#!/usr/bin/env python3 import sys import argparse import json import codecs from cereal import log from cereal.services import SERVICE_LIST from openpilot.tools.lib.live_logreader import raw_live_logreader codecs.register_error("strict", codecs.backslashreplace_errors) def hexdump(msg): m = str.upper(msg.hex()) ...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/dump_car_docs.py
selfdrive/debug/dump_car_docs.py
#!/usr/bin/env python3 import argparse import pickle from opendbc.car.docs import get_all_car_docs def dump_car_docs(path): with open(path, 'wb') as f: pickle.dump(get_all_car_docs(), f) print(f'Dumping car info to {path}') if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argume...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/count_events.py
selfdrive/debug/count_events.py
#!/usr/bin/env python3 import sys import math import datetime from collections import Counter from pprint import pprint from typing import cast from cereal.services import SERVICE_LIST from openpilot.tools.lib.logreader import LogReader, ReadMode from openpilot.selfdrive.test.process_replay.migration import migrate_al...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/check_lag.py
selfdrive/debug/check_lag.py
#!/usr/bin/env python3 import cereal.messaging as messaging from cereal.services import SERVICE_LIST TO_CHECK = ['carState'] if __name__ == "__main__": sm = messaging.SubMaster(TO_CHECK) prev_t: dict[str, float] = {} while True: sm.update() for s in TO_CHECK: if sm.updated[s]: t = sm....
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/print_docs_diff.py
selfdrive/debug/print_docs_diff.py
#!/usr/bin/env python3 import argparse from collections import defaultdict import difflib import pickle from opendbc.car.docs import get_all_car_docs from opendbc.car.docs_definitions import Column FOOTNOTE_TAG = "<sup>{}</sup>" STAR_ICON = '<a href="##"><img valign="top" ' + \ 'src="https://media.githubu...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/print_flags.py
selfdrive/debug/print_flags.py
#!/usr/bin/env python3 from opendbc.car.values import BRANDS for brand in BRANDS: all_flags = set() for platform in brand: if platform.config.flags != 0: all_flags |= set(platform.config.flags) if len(all_flags): print(brand.__module__.split('.')[-2].upper() + ':') for flag in sorted(all_flags...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/can_print_changes.py
selfdrive/debug/can_print_changes.py
#!/usr/bin/env python3 import argparse import binascii import time from collections import defaultdict import cereal.messaging as messaging from openpilot.selfdrive.debug.can_table import can_table from openpilot.tools.lib.logreader import LogIterable, LogReader RED = '\033[91m' CLEAR = '\033[0m' def update(msgs, bu...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false
commaai/openpilot
https://github.com/commaai/openpilot/blob/adbf68f77120b4568de68c37b8bed4ed433e01fe/selfdrive/debug/get_fingerprint.py
selfdrive/debug/get_fingerprint.py
#!/usr/bin/env python3 # simple script to get a vehicle fingerprint. # Instructions: # - connect to a Panda # - run selfdrive/pandad/pandad # - launching this script # Note: it's very important that the car is in stock mode, in order to collect a complete fingerprint # - since some messages are published at low fre...
python
MIT
adbf68f77120b4568de68c37b8bed4ed433e01fe
2026-01-04T14:38:40.093933Z
false