Compare commits

..

1885 Commits

Author SHA1 Message Date
Jason Wen
783e3dad39 phase 1 2026-03-03 12:26:11 -05:00
Jason Wen
a17a38d8c3 Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1749) 2026-03-01 16:33:34 -05:00
Jason Wen
8b13186a32 Merge branch 'upstream/openpilot/master' into sync-20260301
# Conflicts:
#	.github/workflows/ci_weekly_report.yaml
#	.github/workflows/ci_weekly_run.yaml
#	panda
#	system/ui/mici_setup.py
#	tools/replay/api.cc
2026-03-01 16:18:24 -05:00
Jason Wen
9c5bf2ce0a ui: AlertFadeAnimator for longitudinal-related statuses (#1748) 2026-03-01 13:50:44 -05:00
Adeeb Shihadeh
f9b5d1e9e5 use vendored libyuv from dependencies (#37512)
* vendor libyuv from dependencies

* relock libyuv to latest vendor branch

* install cmake in macOS setup when missing

* lock

* unused?

* rm that

* no yuv for the larch
2026-03-01 10:46:26 -08:00
Adeeb Shihadeh
041606de4c fix font output targets (#37511) 2026-03-01 10:01:41 -08:00
Jason Wen
daaec59464 Toyota: Stop and Go Hack (Alpha) (#1733)
* init

* sl

* some

* more

* alpha

* bump

* onroad cycle it
2026-03-01 11:14:42 -05:00
github-actions[bot]
56ef3751d8 [bot] Update Python packages (#1747)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-01 10:49:01 -05:00
Shane Smiskol
c244a5d485 Update BigInputDialog to remove default URL
Remove default URL from custom software input dialog.
2026-03-01 03:41:20 -08:00
Shane Smiskol
308475fcc9 Fix continue being enabled under WifiUi 2026-03-01 03:27:41 -08:00
Shane Smiskol
a7de971334 mici setup: use nav stack (#37507)
* pressable

* slow

* fast and looks great

* 0.075

* clean up

* fix missing

* clean up

* mici setup use nav stack!

* remove flat state!

* todo

* clean up

* clean up ordering

* clean up

* reset progress on show, dont mutate nav stack from thread

* reset text on show too

* rename

* clean up
2026-03-01 02:41:51 -08:00
Shane Smiskol
61658fbfe3 mici setup: new start button (#37501)
* pressable

* slow

* fast and looks great

* 0.075

* clean up

* fix missing

* clean up
2026-03-01 00:56:52 -08:00
Shane Smiskol
5ef0040ac6 ui: delay click callback (#37502)
* delay click callback

* actually may be better

* clean up

* clean up
2026-02-28 23:51:56 -08:00
Chris
c188c96956 i18n(fr): Add French translations (#1624)
i18n(fr): Add French translations for sunnypilot UI

Update 36 existing French translations with corrections and add
369 new sunnypilot-specific translation entries.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 02:37:13 -05:00
Nayan
0376600dec [TIZI/TICI] ui: dynamic alert size (#1634)
* dynamic alert sizing

* lint

* uhhh.. yeah

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 02:22:47 -05:00
Jason Wen
cfc28176f2 [TIZI/TICI] ui: Developer UI cleanup (#1746)
* [TIZI/TICI] ui: Developer UI cleanup

* why 61
2026-03-01 02:07:23 -05:00
Jason Wen
7b104c682b ci: no more sunnypilot modeld builds 2026-03-01 01:53:50 -05:00
DevTekVE
42f43c3231 sunnylink: Handle exceptions in getParamsAllKeysV1 to log crashes (#1722)
Handle exceptions in `getParamsAllKeysV1` to prevent crashes
- Added `try-except` block to improve error handling during key parsing.
- Ensures robustness by logging exceptions and re-raising them.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 01:50:09 -05:00
James Vecellio-Grant
b2201c2a1d CI: validate model after build (#1744)
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 01:12:16 -05:00
James Vecellio-Grant
d1005f3b69 modeld_v2: decouple planplus scaling from accel (#1730)
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 01:03:43 -05:00
Shane Smiskol
24d3f07a2f Add review terms & conditions to device settings w only accept 2026-02-28 22:02:42 -08:00
Shane Smiskol
b10c2ada79 ui: match updater/setup/installer figma text styles (#37500)
* from figma

* match setup figma now

* lint
2026-02-28 21:52:37 -08:00
Shane Smiskol
d44fde7117 multilang: return original string if missing (#37487)
should return og if not there
2026-02-28 21:50:59 -08:00
Robbe Derks
d634894300 Fix thermal sensor readouts on four (#37310) 2026-02-28 21:16:48 -08:00
Adeeb Shihadeh
8856585129 new demo route (#37457) 2026-02-28 21:14:51 -08:00
Adeeb Shihadeh
e7cc70f3fa consolidate file downloading from C++ to Python (#37497) 2026-02-28 21:09:02 -08:00
James Vecellio-Grant
de0790f912 sunnypilot modeld: remove thneed modeld (#1731)
* sunnypilot modeld: remove unused modeld

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-03-01 00:07:24 -05:00
Adeeb Shihadeh
a6b562e0c1 jenkins: move panda tests before camera tests (#37498)
* jenkins: move panda tests before camera tests

* force this time

* Revert "force this time"

This reverts commit 53508225d39d63b97ff7ecc3a0181a27b5948d1b.
2026-02-28 20:51:31 -08:00
Jason Wen
60ae57a3ed [MICI] ui: Speed Limit Assist preActive status (#1742)
* mici init

* obv

* hybrid

* adapt

* less

* consolidate

* oops

Refactor speed limit alert function to use car state directly.

* no event border for tizi/tici

* abstract it

* less

* nah
2026-02-28 20:19:40 -05:00
Jason Wen
5a0c064346 ui: consolidate Speed Limit Assist preActive status rendering (#1745)
* mici init

* obv

* hybrid

* adapt

* less

* consolidate

* oops

Refactor speed limit alert function to use car state directly.

* no event border for tizi/tici

* abstract it

* too soon junior

* refactor
2026-02-28 20:06:38 -05:00
Adeeb Shihadeh
ca5234a32f tools/setup: remove vestigial mac .env file 2026-02-28 16:44:00 -08:00
Jason Wen
fd1937c6d4 ui: Speed Limit Assist preActive improvements (#1743)
* mici init

* obv

* hybrid

* too soon junior

* make them all flash the same pls

* abstract

* shorter

* also too soon junior

* not so fast
2026-02-28 15:23:04 -05:00
Adeeb Shihadeh
a27efe5796 setup: add retry for transient network fails on uv install (#37490) 2026-02-28 10:39:13 -08:00
Shane Smiskol
870430e19f Revert "Actions cleanup" (#37463)
Revert "Actions cleanup (#37307)"

This reverts commit f41d77b24f.
2026-02-28 08:11:25 -08:00
Shane Smiskol
6cbef7bc13 ui: widgets animate out v2 (#37483)
* i like this better

* clean up

* debug

* fix able to click navwidgets that are closing (tested at rc 10)

* add dismiss guards

* fix keyboard so it unselects

* pairing: use dismiss

* main todo

* rm pop_widgets_to!

* reset dismiss state on show event

* debug pop animation bugs

* Revert "debug pop animation bugs"

This reverts commit 9239f2e12cf79b1f75d15d39262fdd15ff5a5200.

* revert

* cmt

* type

* clean up

* now do the todo

* treat using widgets, not idxs, as a separate clean up for later

* actually if not navwidget this is buggy

* fix

* short

* simpler
2026-02-28 08:00:07 -08:00
Shane Smiskol
9cc0d7a1c9 NavWidget: support programmatic dismiss (#37486)
* add dismiss support

* add to widget

* use in dialogs

* good catch

* fix!!

* fix!!

* it works eitehr way

* frick

* good catch
2026-02-28 07:16:06 -08:00
Shane Smiskol
e244aabe88 mici ui: fix navwidget guard 2026-02-28 06:38:47 -08:00
Shane Smiskol
b15390d351 mici ui: add interaction timeout fixme + fix navwidget guard 2026-02-28 06:33:51 -08:00
Shane Smiskol
2af7b3441e Nav stack: clean up (#37484)
guards
2026-02-28 06:19:43 -08:00
Shane Smiskol
87c495b761 Update test_widget_leaks.py 2026-02-28 06:16:03 -08:00
Shane Smiskol
d016071df3 NavWidget: clean up scroller access (#37480)
* clean up

* more

* great clean ups

* better name

* remove useless _can_swipe_away

* reorder

* rename

* state machine is nice but might be too much

* Revert "state machine is nice but might be too much"

This reverts commit f8952969243a2eac3ed5f84793ba7b0c0cdf24bf.

* got a better name out of it though

* clean up

* clean up

* rm!

* rm

* and this

* and

* clean up
2026-02-28 03:26:18 -08:00
Shane Smiskol
940c5b3b3f NavWidget: remove back enabled (#37482)
* free navwidget!

* clean up

* clean up
2026-02-28 03:17:57 -08:00
Shane Smiskol
256ee6cf6f rm hacky trigger 2026-02-28 03:03:49 -08:00
Shane Smiskol
b5855bcade NavWidget: clean up names (#37481)
* better names

* better names

* fix

* order

* rm!
2026-02-28 02:53:27 -08:00
Shane Smiskol
8f328f17fc NavWidget: rm useless state variable 2026-02-28 02:44:27 -08:00
Shane Smiskol
b6f3692b56 NavWidget: standardize back callback (#37479)
clean this up
2026-02-28 00:29:15 -08:00
Shane Smiskol
6266feeed2 Revert "ui: widgets animate out" (#37478)
Revert "ui: widgets animate out (#37321)"

This reverts commit 47ca2c9381.
2026-02-28 00:13:34 -08:00
Shane Smiskol
876ac69047 mici ui: power button visible on ignition (#37475)
visilbe when not ignition
2026-02-27 23:48:56 -08:00
royjr
16047e3c3d ui: dont hide steering wheel when blindspot disabled (#1709)
Update blind_spot_indicators.py

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-28 00:28:08 -05:00
Shane Smiskol
47ca2c9381 ui: widgets animate out (#37321)
* stash

* widgets animate out

* Revert "stash"

This reverts commit eac3493509cff6f2c64111d803c7fef21a1aa2dd.

* abstract

* works also

* works also

* support pop_widget

* only animate top

* callback in request pop

* tune it

* fix

* fix

* try this

* Revert "try this"

This reverts commit 191373a1b35917ee3a361afe73b16eeb60d0a20e.

* debug

* debug

* clean up

* simple test

* clean up

* clean up

* clean up

* clean up

* clean up

* clean up

* clkean up

* re sort

* fine

* yes
2026-02-27 21:21:33 -08:00
Jason Wen
29a3b3315f ui: reimplement "Screen Off" option to Onroad Brightness (#1732)
* ui: Add "Screen Off" option to Onroad Brightness

* migrate old value

* bruh

* fix algo

* comment

* no
2026-02-28 00:18:35 -05:00
Shane Smiskol
10f3f56801 mici ui: get version from build metadata (#37470)
* get version from build

* fix test
2026-02-27 20:20:50 -08:00
Jason Wen
7eb65e878b [TIZI/TICI] ui: Speed Limit Assist active status (#1729)
[TIZI/TICI] ui: display Speed Limit Assist active status
2026-02-27 22:56:26 -05:00
Shane Smiskol
2e42bf9fa4 mici ui: fix onroad transitions if in settings (#37467)
* fix

* type
2026-02-27 18:32:28 -08:00
Jason Wen
3beee1b80e [MICI] ui: need superclass _render in HudRendererSP (#1728) 2026-02-27 20:01:06 -05:00
Shane Smiskol
3a958b882a Revert "onroad: fill bookmark icon when activated" (#37465)
Revert "onroad: fill bookmark icon when activated (#37034)"

This reverts commit 0b958f7c9a.
2026-02-27 15:47:56 -08:00
Shane Smiskol
1b17bf40cd Revert "UI: only show onroad_fade.png when engaged" (#37466)
Revert "UI: only show `onroad_fade.png` when engaged (#37051)"

This reverts commit 39dcc88330.
2026-02-27 15:47:54 -08:00
Robbe Derks
6e8f325024 Fix mic clipping on comma four (#37461)
* 6dB reduction on four

* wrong submodule
2026-02-27 15:05:01 -08:00
Adeeb Shihadeh
cc21fd3ac3 ci: remove weekly eval jobs 2026-02-27 15:04:37 -08:00
Shane Smiskol
010a32bb9b WifiUi: single source for forget btn visible (#37450)
single
2026-02-27 14:56:01 -08:00
Jason Wen
6f6dfa6bba tools: block manage_sunnylinkd in sim startup script (#1725)
* ui sync conflicts with upstream

* md

* ref

* ci

* lint

* more

* more ci

* new new

* tools: block `manage_sunnylinkd` in sim startup script

* try this out

* unbump
2026-02-27 17:53:42 -05:00
Jason Wen
a37d3569bd Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1727) 2026-02-27 17:42:08 -05:00
Jason Wen
d3e26cf695 Merge branch 'upstream/openpilot/master' into sync-20260227
# Conflicts:
#	.github/workflows/release.yaml
#	.github/workflows/setup/action.yaml
#	.github/workflows/tests.yaml
#	panda
Sync: `commaai/opendbc:master` → `sunnypilot/opendbc:master`

Sync: `commaai/panda:master` → `sunnypilot/panda:master`
2026-02-27 17:05:28 -05:00
github-actions[bot]
05e331736d [bot] Update Python packages (#1715)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-27 16:27:16 -05:00
Jason Wen
ab9a58c64a Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1721) 2026-02-27 16:23:20 -05:00
James Vecellio-Grant
ddf05d7126 modeld_v2: tinygrad transformation warp (#1698)
* chore: sync tinygrad

Runs great in sim. now we need to rebuild some models

* oops forgot to unblock this after testing

* helpers

* oh yeah

* latest tg

* this wont do anything empriically

* reduce complexity

* okay lint

* Update tinygrad_runner.py

* Update modeld.py

* Update build-all-tinygrad-models.yaml

* tinygrad bump

* Update modeld.py

* Update tinygrad_runner.py

* bump

* Update SConscript

* Update SConscript

* com

* Update fetcher.py

* Update helpers.py

* life is froughtless, when you're thoughtless

* lint

* ozdust ballroom

* shiz

* Update tinygrad_runner.py

* Update tinygrad_runner.py

* slough it off as i do

* try old support one last time

* support mixed input dtypes

* use internal

* dont need that shiz

* Update fill_model_msg.py

* Update onnx_runner.py

* Update onnx_runner.py

* Update model_runner.py

* see if this speeds up execution

if not, revert me

* no

* Update helpers.py

* rebase

* more

* planplus

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-27 16:15:59 -05:00
Jason Wen
59a16b9cdc Merge branch 'upstream/openpilot/master' into sync-20260225
# Conflicts:
#	.github/workflows/auto_pr_review.yaml
#	.github/workflows/badges.yaml
#	.github/workflows/mici_raylib_ui_preview.yaml
#	.github/workflows/prebuilt.yaml
#	.github/workflows/raylib_ui_preview.yaml
#	.github/workflows/release.yaml
#	.github/workflows/repo-maintenance.yaml
#	.github/workflows/tests.yaml
#	.gitignore
#	Dockerfile.openpilot_base
#	SConstruct
#	docs/CARS.md
#	opendbc_repo
#	panda
#	release/build_release.sh
#	selfdrive/modeld/SConscript
#	selfdrive/modeld/modeld.py
#	selfdrive/pandad/panda_safety.cc
#	selfdrive/pandad/pandad.cc
#	selfdrive/pandad/pandad.py
#	selfdrive/test/process_replay/process_replay.py
#	selfdrive/ui/layouts/onboarding.py
#	selfdrive/ui/mici/layouts/home.py
#	selfdrive/ui/tests/diff/replay.py
#	selfdrive/ui/tests/test_ui/raylib_screenshots.py
#	tools/mac_setup.sh
#	uv.lock
2026-02-27 16:12:57 -05:00
Adeeb Shihadeh
276713ddf9 add back bz2 support with vendored bzip2 (#37459)
* add back bz2 support with vendored bzip2

Reverts f4a36f7f7 ("rm cpp bz2") to restore bzip2 decompression
support in replay/cabana tools, and replaces the system libbz2-dev
with a vendored bzip2 package from commaai/dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* relock bzip2 from releases branch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 12:10:38 -08:00
Andi Radulescu
e1a4189c1f op.sh: add 'op script' subcommand with som-debug (#37325)
* op: add som-debug command for SOM serial debug via panda

* op: namespace som-debug under 'op script' subcommand
2026-02-27 11:51:01 -08:00
Adeeb Shihadeh
a1f4ba55bf nicer scons output (#37455) 2026-02-27 08:05:06 -08:00
Adeeb Shihadeh
d899834b63 Revert "new demo route (#37456)"
This reverts commit c5372e9041.
2026-02-27 08:04:45 -08:00
Adeeb Shihadeh
c5372e9041 new demo route (#37456) 2026-02-27 08:04:24 -08:00
Shane Smiskol
1bf0fb3851 mici ui: Scroller widget helpers (#37451)
* it's so dumb

* niceeee

* oh this is interesting

* this is actually epic

* clean up

* more clean up

* cmt

* super

* forgot

* top
2026-02-27 02:37:02 -08:00
Shane Smiskol
fe39ffa55a mici ui: clear ssh key (#37449)
* clear ssh

* rev
2026-02-27 00:56:41 -08:00
Shane Smiskol
0437998bce Scroller: add_widgets helper 2026-02-26 23:25:48 -08:00
Shane Smiskol
de8f7c4584 Scroller: rename scroll_to(block) 2026-02-26 23:24:21 -08:00
Andi Radulescu
286c4f8403 op.sh: fallback to script's own location for openpilot root (#37326)
op: fallback to script's own location for openpilot root
2026-02-26 21:24:51 -08:00
Adeeb Shihadeh
0977a91d65 CI for the people: no cache (#37437)
* sympathize with our first time cloners

* venv

* rm compile openpilot

* retry for all

* rm setup action
2026-02-26 21:17:00 -08:00
Adeeb Shihadeh
245d5bba9c make ruff happy 2026-02-26 20:49:18 -08:00
Adeeb Shihadeh
2ef29967e8 tici: rm cavli modem config 2026-02-26 20:42:18 -08:00
Kacper Rączy
6d559c4219 lagd: min_lag (#37402)
* Add min_lag

* Split line

* Clip lag

* Test should run with 3 lag frames too

* Update selfdrive/locationd/lagd.py
2026-02-27 03:47:07 +00:00
Shane Smiskol
3cc4683eb7 mici reset: fix cancel closes application (#37434)
* fix

* match tici

* rm
2026-02-26 17:34:26 -08:00
Shane Smiskol
ac08c79139 BigButton: sublabel takes all available space (#37431)
change
2026-02-26 16:19:12 -08:00
ZwX1616
04dcdf46bc DM: Le Mans GT3 Model (#37425)
* 81248b12-6592-4a5c-9b59-a44c64123b2b

* install tg instead of onnx

* fix python path

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2026-02-26 16:10:57 -08:00
Shane Smiskol
7f1def00b2 BigButton: handle background function (#37430)
* move

* fix
2026-02-26 16:04:53 -08:00
Shane Smiskol
94ee6b0f43 BigButton: move parameters into class (#37429)
* BigButton: move parameters into class

* fix
2026-02-26 16:01:30 -08:00
ZwX1616
91696ba6c8 fix module for model_review (#37428)
* install tg instead of onnx

* fix python path

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2026-02-26 15:58:52 -08:00
Shane Smiskol
608a1c2baa Add comment about epoch guard 2026-02-26 03:48:00 -08:00
Shane Smiskol
93a96695ea WifiManager: frozen WifiState (#37420)
froze
2026-02-26 03:46:40 -08:00
Shane Smiskol
146c64b0f1 mici ui: improve tethering a bit (#37418)
* try this

* deactivate

* faiilures!

* starting

* try

* ...

* starting

* fix strength

* revert

* debug

* more

* override for display network

* try

* nvm it fixes a few things

* cmt

* clean up
2026-02-26 02:24:59 -08:00
Shane Smiskol
4cd5c1b3c2 clean up 2026-02-26 02:24:12 -08:00
Shane Smiskol
811363cab9 clean up 2026-02-26 01:21:32 -08:00
Shane Smiskol
b2e94548b9 ui: move connected wifi buttons to front independent of scan results (#37417)
* move items

* clean up

* wtf

* debg
2026-02-26 01:20:06 -08:00
Shane Smiskol
cf5ae3cbca WifiManager: fix connect flash while forgetting (#37416)
* real traces for some tests

combine and new test for low strength/turn off hotspot while connecting

revert wifiui

* stupid llm

* clean up
2026-02-26 01:10:35 -08:00
Daniel Koepping
561c490b2a Replay: keep ref history (#37357)
keep history
2026-02-25 20:32:44 -08:00
Shane Smiskol
496ae85f67 WifiManager: guard init_wifi_state (#37413)
* failing test

* fix

* rename

* better
2026-02-25 19:30:02 -08:00
Robbe Derks
5c630b20a9 panda sound output level (#37408)
parse sound output level
2026-02-25 19:29:55 -08:00
Shane Smiskol
c2a7437972 WifiManager: fix some threading race conditions (#37406)
* interesting epoch approach

* repro

* determ fix

* cmts

* new issue

* test

* clean up

* cmt

* add back

* reorg cmt

* cmt

* clean up

* cmt
2026-02-25 19:09:11 -08:00
Shane Smiskol
1550520b63 WifiManager: connect/activate failure resets ssid (#37410)
fix connect/activate failure resetting connected/connecting ssid
2026-02-25 18:41:28 -08:00
Shane Smiskol
bcb4a6a3e3 WifiManager: fix deterministic state mismatches (#37407)
* hmm

* revert to master

* context too big

* fresh context

* early return

* early return

* tests

* restore cmts

* lester nester

* note

* add

* final review

* cmt
2026-02-25 17:25:31 -08:00
Shane Smiskol
7835b9aa17 WifiManager: no need to update networks in as many places v2 (#37405)
* debug

* todo

* clean up

* clean up

* fix test
2026-02-25 15:24:33 -08:00
Alexandre Nobuharu Sato
f2c4749420 update docs (#37293)
* update docs

* Update paths for brand-specific safety files
2026-02-25 15:40:13 -05:00
James Vecellio-Grant
238fca2334 tools: fix darwin compile errors (#37399) 2026-02-25 08:03:08 -08:00
Shane Smiskol
72ecc330e2 WifiManager: don't emit need auth for partially connected networks (#37397)
* fix a few

* document

* now remove unused prev_ssid

* more
2026-02-25 02:54:15 -08:00
Shane Smiskol
d9b5a1e30b WifiManager: add test for state machine (#37396)
* test wifi state machine

* clean up and another few tests

* no unittest :((

* clean up

* clean up

* try to repro on device

* try to repro on device

* nice, the flicker is covered by test_user_initiated_skips_dbus_lookup!

* add todo soon to be all fixed

* documentaiton

* test the thread races too

* _fire -> fire

* duplication

* new state

* fix some tests

* format

* combine similar tests

* use process_callbacks

* clean up

* collapse two tests

* rm nl

* previous messy test

* delete old

* asked another to ask questions
2026-02-25 01:59:19 -08:00
Jason Wen
f43dc93bd9 Revert "bump"
This reverts commit 06a5a380df.
2026-02-25 03:34:05 -05:00
Jason Wen
06a5a380df bump 2026-02-25 02:51:39 -05:00
Lukas Heintz
a4166563e1 pandad: flasher for Rivian long upgrade module (#1712)
* flasher for Rivian long upgrade

* self-contained no dependency on Panda.F4_DEVICES

* standalone flasher

* move to sp module

* use brand field directly

* use brand field directly

* use brand field directly

* bump

* add some logging

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-25 02:39:50 -05:00
Shane Smiskol
1792a60053 WifiManager: split out state machine (#37395)
split out state machine
2026-02-24 23:24:08 -08:00
Zeph
538e1e8a9a soundd: trigger timeout warning during MADS lateral-only (#1717)
* soundd: trigger timeout warning during MADS lateral-only

The selfdrive timeout alert (warningImmediate) only fires when
selfdriveState.enabled is True. During MADS lateral-only mode,
enabled is False even though the system is actively steering.

If selfdrived stops publishing while MADS lateral is active, the
driver gets no audible warning that steering has become unresponsive.

Add selfdriveStateSP to the SubMaster and check mads.active alongside
selfdriveState.enabled so the timeout alert fires whenever the system
is actuating steering.

* test_soundd: add MADS lateral-only timeout test

Test that the selfdrive timeout warning fires when selfdriveState.enabled
is False but selfdriveStateSP.mads.active is True.

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-25 02:00:07 -05:00
Zeph
7a43e2cb67 controlsd: fix steer_limited_by_safety not updating under MADS (#1716)
The `steer_limited_by_safety` update in `publish()` is gated by
`selfdriveState.active`, which is False during MADS lateral-only
control. This causes the flag to never update once cruise deactivates
— it stays stuck at whatever value it had during the last ramp-up
(typically True), permanently suppressing the saturation timer in
`_check_saturation` and preventing the "Turn Exceeds Steering Limit"
alert from firing.

Use `CC.latActive` instead, which already accounts for MADS via
`get_lat_active()` in ControlsExt.

Bug was introduced in #446 (MADS), which updated `CC.latActive` to
use `mads.active` but missed updating the `steer_limited_by_safety`
gate in `publish()`.
2026-02-25 01:52:48 -05:00
Shane Smiskol
571937da84 WifiUi: sort networks on show event (#37390)
* should fail

* this works but i think i know a better way

* something like this

* hmm

* this works

* rm useless test

* good stash

* Revert "good stash"

This reverts commit c2dddf0810286cb56e2418dd6f7085c2239e5109.
2026-02-24 22:42:09 -08:00
Shane Smiskol
6442752486 Scroller: reset state on show (#37391)
* one time test

* fix!

* cleanm up

* cleanm up
2026-02-24 22:29:25 -08:00
Shane Smiskol
ed34c4cfd6 NavWidget: reset some state on show 2026-02-24 20:42:50 -08:00
Adeeb Shihadeh
8810948eca CI: ensure no brew (#37387) 2026-02-24 18:49:59 -08:00
Harald Schäfer
0b6da2077f parse planplus (#37386) 2026-02-24 15:41:00 -08:00
Harald Schäfer
159d3a30e3 RM onnx (#37377)
* Give tf flags to onnx parse

* rm onnx again

* update lock
2026-02-24 15:35:52 -08:00
Shane Smiskol
6db6d79211 WifiUi: decouple button update from move/scroll (#37383)
* meh

* hmm

* can also do this

* keep behavior

* rm
2026-02-24 15:34:48 -08:00
Adeeb Shihadeh
a064de7ceb use vendored libjpeg-turbo (#37381) 2026-02-24 12:00:39 -08:00
Harald Schäfer
c787507449 Revert "rm onnx (#37285)" (#37379)
This reverts commit 23e1c4f49e.
2026-02-24 09:43:47 -08:00
Shane Smiskol
3352e48c51 Scroller: add blocking scroll to (#37378)
* rename

* make tuple

* blocking
2026-02-24 00:50:47 -08:00
Shane Smiskol
081bb51e58 mici: add missing Scroller hide events 2026-02-24 00:50:32 -08:00
Shane Smiskol
faa23595af mici buttons and sliders: use semi bold 2026-02-24 00:35:51 -08:00
Shane Smiskol
cf083711bb mici setup: match tici network timeout 2026-02-24 00:34:03 -08:00
Shane Smiskol
9f7002fdf1 mici setup: set core affinity 2026-02-24 00:30:40 -08:00
Shane Smiskol
761c349490 Make WifiNetworkButton self-contained 2026-02-24 00:29:20 -08:00
Jason Wen
03a14ff864 [TIZI/TICI] ui: simplify Smart Cruise Control text rendering (#1719) 2026-02-24 03:02:36 -05:00
James Mikesell
c48b724de1 ICBM: ensure button timers update on disable to clear stale presses (#1688)
* ICBM: ensure button timers update on disable to clear stale presses

* fix race condition

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-24 02:38:19 -05:00
Adeeb Shihadeh
542e14306e vendor zstd and ncurses (#37376) 2026-02-23 23:02:53 -08:00
Adeeb Shihadeh
79bc6c3a52 replace python3-dev apt install with vendored package (#37374)
* replace python3-dev apt install with vendored package

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* keep for agnos

* cleaner

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:59:39 -08:00
Adeeb Shihadeh
8952c947d1 only build installer on device 2026-02-23 21:52:48 -08:00
Adeeb Shihadeh
a1e9cf9df9 translations: replace gettext apt dependency with pure Python tools (#37372) 2026-02-23 21:42:24 -08:00
Angus Dippenaar
8a64cc57a9 [TIZI/TICI] visuals: Improved speed limit (#1713)
improved speed limit

Co-authored-by: royjr <royjr96@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-24 00:22:40 -05:00
Adeeb Shihadeh
2ddf95d47f rm libgles2-mesa-dev (#37373)
* rm libjpeg

* rm-libgles2-mesa-dev
2026-02-23 21:18:29 -08:00
Adeeb Shihadeh
8bd8066589 rm libjpeg (#37371) 2026-02-23 21:11:41 -08:00
Harald Schäfer
44cf6b358e ffmpeg: pipe (#37359)
spec pipe
2026-02-23 20:57:21 -08:00
Shane Smiskol
ded5e5c8d0 BigButton: normal draw order if not scrolling (#37368)
no scroll normal drawing
2026-02-23 20:46:17 -08:00
Shane Smiskol
21b8189a45 ui: support asset flip (#37367)
* support asset flip

* clean up
2026-02-23 20:45:41 -08:00
Shane Smiskol
76a552715f ui: move shake into BigButton (#37364)
* move

* fix
2026-02-23 20:45:22 -08:00
Shane Smiskol
bd3b7a1d87 Scroller: preserve original touch valid callback (#37363)
preserve
2026-02-23 20:20:44 -08:00
Shane Smiskol
8543afc78a Slider: add pressed state (#37365)
* sliders have pressed state

* more

* new and pressed setup sliders
2026-02-23 20:19:41 -08:00
Shane Smiskol
12f923445b Slider: call confirm callback after set state
in case confirm callback resets the state immediately
2026-02-23 20:14:06 -08:00
Shane Smiskol
0e127cf88b WifiManager: guard init wifi state (#37366)
guard init wifi state
2026-02-23 20:13:17 -08:00
Adeeb Shihadeh
c5b65d072d no more xset 2026-02-23 19:53:07 -08:00
Shane Smiskol
ed8d1a65c3 BigCircleButton: new pressed image 2026-02-23 19:39:30 -08:00
Shane Smiskol
91930c2d0d UnifiedLabel: add set_line_height 2026-02-23 19:37:59 -08:00
Nayan
111e8897be models: fix default & index "0" (#1718)
* default be gone

* zero is the most significant number, don't ignore it.

* thanks sentry!!
2026-02-23 19:23:08 -08:00
Trey Moen
19459d2b2e feat(lpa): at client + list profiles (#37337)
* Reapply "feat(lpa): `at` client + list profiles (#37271)" (#37322)

This reverts commit ddf8abc14a.

* lpa: fall back to ModemManager D-Bus when serial port unavailable

On older devices, ModemManager still claims /dev/ttyUSB2, so the
direct serial open fails. Try serial first; if it can't be acquired,
transparently route AT commands through MM's D-Bus Command() interface.

Co-authored-by: Cursor <cursoragent@cursor.com>

* lpa: add serial/dbus transport labels to debug logs

Co-authored-by: Cursor <cursoragent@cursor.com>

* no

* lint

* here

* const

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 18:25:52 -08:00
Adeeb Shihadeh
5af3f32157 simplify setup (#37358)
* simplify setup

* lil more

* simplify dockedr

* just run setup there:

* don't need that junk

* lil more
2026-02-23 16:56:58 -08:00
Harald Schäfer
16dda06a0c Reapply chunker (#37292)
* Reapply chunker

* good size

* rm glob

* cleaner

* back to 45mb

* warp need not be fixed

* add manifest path

* lil cleaner
2026-02-23 16:49:48 -08:00
Adeeb Shihadeh
76d084d877 switch to system compilers (GCC on Linux, Apple Clang on macOS) (#37355) 2026-02-23 16:34:42 -08:00
Shane Smiskol
90a9ef277c ui: remove multiple option dialog (#37356)
* rm

* from here too
2026-02-23 15:17:21 -08:00
Shane Smiskol
b32227e69f BigCircleButton: remove press_state_enabled 2026-02-23 15:03:48 -08:00
commaci-public
7cc237aa4c [bot] Update Python packages (#37351)
* Update Python packages

* fix

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-23 11:58:58 -08:00
Adeeb Shihadeh
0a14e19808 CI: use setup action on macOS (#37352) 2026-02-23 09:45:29 -08:00
Shane Smiskol
c16879f2b8 mici ui: fix missing home show event (#37347)
fix missing
2026-02-23 01:40:56 -08:00
Shane Smiskol
8d0cb9c8cf Unified label fix scroll fade (#37346)
* disable forget for tethering

* nets

* put in wifiman

* batch

* revert

* clean up
2026-02-23 01:31:06 -08:00
Shane Smiskol
2ecdd2810c mici ui: disable forget on tethering and show full strength (#37344)
* disable forget for tethering

* nets

* put in wifiman

* batch

* Revert "batch"

This reverts commit 9af20c1c7513c22bf9283b2f02514373fa981f50.

* clean up

* more

* more
2026-02-23 01:22:59 -08:00
Shane Smiskol
35e38f5fe4 mici ui: show lock in network panel (#37345)
* disable forget for tethering

* nets

* put in wifiman

* batch

* revert

* draw
2026-02-23 01:21:40 -08:00
Adeeb Shihadeh
2a0ac63fa5 remove libbz2 from ubuntu setup (#37342) 2026-02-22 22:17:15 -08:00
Adeeb Shihadeh
ca058bcc81 bye bye brew (#37340)
* bye bye brew

* drop the nproc it's simpler
2026-02-22 21:52:11 -08:00
Adeeb Shihadeh
f96406b13f use vendored eigen from dependencies repo (#37339)
* use vendored eigen from dependencies repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lock

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:48:00 -08:00
Adeeb Shihadeh
0738c05d9f vendored git-lfs (#37338)
* use vendored zeromq from dependencies repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lock

* rm more crap

* use vendored git-lfs from dependencies repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* from releases

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:29:23 -08:00
Adeeb Shihadeh
08b76d3de6 Use built-in clang on macOS (#37335)
* rm extra LLVM install on macOS

* update that

* rm brew cache

* no cache

* Revert "no cache"

This reverts commit a3f8eff234935d4bb27d4bd785ad8a710496a159.
2026-02-22 20:14:12 -08:00
Adeeb Shihadeh
cef81da1e9 use vendored zeromq from dependencies repo (#37333)
* use vendored zeromq from dependencies repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lock

* rm more crap

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:59:05 -08:00
Adeeb Shihadeh
f4a36f7f74 rm cpp bz2 (#37332) 2026-02-22 19:37:14 -08:00
Adeeb Shihadeh
f911493177 rm pyaudio (#37331)
* rm pyaudio

* those too
2026-02-22 19:30:24 -08:00
Adeeb Shihadeh
fa2050ab1a rm unused dependencies (#37329)
ok just libusb
2026-02-22 19:21:56 -08:00
Adeeb Shihadeh
4bffe422e4 vendor capnproto and ffmpeg via dependencies repo (#37327) 2026-02-22 19:15:11 -08:00
Adeeb Shihadeh
f881a9ba68 rm vendor building workflow 2026-02-22 19:00:29 -08:00
Adeeb Shihadeh
afa9ec1138 bump panda: vendored toolchain (#37324)
* bump panda: vendored toolchain

* add

* bump panda
2026-02-22 16:27:59 -08:00
Trey Moen
ddf8abc14a Revert "feat(lpa): at client + list profiles (#37271)" (#37322)
This reverts commit 8bca2ca758.
2026-02-22 09:34:37 -08:00
Shane Smiskol
5f722d2c93 four: new wifi ui design (#37152)
* start

* start

* lil more

* add forget

* fix forget button scrolling

* push right a bit

* fix forget press

* add divider

* fix scroll panel

* better forget and overriding

* revert this

* check icon

* cursor merge conflict fix

* fix rounding and forget btn placement

* scroll indicator

* 65%

* calibrate

* try loading animation

* push to device

* top right

* bottom right

* no red

* top left

* bottom left

* down 2px

* WHY DOES NETWORK MANAGER KEEP CRASHING AHHH

* reduce round trip calls in update_networks

* clean up and combine getallaccesspoint and activeaccesspoint

* cmt

* animate big button over smoothly. super hacky, need to clean up

* animate

* remove old widgets and images

* remove status label, tune loading animation opac back

* connecting is a little buggy still

* add back missing network and don't pop

* some fixes

* "clean up"

* fix lag in animation

* fix adding saved connection to start

* remove saved network to start, divider

* animate up, over, and down

* revert for now

* remove fancy complex animation for now, sorry nick

* remove divider + clean up

* more clean up

* more clean up

* fix forget button press

* cmt

* tweak loading animation behavior

* new lock fix wifi

* rm old lock

* great catch by opus

* clean up

* debug

* fix touch events that are down -> up in one frame (why it only bugged on mici)

* clean up

* eager forgetting

* this SHOULD be full eager forget, more than i thought

* fix wifi slash positioning

* move forgotten networks after saved networks

* temp keep

* test on device

* fix

* see 65

* 5 best

* fix double render double brightness

* can click bottom right now

* disable touch while animating

* fix animation

* can scroll while animating, not tap

* not great yet

* clean up

* didn't work

* always update networks after activation

* stash

* move to update_state

* debug

* debug

* temp

* fix ip and metered flickering when updating at high freq (or rare race condition)

* fix

* if you give it less than 8 chars it never clears connecting

* lock no int

* better wrong password handling

* shake when wrong password

* nm set connecting when it connects on its own

* loading bottom right

* sort connecting first

* sort by unquantized to put strongest first

* clean up

* clean up nm

* clean up nm

* shorter

* fix crash

* 0.5s

* debug

* revert and try something else

* stash

* no

* rev

* use signals

* more

* not wrong password if ever connected after wrong

* similar to gnome shell, don't save connection that never successfully activated.

we do this by creating temporary memory connection with persist: volatile that deletes itself if failed, and then only write to disk when activated

* clean up

* cover all states

* clear if connecting too

* remove pritn

* might need this for CoxWifi

* whoops

* save last pass

* Revert "whoops"

This reverts commit 83a133955246ce32dcf119ededd8b01b3162a866.

* Revert "might need this for CoxWifi"

This reverts commit cddb8b35be152ed154462b188283f9d5a844583d.

* this may be less noisy for low strength networks, but less accurate as previous was reflecting nm state better

* Revert "this may be less noisy for low strength networks, but less accurate as previous was reflecting nm state better"

This reverts commit 740286c846556f32125a96bfe6ecf128300af0d8.

* race condition with volotile not removing conn fast enough/update networks not firing fast enough

* Revert "save last pass"

This reverts commit 7249a58a18b11487fd0370cee36e40a17f7ac521.

* revert some wifiman stuff to master

* not needed

* rm active ap

* remove old dead code

* do after

* always send forgotten callback so we can't be stuck in forgetting state forever

* reproduce race condition where connection removed signal takes a while to remove, then update networks keep is_saved true

* fix from merge

* nice, we can remove some eager code now for treating is_saved as not saved after forgot since it's live

* more

* rm

* simplify passed in callbacks

* clean up

* need this one check back for wrong password to hide forget for a split second

* opus says this is simpler 🤔

* Revert "opus says this is simpler 🤔"

This reverts commit 71472e5b383d7f2083d95ba1188070f41ae14775.

* another attempt

* Revert "another attempt"

This reverts commit 31f30babe656f9cad24399bc2196bb6e7ab79bbd.

* fix from merge

* some lcean up

* fix

* fixes to make work with new animation

* clean up

* this works too

* simplify loading animation behavior for now, revert wifi scan time

* clean up

* temporary fix

* stash

* Revert "stash"

This reverts commit 7471dbdc452807b33b4868a98dd8565681b2e44d.

* stash

* Revert "stash"

This reverts commit e0e5e6e861734320ce5dea5626086784577cb334.

* this check was because is_connected could have been stale from Network as the source

* nm can show connected/connecting to network with 0 aps for a while if strength is low, move out of range under those states

* stash

* Revert "stash"

This reverts commit 5ec3b454d54392523947f6477f551657d3863a6d.

* todo

* todo

* order

* don't need temporary fix anymore

* cmt

* order

* unused i
2026-02-22 07:08:48 -08:00
Shane Smiskol
31ac5a216d WifiManager: fix NEED_AUTH for wrong network (#37320)
* stash

* test seemed to work

* simplify

* clean up

* move under

* Revert "move under"

This reverts commit ce940cffb32378cbe5a69edaf6fc9d9cec202e54.

* back

* fix
2026-02-22 05:49:27 -08:00
Shane Smiskol
1b262a5a52 Scroller: fix overlay 2026-02-22 03:55:13 -08:00
Shane Smiskol
517289f3a5 mici scroller: add move animation (#37319)
* already 90% of the way there and not 144 lines

* nice

* lift properly

* lift, wait, move, wait, drop!

* some clean up

* epic, he ran a simulation to turn opacity filter into pixels

* scroll independant move animation without layout!

* move into function

* clean up

* rm

* overlay behind moving item

* Revert "overlay behind moving item"

This reverts commit 598e22363eb66af6496fe5f1eea8e643d4c2adbb.

* simpler overlay under lifted item

* support multiple animations at once

* Revert "support multiple animations at once"

This reverts commit 3ce6c8281053ee4831ceb88cacf66c343fc7d7ff.

* clean up

* cmt

* clean up

* kinda works

* Revert "kinda works"

This reverts commit ff050c6afc058788b3189a0acc202ada17353504.

* clean up

clean up

* clear overlay

* diff report

* don't break more
2026-02-22 03:36:31 -08:00
Shane Smiskol
6fcd2187e1 scroller: items property 2026-02-21 23:33:47 -08:00
Shane Smiskol
8fa3f60de7 mici ui: remove DeviceStatus (#37317)
rm
2026-02-21 22:54:18 -08:00
Shane Smiskol
a3f40dbac3 ui: add Layout class (#37311)
* split nav widget out

* clean up

* clean up

* fix

* work

* small enough to not be function

* nah we want intflag

* clean up

* always runs

* more clean up

* prep for scroller

* opacity for settings

* clean up layout

* set enabled

* rm
2026-02-21 22:50:59 -08:00
Shane Smiskol
f99dc2eab2 mici scroller: default no snapping (#37316)
* change default

* fix
2026-02-21 22:35:41 -08:00
Shane Smiskol
cdcc2f6766 mici scroller: remove double pad args (#37315)
* remove double pad args

* fix
2026-02-21 22:31:05 -08:00
Shane Smiskol
1304f95978 mici ui: remove line separators (#37314)
remove
2026-02-21 22:26:07 -08:00
Shane Smiskol
c4393277fb ui: draw debug rects (#37313)
* debug

* new
2026-02-21 20:56:51 -08:00
Shane Smiskol
7cd9ab27e6 ui: split out NavWidget (#37312)
* spliit

* fix

* fix imports
2026-02-21 20:37:45 -08:00
Andrey Litvitski
ece999c548 fix typos in contributing doc (#37309) 2026-02-21 20:10:16 -08:00
Christopher Haucke
082cf39d73 UI: Fix option control display for floating point params (#1711) 2026-02-21 20:01:27 -05:00
Adeeb Shihadeh
f41d77b24f Actions cleanup (#37307)
* rm those

* more opt
2026-02-21 11:45:44 -08:00
Adeeb Shihadeh
f45f239774 CI: remove redundant build job (#37306) 2026-02-21 11:34:32 -08:00
Adeeb Shihadeh
02e550e2cb remove setup_vsound (#37305) 2026-02-21 11:32:51 -08:00
Adeeb Shihadeh
06298b28f1 ty: fix unused warnings 2026-02-21 10:28:14 -08:00
Adeeb Shihadeh
a694d051b3 trim unused ubuntu deps (#37297)
* trim unused ubuntu deps

* mac cleanup
2026-02-20 22:39:03 -08:00
Trey Moen
468a50b6f6 fix: adb ssh on mac (#37298)
* fix: adb ssh on mac

* revert
2026-02-20 22:38:51 -08:00
Adeeb Shihadeh
4e8a4f87f4 pj: handle no qt 2026-02-20 22:36:32 -08:00
Shane Smiskol
30350f4207 ui: navigation stack (#37094)
* initial

* start to support nav stack in settings panels + fix some navwidget bugs

* add deprecation warning and move more to new nav stack

* fix overriding NavWidget enabled and do developer panel

* fix interactive timeout and do main

* more device, not done yet

* minor network fixes

* dcam dialog

* start onboarding

* fix onboarding

* do mici setup

* remove now useless CUSTOM_SOFTWARE

* support big ui with old modal overlay

* reset can be old modal overlay, but updater needs new since it uses wifiui

* flip name truthiness to inspire excitement

* all *should* work, but will do pass later

* clean up main

* clean up settiings

* clean up dialog and developer

* cleanup mici setup some

* rm one more

* fix keyboard

* revert

* might as well but clarify

* fix networkinfopage buttons

* lint

* nice clean up from cursor

* animate background fade with position

* fix device overlays

* cursor fix pt1

cursor fix pt2

* rm print

* capital

* temp fix from cursor for onboarding not freeing space after reviewing training guide

* fix home screen scroller snap not resetting

* stash

* nice gradient on top

* 40

* 20

* no gradient

* return unused returns and always show regulatory btn

* nice!

* clean up

* new_modal is always true!

* more clean up

* clean up

* big only renders top 1

* fixup setup and updater

* stash

* Revert "stash"

This reverts commit 3cfb226ccb51869ed1f7d630b5fdd6725ad094d5.

* fix mici keys coming in from top

* clean up

* fix mici dialogs like tici, pop first incase call back pushes

* clever way but not not

* Revert "clever way but not not"

This reverts commit f69d106df61262f049df20cc1a9064ca1e6feeb7.

* more setup

* mici keyboard: fix not disabling below

* cmt

* fix wifi callbacks not running in rare case

* clean up network

* clean up network

* clean up dialog

* pairing

* rm

* todo

* fix replay

* they push themselkves!

* clean up ui_state

* clean up application

* clean up

* stash

* Revert "stash"

This reverts commit 07d3f5f26c99ef891086b6fe03095d53a62b8631.

* typing

* lint
2026-02-20 19:00:27 -08:00
Adeeb Shihadeh
c98ba4ff4c Qt is optional (#37295)
* Qt is optional

* cleanup
2026-02-20 18:54:00 -08:00
Adeeb Shihadeh
c46cf9f536 lil pyproject.toml cleanup 2026-02-20 18:35:24 -08:00
Adeeb Shihadeh
23e1c4f49e rm onnx (#37285) 2026-02-20 16:47:47 -08:00
Bruce Wayne
d6af0e6eb5 Revert "Simpler file chunker (#37276)"
This reverts commit b27fa58444.
2026-02-20 16:43:43 -08:00
Bruce Wayne
09926bf5b5 Revert "safer model pkl chunking (#37283)"
This reverts commit 5d54743d8b.
2026-02-20 16:43:33 -08:00
Adeeb Shihadeh
f9f33c4dc4 show venv size in package update job (#37286)
* show venv size in package update job

* lil more
2026-02-20 16:39:11 -08:00
Adeeb Shihadeh
5fc6fe68f6 rm mapbox-earcut (#37284) 2026-02-20 16:14:46 -08:00
Adeeb Shihadeh
806655b052 CI: replace docker with op setup (#37282) 2026-02-20 15:48:09 -08:00
Harald Schäfer
5d54743d8b safer model pkl chunking (#37283)
* safer chunking

* rm unchunked
2026-02-20 15:19:39 -08:00
Adeeb Shihadeh
b28ff40d4d insource parameterized (#37280)
* insource parameterized

* lil more

* fix
2026-02-20 14:59:36 -08:00
Adeeb Shihadeh
07163f793b pytest timeout doesn't even work (#37281) 2026-02-20 14:48:27 -08:00
Adeeb Shihadeh
66687746f9 replace dictdiffer with native capnp differ (#37279)
* replace dictdiffer with native capnp differ

* capnp diff
2026-02-20 14:20:02 -08:00
Harald Schäfer
b27fa58444 Simpler file chunker (#37276)
* Chunk tinygrad pkl below GitHub max size

* pull that out

* rm glob

* make work

* Single name def

* unused comment

* more cleanups

* revert that

* 10MB overhead

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-20 10:37:14 -08:00
Trey Moen
8bca2ca758 feat(lpa): at client + list profiles (#37271)
* feat(lpa): implement list_profiles in TiciLPA

Add AT command serial interface, TLV parsing, and ES10x transport
to support listing eSIM profiles (SGP.22 v2.3). TiciLPA is a
singleton that maintains a persistent connection to the modem.

* feat(lpa): close TiciLPA serial connection on exit

Register atexit cleanup so the logical channel and serial port are
released when the process exits, even on crashes or early exits.

* feat(lpa): close stale logical channels on init to prevent timeouts

* trying to brick it

* Revert "trying to brick it"

This reverts commit 46a0467314479c92d2cf331280521a1263f6cc43.

* feat(lpa): remove ensure_capabilities check on init

Target devices are known to support the required AT commands,
so skip the capability probes and stale channel cleanup to
speed up initialization.

* feat(lpa): enable debug logging via DEBUG=1 env variable

* muuuch better

* revert

* cleanup

* constant
2026-02-20 10:26:50 -08:00
Shane Smiskol
cefddf4b9b ui: add navigation stack for tici (#37275)
* initial

* start to support nav stack in settings panels + fix some navwidget bugs

* add deprecation warning and move more to new nav stack

* fix overriding NavWidget enabled and do developer panel

* fix interactive timeout and do main

* more device, not done yet

* minor network fixes

* dcam dialog

* start onboarding

* fix onboarding

* do mici setup

* remove now useless CUSTOM_SOFTWARE

* support big ui with old modal overlay

* reset can be old modal overlay, but updater needs new since it uses wifiui

* flip name truthiness to inspire excitement

* all *should* work, but will do pass later

* clean up main

* clean up settiings

* clean up dialog and developer

* cleanup mici setup some

* rm one more

* fix keyboard

* revert

* might as well but clarify

* fix networkinfopage buttons

* lint

* nice clean up from cursor

* animate background fade with position

* fix device overlays

* cursor fix pt1

cursor fix pt2

* rm print

* capital

* temp fix from cursor for onboarding not freeing space after reviewing training guide

* fix home screen scroller snap not resetting

* stash

* nice gradient on top

* 40

* 20

* no gradient

* return unused returns and always show regulatory btn

* nice!

* revert selfdrive/ui

* let's do tici first

* bring back ui

* not sure why __del__, SetupWidget was never deleted?

* device "done"

* network "done!!"

* toggles "done"

* software "done"

* developer "done"

* fix onboarding

* use new modal for debug windows

* and aug

* setup "done"

* clean up

* updater "done"

* reset "done"

* pop first before callbacks in case callbacks push

* fix cmt

* not needed

* remove two commented functions for mici

* clean up application

* typing

* static

* not sure what this means

* fix big

* more static

* actually great catch

* fix cmt
2026-02-20 02:43:11 -08:00
Shane Smiskol
f829c90de6 skip widget leak test 2026-02-20 02:40:41 -08:00
Shane Smiskol
6bd3cab8a8 edge shadows should use widget y 2026-02-19 22:52:21 -08:00
Shane Smiskol
e54c0091bc tici ui: always show regulatory button (#37273)
* i knew it

* clean up
2026-02-19 22:49:23 -08:00
Shane Smiskol
48568cba0b mici training guide: fix memory leak each time you open dialog (#37270)
* fix

* meh

* unclaud test is best

* yess

* try

* works!

* remove dict handling

* clean up

* more clean up

* remove trash

* fixup

* fix up onboarding again

* fix drivercameradialog

* don't show test window

* more widgets

* fix all

* Revert "fix all"

This reverts commit 42d3537c9314af382961a16443a63faed202b157.

* move and whitelist

* clean up

* more test + ignore

* to fix

* temp

* Revert "temp"

This reverts commit 215ecbb8a8fc0e6826d45b2c0d57999c7a19a400.
2026-02-19 22:32:26 -08:00
Shane Smiskol
6ecb1060be ui: normalize ssids for 3X (#37269)
* fix for tici

* clean up
2026-02-19 16:36:35 -08:00
Shane Smiskol
93977e2ee2 ui: fix side gradients (#37268)
fix
2026-02-19 16:35:51 -08:00
Daniel Koepping
8650ca837f add power reduction to release notes (#37266) 2026-02-19 14:50:48 -08:00
Daniel Koepping
6853f1db29 bump panda (#37265) 2026-02-19 14:42:28 -08:00
Adeeb Shihadeh
140aa95523 add kia k7 to release notes 2026-02-19 09:33:03 -08:00
Trey Moen
69544c57fd refactor(esim): cleanup lpa (#37260)
cleanup lpa
2026-02-19 09:28:04 -08:00
Shane Smiskol
a3f2452fa7 WifiManager: single source for known connections (#37262)
* temp

* rev

* reproduce race condition where connection removed signal takes a while to remove, then update networks keep is_saved true

* fix

* Revert "reproduce race condition where connection removed signal takes a while to remove, then update networks keep is_saved true"

This reverts commit cf7044ee955777db16434ab81c520bbe798c9164.

* not anymore

* more clear

* safe guards

nl
2026-02-19 00:49:35 -08:00
Shane Smiskol
c736d43cce Remove old TODO in WifiManager
hell no
2026-02-19 00:40:20 -08:00
Shane Smiskol
a28cc71b8b WifiManager: always emit forgot callback (#37261)
* fixme

* fixme

* fixme
2026-02-19 00:12:49 -08:00
Shane Smiskol
612c518dd6 WifiManager: signal-driven connection status (#37258)
* signal driven wifi state

* copy exactly

* copy signal handler

* remove is_connected

* Revert "remove is_connected"

This reverts commit f2246a70f4a29e9f3405947ca43d9404578c9d2d.

* do 3 network

* missing reason

* do wifiui

* clean up mici updater

* rest

* or not connecting

* clean up is_connected

* clean up wifiui

* match wifiui state more exactly in network panel for wifi button

* update active connection info after activation (used to do in _update_networks)

* clean up prints

* more

* rm

* not needed

* clean up state machine a bit

* more

* more

* indent

* final clean up

* debug

* debug

* wait for ip?

* more

* revert

* just to see

* ensure we emit activated even if we fail to get conn path from dbus

* hmm

* fine

* back

* back

* Revert "back"

This reverts commit 6464abe243c2a3bbf62b8f9a109b72ec3ddb3817.

* debug flickering on forget then connect to another. commit before this is good

* fix rare flicker when forgetting network and immediately connecting to
another

* clean up

* clean up router stuff now

* ugh wtf

* stash -- wtf

* Revert "stash -- wtf"

This reverts commit 756a92a9c0530a16917303424e26447f258f17e4.

* Revert "fix rare flicker when forgetting network and immediately connecting to"

This reverts commit 90c5fc14551726765ab2524e7866ee8b3c5dee7c.

* remove debug

* fix

* add issues

* add flow

* match previous behavior

* it doesn't fix the flikcer

* more atomic

* Revert "more atomic"

This reverts commit ead87c5a7a4030719b64138c12b9154ec82e73d9.

* last test!

last test!

* really the race is here?

* atomic wifi_state replace

* not slow

* clean up
2026-02-18 22:42:05 -08:00
Jason Wen
5ccabb9d54 [TIZI/TICI] ui: use vCruiseCluster and vEgoCluster for SLA preActive (#1708) 2026-02-19 01:36:08 -05:00
github-actions[bot]
0bb2f8c9d4 [bot] Update Python packages (#1707)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-19 01:22:00 -05:00
ZwX1616
3c4ddba992 DM: Ford GT Le Mans Model (#37257)
* b483cec4-7816-4570-a774-be3a2c100098/50

* shipfest

* da4b8724-8998-45da-aa36-d8fb390492b9

* revert

* typo

* deprecates

* 53a2718f-206b-4400-a70b-16915de18472/200

* bump

* update
2026-02-18 20:09:46 -08:00
Shane Smiskol
488d84c664 mici updater: clean up unused signal strength (#37259)
clean up
2026-02-18 16:40:09 -08:00
David
b6a0c89dc5 ui replay: record lossless to fix big replay diff (#37237)
* add RECORD_LOSSLESS and enable for replays

* use RECORD_QUALITY instead

* comment

* clarify comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* clarify comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 15:21:17 -08:00
David
a6f4cdb319 ui replay: remove fps limiting during headless replay (#37241)
use OFFSCREEN during headless replay for no fps limiting
2026-02-18 15:20:55 -08:00
David
b80d3e113b ui diff: better diff report on mobile (#37255)
* Add HTML template for UI diff report

* update .gitignore

* empty line

* use proper html tags

* remove paragraph tags

* simplify paths

* use h3

* use simpler replace instead; dynamically generate videos

* update diff html styling

* remove unnecessary

* fix

* use h4 instead

* padding on h4

* adjust heading margin

* revert

* use h4 again

* remove viewport

* Revert "remove viewport"

This reverts commit 7636920e556fc06bbd65cff7ecb4c3d31b11024d.
2026-02-18 15:20:25 -08:00
Jason Wen
d80cde6e41 tools: block manage_athenad in sim startup script (#37256)
tools: block `manage_athenad` in Metadrive startup script
2026-02-18 15:17:06 -08:00
Shane Smiskol
c6db0cd4b6 WifiManager: fix all networks showing as connected when no active connection (#37252)
* WifiManager: fix all networks showing as connected when no active connection

When there's no active WiFi connection, _get_active_wifi_connection()
returns None. This caused `self._connections.get(ssid) == None` to be
True for all unsaved networks, marking them all as connected.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ltl

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-18 05:52:59 -08:00
Nick
489afc3842 four ui: edge shadows (#37239)
* ui: add edge shadow effect to horizontal scrollers in settings

Adds a black gradient falloff shadow (20x240, 100%→0% opacity) on the
left and right edges of horizontal Scroller panels. Enabled via an
opt-in `edge_shadows` parameter on Scroller for easy per-screen control.

Enabled on: settings menu, toggles, network, device, developer.
Not enabled on: home screen carousel, vertical scrollers, setup screens.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ui: reduce edge shadow opacity to 80%

Co-authored-by: Cursor <cursoragent@cursor.com>

* what on earth is this

* some lines are ok

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-02-18 01:34:57 -08:00
Shane Smiskol
b5f86446d4 WifiManager: check AddConnection was successful (#37250)
check addconnect
2026-02-18 01:19:31 -08:00
Shane Smiskol
62b5fd54e6 WifiUi: sort by real strength (#37249)
sort by real strength
2026-02-18 01:18:06 -08:00
Shane Smiskol
7aeb7085a3 WifiUi: add hide Scroller event (#37248)
* add show/hide scroller events

* another good catch
2026-02-18 01:17:42 -08:00
Shane Smiskol
edafe139a4 WifiManager: set connecting status if NM auto connects (#37247)
* set connecting if nm auto connects

* good catch
2026-02-18 01:14:40 -08:00
Shane Smiskol
80f4becabf no need to guard connect with password 2026-02-18 01:03:39 -08:00
Jason Wen
3a74f8c568 [TIZI/TICI] ui: ensure null checks for CarParams and CarParamsSP (#1706)
* [TIZI/TICI] ui: ensure null checks for `CarParams` and `CarParamsSP`

* space
2026-02-18 02:57:25 -05:00
Jason Wen
5eed9490c6 ci: remove double prebuilt workflow runs 2026-02-18 02:02:34 -05:00
Shane Smiskol
c8e10139c2 WifiUi: if connected, don't show not connected (#37245)
* obt

* obt

* debug

* clean up
2026-02-17 22:53:49 -08:00
Shane Smiskol
966bb6cc54 WifiUi: update wifi button in loop (#37246)
* move to update_state

* move back
2026-02-17 22:41:51 -08:00
github-actions[bot]
57b461a186 [bot] Update Python packages (#1704)
* Update Python packages

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-18 01:32:49 -05:00
Shane Smiskol
887ea25b6d WifiManager: fix is_connected flicker while roaming on low strength networks (#37243)
* temp

* clean up

* debug

* clean up

* fix

* cmt

* clean up
2026-02-17 21:49:50 -08:00
Shane Smiskol
735c2fb48e WifiManager: active WiFi connection helper (#37244)
* short circuit

* rename

* move some usages over

* clean up

* cmt
2026-02-17 21:24:38 -08:00
Shane Smiskol
028f5ca1f4 WifiUi: fix flickering IP and network metered (#37242)
fix flickering ip and network metered
2026-02-17 19:52:37 -08:00
Shane Smiskol
d6238c285a ui: disable tethering password while updating (#37240)
* setting completed

* add back

* try

* try

* only pass

* just tehteringk
2026-02-17 19:41:31 -08:00
Jason Wen
80e23509ba Update CHANGELOG.md 2026-02-17 22:33:28 -05:00
Jason Wen
c07ddcefb0 version: bump to 2026.001.000 2026-02-17 19:48:37 -05:00
Jason Wen
4f407dabcd ci: fix update translations by enable submodule checkout in repo maintenance (#37236) 2026-02-17 16:36:01 -08:00
Shane Smiskol
fd34659dc3 NetworkManager: add more device states (#37235)
* safe

* missing states

* add enum for nmdevicestatereason

* rm for now

* fix links
2026-02-17 16:25:44 -08:00
Shane Smiskol
1f85860f7e WifiManager: always update networks after activation 2026-02-17 16:16:05 -08:00
Shane Smiskol
14f3f6dd1a WifiManager: fix forgotten callback signature 2026-02-17 15:02:31 -08:00
Adeeb Shihadeh
e527b463a5 Revert "Drop support for Intel macOS (#37215)" (#37234)
This reverts commit eea07462fa.
2026-02-17 15:02:06 -08:00
Shane Smiskol
7dc56dc064 draw black bg behind BigButton 2026-02-17 15:01:07 -08:00
Shane Smiskol
0a98ee9e4f WifiUii: rm separate connecting status (#37233)
rm connecting
2026-02-17 14:56:08 -08:00
felsager
43d162e8fb mpc_longitudinal_tuning_report: use enum for axis (#37231) 2026-02-17 11:49:26 -08:00
Jason Wen
e8f65bc652 Controls: Support for Torque Lateral Control v0 Tune (#1693)
* init

* no

* more

* tree it

* final

* comment

* only with enforce torque

* only with enforce torque

* missed

* no

* lint

* Apply suggestion from @sunnyhaibin

* sunnylink metadata sync

* Apply suggestion from @sunnyhaibin

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
2026-02-17 13:17:03 -05:00
Ahmed Harmouche
037e6e749a cabana: fix crash when zmq address is used (#37222)
* Fix zmq support in cabana

* Refactor to launch bridge, remove socketadapter

* bridge_path should be camel_case
2026-02-17 09:19:41 -08:00
David
d984fb1bae ui diff replay: better display replays of different lengths (#37116)
* refactor: improve video synchronization logic in HTML report generation

* feat: include description of which video is longer in report; refactor stuff and add types

* refactor: simplify HTML report generation and remove extra formatting

* reduce diff

* fix video name

* reduce diff

* reduce diff

* fix

* parentheses

* fix I guess
2026-02-16 14:32:37 -08:00
David
3661a01489 ui diff: compare frame hashes instead of temp files (#37154)
* refactor: streamline frame comparison by using frame hashes instead of extracting frames

* add vsync

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-16 14:05:43 -08:00
Adeeb Shihadeh
7fd131e01c mem_usage.py: switch to our tabulate 2026-02-16 11:00:12 -08:00
commaci-public
5d8e54ae3e [bot] Update Python packages (#37228)
* Update Python packages

* revert for now

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-16 10:17:46 -08:00
David
422885dce6 ui replay: cleanup and fix workflow todos (#37230)
* fix: update pull request trigger and clean up workflow paths

* fix other event names
2026-02-16 09:55:46 -08:00
David
136574fbcb ui replay: run with no window (#37229)
run headless
2026-02-16 09:47:20 -08:00
github-actions[bot]
f81e7245fe [bot] Update Python packages (#1702)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-16 04:18:44 -05:00
Jason Wen
0cb6b7b807 ci: exclude non-sunnypilot maintained submodules from repo maintenance (#1703)
* ci: exclude non-sunnypilot maintained submodules from repo maintenance

* match names
2026-02-16 04:16:49 -05:00
Jason Wen
4a869778a9 Revert "ci: skip uv lock upgrade on forks" (#1701)
Revert "ci: skip uv lock upgrade on forks (#1213)"

This reverts commit 220cfff04d.
2026-02-16 04:07:07 -05:00
Jason Wen
a120053d12 docker: Dockerfile.sunnypilot uv run scons (#1700)
* docker: Dockerfile.sunnypilot uv run scons

* docker: Dockerfile.sunnypilot: don't set UV_PROJECT_ENVIRONMENT
2026-02-16 03:32:08 -05:00
James Vecellio-Grant
a48988ccb3 chore: sync tinygrad (#1680)
* chore: sync tinygrad

Runs great in sim. now we need to rebuild some models

* oops forgot to unblock this after testing

* helpers

* oh yeah

* latest tg

* this wont do anything empriically

* reduce complexity

* okay lint

* Update tinygrad_runner.py

* Update modeld.py

* Update build-all-tinygrad-models.yaml

* tinygrad bump

* Update modeld.py

* Update tinygrad_runner.py

* bump

* Update SConscript

* Update SConscript

* com

* Update fetcher.py

* Update helpers.py

* Update model_runner.py

* Update model_runner.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-16 03:01:59 -05:00
Adeeb Shihadeh
a5f9c2fc23 unified ui preview for mici and tizi (#37226)
* unified ui preview for mici and tizi

* lil more

* variants

* run it

* trigger
2026-02-15 21:02:41 -08:00
Adeeb Shihadeh
6704f63a3d update ui job name 2026-02-15 20:43:56 -08:00
Adeeb Shihadeh
8e13d8abd0 CI: build big UI report 2026-02-15 20:33:11 -08:00
Adeeb Shihadeh
8831b11a24 remove old raylib screenshot tool (#37225) 2026-02-15 20:11:17 -08:00
David
03a4f7ef9a ui: add big (tizi) replay (#37198)
* init: tizi_replay.py from pr 37123

* separate coverage folder

* ui replay: adjust HOLD constant, fix coverage, use separate folder for coverage

* openpilot prefix

* fix directory

* fix ui_state

* fix settings click pos

* remove

* attempt merge replay files

* remove

* todo

* fix recording

* spacing

* simplify

* comment

* refactor hold

* refactor: remove layout definitions from VARIANTS and import conditionally in run_replay

* refactor:  remove VARIANTS config

* add argparser with --big flag and improve coverage sources

* refactor

* lowercase

* refactor: combine scripts

* add types

* refactor: move imports for gui_app and ui_state to improve coverage and organization

* update

* update script

* comment

* fix headless

* todo

* fix: get_time and get_frame_time determinism

* todo

* remove file accidently commited

* fix: improve inject_click and handle_event for deterministic event timestamps

* comment

* simplify add

* refactor script building

* fix mici clicks

* pass in pm

* fix wifi state

* refactor clicks

* more refactor

* click cancel instead of remove overlay

* setup_send_fn

* add setup fn

* dummy update

* change

* remove todo

* rename fn to frame_fn

* refactor

* fix workflow

* rename raylib ui preview to old

* rename mici workflow

* fix diff videos

* ignore sub html and mp4 files

* rename for diff

* rename for diff again (mici)

* use ScriptEvent instead of DummyEvent, and move mouse events directly to it; rename hold to wait

* fix: only import MouseEvent for type hint to fix coverage

* adjust settings button click

* clarify

* move ScriptEvent to replay_script

* add handle_event function

* remove passing in setup function, and refactor click events

* clean

* formatting

* refactor

* no import

* comment

* refactor

* refactor setup functions to replay_setup

* refactor

* add ReplayContext

* refactor

* move more setup functions

* refactor and simplify

* refactor

* refactor: add Script class

* refactor: enhance Script event handling and add wait functionality

* refactor

* remove setup_and_click

* use script.setup instead

* comments

* rename wait_frames to wait_after

* add comments

* revert workflows

* revert rename

* move arg parsing to main

* remove quotes

* add type

* return types

* type

* VariantType

* rename to LayoutVariant

* clarify

* switch

* todo

* Revert "fix diff videos"

This reverts commit 7a6e45a409cb7e6d7a330317639fcee74ef8bd31.

* add todos

* add more coverage

* wait 2 frames by default

* add comment

* comment

* switch

* fix space

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove extra

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary blank line in ReplayContext class

* simplify

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-15 20:03:30 -08:00
Adeeb Shihadeh
c393973916 disable sim test, still not ready for it 2026-02-15 17:46:32 -08:00
Adeeb Shihadeh
27f89e6634 jenkins: merge & speedup camera tests (#37223) 2026-02-15 16:39:38 -08:00
Andi Radulescu
4166c9fccb ci: fix first-interaction action missing required input (#37221)
actions/first-interaction@v3 requires both issue_message and pr_message
inputs, but only pr_message was provided, causing the action to fail.
2026-02-15 09:44:06 -08:00
Adeeb Shihadeh
ced5f417b8 MetaDrive: slim down & enable CI test (#37216)
* MetaDrive slimming

* enable

* lock

* modeld fix

* minimal
2026-02-14 21:16:26 -08:00
commaci-public
f67f84109e [bot] Update Python packages (#37166)
* Update Python packages

* clear cache

* try this

* Revert "try this"

This reverts commit 79f21ea0956509c58e5e5ba65a08ae0b2cbd204b.

* Revert "clear cache"

This reverts commit aa49ac5bd3b6cecb25cf9cbfe1e07ec4ad608d63.

* revert for now

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-14 21:02:11 -08:00
Adeeb Shihadeh
eea07462fa Drop support for Intel macOS (#37215)
* Drop support for Intel macOS

* arch.sh

* scons

* platform.sh

* lil more

* mv tici
2026-02-14 21:00:29 -08:00
Adeeb Shihadeh
96d1b876bb pandad: remove multi-panda + USB support (#37217)
* pandad: remove multi-panda support

* lil more

* mac

* skip mac
2026-02-14 20:54:09 -08:00
Adeeb Shihadeh
56d3014298 Remove pycurl handling from mac_setup.sh (#37214) 2026-02-14 13:42:21 -08:00
Adeeb Shihadeh
ae6aa0f008 Remove gcc@13 installation from mac_setup.sh (#37213)
* Remove gcc@13 installation from mac_setup.sh

Removed installation of gcc@13 from mac_setup.sh.

* no cache

* Revert "no cache"

This reverts commit fc27f7dc9e6dab4b61703433130531f12dbe334b.
2026-02-14 13:39:14 -08:00
David
ecde604198 ui replay: use openpilot prefix (#37185)
* fix: use openpilot prefix

* fix ui_state import

* comment
2026-02-14 13:21:09 -08:00
David
4af41ffce6 ui diff: ensure video name matches output (#37211)
* auto name diff.mp4

* ensure output file has .html extension
2026-02-14 13:20:44 -08:00
Jason Wen
0650964559 [TIZI/TICI] ui: only fetch roles and users when the sunnylink panel is opened (#1697)
* sunnylink: only roles and users when the sunnylink panel is opened

* shadow

* thread-safe
2026-02-13 23:39:55 -05:00
Nick
2dac616bef keyboard: fix hint text truncation and add trailing ellipsis (#37207)
Widen the hint label rect so it doesn't reserve right-side space for the
hidden backspace button, preventing unnecessary text eliding. Also show
the blinking cursor over the hint and add trailing ellipsis to hint
strings for consistency.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 17:43:53 -08:00
Shane Smiskol
5a9fdde156 WifiUi: use WifiManager forget (#37208)
* start

* clean up forget
2026-02-13 17:30:59 -08:00
Shane Smiskol
9bb6e997aa Make more icons 90% white (#37206)
* 90% icons

* fix!
2026-02-13 17:20:54 -08:00
Shane Smiskol
cd03aa19a1 WifiManager: fix forgetting wrong network (#37187)
* not sure  how works but does?

* clean up

* clean up
2026-02-13 17:14:51 -08:00
Shane Smiskol
10065c8c28 WifiManager: handle failed state change (#37205)
* handle connecting to network that drops out w/ wrong password (no longer says connected and now deletes connection)

* clean up

* combine
2026-02-13 17:02:42 -08:00
Shane Smiskol
1b426a3160 wifi button shows connecting (#37202)
* connecting wifi button

* use real wifi strength

* simplify

* meh cursor brought up edge case
2026-02-13 16:15:59 -08:00
Shane Smiskol
c91225b52e WifiUi: reset networks on panel hide (#37199)
* stash

* fix setup

* clean up

* clean up

* clean up

* set active as safeguard
2026-02-13 15:37:07 -08:00
Adeeb Shihadeh
49a611df59 CI: don't block on badges job for release builds 2026-02-13 14:08:26 -08:00
Yasuhiro Ohno
b62014eb12 SCC-V: Use p97 for predicted lateral accel (#1635)
* SCC-V: Use p97 for predicted lateral accel

* SCC-V: add param tests for p97 max_pred_lat_acc

* fix

* typo

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-13 17:03:03 -05:00
Jason Wen
037e8c18f8 sunnylink: update subscribed services states while running (#1694) 2026-02-13 16:22:51 -05:00
YassineYousfi
2ba6df2506 chunk tinygrad pkl below GitHub max size - NoCache and AlwaysBuild (#37194)
* nocache

* +

* fixes

* lint

* not split

* use pathlib

* cleanup

* better

* even better
2026-02-13 10:14:24 -08:00
David
9b7bf4a101 mici ui replay: fix indeterminism with swiping and animations (#37110)
* fix: get_time and get_frame_time determinism

* remove some hackiness

* don't need that
2026-02-13 09:26:14 -08:00
royjr
4bd60cd3cd [MICI] ui: rainbow path (#1630)
* allow rainbow road on mici

* initialization

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-13 11:41:30 -05:00
Jason Wen
3fe33cbe97 [TIZI/TICI] ui: fix toggle states and simplify blindspots/turn signals updates (#1692)
* [TIZI/TICI] ui: fix toggle states and simplify blindspots/turn signals updates

* more
2026-02-13 11:33:52 -05:00
felsager
a61badb564 test_following_distance: bump error margin when initial speed is 0 (#37196) 2026-02-12 20:59:14 -08:00
Shane Smiskol
2e21deeae8 WifiUi: fix up wrong password dialog (#37195)
* debug why so slow

* forget after

* i'm not sure why this is a thing

* better forget connecting reset

* ????

* has lag

* fix

* clean up

* should be fine
2026-02-12 20:48:34 -08:00
Christopher Haucke
b3878fb211 Pause Lateral Control with Blinker: Post-Blinker Delay (#1567)
* Delay lateral reengagement

* UI elements

* Add tests

* Update title and description

* Update params_metadata

* Didn't mean to pass this to int()

* Keep sentry happy

* Title and description update

* always 100 hz

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-12 23:33:38 -05:00
Nayan
33a26ba373 ui: better wake mode support (#1578)
* wake mode support

* use ui_state.params

* better

* cleanup

* fix

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-12 23:09:24 -05:00
Jason Wen
58af294ffd [TIZI/TICI] ui: Cruise panel (#1691)
* init cruise panel

* init descriptions

* damn descriptions

* init SLA sub layout

* reorder

* icbm it

* callback for `Custom ACC Speed Increments` toggle to update dependent UI elements dynamically.

* works

* more init

* more

* [TIZI/TICI] ui: individual button states support for MultipleButtonActionSP

* less

* convert

* init properly

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
2026-02-12 22:56:18 -05:00
Harald Schäfer
132f10365a relax dm timing tgwarp (#37191) 2026-02-12 19:52:22 -08:00
Jason Wen
bafbfe19b4 [TIZI/TICI] ui: individual button states support for MultipleButtonActionSP (#1690)
* [TIZI/TICI] ui: individual button states support for MultipleButtonActionSP

* no magic nums
2026-02-12 22:32:15 -05:00
David
98bc70344f fix: use correct display ID for WSL2 when setting up Xvfb (#36697)
use correct display ID for wsl
2026-02-12 19:19:25 -08:00
Jason Wen
dae95af1df [TIZI/TICI] ui: override set_parent_rect to dynamically update item height (#1689)
[TIZI/TICI] ui: override `set_parent_rect` method to update item height dynamically
2026-02-12 22:07:05 -05:00
Shane Smiskol
0fa8e01d1f Wifi ui: render scroller gradient under (#37193)
* gradient under

* blend mode works

* Revert "blend mode works"

This reverts commit 092924fbd6dc40cbb937cac8578257ba5a28a7ef.

* everywehre

* everywehre
2026-02-12 18:39:08 -08:00
Shane Smiskol
f142f1cd70 scroller: move scissor to render 2026-02-12 16:24:48 -08:00
Shane Smiskol
eb5cd542d9 WifiUi: add new networks to end, delete buttons on exit (#37189)
* add networks to end, remove bad scroller restore logic that sometimes starts in the middle

* works

* almost

* wifi slash

* clean up

* clean up

* opactiy

* more clean up

* more clean up

* set enabled and network missing on regain network

* cmt
2026-02-12 16:23:58 -08:00
Shane Smiskol
1257d31a56 WifiManager: dbus debug flag (#37188)
* add dbus debug wrapper

* no
2026-02-12 15:00:50 -08:00
Shane Smiskol
2e9b980fc2 remove lang_button 2026-02-12 13:48:55 -08:00
Shane Smiskol
2b7f91d151 WifiManager: update networks on active (#37186)
* immediately

* only if active
2026-02-12 13:40:00 -08:00
David
7665045fc6 ui replay: fix coverage reporting to include imports (#37180)
Fix coverage reporting by adjusting MiciMainLayout import
2026-02-12 10:46:34 -08:00
Harald Schäfer
af1583cdfc Reapply tgwarp w NV12 fix (#37168)
* Revert "Revert tgwarp again (#37161)"

This reverts commit 45099e7fcd.

* Weird uv sizes

* Fix interleaving

* Fix on CPU

* make CPU safe

* Prevent corruption without clone

* Claude knows speeed

* fix interleaving

* less kernels

* blob caching

* This is still slightly faster

* Comment for blob cache
2026-02-12 08:59:19 -08:00
Shane Smiskol
a46007d84d WifiManager: safeguard an error response (#37182)
safeguard
2026-02-11 23:14:38 -08:00
Shane Smiskol
13b71b4e81 WifiManager: update networks on scan (#37177)
* like c++ wifiman

* rename to scan

* can do this

can do this

* Revert "can do this"

This reverts commit 295f7f49d448c6aacdde2ef810904df86357840b.

* kinda useless now

* clean up
2026-02-11 23:14:13 -08:00
Shane Smiskol
b084294dc0 incorrect -> wrong 2026-02-11 23:05:04 -08:00
Shane Smiskol
6cf95918c5 WifiManager: clean up connections (#37179)
* fix recent connect regression from connection not being known yet

* always update connections in background, keep track via signals only. no getallconnections each time one is added/deleted. matches c++

* works

* clean up

* clean up

* clean up
2026-02-11 23:02:07 -08:00
Jason Wen
86d52ab969 Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1687)
* clips: allow mici UI (now default) (#37070)

fix: make big false by default and remove assertion

* comma four: new keyboard enter button (#37072)

* works

* enter dis

* clean up

* clean up

* no debug

* useless

* poadding

* tools: fix Python version comparison using normalized semantic version format (#37075)

* Back to tethering BigButton (#37082)

Back to tethering big button

* Stock LKAS: remove permanent alert (#37083)

rm perm

* BigButton: remove unused scrolling (#37085)

* BigButton: remove unused scrolling

* clean up

* BigButton: use UnifiedLabel (#37086)

* BigButton: remove unused scrolling

* start

* debug

* stash

* actually removing the hardcoded size for multioption fixes it

* back

* cursor does sub label

* clean  up

* more

* more

* try this for now

* nick suggest

* clean up

* more

* more

* Network menu improvements (#37077)

* try this

* that's handy

* todo, not sure what happens here

* set_text

* normalize

* scroll wifi

* clean up

* more

* better check

* UI: only show `onroad_fade.png` when engaged (#37051)

* only show when engaged

* retrigger CI

* fade animation 0.1

* nl

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* NavBar: fix no show animation (#37090)

* 1.5 not enough time on small screen

* ohhhh

* clean up

* translations: remove arabic (#37087)

* remove arabic

* more

* bump opendbc (#37091)

* long_mpc: use log.capnp source enum instead of list (#37093)

* Revert "long_mpc: use log.capnp source enum instead of list" (#37095)

Revert "long_mpc: use log.capnp source enum instead of list (#37093)"

This reverts commit 7e959c5a3e.

* mici setup: remove unused functions

* fix mici setup int enum

* clips: improve overlays for mici (#37088)

* adjust overlay sizes and wrap metadata text for mici

* comment

* adjust overlay rendering to dynamically calculate line height for wrapped metadata text

* render time first so we can use width in margin calculation

* update comment (to retry failed CI actually)

* increase metadata size on mici

* longitudinal mpc tuning: behind if main (#37099)

* longitudinal mpc tuning report: add sinusoidal oscillation scenario (#37100)

* long_mpc: use log.capnp source enum (#37096)

* Calibrate in tg (#36621)

* squash

* bump tg

* fix linmt

* Ready to merge

* cleaner

* match modeld

* more dead stuff

* long mpc: state name before subscript (#37101)

* clip: clean up imports (#37104)

* wtf is this

* don't break import timing

* they are the same

* clean up

* good catch

* rm common/mat.h

* Remove all the OpenCL (#37105)

* Remove all the OpenCL

* lil more

* bump msgq

* clip: use wrap_text helper (#37102)

* they are same

* no duplication!

* rm rstrip

* bump opendbc (#37108)

bump

* Delete less dialogs (#37111)

* try

* revert

* this is fine

* revert tg calib and opencl cleanup (#37113)

* Revert "Remove all the OpenCL (#37105)"

This reverts commit d5cbb89d84.

* Revert "rm common/mat.h"

This reverts commit 4ce701150a.

* Revert "Calibrate in tg (#36621)"

This reverts commit 593c3a0c8e.

* fix: route fetch metadata when first log isnt uploaded (#37114)

* fix: route fetch metadata when first log isnt uploaded

* default

* simple

---------

Co-authored-by: Trey Moen <treymoen@amazon.com>

* gitignore .context/

* ui diff replay: remove unused frame_data list for individual frame display (#37117)

Remove unused base64 encoding and simplify frame data handling in diff video report

* bridge: move ZMQ handling over (#37118)

* replace tabulate with simple helper (#37122)

* Better memory usage debugging (#37120)

* Revert "revert tg calib and opencl cleanup (#37113)" (#37115)

* Revert "revert tg calib and opencl cleanup (#37113)"

This reverts commit 51312afd3d.

* power draw is a lil higher

* just don't miss a cycle

* fix warp targets

* fix tinygrad dep

* CI: garbage collect tmp jenkins branches (#37125)

* Build vendored artifacts in CI (#37127)

* Build vendored artifacts in CI

* parallel

* deterministic

* fix up

* fix gitignores

* lil more

* lil more consistency

* remove get_mcu_type from pandad.py (#37132)

* Chunk big model files (#37134)

* file chunking

* try this

* more cleanup

* cleaner

* ui: delay nav bar animation (#37137)

* from da bounce

* try this

* you can get it to clean up wow

* modeld: simplify model run processing (#37138)

Hi! The point of this pr is to make the model run easier to read. On the latest tinygrad numpy().flatten() empirically does the same thing as the internal contiguous().realize().uop.base.buffer.numpy(). numpy() is also documented (docstrings), which can assist new contributors in learning what each potential execution does. Torq_boi or yassine, I know you want proof in the code base, so here it is. As of tinygrad commit 2f55005:

 in tinygrad_repo/tinygrad/tensor.py
Lines 316-318 (def _buffer): ensure the tenso is contiguous() and realized() before accessing the raw buffer.
Line 378 (def numpy): Wraps the buffer access and adds a reshape to match the tensor shape.
self._buffer() is what executes contiguous().realize() and returns the buffer object.
Calling numpy() on that buffer object returns a 1D array (defined in tinygrad/device.py:193 via np.frombuffer).
The reshape(self.shape) at the end of Tensor.numpy() then adds dimensions to that 1D array. The added .flatten() removes those dimensions, flattening it back to a 1D array. Effectively the same as what is currently done, but less complex.

* Revert "Chunk big model files (#37134)" (#37139)

This reverts commit a941e8f78f.

* Process replay: move refs to ci-artifacts (#37049)

* 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

* Update .github/workflows/tests.yaml

Co-authored-by: Shane Smiskol <shane@smiskol.com>

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* fix first-interaction action inputs for v3 (#37144)

v3 renamed inputs from kebab-case to snake_case (repo-token -> repo_token,
pr-message -> pr_message). The old names were silently ignored, causing
"Input required and not supplied: issue_message" errors.

* bump create-pull-request action to v8.1.0 (#37143)

The pinned SHA was v6.0.4, which is incompatible with actions/checkout@v6
and causes a "Duplicate header: Authorization" 400 error during git
remote operations. See peter-evans/create-pull-request#4272.

* bump numpy to 2.4.2 (#37145)

* show dependency tree in weekly uv lock job (#37146)

* Revert "DM: Ford GT model" (#37148)

Revert "DM: Ford GT model (#37013)"

This reverts commit 1459d3519d.

* remove dead multilang for mici (#37150)

* ui: remove dead side button (#37151)

* rm side button

* fix

* fix

* BigButton: fix alignment and style (#37153)

* correct from bottom alignment

* temp

* fix scale animation w/ btn_y

* home settings are always 64

* cleanup

* some clean up

* make 23 const

* rev

* more

* remove azure deps (#37084)

* remove azure deps

* fix lint

* restore scripts

* [bot] Update Python packages (#37147)

* Update Python packages

* fix

* bump panda

* revert tinygrad

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* remove pytest-repeat (#37156)

* BigButton: push up all content when pressed (#37157)

clean implementation

* ui.py: fix stride (#37159)

fix uii.py

* BigButton: don't round drawn content (#37158)

* unround icons

* unround rest

* Revert tgwarp again (#37161)

* Reapply "revert tg calib and opencl cleanup (#37113)" (#37115)

This reverts commit 667f3bb32f.

* revert msgq too

* msgq on master

* newline in updater error

* Remove vertical scroll bar

* Simple scroll indicator (#37162)

* scroll indicator

* 65%

* calibrate

* margin

* cleaner?

* manual clean up

* clean up

* full scroll bar

* look

* looks

* unlook

* no fade, looks good but "too much"

* clean up

* cmt

* Scroll panel: adapt to content size shrinking (#37163)

fix

* WifiManager: sort by known networks (#37164)

sort by known

* mpc tuning report: minor improvements (#37167)

---------

Co-authored-by: David <49467229+TheSecurityDev@users.noreply.github.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: ugtthis <142481257+ugtthis@users.noreply.github.com>
Co-authored-by: royjr <royjr96@gmail.com>
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: felsager <76905857+felsager@users.noreply.github.com>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Trey Moen <50057480+greatgitsby@users.noreply.github.com>
Co-authored-by: Trey Moen <treymoen@amazon.com>
Co-authored-by: Andi Radulescu <andi.radulescu@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Daniel Koepping <elkoled@gmail.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
2026-02-11 20:35:55 -05:00
Jason Wen
52fb0b8171 Merge branch 'upstream/openpilot/master' into sync-20260211
# Conflicts:
#	.github/workflows/auto_pr_review.yaml
#	.github/workflows/tests.yaml
#	opendbc_repo
#	panda
#	selfdrive/pandad/pandad.py
#	selfdrive/test/process_replay/test_processes.py
2026-02-11 20:16:02 -05:00
Shane Smiskol
0072449b01 WifiManager: cache connections until new/removed connection (#37175)
* new/removed conns signal

* clean up

* only get connections when adding/removing not every refresh

* add debug

* block

* Revert "block"

This reverts commit 30bbffca8d2db21c53d7a3601ae46bf05e2a7cd5.

* rm debug

* block on any new message, faster conn rem/add reaction

* better names
2026-02-11 17:07:41 -08:00
Shane Smiskol
f03efab907 Reduce wifi dbus calls pt. 4 (#37174)
* combine active AP and all APs into getall

* combine these two functions reducing more calls

* little clean up

* down here
2026-02-11 16:30:40 -08:00
Shane Smiskol
cddc3b9e8f Reduce wifi dbus calls pt. 3 (#37172)
* fewer calls to set metered

* print

* hell yeah

* Revert "hell yeah"

This reverts commit 0e0786bc204821329febc62a1b8dfd870e9aeb6e.

* Revert "print"

This reverts commit e9c7550496e9835888cb71c7dd622cbfb4624fbf.
2026-02-11 15:25:53 -08:00
Shane Smiskol
d977a5bd62 ui: reduce wifi dbus calls during scanning pt. 2 (#37171)
one GetAll instead of 2 calls per wifi activeconnection

can't trust anyone these days
2026-02-11 15:13:30 -08:00
Shane Smiskol
99c2fcc797 ui: reduce wifi dbus calls (#37170)
* 2 -> 1

* cmt
2026-02-11 15:05:10 -08:00
felsager
5b98ea04ad mpc tuning report: minor improvements (#37167) 2026-02-11 10:21:12 -08:00
Shane Smiskol
b9344af9bb WifiManager: sort by known networks (#37164)
sort by known
2026-02-11 01:23:14 -08:00
Shane Smiskol
1e0f1a8abc Scroll panel: adapt to content size shrinking (#37163)
fix
2026-02-11 01:23:00 -08:00
Shane Smiskol
8ba36b76a0 Simple scroll indicator (#37162)
* scroll indicator

* 65%

* calibrate

* margin

* cleaner?

* manual clean up

* clean up

* full scroll bar

* look

* looks

* unlook

* no fade, looks good but "too much"

* clean up

* cmt
2026-02-11 01:15:02 -08:00
Shane Smiskol
3f382d6e69 Remove vertical scroll bar 2026-02-11 00:18:02 -08:00
Shane Smiskol
10edb90ac6 newline in updater error 2026-02-10 23:27:38 -08:00
Harald Schäfer
45099e7fcd Revert tgwarp again (#37161)
* Reapply "revert tg calib and opencl cleanup (#37113)" (#37115)

This reverts commit 667f3bb32f.

* revert msgq too

* msgq on master
2026-02-10 23:12:41 -08:00
Shane Smiskol
77f069cbe5 BigButton: don't round drawn content (#37158)
* unround icons

* unround rest
2026-02-10 21:57:34 -08:00
Shane Smiskol
1070dda3ee ui.py: fix stride (#37159)
fix uii.py
2026-02-10 21:56:45 -08:00
Jason Wen
decd7d4c1c [TIZI/TICI] ui: exclude angleState from fade effects when rendering torque bar (#1686) 2026-02-11 00:35:03 -05:00
Shane Smiskol
fcd5897650 BigButton: push up all content when pressed (#37157)
clean implementation
2026-02-10 21:29:14 -08:00
Jason Wen
dc5dfe7f3b maneuversd: keep services happy (#1685) 2026-02-11 00:27:57 -05:00
Jason Wen
f9c57ff285 Revert "CI: enable macos tests (#37005)"
This reverts commit c179a3ccb7.
2026-02-11 00:20:23 -05:00
Adeeb Shihadeh
f1785c245a remove pytest-repeat (#37156) 2026-02-10 20:53:02 -08:00
commaci-public
6892b62761 [bot] Update Python packages (#37147)
* Update Python packages

* fix

* bump panda

* revert tinygrad

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-02-10 20:48:34 -08:00
Jason Wen
3d3a5de409 [TIZI/TICI] ui: dynamic ICBM status (#1684)
* [TIZI/TICI] ui: dynamic ICBM status

* wat

* make sure to init

* make sure it exists

* send it for all
2026-02-10 22:58:59 -05:00
Jason Wen
bef93ecf65 [TIZI/TICI] ui: fix Developer UI orders (#1682) 2026-02-10 22:24:18 -05:00
Daniel Koepping
a18ddf12eb remove azure deps (#37084)
* remove azure deps

* fix lint

* restore scripts
2026-02-10 17:51:09 -08:00
Shane Smiskol
46ae67b607 BigButton: fix alignment and style (#37153)
* correct from bottom alignment

* temp

* fix scale animation w/ btn_y

* home settings are always 64

* cleanup

* some clean up

* make 23 const

* rev

* more
2026-02-10 17:15:59 -08:00
Shane Smiskol
4d3aeaba6d ui: remove dead side button (#37151)
* rm side button

* fix

* fix
2026-02-10 15:04:36 -08:00
Shane Smiskol
ba67e468ab remove dead multilang for mici (#37150) 2026-02-10 14:53:25 -08:00
ZwX1616
e946e9de0b Revert "DM: Ford GT model" (#37148)
Revert "DM: Ford GT model (#37013)"

This reverts commit 1459d3519d.
2026-02-10 13:56:07 -08:00
Adeeb Shihadeh
7d2563880a show dependency tree in weekly uv lock job (#37146) 2026-02-10 09:31:50 -08:00
Andi Radulescu
43edc51cb6 bump numpy to 2.4.2 (#37145) 2026-02-10 09:20:52 -08:00
Andi Radulescu
9476a8a7f6 bump create-pull-request action to v8.1.0 (#37143)
The pinned SHA was v6.0.4, which is incompatible with actions/checkout@v6
and causes a "Duplicate header: Authorization" 400 error during git
remote operations. See peter-evans/create-pull-request#4272.
2026-02-10 09:19:56 -08:00
Andi Radulescu
053441fbb3 fix first-interaction action inputs for v3 (#37144)
v3 renamed inputs from kebab-case to snake_case (repo-token -> repo_token,
pr-message -> pr_message). The old names were silently ignored, causing
"Input required and not supplied: issue_message" errors.
2026-02-10 09:19:37 -08:00
DevTekVE
1179273217 Revert "sunnylink: shorter timeout for websocket reconnect" (#1683)
Revert "sunnylink: shorter timeout for websocket reconnect (#1681)"

This reverts commit c51b41e96a.
2026-02-10 11:28:51 -05:00
Daniel Koepping
e35a1eca99 Process replay: move refs to ci-artifacts (#37049)
* 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

* Update .github/workflows/tests.yaml

Co-authored-by: Shane Smiskol <shane@smiskol.com>

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-02-09 21:37:20 -08:00
Harald Schäfer
3d11e8ef36 Revert "Chunk big model files (#37134)" (#37139)
This reverts commit a941e8f78f.
2026-02-09 20:58:22 -08:00
Jason Wen
c51b41e96a sunnylink: shorter timeout for websocket reconnect (#1681)
* separate

* no need

* shorten

* lint
2026-02-09 23:46:39 -05:00
James Vecellio-Grant
73f720220b modeld: simplify model run processing (#37138)
Hi! The point of this pr is to make the model run easier to read. On the latest tinygrad numpy().flatten() empirically does the same thing as the internal contiguous().realize().uop.base.buffer.numpy(). numpy() is also documented (docstrings), which can assist new contributors in learning what each potential execution does. Torq_boi or yassine, I know you want proof in the code base, so here it is. As of tinygrad commit 2f55005:

 in tinygrad_repo/tinygrad/tensor.py
Lines 316-318 (def _buffer): ensure the tenso is contiguous() and realized() before accessing the raw buffer.
Line 378 (def numpy): Wraps the buffer access and adds a reshape to match the tensor shape.
self._buffer() is what executes contiguous().realize() and returns the buffer object.
Calling numpy() on that buffer object returns a 1D array (defined in tinygrad/device.py:193 via np.frombuffer).
The reshape(self.shape) at the end of Tensor.numpy() then adds dimensions to that 1D array. The added .flatten() removes those dimensions, flattening it back to a 1D array. Effectively the same as what is currently done, but less complex.
2026-02-09 20:24:25 -08:00
Shane Smiskol
a1202eaf2a ui: delay nav bar animation (#37137)
* from da bounce

* try this

* you can get it to clean up wow
2026-02-09 17:16:36 -08:00
Harald Schäfer
a941e8f78f Chunk big model files (#37134)
* file chunking

* try this

* more cleanup

* cleaner
2026-02-09 15:29:50 -08:00
Andi Radulescu
9aca13cf2d remove get_mcu_type from pandad.py (#37132) 2026-02-09 09:36:04 -08:00
Jason Wen
7722d14b89 Reapply "[TIZI/TICI] ui: drive stat cache is a json already"
This reverts commit 043eab5620.
2026-02-09 02:55:17 -05:00
Jason Wen
043eab5620 Revert "[TIZI/TICI] ui: drive stat cache is a json already"
This reverts commit 51d3f0dea2.
2026-02-09 02:54:58 -05:00
Jason Wen
51d3f0dea2 [TIZI/TICI] ui: drive stat cache is a json already 2026-02-09 02:47:35 -05:00
Jason Wen
8be8bbbfdb [TIZI/TICI] ui: Trips panel (#1679)
* init

* more

* change

* exist

* better title

* adjust

* more

* seems better

* slightly more

* slightly more

* center it

* final

* move

* no bc ew

* more less
2026-02-09 02:43:28 -05:00
Nayan
1f778c8c23 Device: Retain QuickBoot state after op switch (#1333)
Device: Retain QuickBoot state after SSH Update

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2026-02-09 00:38:39 -05:00
Nayan
981494a354 [TIZI/TICI] ui: Visuals panel (#1496)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* introducing ui_state_sp for py

* param to control stock vs sp ui

* better

* add ui_update callback

* better padding

* init

* revert padding to 20

* new line, who dis

* this

* support for next line multi-button

* use inline=false

* uhh

* disabled colors

* hide em all

* lambdas

* NOT inline

* final touches

* hide HIDE

* ruff.. RUFF.. WHY RUFF

* listitem -> listitemsp

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* scroller -> scroller_tici

* scroller -> scroller_tici

* remove line separator padding

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* uhhh. nope

* optimizations

* I THINK this is not needed, i don't see it used on the visuals panel...

* unhide for now... Why hidden tho?

* refresh controls

* missing

* blindspot

* standstill timer

* road name toggle

* more descriptions

* more descriptions

* update desc

* param turn signals

* sort

* fix

* always show desc if not available

* should be bool

* rocket fuel

* steering arc

* lint

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2026-02-09 00:17:34 -05:00
Jason Wen
254f55ac15 [TIZI/TICI] ui: Hide vEgo and True vEgo (#1678) 2026-02-08 20:42:23 -05:00
James Vecellio-Grant
96b58024ab [MICI] ui: driving models selector (#1574)
* ui: models mici

* Update models.py

* Update models.py

* sync

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-08 19:54:33 -05:00
Jason Wen
a9229e11a0 [TIZI/TICI] ui: standstill timer (#1677)
* standstill timer

* final
2026-02-08 19:40:04 -05:00
Jason Wen
020f503364 [TIZI/TICI] ui: Green Light and Lead Departure elements (#1676)
* init

* big for now

* only adjust for right dev ui for now

* final

* final final
2026-02-08 19:14:19 -05:00
Jason Wen
c274dba36e [TIZI/TICI] ui: Smart Cruise Control elements (#1675)
* init

* punch

* lower

* colors
2026-02-08 18:28:36 -05:00
royjr
35c87a1519 [TIZI/TICI] ui: steering arc (#1628)
* init

* lint

* add toggle

* Update params_keys.h

* Update params_metadata.json

* Update params_keys.h

* bool

* decouple

* no

* make it perfect

* fade it

* only with torque bar

* dynamic

* in another PR

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-08 17:00:37 -05:00
Adeeb Shihadeh
ac087d085e Build vendored artifacts in CI (#37127)
* Build vendored artifacts in CI

* parallel

* deterministic

* fix up

* fix gitignores

* lil more

* lil more consistency
2026-02-08 09:59:33 -08:00
Adeeb Shihadeh
46d65095af CI: garbage collect tmp jenkins branches (#37125) 2026-02-07 23:04:01 -08:00
github-actions[bot]
81bd8aa0e2 [bot] Update Python packages (#1662)
* Update Python packages

* bump

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-02-08 01:03:16 -05:00
Adeeb Shihadeh
667f3bb32f Revert "revert tg calib and opencl cleanup (#37113)" (#37115)
* Revert "revert tg calib and opencl cleanup (#37113)"

This reverts commit 51312afd3d.

* power draw is a lil higher

* just don't miss a cycle

* fix warp targets

* fix tinygrad dep
2026-02-07 21:36:44 -08:00
royjr
c908189e73 ui: use correct signals while using PID with Developer UI (#1674)
* only if angleState

* pidState element
2026-02-08 00:32:12 -05:00
Adeeb Shihadeh
c65cf18c75 Better memory usage debugging (#37120) 2026-02-07 21:00:56 -08:00
Adeeb Shihadeh
55a31d7657 replace tabulate with simple helper (#37122) 2026-02-07 18:27:16 -08:00
Adeeb Shihadeh
ac17c35cfe bridge: move ZMQ handling over (#37118) 2026-02-07 15:18:00 -08:00
David
bcb13a7229 ui diff replay: remove unused frame_data list for individual frame display (#37117)
Remove unused base64 encoding and simplify frame data handling in diff video report
2026-02-07 14:19:08 -08:00
Adeeb Shihadeh
0ce28803ec gitignore .context/ 2026-02-07 12:20:34 -08:00
Trey Moen
db8cd9f411 fix: route fetch metadata when first log isnt uploaded (#37114)
* fix: route fetch metadata when first log isnt uploaded

* default

* simple

---------

Co-authored-by: Trey Moen <treymoen@amazon.com>
2026-02-07 11:52:28 -08:00
Harald Schäfer
51312afd3d revert tg calib and opencl cleanup (#37113)
* Revert "Remove all the OpenCL (#37105)"

This reverts commit d5cbb89d84.

* Revert "rm common/mat.h"

This reverts commit 4ce701150a.

* Revert "Calibrate in tg (#36621)"

This reverts commit 593c3a0c8e.
2026-02-07 09:10:29 -08:00
Shane Smiskol
efc23644c7 Delete less dialogs (#37111)
* try

* revert

* this is fine
2026-02-06 22:59:05 -08:00
Shane Smiskol
e531f844f6 bump opendbc (#37108)
bump
2026-02-06 20:15:12 -08:00
Shane Smiskol
46f74753cd clip: use wrap_text helper (#37102)
* they are same

* no duplication!

* rm rstrip
2026-02-06 17:11:17 -08:00
Adeeb Shihadeh
d5cbb89d84 Remove all the OpenCL (#37105)
* Remove all the OpenCL

* lil more

* bump msgq
2026-02-06 16:36:47 -08:00
Adeeb Shihadeh
4ce701150a rm common/mat.h 2026-02-06 16:06:16 -08:00
Shane Smiskol
96fded0399 clip: clean up imports (#37104)
* wtf is this

* don't break import timing

* they are the same

* clean up

* good catch
2026-02-06 15:13:08 -08:00
felsager
12597856da long mpc: state name before subscript (#37101) 2026-02-06 14:26:20 -08:00
Harald Schäfer
593c3a0c8e Calibrate in tg (#36621)
* squash

* bump tg

* fix linmt

* Ready to merge

* cleaner

* match modeld

* more dead stuff
2026-02-06 14:13:46 -08:00
felsager
187d3a079c long_mpc: use log.capnp source enum (#37096) 2026-02-06 13:36:51 -08:00
felsager
9755520b87 longitudinal mpc tuning report: add sinusoidal oscillation scenario (#37100) 2026-02-06 11:30:49 -08:00
felsager
7099bd18e3 longitudinal mpc tuning: behind if main (#37099) 2026-02-06 10:35:54 -08:00
David
cb670c2c3d clips: improve overlays for mici (#37088)
* adjust overlay sizes and wrap metadata text for mici

* comment

* adjust overlay rendering to dynamically calculate line height for wrapped metadata text

* render time first so we can use width in margin calculation

* update comment (to retry failed CI actually)

* increase metadata size on mici
2026-02-06 09:58:30 -08:00
Shane Smiskol
f5b84e74f4 fix mici setup int enum 2026-02-05 23:42:16 -08:00
Shane Smiskol
2b8e887e44 mici setup: remove unused functions 2026-02-05 23:39:22 -08:00
Harald Schäfer
64f74dad27 Revert "long_mpc: use log.capnp source enum instead of list" (#37095)
Revert "long_mpc: use log.capnp source enum instead of list (#37093)"

This reverts commit 7e959c5a3e.
2026-02-05 16:23:28 -08:00
felsager
7e959c5a3e long_mpc: use log.capnp source enum instead of list (#37093) 2026-02-05 15:55:03 -08:00
Jason Young
28795d3065 bump opendbc (#37091) 2026-02-05 16:30:03 -05:00
royjr
8aed5a1a89 translations: remove arabic (#37087)
* remove arabic

* more
2026-02-05 09:28:01 -08:00
James Vecellio-Grant
4d65c52e6d modeld_v2: refactor abstract class to support off-policy models (#1672)
* modeld_v2: refactor abstract class to support off-policy models.

* whoops

* bump
2026-02-05 08:35:57 -05:00
Shane Smiskol
a5c973be89 NavBar: fix no show animation (#37090)
* 1.5 not enough time on small screen

* ohhhh

* clean up
2026-02-04 23:52:59 -08:00
ugtthis
39dcc88330 UI: only show onroad_fade.png when engaged (#37051)
* only show when engaged

* retrigger CI

* fade animation 0.1

* nl

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-02-04 23:03:01 -08:00
Shane Smiskol
fc6afd5ab8 Network menu improvements (#37077)
* try this

* that's handy

* todo, not sure what happens here

* set_text

* normalize

* scroll wifi

* clean up

* more

* better check
2026-02-04 22:58:16 -08:00
Shane Smiskol
177a1a3c8b BigButton: use UnifiedLabel (#37086)
* BigButton: remove unused scrolling

* start

* debug

* stash

* actually removing the hardcoded size for multioption fixes it

* back

* cursor does sub label

* clean  up

* more

* more

* try this for now

* nick suggest

* clean up

* more

* more
2026-02-04 22:25:28 -08:00
Shane Smiskol
1979a6d8e8 BigButton: remove unused scrolling (#37085)
* BigButton: remove unused scrolling

* clean up
2026-02-04 19:30:20 -08:00
Shane Smiskol
944c23f369 Stock LKAS: remove permanent alert (#37083)
rm perm
2026-02-04 17:06:11 -08:00
Shane Smiskol
2230933d4b Back to tethering BigButton (#37082)
Back to tethering big button
2026-02-04 16:38:24 -08:00
Jason Wen
3ea474dd58 tools: fix Python version comparison using normalized semantic version format (#37075) 2026-02-04 16:31:44 -08:00
Shane Smiskol
8879d481e5 comma four: new keyboard enter button (#37072)
* works

* enter dis

* clean up

* clean up

* no debug

* useless

* poadding
2026-02-04 16:04:49 -08:00
David
5e35feb3ab clips: allow mici UI (now default) (#37070)
fix: make big false by default and remove assertion
2026-02-04 11:25:09 -08:00
Jason Wen
5c12a7cfc3 Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1667) 2026-02-04 01:03:20 -05:00
Jason Wen
f309be9038 DEC: refactor mode conditions with Experimental Mode 2026-02-04 00:31:55 -05:00
Jason Wen
959ebd22d8 Merge branch 'upstream/openpilot/master' into sync-20260201
# Conflicts:
#	.github/workflows/auto_pr_review.yaml
#	.github/workflows/docs.yaml
#	.github/workflows/repo-maintenance.yaml
#	.gitignore
#	docs/CARS.md
#	opendbc_repo
#	panda
#	pyproject.toml
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/test/process_replay/ref_commit
#	tinygrad_repo
2026-02-04 00:14:58 -05:00
YassineYousfi
5b6436a90c CD210 model (#37050)
a27b3122-733e-4a65-938b-acfebebbe5e8/100
2026-02-03 19:14:02 -08:00
Harald Schäfer
ee7601ae9d long planner: Min(stopping) is also important (#37074)
Min(stopping) is also important
2026-02-03 15:55:13 -08:00
Shane Smiskol
54cf8d6a5e four keyboard: fix keys lagging behind parent widget (#37073)
* fix keys lagging behind

* use parent rect

* use parent rect

* cmt
2026-02-03 15:55:05 -08:00
Harald Schäfer
aac90dd11b Bump tg (#37069)
bump tg
2026-02-03 13:59:45 -08:00
Shane Smiskol
85b9f8962e Clean up four keyboard text rects (#37068)
* start clean up

* rm

* not really needed

* more

* clean up
2026-02-02 22:32:52 -08:00
Jason Wen
8f970bcb99 Reapply "latcontrol_torque: lower kp and lower friction threshold (commaai/openpilot#36619)" (#1581) (#1669)
* Reapply "latcontrol_torque: lower kp and lower friction threshold (commaai/openpilot#36619)" (#1581)

This reverts commit 7560497f

* bump
2026-02-02 22:13:37 -05:00
Shane Smiskol
a668bc9eda comma four setup improvements (#37066)
* always check, no flickering from has inter -> waiting -> has inter from the reset

* 1s interval. i see read timeouts at 0.5s sometimes

* clean up

* cursor

* Revert "cursor"

This reverts commit 13ec6312aa7f71b58771f8789456e97c4481856a.

* clean up
2026-02-02 16:58:45 -08:00
Trey Moen
fd50941cff chore: bump minimum Python version to 3.12.3 (#37052) 2026-02-02 08:13:49 -08:00
Adeeb Shihadeh
831f2396d9 bump opendbc 2026-02-02 08:08:09 -08:00
Adeeb Shihadeh
5fc4c2b25c ubloxd: remove kaitai (#37055)
* rm kaitai

* lil less

* bs

* lil less

* lil less
2026-02-01 20:00:55 -08:00
Adeeb Shihadeh
b03e7821d4 replace smbus2 package with minimal implementation (#37061)
* replace smbus2 package with minimal implementation

* cleanup

* fix up
2026-02-01 17:26:58 -08:00
Adeeb Shihadeh
35241a5fb8 cleanup pyproject (#37060)
* cleanup pyproject

* lil more

* fix warning
2026-02-01 16:03:18 -08:00
Adeeb Shihadeh
5da6bf9e03 rm pytools package (#37059) 2026-02-01 15:46:40 -08:00
Adeeb Shihadeh
948d42b3e5 rm pyopencl package (#37058)
rm pyopencl
2026-02-01 15:42:42 -08:00
Adeeb Shihadeh
422de59898 acados: strip future-fstrings declaration (#37057)
* Revert "rm future-fstrings package (#37056)"

This reverts commit 7a990b99f7.

* Reapply "rm future-fstrings package (#37056)"

This reverts commit 8b93f6646eed6863ad67b9bab558d305ecb8b7b4.

* strip it

* cleanup
2026-02-01 15:24:42 -08:00
Adeeb Shihadeh
7a990b99f7 rm future-fstrings package (#37056) 2026-02-01 15:07:22 -08:00
Adeeb Shihadeh
0a84b00406 fix up status for in progress builds 2026-02-01 13:36:55 -08:00
Trey Moen
e76e1e500c clips: use AugmentedRoadView instead of MainLayout (#37053)
Render only the road view in clips rather than the full main layout,
matching the updated UI module structure.
2026-02-01 13:21:00 -08:00
Adeeb Shihadeh
cd70e23dc3 clips: direct rendering with raylib (#36935)
* good clips

* replace

* fix

* fix font

* lil more
2026-01-31 20:15:23 -08:00
Pádraic Slattery
1dfef69a3c chore: Update outdated GitHub Actions versions (#37020)
* chore: Update outdated GitHub Actions versions

* just the github ones

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-01-31 18:37:00 -08:00
Adeeb Shihadeh
c35df583a5 tools: enable log caching by default (#36962) 2026-01-31 15:52:50 -08:00
King Art
db3df61c34 fix non-determinism in modeld build (#37042)
* fix non-determinism in selfservice model build

also trim down model compile dependencies to the minimum required

* Apply suggestions from code review

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-01-30 17:16:56 -08:00
Shane Smiskol
32f0a2cbbc bump opendbc (#37046)
bump
2026-01-30 00:30:11 -08:00
Shane Smiskol
569099eb70 update docs 2026-01-30 00:09:44 -08:00
Shane Smiskol
df7f426405 bump opendbc (#37043)
* bump opendbc

* update refs
2026-01-30 00:09:19 -08:00
T3d
bddd20c425 Complete french translations in app_fr.po (#37023) 2026-01-29 10:36:51 -08:00
Shane Smiskol
e89e4407c5 Tweak stockLkas alert (#37040)
* stockLkas alert is orange, small, mid prio, ldw vis alert

* copy exactly from existing ldw alert with prompt sound, black alert
2026-01-28 19:50:53 -08:00
Shane Smiskol
d849d6f1d7 mici keyboard: bold SmallKey (#37035)
bold SmallKey
2026-01-27 21:28:50 -08:00
Shane Smiskol
0b958f7c9a onroad: fill bookmark icon when activated (#37034)
* bookmark fill

* and here's what i would have done

* add
2026-01-27 19:59:25 -08:00
felsager
2fc10e8299 Maneuver: log drel and use it in tuning report (#37033) 2026-01-27 17:15:39 -08:00
Shane Smiskol
bf8cae5e7c mici ui: new icons (#37021)
* new icons

* add missing

* fixed tethering big icon, size of pairing comma, buttons now use 90percent white

* why o why

* newline

* fancy

* already default

* fixes

* add firehose

* ltl

* fix caps lock icon

---------

Co-authored-by: nickorie <nickorie@gmail.com>
2026-01-27 16:20:32 -08:00
Shane Smiskol
93015c1c17 ui: fix button label color (#37031)
label color
2026-01-27 15:40:09 -08:00
felsager
97329e46ae longitudinal maneuvers: add report for longitudinal mpc tuning (#37030) 2026-01-26 16:07:13 -08:00
felsager
d76f756f42 long_mpc: simplify longitudinal planner by removing "modes" (#37014) 2026-01-26 15:02:57 -08:00
commaci-public
71a418d166 [bot] Update Python packages (#37028)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2026-01-26 09:14:57 -08:00
Kumar
fb58e8f1f7 [TIZI/TICI] ui: Speed Limit (#1653)
* sla ui

remove dub

debug ahead

postition

maybe

posttion

think

* sunny will be mad

Reapply "test"

This reverts commit 7a35fd3053425b06c1e4cebf68b6c9676eb6e279.

Revert "test"

This reverts commit 1a79155d3cfc8e6e09a6fc38d13747883745ef6a.

test

* road name

* Revert "road name"

This reverts commit 02e69b008603c357f14b4793e8fc893e00b3d3a0.

* decouple

* dial it in

* match cur

* no magic numbers

* cleanup

* more cleanup

* match

* always draw ahead

* Revert "always draw ahead"

This reverts commit f695e00078.

* new

* type

* Revert "type"

This reverts commit 2dafa02407.

* default

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-26 01:54:42 -05:00
Candy0707
5dea009113 [TIZI/TICI] ui: Fix misaligned turn signals and blindspot indicators with sidebar (#1659)
* Fix Bug Turn and blind

* use separate y coord for left and right signals

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-24 22:50:39 -05:00
Adeeb Shihadeh
de024fd4a7 pandad: pure Python capnp helpers (#37025)
* pandad: pure Python capnp helpers

* cleanup
2026-01-24 12:02:33 -08:00
Adeeb Shihadeh
7c90c0669a script for CI results (#37024) 2026-01-24 10:51:41 -08:00
dzid26
fc4a0fb944 [TIZI/TICI] ui: Blue "Exit Always Offroad" button (#1655)
Blue "Exit Always Offroad" button

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-24 02:11:38 -05:00
Kumar
5c01365125 [TIZI/TICI] ui: Road Name (#1654)
* road name

* decouple

* rename

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-24 02:04:42 -05:00
Kumar
d7770ad55c [MICI] ui: display blindspot indicators when available (#1525)
* always bsm

* c4 bsm for c3x

* position

* sperate

* sp dir

* revert

* decouple

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-24 01:36:47 -05:00
Jason Wen
1bd3255f14 [TIZI/TICI] ui: MICI style blindspot indicators (#1657)
* introduce blinker

* add blind spot

* bigger

* nah

* lint
2026-01-24 01:04:25 -05:00
Kumar
76d50df466 [TIZI/TICI] ui: MICI style turn signals (#1504)
* mici turn signal for c3x

* sp dir

* decouple

* more

* ty

* refactor and slim down

* bigger

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-24 00:46:00 -05:00
Kumar
8c36739ebd [TIZI/TICI] ui: Rocket Fuel (#1337)
* rocket

* raylib

* extra

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-23 23:27:12 -05:00
Kacper Rączy
560ed80123 tools: seekable URLFile (#37022)
* Make URLFile seekable

* Return value in seek
2026-01-24 04:04:54 +00:00
Nayan
2e788ae54d [TIZI/TICI] ui: Steering panel (#1540)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* Option Control

* Need this

* sunnylink state

* introducing ui_state_sp for py

* poll from ui_state_sp

* cloudlog & ruff

* param to control stock vs sp ui

* better

* sponsor & pairing qr

* init panel elements

* backup & restore

* fruit loops

* update

* enable, disable, enable, disable

* handle layout updates

* not needed

* add ui_update callback

* change it up

* better padding

* this

* support for next line multi-button

* uhh

* disabled colors

* better

* listitem -> listitemsp

* listitem -> listitemsp

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* simplify

* I. SAID. SIMPLIFY.

* AAARGGGGGG.....

* option control value fix

* left button

* more init

* simple_button, yay

* simple_button, yay

* more more init

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* simple button

* simple button

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* optimizations

* change order

* subpanels

* lane change timer

* update toggles

* update toggles

* add cp_sp to ui_state

* mads

* add cp_sp to ui_state_sp

* fix ui crash

* update params

* ui_state changes

* descriptions

* Update scroller.py

* wrong pr

* listen nessa, yes nessa

* i've got something to confessa

* some bs

* # Conflicts:
#	selfdrive/ui/sunnypilot/layouts/settings/steering.py
#	selfdrive/ui/sunnypilot/layouts/settings/vehicle.py
#	system/ui/sunnypilot/widgets/list_view.py

* sine

* more

* Delete selfdrive/ui/sunnypilot/layouts/vehicle_settings/platform_selector.py

* Update styles.py

* allow sunnylink

* nah

* more

* sync

* lint

* revert

* button is always shown, just disabled if off

* revert

* Fix SimpleButtonActionSP not respecting enabled state

* some changes

* new pr

* some more

* ui: `ButtonSP`

* slight cleanup

* fixes

* no

* fix

* much better

* ui: `LineSeparatorSP`

* ui: add `inline` to `option_item_sp`

* small cleanup mads

* lane change

* allow changing title

* torque settings init

* lont

* more logic

* import directly

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
2026-01-23 22:55:50 -05:00
Jason Wen
a0a5c9b9ca ui: add set_title and improve state updates in ListViewSP (#1656) 2026-01-23 22:49:10 -05:00
Matt Purnell
12220ec82d cereal: update msgq imports (#36833)
Update outdated reference

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-01-23 17:11:23 -08:00
Shane Smiskol
3715fe85aa bump opendbc (#37019) 2026-01-23 00:55:12 -08:00
Shane Smiskol
ba6e5f125d Fix bridge w/ ZMQ (#37018)
* fix

* can also do this

* 1 less +lines but more diff - Revert "can also do this"

This reverts commit 8e18218099af6d3bc852d8ef0069b80d9322d6ca.
2026-01-23 00:24:15 -08:00
ZwX1616
1459d3519d DM: Ford GT model (#37013)
* b483cec4-7816-4570-a774-be3a2c100098/50

* shipfest

* da4b8724-8998-45da-aa36-d8fb390492b9

* revert

* typo

* deprecates
2026-01-22 18:41:08 -08:00
felsager
c9cfe2c727 LatcontrolTorque: move jerk calculation and filtering outside if else (#37011) 2026-01-21 12:32:56 -08:00
Jason Wen
27a8837422 Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1645) 2026-01-20 22:32:31 -05:00
felsager
bc979ea6aa Latcontrol torque test: ensure desired lateral accel buffer is consistent (#37004) 2026-01-20 16:16:38 -08:00
Adeeb Shihadeh
79472cdf83 Revert "docs: comma 3X to comma four (#37009)"
This reverts commit a7dfd36c00.
2026-01-20 16:04:05 -08:00
Harald Schäfer
adf6f28ebf LatcontrolTorque: always fill buffer (#36991) 2026-01-20 15:34:57 -08:00
Lukas
a7dfd36c00 docs: comma 3X to comma four (#37009)
* comma 3X -> comma four

* add comma four ports image
2026-01-20 15:15:12 -08:00
Jason Wen
53327edb50 Merge branch 'upstream/openpilot/master' into sync-20260111
# Conflicts:
#	common/api.py
#	docs/CARS.md
#	opendbc_repo
#	panda
#	scripts/lint/lint.sh
#	selfdrive/car/car_specific.py
#	selfdrive/car/card.py
#	selfdrive/test/process_replay/ref_commit
#	system/hardware/hardwared.py
#	tinygrad_repo
2026-01-20 07:29:25 -05:00
Adeeb Shihadeh
6c7f3751e7 camerad: calculate buffer sizes with VENUS helpers (#37006)
* Revert "NV12 buffer shape helpers (#36683)"

This reverts commit 13efc421c4.

* camerad: calculate buffer sizes with VENUS helpers

* copy header:

* assert aligned

* python nv12 info

* debug

* handle padding

* use the helper
2026-01-19 17:18:22 -08:00
Mauricio Alvarez Leon
c179a3ccb7 CI: enable macos tests (#37005)
enable macos tests
2026-01-19 16:45:45 -08:00
Harald Schäfer
13efc421c4 NV12 buffer shape helpers (#36683)
* Give this a try

* can codex debug?

* simpler

* Revert "simpler"

This reverts commit 572335008c1c719aa985d14bd740253ff94b94a9.

* better

* cleanup

* try again

* tie

* try this

* try this

* do tests fail without this?

* doesn't seem needed

* unused

* don't need duplicate

* passes CI?

* try this

* try this

* try this

* I don't understand this, so back to before

* keep that alignment

* set uv_height

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-01-19 16:27:41 -08:00
Adeeb Shihadeh
10db1edc7f merge common.util and common.utils (#36951)
* common: merge common.util and common.utils

* cleanup

* cleanup
2026-01-19 15:50:00 -08:00
Adeeb Shihadeh
039b85f355 bump opendbc (#37003)
* bump opendbc

* bump

* bump

* bump

* bump bump bump
2026-01-19 15:33:23 -08:00
Harald Schäfer
0b41b42f7b WMI model 🍉 (#36798)
* 1791ea0f-8667-4e0b-be73-084d912f6c4c/100

* eab53871-1f8c-45be-9a98-f6b3dd6a0adc/100

* dd075c9d-0c49-402e-b4f2-9adbe5301c84/100

* e8b5b1b0-2d37-4b62-bd39-21ff0d08ee68/100

* 1aff00c7-06c5-46a6-8a79-7e56f77d81bf/100

* 3547a2cc-1699-4e7d-a2ab-4eb87d0b8684/100

* 849aa9fb-dae6-4604-923e-050883def218/100

* 0e0f6dd2-96dc-4f34-a7cd-63bccc2f5616/100

* 887f923b-7e79-43c6-8f1f-053e1490f859/100

* 1fa82260-1171-4db5-9968-d34ce2e14694/100

* Revert "1fa82260-1171-4db5-9968-d34ce2e14694/100"

This reverts commit 855f5e4ddefd69a20cc4e9da004eb53f3e00d950.

* a27b3122-733e-4a65-938b-acfebebbe5e8/100

---------

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2026-01-19 11:48:06 -08:00
commaci-public
a46ff01cab [bot] Update Python packages (#36966)
* Update Python packages

* ty fixes

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-01-19 11:39:21 -08:00
Nayan
e7b6e62b82 [TIZI/TICI] ui: expose Interactivity Timeout option (#1497)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* Option Control

* Need this

* introducing ui_state_sp for py

* param to control stock vs sp ui

* better

* add ui_update callback

* better padding

* this

* listitem -> listitemsp

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* simplify

* I. SAID. SIMPLIFY.

* AAARGGGGGG.....

* init

* option control value fix

* add all controls

* hide all controls

* lint

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* optimizations

* Removed hide for now

* refresh controls

* ugh

* global brightness

* initialize

* inline everything again

* change name

* Onroad Brightness reimpl

* Custom Interactive Timeout reimpl

* Global Brightness Override reimpl

* keep stock

* ui: Custom Interactive Timeout

* rename

* ui: Customizable Onroad Brightness

* lint

* lint

* Revert "Global Brightness Override reimpl"

This reverts commit 53522da4f8.

* Revert "Custom Interactive Timeout reimpl"

This reverts commit 459863a9bb.

* Revert "Onroad Brightness reimpl"

This reverts commit 4092d23e57.

* fixes

* lint

* reset on show/hide

* reset on show/hide for mici

* only set if true

* wrong var

* try this out

* use clear

* starts cleanup

* wake for all visual alerts and handle timeouts

* fixup: wake for all visual alerts and handle timeouts

* handle always wake if there's an event properly

* some

* slightly more

* need this back

* Reapply "ui: Global Brightness Override (#1579)"

This reverts commit a0c10be1ff.

* do not touch light sensor logic

* override properly and clip to 30% minimum

* wrap

* lint

* update immediately

* read

* max global brightness

* rename

* gotta do it for mici too lol

* update metadata

* desc

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2026-01-19 01:42:24 -05:00
Jason Wen
3662a8e962 ui: Customizable Onroad Brightness (#1641)
* ui: Customizable Onroad Brightness

* fixes

* lint

* reset on show/hide

* reset on show/hide for mici

* only set if true

* wrong var

* try this out

* use clear

* starts cleanup

* wake for all visual alerts and handle timeouts

* fixup: wake for all visual alerts and handle timeouts

* handle always wake if there's an event properly

* some

* slightly more

* need this back

* Reapply "ui: Global Brightness Override (#1579)"

This reverts commit a0c10be1ff.

* do not touch light sensor logic

* override properly and clip to 30% minimum

* wrap

* lint

* update immediately

* read

* max global brightness

* rename

* gotta do it for mici too lol

* revert

* Revert "revert"

This reverts commit 121a082de1.

* no more

* ui

* more

* intenum

* simplify ONROAD_BRIGHTNESS_TIMER_VALUES

* no more toggle

* 15 seconds countdown for auto dark regardless

* auto dark refinement

* only consume if expired

* immediately set

* rename

* update sl metadata

* no more

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2026-01-19 01:26:16 -05:00
Copilot
49b6ef7f48 SL: Fix MaxTimeOffroad metadata unit from seconds to minutes (#1650)
* Initial plan

* Fix MaxTimeOffroad metadata unit from seconds to minutes

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>
2026-01-17 14:36:19 -05:00
Matt Purnell
1f9efd9311 transformations: move Cython to pure Python (#36830)
* Remove cython for transformations

* Add new test

* Switch back to program to fix mac builds

* Convert to Python instead

* Fix failing builds

* lint

* Implement conversion in pure python/numpy

* Add more tests

* Fix bugs in tests
2026-01-16 22:31:26 -08:00
Shane Smiskol
7f8dbf24e7 Cabana: fix for internal source (#36998)
* fix for internal sources from cursor

* clean up

* more

* not needed

* clean up

* sure
2026-01-15 17:18:40 -08:00
Shane Smiskol
5e4b88201e Toyota: whitelist hybrids for standstill resume behaviour (#36996)
tioyota
2026-01-15 14:38:43 -08:00
Adeeb Shihadeh
1252188b4b sensord: tighten temperature threshold (#36994)
* sensord: tighten temperature threshold

* lil more
2026-01-13 14:33:13 -08:00
DevTekVE
a0c10be1ff Revert "ui: Global Brightness Override (#1579)"
This reverts commit 1eb82fcc
2026-01-10 21:24:44 +01:00
Adeeb Shihadeh
15d3a166f7 enable pyopencl on arm64 (#36990) 2026-01-09 20:49:14 -08:00
Nayan
a58db66a98 sunnylink: add units to param metadata (#1643)
add units
2026-01-09 18:40:09 -05:00
Harald Schäfer
f51c2aeced Modeld: less lat smoothing (#36987)
* lat is plenty smooth!

* fix
2026-01-09 15:04:33 -08:00
Harald Schäfer
3edb3243f6 SC driving (#36986)
f1d30a23-4122-400a-80a6-557502284c36/200
2026-01-09 09:16:57 -08:00
YassineYousfi
c693bc1247 MacroStiff Model 🟥🟩🟦🟨 (#36972)
* 8c06e95e-d7c0-4fd9-ba02-9f0b6848785e/400

* test

* test

* test now
2026-01-05 16:14:05 -08:00
Adeeb Shihadeh
5d3ab260e1 welcome lexus ls 2026-01-05 10:15:20 -08:00
Jason Young
ea64c4c0ae VW: Enable torqued (#36983) 2026-01-04 21:35:13 -05:00
Adeeb Shihadeh
84bce8ae02 rm pygame (#36982)
* rm pygame

* lil more

* cleanup

* lil more
2026-01-04 17:52:10 -08:00
Jason Young
3c5974930a cleanup SecOC release gating (#36980) 2026-01-04 17:09:26 -05:00
Adeeb Shihadeh
be854df32d remove unused dbus-next package (#36979) 2026-01-04 13:46:30 -08:00
Jason Wen
e5e56614c9 ui: Customizable Interactive Timeout (#1640)
* ui: Custom Interactive Timeout

* rename

* lint
2026-01-04 00:33:32 -05:00
Nayan
1eb82fcc85 ui: Global Brightness Override (#1579)
* global brightness

* initialize

* keep stock

* lint

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-04 00:27:22 -05:00
Copilot
987f53e69a [TIZI/TICI] ui: sunnylink status on sidebar (#1638)
* Initial plan

* feat: add sunnylink status metric

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: extract sidebar constants

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* refactor: guard metric spacing

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: clarify sunnylink helpers

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* refactor: guard metric spacing edge cases

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: simplify spacing guards

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: normalize sunnylink params

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: harden sunnylink param parsing

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: add param decode helper

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: simplify sidebar metric spacing

Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>

* chore: update sunnylink status color logic for improved clarity

* sunnylink: update status handling to reflect offline state and improve fault indication

sunnylink: enhance status handling with temporary fault indication

* sunnylink: enhance status update logic for improved accuracy and clarity

* make it int

* Ugly with zero value, but done. Now we only need to remember to check the new sidebar if the old sidebar ever changes

* Revert "Ugly with zero value, but done. Now we only need to remember to check the new sidebar if the old sidebar ever changes"

This reverts commit 2d3b740e38.

* decouple

* no bad bot

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devtekve <7696966+devtekve@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-03 21:01:21 -05:00
github-actions[bot]
9a04a5eaae [bot] Update Python packages (#1565)
* Update Python packages

* no

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-03 15:54:55 -05:00
Nayan
50b8ae9e09 sunnylink: update params metadata (#1636)
* sunnylink model controls

* cleanup more controls

* update verbiage

Co-authored-by: DevTekVE <devtekve@gmail.com>

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2026-01-03 08:35:02 -05:00
YassineYousfi
adbf68f771 FrameReader: add hwaccel arg and clear frames_cache (#36974) 2026-01-02 11:29:45 -08:00
YassineYousfi
f62177a827 FrameReader: use hwaccel auto (#36973)
* FrameReader: use hwaccel auto

* rm main block
2026-01-01 19:06:31 -08:00
Alexandre Nobuharu Sato
bb40d161e8 Add back badges for keep multilanguage support (#36967) 2026-01-01 15:13:18 -08:00
James Vecellio-Grant
a30fc9bcd2 modeld: configurable camera offset (#1614)
* modeld: configurable camera offset

Negative Values: Shears the image to the left, moving the models center to the Right.

Positive Value: Shears the image to the right, moving the models center to the Left.

* modeld: camera offset class

* verify zero offset I @ A = A

* slithered and slunked

* Update params_metadata.json

* wait

* Update model_renderer.py

* Update model_renderer.py

* requested changes

* stricter

* Update model_renderer.py

* more

* return default

* Update params_metadata.json

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2026-01-01 14:23:01 -05:00
Shane Smiskol
84b1f363e4 Alert for stock LKAS (#36969)
* alert stock lkas

* high

* i didn't do this
2025-12-31 12:43:36 -08:00
Kumar
19a7d1d5d7 [TIZI/TICI] ui: update dmoji position and Developer UI adjustments (#1601)
* ui: improve layout and centering of bottom developer UI elements

* int

* less is more, y'all

* always show actual lat for all cars

* lint

* perfect

* cleanup

* too long

* inherit

* remove unused

* inir

* need to fix

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-31 00:27:53 -05:00
Jason Wen
fb8f46cba9 Reimplement sunnypilot Terms of Service & sunnylink Consent Screens (#1633)
* tos reimpl

* nah

* simpler

* check consent on sunnylink panel - mici

* slight cleanup

* rename

* keep it off

* decouple

* more rename

* more decouple

* a bit more

* fix state

* decouple more

* a bit more

* wrong type

* rearrange

* don't do that

* final

* lint

* include

* more

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
2025-12-31 00:08:36 -05:00
Nayan
70386c6b00 ui: fix Always Offroad button visibility (#1632)
always offroad button fix
2025-12-30 23:20:20 -05:00
James Vecellio-Grant
edeede5e82 modeld_v2: conditional model compilation for metadrive testing (#1623)
* modeld_v2: conditional model compilation for PC

* full send

* shebang

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-29 22:03:08 -05:00
Adeeb Shihadeh
a5348b8679 crcmod -> crcmod-plus (#36968) 2025-12-29 16:41:52 -08:00
James Vecellio-Grant
6df313b974 modeld_v2: remove dead test (#1621)
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-29 17:01:58 -05:00
James Vecellio-Grant
9442bc9aec modeld_v2: planplus model tuning (#1620)
* modeld: planplus model tuning

* little more

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-29 16:55:39 -05:00
Adeeb Shihadeh
63c9a85c6a FrameReader: use HW accel if available (#36964)
* FrameReader: add macOS hw accel

* sys

* more platforms

* logging
2025-12-28 21:38:54 -08:00
Adeeb Shihadeh
adf9ec5360 tools: speed up Route() (#36963)
* tools: speed up Route()

* cleanup
2025-12-28 15:39:20 -08:00
commaci-public
883d1232d3 [bot] Update Python packages (#36606)
update

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-12-28 13:00:35 -08:00
Adeeb Shihadeh
b58fddb83e replay: add --benchmark mode (#36957) 2025-12-28 12:20:45 -08:00
Adeeb Shihadeh
ce1491df9c tools: add LRU eviction for log cache (#36959)
* tools: add LRU for log cache

* lil more

* cleanup:

* less syscall

* manifest

* cleanup

* cleanup

* lil more

* cleanup

* lil more

* simpler

* lil more
2025-12-28 11:45:19 -08:00
Adeeb Shihadeh
ea01a53711 switch from mypy to ty (#36961) 2025-12-28 10:42:49 -08:00
Adeeb Shihadeh
85cdb2ed9a fix(url_file): ensure seek position is always an integer (#36960) 2025-12-27 23:15:18 -08:00
Adeeb Shihadeh
368947c88c msgq on macOS (#36958)
* msgq on macOS

* clean that up
2025-12-27 16:49:30 -08:00
DevTekVE
763049f068 SL: Re enable and validate ingestion of swaglogs (#1580)
* Re enable and validate ingestion
2025-12-27 11:49:26 -05:00
Trey Moen
3f1f7ad89c feat(esim): remove bootstrap (#36954)
feat: remove bootstrap
2025-12-24 09:04:34 -08:00
Nayan
c6c644a3a6 [mici] ui: sunnypilot font on home menu (#1561)
use sp font on home

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-23 16:34:00 -05:00
dzid26
c876a83a31 ui: fix malformed dongle ID display on the PC if dongleID is not set (#1612) 2025-12-23 09:34:56 -05:00
Nayan
a04a5b4284 ui: expand DeviceLayoutSP (#1560)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* better padding

* this

* support for next line multi-button

* uhh

* disabled colors

* listitem -> listitemsp

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* simple button

* simple button

* add to readme

* use gui_app.sunnypilot_ui()

* i've got something to confessa

* init

* more init

* power buttons always visible

* uh, nope

* add reset to offroad only

* support wake up offroad

* flippity floppity

* dual button item sp

* use dual button item sp

* lint

* keep @devtekve from going blind

* more round

* some

* revert

* slight diff

* should've been inline

* cleanup power btns and offroad transitions

* bruh

* 1st row red diff

* 2nd row red diff

* 3rd row red diff

* slight diff

* move around

* more diff

* only when onroad we move to the top, not the toggle

* nah

* sort

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
2025-12-23 00:51:35 -05:00
Matt Purnell
373894a81f docs: Update branch installation instructions in README (#1610)
* Update branch installation instructions

* Add another link

* Add limited support link

* Incorporate suggested link

* Tweak wording
2025-12-23 00:42:24 -05:00
Jason Wen
34ce746869 ui: DualButtonActionSP and dual_button_item_sp helpers (#1608) 2025-12-22 09:29:01 -05:00
Matt Purnell
e96b0da9d7 ci: Add unit test to prevent MADS DM regressions (#1602)
* monitoring/tests: Add unit test to prevent MADS regressions

* dm: remove TODO

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-21 23:07:01 -05:00
Jason Wen
6d7910ed74 ui: add inline to option_item_sp (#1600) 2025-12-21 22:56:51 -05:00
Jason Wen
e54ddf30b8 ci: restore workflows from source branch for reset and squash (#1607) 2025-12-21 22:48:45 -05:00
Nayan
3093bb0b66 ui: fix sunnylink paired/sponsorship state (#1603)
* fix

* no point polling when disabled
2025-12-21 22:26:11 -05:00
Adeeb Shihadeh
a8cfa2e2fe bump msgq (#36950) 2025-12-21 17:22:57 -08:00
Adeeb Shihadeh
c8eed43538 misc system/hardware/ cleanup (#36949)
* misc system/hardware/ cleanup

* lil more

* pc is kinda base

* lil more

* lil more

* lil more

* int

* lil more?
2025-12-21 17:02:39 -08:00
Adeeb Shihadeh
29a2f576f5 unpin raylib-python-cffi (#36948) 2025-12-21 16:49:15 -08:00
Adeeb Shihadeh
31ec0096e4 ui: fix raylib init spam (#36947)
* lil more

* not none

* don't need that either

* too spammy now?
2025-12-21 16:21:35 -08:00
Adeeb Shihadeh
8728c7dde3 killing car_specific.py, part 3 (#36946)
* mv that

* lil more

* todo

* cleanup
2025-12-21 15:42:53 -08:00
Jason Wen
9c7c84bd03 ui: simplify non-inline action button positioning in ListViewSP (#1599)
ui: update non-inline action button positioning in `ListViewSP`
2025-12-20 23:30:30 -05:00
Jason Wen
6c6be573c7 ui: LineSeparatorSP (#1598) 2025-12-20 22:50:58 -05:00
Jason Wen
8904300565 Toyota: Enforce Factory Longitudinal Control (#1596)
* Toyota: enforce factory longitudinal control support

* sunnylink!

* bump

* bruh
2025-12-20 22:40:40 -05:00
Jason Wen
09c4b933a8 ui: capitalize button texts in Vehicle panel (#1597) 2025-12-20 22:14:19 -05:00
Jason Wen
1a1178140f ui: include MADS enabled state to engaged check (#1595) 2025-12-20 21:35:51 -05:00
Dean Lee
e9a37d99c3 Fix incorrect msgq path in prefix.h (#36943) 2025-12-20 16:33:52 -08:00
Adeeb Shihadeh
67742699cc card: move drivable gears to opendbc (#36942)
* card: move drivable gears to opendbc

* it's not none

* bump opendbc

* mypy
2025-12-20 15:22:30 -08:00
Adeeb Shihadeh
de975d5af9 card: remove MockCarstate (#36941) 2025-12-20 15:04:13 -08:00
Jason Wen
452aa67581 DM: fix upstream merge overwrite with latActive check (#1594)
* Update enabled condition to include latActive

* Todo-sp
2025-12-20 15:20:24 -05:00
Kumar
5bf2ac1657 [TIZI/TICI] ui: chevron metrics (#1487)
* chevron info

* sp dir

* rename

* decouple from stock model renderer

* pain

* RED DIFF: get from ui state directly

* built in

* banned

* no magic

* space

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-19 22:06:27 -05:00
Kumar
f42dbf0c34 [TIZI/TICI] ui: rainbow path (#1486)
* rainbow

* use monotonic

* sp dir

* lint

* decouple from stock model renderer

* call in ui state directly

* it's a boolean

* too long

* nope

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-19 17:36:43 -05:00
zikeji
40f838260b sunnylink: block remote modification of SSH key parameters (#1591)
* feat: add blocked parameter names

* add unit test to validate

* test: use cached method

* move it out

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-19 16:31:01 -05:00
Nayan
f8487cae23 sunnylink: elliptic curve keys support and improve key path handling (#1566)
* support ecdsa for mici

* lint

* ugh

* ugh ughain

* more

* symmetrical AES key derivation and some missing key handling

* cleanup

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-19 15:49:24 -05:00
Jason Wen
2e576178cb ci: fix duplicate if syntax error (#1590) 2025-12-19 15:31:29 -05:00
royjr
5578b7e754 ui: lateral-only and longitudinal-only UI statuses support (#1539)
* init

* add only colors

* fix LAT_ONLY on mici

* better ball

* hide wheel on LONG_ONLY

* hide torquebar on LONG_ONLY

* simpler

* dont block demo

* path only on long

* lanelines only on lat

* hide on override

* better

* same LANE_LINE_COLORS for mads

* use mads colors

* Revert "use mads colors"

This reverts commit 556321e5debe44e33d4ad98f440f0ed9f961fdf5.

* slight decouple confidence ball

* slight decouple model renderer

* slight decouple augmented road view

* decouple status update

* decouple and override with our own, no overriding with steering if long only

* fix

* fix it

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-19 14:36:10 -05:00
eFini
c3143f3833 Multilang: update zh translation (#36933) 2025-12-19 09:38:23 -08:00
Maxime Desroches
1c2f9e6190 bump version to 0.10.4 2025-12-18 23:26:59 -08:00
Maxime Desroches
654338f9c7 update release instructions 2025-12-18 22:52:14 -08:00
Maxime Desroches
dfd7a8c8d7 AGNOS 16 (#36915)
* stage

* prod

* bump reset
2025-12-18 22:02:46 -08:00
Shane Smiskol
bb8a5bd476 Fix slow DM onboarding (#36932)
* slow

* interesting

* check

* clean up
2025-12-18 20:50:34 -08:00
Nayan
57e7c0b2c1 [comma 4] ui: sunnylink panel (#1544)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* sunnylink state

* introducing ui_state_sp for py

* poll from ui_state_sp

* cloudlog & ruff

* param to control stock vs sp ui

* better

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* fetch only when connected to network

* init sunnylink panels

* cleanup

* lint

* flippity floppity

* fix backup/restore status

* show contributor tier

* sunnylink-mici

* icons

* fix

* add uploader

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-18 23:15:52 -05:00
Shane Smiskol
e4359e9acb api_get: use session (#36930)
* use session

* prob better for now

* todo

* same for firehose

* no more stutters!

* cmt
2025-12-18 17:15:47 -08:00
Maxime Desroches
13b8a67ae2 reset: fix button overlap (#36929)
fix
2025-12-18 16:03:45 -08:00
Kumar
93f98a8a36 [TIZI/TICI] ui: Developer Metrics (#1523)
* devui

* clean up

* clean up

* optimize text measurement for better rendering performance

* sp dir

* decouple from stock HudRenderer

* rename

* fetch mode in _update_state

* wrong type

* start decoupling elements

* decouple elements

* un-ew this pls

* fully decouple developer UI elements

* rename

* more decouple

* full send

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-18 05:01:16 -05:00
Shane Smiskol
89d9fdca82 WifiUi: tune wifi strengths (#36923)
* tune wifi strengths

* android nor ios show none or slash. it's always 1, 2, or 3 bars

* match here

* clean up
2025-12-17 23:15:22 -08:00
Jason Wen
b52d0df6e3 ci: enable mici Raylib UI Preview in sunnypilot (#1588) 2025-12-18 02:08:20 -05:00
Shane Smiskol
a478b64ff3 WifiUi: fix clicking (#36919)
* fix

* rm

* rename

* need this in case user swipes back to starting pos

* better

* better

* clean up

* cmt
2025-12-17 21:55:31 -08:00
Shane Smiskol
b3c2daf9e5 Revert "Widget: track mouse events (#36922)"
https://github.com/commaai/openpilot/pull/36920#issuecomment-3668453692

This reverts commit 792a9b715c.
2025-12-17 21:32:06 -08:00
Shane Smiskol
792a9b715c Widget: track mouse events (#36922)
* track

* fix

* rm
2025-12-17 21:30:40 -08:00
James Vecellio-Grant
f3598ce3ed ci: fix sunnypilot unit tests (#1584)
This PR aims to fix sunnypilot pytest that was broken on MacOS due to calling capnp to_dict, which isn't supported on pycapnp library for Mac.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-18 00:29:37 -05:00
Shane Smiskol
631d6d9ef4 Widget: mouse handlers don't use bool (#36921)
* not used

* lint
2025-12-17 21:26:52 -08:00
Jason Wen
2b51adff11 sunnylink: Vehicle Selector support (#1587)
* sunnylink: Vehicle Selector support

* shebang
2025-12-18 00:20:42 -05:00
Jason Wen
f5b3d87e25 ci: add GitHub app token for authenticated pushes (#1586) 2025-12-18 00:03:48 -05:00
James Vecellio-Grant
28fa7d5ed9 sync: update message queues and upstream merge conflicts (#1585)
* bug: fix sp message queues and protected method access

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-17 23:54:39 -05:00
Shane Smiskol
6249211745 Update canError alert texts (#36918)
* hmm

* hmm it's small

* can

* ?

* variant?

* unknown
2025-12-17 19:57:57 -08:00
James Vecellio-Grant
7560497f15 Revert "latcontrol_torque: lower kp and lower friction threshold (commaai/openpilot#36619)" (#1581)
* Revert " latcontrol_torque: delay independent jerk and lower kp and lower friction threshold (#36619)"

This reverts commit f01391a7d9

* revert opendbc_repo

* bump

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-17 21:32:18 -05:00
Jason Wen
5999079838 Sync: commaai/openpilot:mastersunnypilot/sunnypilot:master (#1583)
* comma four: fix missing WiFi show_event (#36858)

* can't do this

* can do this

* comma four: rm duplicate wifi show_event

* comma four: fix WiFi panel not starting at the top (#36859)

* fix

* fix

* NavWidget: disable nav bar for vertical scrollers (#36857)

* disable nav bar vert scroller

* cmt

* ui: improve network sort (#36855)

* better sort

* clean up

* comma four: reset WiFi SSID scroll on show (#36861)

reset scroll

* WifiUi: fix infinite wraps (#36863)

* fix infinite wrap

* fix selection

* Revert "fix selection"

This reverts commit 555c57922409312bf5d9efedf571994f157b9e44.

* revert

* revert

* revert

* revert

* cleaner

* cleaner

* mypy!!

* WifiUi: remove delayed network panel open (#36865)

not used

* comma four: fix WiFi scroll to (#36864)

* fix selection

* stash

* Revert "stash"

This reverts commit d04ed66b090641072c86b8ed7ed86dbdbf67fbd9.

* clean up

* clean up

* move

* fix

* WifiUi: pause updates while user is scrolling (#36866)

* pause updates while user is scrolling

* clean up

* WifiUi: pause updates while user is interacting (#36868)

int not scroll

* Widget: implement layout function (#36869)

* we can implement layout to fix flashing

* reorder

* fix faster than normal snap and reduce duplicate calculations

* yes

* comma four: follow current network (#36862)

* stay

* whoops

* whoops

* fix

* fix div by z

* we can implement layout to fix flashing

* Revert "we can implement layout to fix flashing"

This reverts commit 7278a1e2a6117aec775ef4fabee2fd68b3d064f3.

* random

* clean up

* wtf

* rev

* smooth

* we can implement layout to fix flashing

* snap looks so much better

* fix

* rev

* better name

* cmt

* less random

* even less random

* simpler

* cmt

* clean up

* clean up

* clean up

* GuiScrollPanel2: fix possible crash (#36870)

fix crash

* WifiUi: tweak unselected button size (#36871)

looks too spaces

* rm dead unlog_ci_segment.py

* joystickd: add cruise control resume (#36876)

* Add cruise control resume logic based on conditions

* simple

* bump opendbc (#36878)

* bump

* update docs

* bump

* gotta go fast

* sensord: remove last of dual IMU support (#36881)

* Toyota: prevent roll in ICE after pressing resume while wanting to stay stopped (#36877)

* bump

* only show alert when user can leave standstill

* cmt

* stash

* bump

* bump to master

* test_onroad: absolute memory usage test (#36885)

* test_onroad: absolute memory usage test

* show msgq size

* reduce a little

* bump msgq

* Revert "bump msgq"

This reverts commit 683d0ae9fc754f7b72e2bc4b256e9a3b0a60a127.

* Reduce pub-sub memory usage by 10x (#36884)

less mem

* four: hide untoggleable toggles (#36890)

* hide toggles

* enabled is redundant

* bump msgq (#36891)

* bump msgq

* update prefix

* ui: generic hold gesture (#36893)

* generic

* fix

* use in home

* clean up

* rm

* clean up

* four: simpler steer saturated alert (#36894)

* looks good

* fix

* cleanup

* test_onroad: relax memory threshold (#36895)

* Update RELEASES.md for version 0.10.3

* Update RELEASES.md

* ui: override default interactive timeout (#36898)

* impl

* fix one place

* don't need in setup

* fix onboarding

* need here too

* ui: default text color 90% white (#36899)

default 90%

* onboarding: fixup DM RHD detection (#36900)

* helper

* fix

* use it

* prop

* bigger box

* huh

* comma four: simpler DM onboarding (#36896)

* rm confirm mode

* kinda works

* how

* disabled

* do this

* do this

* wait

* here

* something

* fade in

* 4s

* clean up

* copy

* help

* 30deg center

* stuff

* reset_interactive_timeout

* rm

* simple

* simple

* copy

* 1.5x

* smooth opacity

* power off slider

* fix

* new icons and gradient and rounded

* final check

* fix

* how the hell did this work

* clean up

* clean up

* flip

* cmt

* uh yeah

* remove this

* revert this

* lint

* 45

* clean up

* fix

* no show time

* question

* rm

* no use

* ()

* lint

* call

* ui: fix not showing networks if viewing right after startup

* Fix tici DM dialog memory leak (#36790)

* not finished

* no

* debug

* clean up

* clean up

* Revert "ui: generic hold gesture (#36893)"

This reverts commit 9768109ec1.

* setup: go back to main page once connected (#36902)

* call

* break

* print

* fix

* rm

* debug

* fix

* yeah ideally wifiui has no clue about this

* clean up

* clean up

* clean up

* only need this

* cu

* rm

* fix

* CI: tmp disable macOS due to brew bug (#36906)

* need update?

* try this

* x

* just disable it

* lil more release notes

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
2025-12-17 21:18:47 -05:00
Jason Wen
2458a6d115 Merge branch 'upstream/openpilot/master' into sync-20251217
# Conflicts:
#	docs/CARS.md
#	opendbc_repo
2025-12-17 21:09:26 -05:00
Shane Smiskol
2213f8f8a4 MultiOptionDialog: tap activates current option (#36911)
* works

* clean up
2025-12-17 17:10:12 -08:00
Shane Smiskol
4e85568370 MultiOptionDialog: support no default (#36912)
fix
2025-12-17 17:02:19 -08:00
Shane Smiskol
88a4f2baf1 Onboarding: no buttons if no frame (#36909)
no buttons if no frame
2025-12-17 16:27:43 -08:00
Adeeb Shihadeh
4bfc28dec0 lil more release notes 2025-12-17 10:19:05 -08:00
Adeeb Shihadeh
be2818a131 CI: tmp disable macOS due to brew bug (#36906)
* need update?

* try this

* x

* just disable it
2025-12-17 09:37:30 -08:00
Shane Smiskol
1646fd94b8 setup: go back to main page once connected (#36902)
* call

* break

* print

* fix

* rm

* debug

* fix

* yeah ideally wifiui has no clue about this

* clean up

* clean up

* clean up

* only need this

* cu

* rm

* fix
2025-12-17 01:55:17 -08:00
Shane Smiskol
3fbd928b98 Revert "ui: generic hold gesture (#36893)"
This reverts commit 9768109ec1.
2025-12-17 01:53:17 -08:00
Shane Smiskol
d2125aafd4 Fix tici DM dialog memory leak (#36790)
* not finished

* no

* debug

* clean up

* clean up
2025-12-17 01:23:49 -08:00
Shane Smiskol
b9c3b1219a ui: fix not showing networks if viewing right after startup 2025-12-16 23:45:34 -08:00
Shane Smiskol
99983d39c3 comma four: simpler DM onboarding (#36896)
* rm confirm mode

* kinda works

* how

* disabled

* do this

* do this

* wait

* here

* something

* fade in

* 4s

* clean up

* copy

* help

* 30deg center

* stuff

* reset_interactive_timeout

* rm

* simple

* simple

* copy

* 1.5x

* smooth opacity

* power off slider

* fix

* new icons and gradient and rounded

* final check

* fix

* how the hell did this work

* clean up

* clean up

* flip

* cmt

* uh yeah

* remove this

* revert this

* lint

* 45

* clean up

* fix

* no show time

* question

* rm

* no use

* ()

* lint

* call
2025-12-16 23:16:45 -08:00
Shane Smiskol
31e46f929d onboarding: fixup DM RHD detection (#36900)
* helper

* fix

* use it

* prop

* bigger box

* huh
2025-12-16 22:42:13 -08:00
Shane Smiskol
cecce82015 ui: default text color 90% white (#36899)
default 90%
2025-12-16 20:34:51 -08:00
Shane Smiskol
a112e6e882 ui: override default interactive timeout (#36898)
* impl

* fix one place

* don't need in setup

* fix onboarding

* need here too
2025-12-16 19:31:49 -08:00
YassineYousfi
c69c076acb Update RELEASES.md 2025-12-16 19:28:21 -08:00
Adeeb Shihadeh
6069c87b07 Update RELEASES.md for version 0.10.3 2025-12-16 19:21:00 -08:00
Adeeb Shihadeh
90ed6d739c test_onroad: relax memory threshold (#36895) 2025-12-16 18:14:47 -08:00
Shane Smiskol
95350ad854 four: simpler steer saturated alert (#36894)
* looks good

* fix

* cleanup
2025-12-16 16:56:19 -08:00
Shane Smiskol
9768109ec1 ui: generic hold gesture (#36893)
* generic

* fix

* use in home

* clean up

* rm

* clean up
2025-12-16 16:19:53 -08:00
Adeeb Shihadeh
4fa4237e3f bump msgq (#36891)
* bump msgq

* update prefix
2025-12-16 15:51:35 -08:00
Shane Smiskol
4624d8f936 four: hide untoggleable toggles (#36890)
* hide toggles

* enabled is redundant
2025-12-16 15:42:59 -08:00
Adeeb Shihadeh
bcdeec3133 Reduce pub-sub memory usage by 10x (#36884)
less mem
2025-12-16 13:27:14 -08:00
Adeeb Shihadeh
545f7c6f2a test_onroad: absolute memory usage test (#36885)
* test_onroad: absolute memory usage test

* show msgq size

* reduce a little

* bump msgq

* Revert "bump msgq"

This reverts commit 683d0ae9fc754f7b72e2bc4b256e9a3b0a60a127.
2025-12-15 22:00:39 -08:00
Shane Smiskol
507f420927 Toyota: prevent roll in ICE after pressing resume while wanting to stay stopped (#36877)
* bump

* only show alert when user can leave standstill

* cmt

* stash

* bump

* bump to master
2025-12-15 19:19:41 -08:00
Adeeb Shihadeh
752ef8696a sensord: remove last of dual IMU support (#36881) 2025-12-15 19:04:11 -08:00
Shane Smiskol
9e4c2bcacf bump opendbc (#36878)
* bump

* update docs

* bump

* gotta go fast
2025-12-15 16:41:16 -08:00
Shane Smiskol
9d9e5aa02d joystickd: add cruise control resume (#36876)
* Add cruise control resume logic based on conditions

* simple
2025-12-15 15:36:28 -08:00
Jason Wen
a1d0f6aa55 ci: use Brewfile for macOS setup and update Homebrew cache keys (#1576)
* ci: use Brewfile for macOS setup and update Homebrew cache keys

* Brewfile
2025-12-14 23:50:44 -05:00
Nayan
e7554170b8 ui: SimpleButtonActionSP (#1502)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* better padding

* this

* support for next line multi-button

* uhh

* disabled colors

* listitem -> listitemsp

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* simple button

* simple button

* add to readme

* use gui_app.sunnypilot_ui()

* i've got something to confessa

* sync

* revert

* Fix SimpleButtonActionSP not respecting enabled state

* some more

* ui: `ButtonSP`

* slight cleanup

* fixes

* fix

* unused

* try this

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: discountchubbs <alexgrant990@gmail.com>
2025-12-14 23:18:49 -05:00
Jason Wen
9c2fd8d2be ui: ButtonSP (#1575)
* ui: `ButtonSP`

* final

* revert for now

* revert
2025-12-14 22:44:51 -05:00
Adeeb Shihadeh
e2fd6f34e9 rm dead unlog_ci_segment.py 2025-12-13 12:56:32 -08:00
Jason Wen
d9bbc8f5bb ci: update prebuilt exclusions (#1572) 2025-12-13 15:17:20 -05:00
Shane Smiskol
a3c638697f WifiUi: tweak unselected button size (#36871)
looks too spaces
2025-12-13 06:26:27 -08:00
Shane Smiskol
f287d487e5 GuiScrollPanel2: fix possible crash (#36870)
fix crash
2025-12-13 06:16:31 -08:00
Shane Smiskol
7cabab69a1 comma four: follow current network (#36862)
* stay

* whoops

* whoops

* fix

* fix div by z

* we can implement layout to fix flashing

* Revert "we can implement layout to fix flashing"

This reverts commit 7278a1e2a6117aec775ef4fabee2fd68b3d064f3.

* random

* clean up

* wtf

* rev

* smooth

* we can implement layout to fix flashing

* snap looks so much better

* fix

* rev

* better name

* cmt

* less random

* even less random

* simpler

* cmt

* clean up

* clean up

* clean up
2025-12-13 06:15:31 -08:00
Shane Smiskol
716ad288bb Widget: implement layout function (#36869)
* we can implement layout to fix flashing

* reorder

* fix faster than normal snap and reduce duplicate calculations

* yes
2025-12-13 05:45:42 -08:00
Shane Smiskol
1c135f7ff2 WifiUi: pause updates while user is interacting (#36868)
int not scroll
2025-12-13 05:28:53 -08:00
Shane Smiskol
1504e10380 WifiUi: pause updates while user is scrolling (#36866)
* pause updates while user is scrolling

* clean up
2025-12-13 05:14:21 -08:00
Shane Smiskol
65008d281f comma four: fix WiFi scroll to (#36864)
* fix selection

* stash

* Revert "stash"

This reverts commit d04ed66b090641072c86b8ed7ed86dbdbf67fbd9.

* clean up

* clean up

* move

* fix
2025-12-13 04:33:27 -08:00
Shane Smiskol
2e8586fab5 WifiUi: remove delayed network panel open (#36865)
not used
2025-12-13 04:11:36 -08:00
Shane Smiskol
6c5be6ddab WifiUi: fix infinite wraps (#36863)
* fix infinite wrap

* fix selection

* Revert "fix selection"

This reverts commit 555c57922409312bf5d9efedf571994f157b9e44.

* revert

* revert

* revert

* revert

* cleaner

* cleaner

* mypy!!
2025-12-13 04:08:01 -08:00
Shane Smiskol
7a324fc377 comma four: reset WiFi SSID scroll on show (#36861)
reset scroll
2025-12-13 01:50:55 -08:00
Shane Smiskol
f4dea7977b ui: improve network sort (#36855)
* better sort

* clean up
2025-12-13 01:44:05 -08:00
Shane Smiskol
e9255d1e9c NavWidget: disable nav bar for vertical scrollers (#36857)
* disable nav bar vert scroller

* cmt
2025-12-13 01:41:01 -08:00
Shane Smiskol
350dc6a50f comma four: fix WiFi panel not starting at the top (#36859)
* fix

* fix
2025-12-13 01:39:45 -08:00
Shane Smiskol
3206784dd8 comma four: rm duplicate wifi show_event 2025-12-13 01:35:10 -08:00
Shane Smiskol
0dd59d0404 comma four: fix missing WiFi show_event (#36858)
* can't do this

* can do this
2025-12-13 01:32:06 -08:00
Jason Wen
a33e01ca96 Sync: commaai/openpilot:mastersunnypilot/openpilot:master (#1571) 2025-12-13 01:58:07 -05:00
Jason Wen
03c8494dbc Merge branch 'upstream/openpilot/master' into sync-20251213
# Conflicts:
#	README.md
#	common/api.py
#	docs/CARS.md
#	opendbc_repo
#	panda
#	selfdrive/ui/mici/layouts/offroad_alerts.py
#	system/ui/README.md
#	system/version.py
2025-12-13 01:50:42 -05:00
James Vecellio-Grant
cab2a28e10 ui: Developer panel extension (#1521)
* ui: developer panel

* comment out

* double translate

* quickboot and more efficient file checking

* use HtmlModalSP!

* ui: `HtmlModalSP`

* less

* lint

* less

* just use existing dir on PC

* grammar

* match official

* rename

* biiig

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-13 00:50:57 -05:00
Shane Smiskol
cc119b2a37 comma four: adjust Wifi scroller sizes (#36854)
* adjust sizes

* back
2025-12-12 21:37:26 -08:00
Harald Schäfer
9421e1cbfe Dark Souls 2 (#36849)
4b78e2e6-660f-4155-9105-81d4d8c658cd/400
2025-12-12 18:04:16 -08:00
Jason Wen
46257aca02 ui: HtmlModalSP (#1570)
* ui: `HtmlModalSP`

* less
2025-12-12 03:16:57 -05:00
James Vecellio-Grant
436ff5aa42 ui: OSM panel (#1515)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* dialog txt

* compare vs what used to be done before InputDialog

* merge origin raylib toggles

* tree dialog

* less trees for the planet

* the heck

* save the trees we got icons

* Update process.py

* Remove 'sunnypilot_ui' 

Removed 'sunnypilot_ui' parameter from params_keys.h

* Update raylib_screenshots.py

Removed the parameter setting for 'sunnypilot_ui' in the test.

* ui: fuzzy search helper

* better tree. fully dynamic and stuff

* rm

* more indent

* Squashed commit of the following:

commit 6b5b686fa5
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 17:16:17 2025 -0800

    more indent

commit 76bc538ac7
Merge: 53eb821dc4 c53e2134e2
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 24 17:15:48 2025 -0800

    Merge branch 'master' into rl-tree-dialog

commit 53eb821dc4
Merge: 82e1ebe97e 844f4cbc74
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 24 11:54:55 2025 -0800

    Merge branch 'master' into rl-tree-dialog

commit 82e1ebe97e
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 10:23:35 2025 -0800

    rm

commit da3ff45bb6
Merge: 41da513fca a829a1b972
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 10:19:08 2025 -0800

    Merge remote-tracking branch 'origin/rl-tree-dialog' into rl-tree-dialog

commit 41da513fca
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 10:18:43 2025 -0800

    better tree. fully dynamic and stuff

commit b2950149fb
Merge: 4fb8e4beed 924e5a3211
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 10:17:51 2025 -0800

    Merge remote-tracking branch 'origin/input-dialog' into rl-tree-dialog

commit a829a1b972
Merge: 848290d07e 9edc36ca66
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 24 10:16:28 2025 -0800

    Merge branch 'master' into rl-tree-dialog

commit 4fb8e4beed
Merge: 848290d07e af4f0f8372
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 24 10:16:20 2025 -0800

    Merge remote-tracking branch 'origin/fuzzy-dialog' into rl-tree-dialog

commit af4f0f8372
Merge: 1d5f0ab282 3cd55260d9
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 24 06:39:29 2025 -0800

    Merge branch 'master' into fuzzy-dialog

commit 1d5f0ab282
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Sun Nov 23 11:28:59 2025 -0800

    ui: fuzzy search helper

commit 848290d07e
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 21:08:07 2025 -0800

    Update raylib_screenshots.py

    Removed the parameter setting for 'sunnypilot_ui' in the test.

commit 6694928a46
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 21:06:57 2025 -0800

    Remove 'sunnypilot_ui'

    Removed 'sunnypilot_ui' parameter from params_keys.h

commit b3c90ef7b2
Merge: 0d3bc959c8 457b6634fd
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 21:06:04 2025 -0800

    Merge branch 'master' into rl-tree-dialog

commit 924e5a3211
Merge: a4ee4ba76d d92d2cb683
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 19:33:18 2025 -0800

    Merge branch 'master' into input-dialog

commit a4ee4ba76d
Merge: e911de5968 4f13a0f775
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 16:24:31 2025 -0800

    Merge branch 'master' into input-dialog

commit e911de5968
Merge: cea6e00819 0ba5cbea91
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 13:50:33 2025 -0800

    Merge branch 'master' into input-dialog

commit cea6e00819
Merge: d7b8ce86ed 8184cd8a6a
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 12:01:45 2025 -0800

    Merge branch 'master' into input-dialog

commit 0d3bc959c8
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Wed Nov 19 20:29:30 2025 -0800

    Update process.py

commit 4f3c19ffb5
Author: James Vecellio <alexgrant990@gmail.com>
Date:   Wed Nov 19 20:28:59 2025 -0800

    save the trees we got icons

commit ae5c44355d
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 13:38:04 2025 -0800

    the heck

commit 066438ad10
Merge: 9532675814 e74460f3a8
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 12:18:17 2025 -0800

    Merge remote-tracking branch 'origin/rl-tree-dialog' into rl-tree-dialog

commit 9532675814
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 12:17:52 2025 -0800

    less trees for the planet

commit e74460f3a8
Merge: c347db376a 423a7d2ed0
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Wed Nov 19 09:37:44 2025 -0800

    Merge branch 'rl-sp-toggles' into rl-tree-dialog

commit c347db376a
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 09:36:33 2025 -0800

    tree dialog

commit c9bd67b261
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 09:34:08 2025 -0800

    merge origin raylib toggles

commit d7b8ce86ed
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 17 20:21:33 2025 -0800

    compare vs what used to be done before InputDialog

commit 2d3d104658
Merge: ded02895f4 f1025f6ee9
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 17 19:24:20 2025 -0800

    Merge branch 'master' into input-dialog

commit ded02895f4
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Mon Nov 17 19:22:01 2025 -0800

    dialog txt

commit 9778a925b0
Merge: cb03d08397 08e85808c5
Author: Jason Wen <haibin.wen3@gmail.com>
Date:   Sun Nov 16 03:16:58 2025 -0500

    input dialog

commit 423a7d2ed0
Author: nayan <nayan8teen@gmail.com>
Date:   Sun Nov 16 11:15:28 2025 -0500

    fix ui preview

commit e4e10d4b87
Author: nayan <nayan8teen@gmail.com>
Date:   Sun Nov 16 11:15:22 2025 -0500

    fix callback

commit 362e9ce04b
Author: nayan <nayan8teen@gmail.com>
Date:   Sun Nov 16 09:53:28 2025 -0500

    sp raylib preview

commit 3946e643f6
Author: nayan <nayan8teen@gmail.com>
Date:   Sat Nov 15 20:24:20 2025 -0500

    optimizations

commit 0c37a38596
Author: nayan <nayan8teen@gmail.com>
Date:   Sat Nov 15 09:42:12 2025 -0500

    Lint

commit 9c5acf61c0
Author: nayan <nayan8teen@gmail.com>
Date:   Sat Nov 15 09:29:07 2025 -0500

    SP Toggles

commit 121b304fe0
Author: nayan <nayan8teen@gmail.com>
Date:   Sat Nov 15 09:28:58 2025 -0500

    init styles

commit 47d848293b
Author: nayan <nayan8teen@gmail.com>
Date:   Sat Nov 15 09:28:43 2025 -0500

    param to control stock vs sp ui

* Squashed commit of the following:

commit 70ad001add
Merge: 142663c490 844f4cbc74
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Mon Nov 24 11:54:58 2025 -0800

    Merge branch 'master' into rl-progress-bar

commit 142663c490
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Sat Nov 22 20:12:44 2025 -0800

    smoother updating

commit 4476e418dd
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Sat Nov 22 09:55:17 2025 -0800

    easier to see

commit ad66c22e88
Merge: 0c46ef5948 457b6634fd
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Sat Nov 22 07:45:05 2025 -0800

    Merge branch 'master' into rl-progress-bar

commit 0c46ef5948
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Sat Nov 22 07:42:59 2025 -0800

    freaking test dir

commit 11c19aad24
Merge: 7785238d54 8184cd8a6a
Author: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Date:   Fri Nov 21 12:01:36 2025 -0800

    Merge branch 'master' into rl-progress-bar

commit 7785238d54
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Nov 19 07:47:10 2025 -0800

    raylib: progress bar

* OSM panel

* fetching

* only show if fav_param is used in the call

* flattened and custom search query

* conditional for mypy

* sunny's new x,y makes this even easier!

* download all

* add back the rough estimate

* not sure i like the 'Download'

* simplify the path

* actual size as of today

* format

* more simple

* only show on download or delete

* loathing loathing, unadulterated loathing, i loathe it all

* loathing loathing, unadulterated loathing, i loathe it all

* # Conflicts:
#	system/ui/sunnypilot/lib/styles.py
#	system/ui/sunnypilot/widgets/tree_dialog.py

* search

* st

* Update osm.py

* one second updates:

 its heavy process, which isnt really noticeable during downloads ayways. the once a second ensures responsiveness on the ui, while also maintaining 20fps on device for country/state downloads.

* efficient? i hope

* big boi texts

* big boi texts

* use our own classes

* need to clear all params when delete all

* more

* collateral lol

* do not behave as selected if canceled during US->States dialog

* more

* instead of timestamp, let's just show formatted time

* disable button when downloading dbs

* should be the buttons being disabled

* well gotta re-enable them too

* empty country

* might be bigger now

* fixes for mapd manager

* should stay as a json

* sanitize it a bit

* revert

* only nuke if the cancel button is called

* always try to update the labels

* Revert "always try to update the labels"

This reverts commit ba0988fc06.

* re-enable button after download is complete

* disable all while downloading (till we could cancel and re-download)

* fix progress bar not filling up as intended for smaller total counts

* revert

* use new

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-12 02:40:33 -05:00
Jason Wen
928672999b ui: consolidate NoElideButtonAction (#1569) 2025-12-12 02:31:06 -05:00
Shane Smiskol
9947206ccd comma four: fix wrapping steer right (#36848)
rm extra space
2025-12-11 21:52:24 -08:00
James Vecellio-Grant
b2e7dffa59 modeld_v2: support planplus outputs (#1532)
* conditional concatenation

* v13

* modifucatuins
2025-12-11 23:24:45 -05:00
Bruce Wayne
0871a35c10 Revert "Dark Souls Model (#36764)"
This reverts commit 83dad85cdd.
2025-12-11 19:43:53 -08:00
Suyog Shinde
2d91aa5abc locationd: fix velocity calibration using wrong pose field (#36844) 2025-12-11 19:24:32 -08:00
Matt Purnell
13693e3a0a loggerd: Fix test that fails on non-TICI devices (#36846)
Only check for TICI files on TICI
2025-12-11 18:19:59 -08:00
Shane Smiskol
edede31c32 athenad: get ES256 key (#36845)
* fix

* why not format

* fix typing

* cast
2025-12-11 18:00:43 -08:00
Adeeb Shihadeh
c61ed10015 USB GPU benchmarking (#36840)
* test boot time

* lil nicer

* cleanup

* revert that

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-12-11 13:04:59 -08:00
Adeeb Shihadeh
1391434f54 setup: fix uv install fail (#36839)
* pipefail

* curl retry
2025-12-11 11:22:08 -08:00
YassineYousfi
d8125f50d2 dm: speedup stat filters convergence (#36756)
* dm: speedup stat filters convergence

* lint
2025-12-11 09:38:53 -08:00
Dean Lee
a49273d9d4 remove unused #include "common/params.h" from hardware.h (#36827)
remove include
2025-12-11 09:22:30 -08:00
rj-lynch
ff5b75d164 Refactor CarSpecificEvents Class extracting BRAND_EXTRA_GEARS (#36805)
* Brand Extra Gears Dict added. Gear data removed from CarSpecificEvents Update method, data now held in global variable.

* Added elif for Ford and Nissan events creation. BRAND_EXTRA_GEARS now extracted from CarSpecificEvents

* Amended Chrysler and Toyota create_common_events calls.

* format

* can do this!

* consis

* whoops

* type

---------

Co-authored-by: RJ <ryan@DESKTOP-4S0L5O5.localdomain>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-12-10 16:35:35 -08:00
Shane Smiskol
53b7adedc2 Fix UI timing test (#36823)
* why did no one tell me about this?!

* not necessary
2025-12-10 00:29:03 -08:00
Shane Smiskol
f78bacf96b mici ui replay: temp remove swipes (#36818)
hmm it IS nondeterm
2025-12-09 15:38:43 -08:00
Shane Smiskol
dfd56a46d2 mici cameraview: log timings (#36816)
missing from mici
2025-12-09 15:37:13 -08:00
clintonsteiner
6bbc3f4d1c pyproject: remove pytools pinning (#36812)
* pyproject: remove pytools pinning

* issue requiring pin is fixed
* https://github.com/inducer/pyopencl/issues/827

* uv lock

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-12-09 11:04:03 -08:00
Harald Schäfer
34fed9f908 URLFILE: Need to catch max retry (#36815)
Need to catch max retry
2025-12-09 10:19:10 -08:00
Adeeb Shihadeh
c85db43705 camerad: misc labeling/cleanup (#36809)
* what's 2c

* include

* no idea what this means

* register comments
2025-12-08 20:14:19 -08:00
Shane Smiskol
8d9e203130 raylib ui diff: swipe around (#36807)
* swipe support

* swipe around

* same
2025-12-08 19:25:09 -08:00
Adeeb Shihadeh
d5f6946502 camerad: probe os first 2025-12-08 18:48:58 -08:00
「 crwusiz 」
48a42a9c53 UI: Color Constants Uppercase (#36796) 2025-12-08 18:43:31 -08:00
Adeeb Shihadeh
fb807cc007 ui: video diff tool (#36737)
* video diff

* format

* duplicate

* try

* WINDOWED

* ?

* correct res

* Revert "correct res"

This reverts commit f90991192fce93a31d1b581a4f0ff93a7a972337.

* save to report/

* add duplicate

* work?

* fix

* more

* more

* and this

* ffmpeg

* branch

* uncmt

* test preview

* Revert "uncmt"

This reverts commit b02404dbbe515fd861717f831c7bb0243442ddbc.

* create openpilot_master_ui_mici_raylib

* ahh

* push to master

* copy and always run

* test

* does cmt break it?

* who did this

* fix?

* fix that

* hmm

* hmm

* ah this was moving it, and then the job below didn't run on master

* google ai overview lied to me

* use markdown to start

* need to add to one branch

* ????

* oof

* no

* this work?

* test

* try this

* clean up master branch name

* more cleanup

more cleanup

* don't fail for no diff!

don't fail for no diff!

* back

* add to cmt

* test it

* should work

* fix that

* back

* clean up

* clean up

* save to report

* pull_request_target

* sort

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-12-08 18:39:47 -08:00
Matt Purnell
7119412d35 updated: fix skipped test case (#36786)
Fix three failing tests
2025-12-08 16:41:45 -08:00
Chechulin Serhii
fadf7ff1e5 ui: feature Ukrainian translation (#36646)
* Add Ukrainian lang

* update_translations.py

* Add Ukrainian strings

* Small patch to display translated update states

* Revert "Small patch to display translated update states"

This reverts commit b0545f4e109f451a21e4e5884259dbb881d7a58e.

* Revert "update_translations.py"

This reverts commit 79eea20c33f1b1d542b62a782ab1b67bc9277026.

* fix so these meaningless edits
2025-12-08 16:40:29 -08:00
Matt Purnell
cce2e4d357 tools: Handle smaller terminal sizes in replay (#36766)
* Only show help if there's room for it

* show less

* wording
2025-12-08 16:38:35 -08:00
Dean Lee
4e74e0f755 cabana: fix UI hang when switching streams (#36735)
fix UI hang when switching streams
2025-12-08 16:36:55 -08:00
Dean Lee
a6645a1be1 cabana: add automatic session save/restore (#36736)
adds auto session save/store
2025-12-08 16:36:35 -08:00
「 crwusiz 」
239d690a43 Multilang: update kor translation (#36795) 2025-12-08 16:32:56 -08:00
James Vecellio-Grant
323b793a83 ui: software panel (#1518)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* dialog txt

* compare vs what used to be done before InputDialog

* introducing ui_state_sp for py

* raylib: input dialog

* raylib: SP Toggles

* raylib: SP Panels

* raylib: Option Control

* init

* param to control stock vs sp ui

* better

* tree dialog, progress bar widget cool stuff

* merge origin raylib toggles

* tree dialog

* less trees for the planet

* the heck

* add ui_update callback

* save the trees we got icons

* Update process.py

* yesssssssssss

* utilize ON_COLOR constant form op system

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* # Conflicts:
#	system/ui/sunnypilot/widgets/list_view.py
#	system/ui/sunnypilot/widgets/option_control.py

* Merge remote-tracking branch 'openpilot/master' into nov-19-sync

* ui: `GuiApplicationExt`

* add to readme

* scroller_tici :)

* use gui_app.sunnypilot_ui()

* # Conflicts:
#	selfdrive/ui/layouts/main.py
#	selfdrive/ui/sunnypilot/layouts/settings/cruise.py
#	selfdrive/ui/sunnypilot/layouts/settings/display.py
#	selfdrive/ui/sunnypilot/layouts/settings/models.py
#	selfdrive/ui/sunnypilot/layouts/settings/navigation.py
#	selfdrive/ui/sunnypilot/layouts/settings/osm.py
#	selfdrive/ui/sunnypilot/layouts/settings/steering.py
#	selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py
#	selfdrive/ui/sunnypilot/layouts/settings/trips.py
#	selfdrive/ui/sunnypilot/layouts/settings/vehicle.py
#	selfdrive/ui/sunnypilot/layouts/settings/visuals.py
#	system/ui/sunnypilot/widgets/option_control.py

* init value

* Remove 'sunnypilot_ui' 

Removed 'sunnypilot_ui' parameter from params_keys.h

* Update raylib_screenshots.py

Removed the parameter setting for 'sunnypilot_ui' in the test.

* easier to see

* Update progress_bar.py

* try something

* adjust placement

* more simple

* smoothing updating components

* ui: fuzzy search helper

* ui_state_sp

* description!

* fuzzy af searching

* better tree. fully dynamic and stuff

* rm

* rearrange

* license

* idk how maybe the merge

* more indent

* more indent

* cleanup

* temporaily revert ui_state_sp

* only show if fav_param is used in the call

* conditional for mypy

* mypy

* conditional for mypy

* str concatenation to reduce line len

* level

* sunny's new x,y makes this even easier!

* refreshing half a second seems legit.

* software stuffs

* rm

* add

* loathing loathing, unadulterated loathing, i loathe it all

* loathing loathing, unadulterated loathing, i loathe it all

* # Conflicts:
#	system/ui/sunnypilot/lib/styles.py
#	system/ui/sunnypilot/widgets/tree_dialog.py

* search

* ds

* hide on advanced controls

* some

* handle toggle confirmation

* sunny, NO

* nayan, NO !!

* easier

* move

* move it!

* add more

* need to show current branch

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-07 01:36:02 -05:00
Jason Wen
96c2650ac4 ui: improve TreeOptionDialog node selection and item handling (#1563) 2025-12-07 01:31:00 -05:00
Jason Wen
1807b193fa ui: preserve and update current_ref in TreeOptionDialog init (#1562)
* ui: preserve and update `current_ref` in `TreeOptionDialog` init

* do it in init instead
2025-12-07 00:58:33 -05:00
Nayan
5007437969 ui: enforce fixed dimensions for ToggleSP (#1558)
fix rect

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-05 22:58:53 -05:00
Nayan
93c1c713a9 ui: toggle should only toggle toggle - don't toggle description with toggle. Yeah, that! (#1559)
@sunnyhaibin, please!

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-05 22:52:41 -05:00
Shane Smiskol
d4d6134d3b UnifiedLabel: fix clipping descenders (#36793)
* fix

* can also do this

* but then y is off. this is from font_scale I think

* fix

* cmt
2025-12-05 18:18:58 -08:00
Robbe Derks
0965650f61 Bump panda (#36783)
* panda bump

* try this one

* this breaks it?

* still broken, right?

* fixed?

* second try
2025-12-05 23:12:39 +01:00
Jason Wen
d382cd08e5 ui: adjust Sponsor and Pairing button behaviors in sunnylink panel (#1557)
ui: adjust sponsor and pairing button behaviors in sunnyLink panel
2025-12-05 16:49:29 -05:00
James Vecellio-Grant
57eca29970 ui: Models panel (#1495)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* dialog txt

* compare vs what used to be done before InputDialog

* introducing ui_state_sp for py

* raylib: input dialog

* raylib: SP Toggles

* raylib: SP Panels

* raylib: Option Control

* init

* param to control stock vs sp ui

* better

* tree dialog, progress bar widget cool stuff

* merge origin raylib toggles

* tree dialog

* less trees for the planet

* the heck

* add ui_update callback

* save the trees we got icons

* Update process.py

* yesssssssssss

* utilize ON_COLOR constant form op system

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* # Conflicts:
#	system/ui/sunnypilot/widgets/list_view.py
#	system/ui/sunnypilot/widgets/option_control.py

* Merge remote-tracking branch 'openpilot/master' into nov-19-sync

* ui: `GuiApplicationExt`

* add to readme

* scroller_tici :)

* use gui_app.sunnypilot_ui()

* # Conflicts:
#	selfdrive/ui/layouts/main.py
#	selfdrive/ui/sunnypilot/layouts/settings/cruise.py
#	selfdrive/ui/sunnypilot/layouts/settings/display.py
#	selfdrive/ui/sunnypilot/layouts/settings/models.py
#	selfdrive/ui/sunnypilot/layouts/settings/navigation.py
#	selfdrive/ui/sunnypilot/layouts/settings/osm.py
#	selfdrive/ui/sunnypilot/layouts/settings/steering.py
#	selfdrive/ui/sunnypilot/layouts/settings/sunnylink.py
#	selfdrive/ui/sunnypilot/layouts/settings/trips.py
#	selfdrive/ui/sunnypilot/layouts/settings/vehicle.py
#	selfdrive/ui/sunnypilot/layouts/settings/visuals.py
#	system/ui/sunnypilot/widgets/option_control.py

* init value

* Remove 'sunnypilot_ui' 

Removed 'sunnypilot_ui' parameter from params_keys.h

* Update raylib_screenshots.py

Removed the parameter setting for 'sunnypilot_ui' in the test.

* easier to see

* Update progress_bar.py

* try something

* adjust placement

* more simple

* smoothing updating components

* ui: fuzzy search helper

* ui_state_sp

* description!

* fuzzy af searching

* better tree. fully dynamic and stuff

* rm

* rearrange

* license

* idk how maybe the merge

* more indent

* more indent

* cleanup

* temporaily revert ui_state_sp

* only show if fav_param is used in the call

* conditional for mypy

* mypy

* conditional for mypy

* str concatenation to reduce line len

* level

* sunny's new x,y makes this even easier!

* refreshing half a second seems legit.

* loathing loathing, unadulterated loathing, i loathe it all

* loathing loathing, unadulterated loathing, i loathe it all

* # Conflicts:
#	system/ui/sunnypilot/lib/styles.py
#	system/ui/sunnypilot/widgets/tree_dialog.py

* Update models.py

* Change BUTTON_DISABLED_BG_COLOR to a lighter shade

* I think this is it

* Update tree_dialog.py

* Update models.py

* Update models.py

* oops, angry f string

* bool

* Update ui_state.py

* Update ui_state.py

* wtf where'd the end quote go lol

* some

* more

* quick test

* Revert "quick test"

This reverts commit fb97afa54c.

* try this out

* use sp's

* cap

* how weird?

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-05 03:14:53 -05:00
Nayan
1d9bda65fe ui: sunnylink panel (#1494)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* sunnylink state

* introducing ui_state_sp for py

* poll from ui_state_sp

* cloudlog & ruff

* param to control stock vs sp ui

* better

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* fetch only when connected to network

* sponsor & pairing qr

* init panel elements

* backup & restore

* fruit loops

* update

* enable, disable, enable, disable

* handle layout updates

* not needed

* change it up

* better

* scroller -> scroller_tici

* optimizations

* remove Params

* fix button disablement

* ui_state_sp changes

* keep enabled

* add header text

* dad jokes?

* no

* lint? Lint!

* final touches

* add sp font

* use sp font

* some

* ui: add right-aligned value display support in `ListItem` (in another pr)

* display sunnylink device id

* display sunnylink device id and sponsor tiers

* ui: add right-aligned value display support in `ListItemSP`

* lint

* styles

* lint

* ui: introduce customizable value colors for `ButtonActionSP` and `ListViewSP`

* support

* convert to str

* disable if paired

* colored sponsors

* hide and disable pairing button if paired

* texts

* ui: sunnypilot sponsor tier color mapping

* lint

* dongle id for ui preview

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-12-05 01:01:55 -05:00
Jason Wen
b5b170b65a ui: sunnypilot sponsor tier color mapping (#1556)
* ui: sunnypilot sponsor tier color mapping

* lint
2025-12-05 00:30:48 -05:00
Jason Wen
c6818bd07f ui: customizable value colors for ButtonActionSP and ListViewSP (#1555)
ui: introduce customizable value colors for `ButtonActionSP` and `ListViewSP`
2025-12-04 21:41:58 -05:00
Shane Smiskol
224e2c271b Revert "ui: fix dialog memory leak" (#36787)
Revert "ui: fix dialog memory leak (#36767)"

This reverts commit 45b7d60263.
2025-12-04 16:51:18 -08:00
Jason Wen
d75d80b885 ui: add right-aligned value display support in ListItemSP (#1554)
* ui: add right-aligned value display support in `ListItemSP`

* lint

* styles
2025-12-04 17:53:33 -05:00
Harald Schäfer
e72e5d4ebe beeps in key (#36765)
beeps in keyt
2025-12-04 13:11:27 -08:00
Shane Smiskol
f962a36fd8 Fix ui crashing replay/selfdrived (#36760)
* fix

* clean up

* type hint
2025-12-04 02:39:41 -08:00
Dean Lee
2947af42fc ui: fix TraningGuide leak (#36763)
* fix TraningGuide leak

* other thing

* this is truly the simplest way

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-12-04 02:23:37 -08:00
Shane Smiskol
cd9b08492e ui: small TrainingGuide clean up 2025-12-04 02:00:45 -08:00
Shane Smiskol
45b7d60263 ui: fix dialog memory leak (#36767)
* weakref alternative

* and here

* clean up

* fix

* rm
2025-12-04 01:56:38 -08:00
Dean Lee
93f2076c7e ui: fix crash caused by double shader unload in CameraView (#36778)
fix double free isuue
2025-12-04 01:54:11 -08:00
Nayan
1f967668a5 ui: add sunnypilot font (#1552)
add sp font
2025-12-04 01:51:08 -05:00
Shane Smiskol
4edbc7d0cf DriverCameraDialog: proper clean up (#36775)
* fixes leak

* wait can't do this, we need close after all

* wait can't do this, we need close after all

* clean up memory
2025-12-03 22:19:30 -08:00
Shane Smiskol
cc7dd066d2 ui: call modal hide_event (#36772)
* start, not fully working since hide is called before last render

* clean up
2025-12-03 21:55:05 -08:00
Shane Smiskol
9e55577cc7 Clean up DM dialog CameraView bound method (#36770)
* clean up

* why not?

* clean up
2025-12-03 20:41:58 -08:00
Shane Smiskol
7ea6cfcbdf remove unecessary function 2025-12-03 20:00:19 -08:00
Harald Schäfer
83dad85cdd Dark Souls Model (#36764)
a4cf2707-3d69-49ea-af8b-f91cd3285249/400
2025-12-03 12:55:33 -08:00
Jason Wen
bea05d4624 ui: add pressed state and visual feedback for search button in TreeOptionDialog (#1547)
* ui: add pressed state and visual feedback for search button in `TreeDialog`

* less
2025-12-03 02:29:33 -05:00
Jason Wen
b9c54e07fb Revert "ci: disable macos builds" (#1529)
Revert "ci: disable macos builds (#1514)"

This reverts commit 42b2e1534b.
2025-12-03 01:18:00 -05:00
James Vecellio-Grant
c560ac43aa ui: NetworkUISP (#1535)
* ui: network panel

* refactor adding scan button without overriding upstream layout

* trigger immediate network refresh instead of waiting

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-03 01:08:38 -05:00
David
a83c64ffbd ui: fix sidebar scroll in UI screenshots (#1519)
* fix: delay between scroll clicks; add larger delay; fix cruise button

* scroll more for cruise

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-03 00:56:19 -05:00
Nayan
f08dfa1c14 ui: sunnylink client-side implementation (#1488)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* sunnylink state

* introducing ui_state_sp for py

* poll from ui_state_sp

* cloudlog & ruff

* param to control stock vs sp ui

* better

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* fetch only when connected to network

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-03 00:20:40 -05:00
Maxime Desroches
5fd0906164 allow restarting processes after crash (#36755)
more
2025-12-02 17:10:24 -08:00
Maxime Desroches
e7d349bf36 Revert "ui: restart if crash (#36746)" (#36754)
This reverts commit fa18bb9261.
2025-12-02 16:45:09 -08:00
Bruce Wayne
5393308d03 Logreader: print errors 2025-12-02 15:54:21 -08:00
YassineYousfi
dc02a2d385 dm: adjust cold start pose offsets (#36739)
* dm: adjust cold start offsets and thresholds

* change just offsets for now
2025-12-02 15:17:59 -08:00
Chechulin Serhii
63563c3561 ui: fix - translate display text of updater_state (#36649)
* Add updater_state translation

* Move STATE_TO_DISPLAY_TEXT on top
2025-12-02 13:13:13 -08:00
Dean Lee
ae6250e685 ui/CameraView: use consistent 2-space indentation (#36748)
use consistent 2-space indentation
2025-12-02 13:09:24 -08:00
Shane Smiskol
ae402d3ac7 Revert "ui: speed up mici/AugmentedRoadView by optimizing _calc_frame_matrix caching" (#36749)
Revert "ui: speed up `mici/AugmentedRoadView` by optimizing _calc_frame_matri…"

This reverts commit 1052435391.
2025-12-02 13:02:01 -08:00
James Vecellio-Grant
3c5841ff02 ui: vehicle brand settings (#1509)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* dialog txt

* compare vs what used to be done before InputDialog

* introducing ui_state_sp for py

* param to control stock vs sp ui

* better

* add ui_update callback

* better padding

* this

* support for next line multi-button

* uhh

* disabled colors

* listitem -> listitemsp

* listitem -> listitemsp

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* lint

* no fancy toggles :(

* match them

* mici scroller - no touchy

* no

* more

* size adjustments

* fix scroller. yay

* ui vehicle panel: platform selector

* some brands

* platform selector

* bruh

* ui_state_sp

* o

* is_offroad() and format

* huh

* use in toggles panel

* ugh. no

* better & animated

* lint

* cleanup

* lint. LINT

* slight

* rebase

* no more

* rebae

* vic

* v

* # Conflicts:
#	system/ui/sunnypilot/lib/styles.py
#	system/ui/sunnypilot/widgets/helpers/fuzzy_search.py

* loathing loathing, unadulterated loathing, i loathe it all

* more changes!

* Update styles.py

* set visibility

* Update hyundai.py

* add padding

* use symlink on sp side

* use make from json and show all actual makes

* all done!

* Revert "all done!"

This reverts commit 595c45f057.

* reimpl onroad/offroad confirmation

* use global offroad directly

* ui: highlight on pressed, and less indent

* inherit MultiOptionDialog main buttons

* align top level folders to the edge properly

* lint

* lint

* handle folder presses too

* ui: overridable title and subtitle for `TreeOptionDialog`

* override TreeOptionDialog title and subtitle

* lint

* more

* ui: magnifying glass icon and new search bar style in `TreeDialog`

* cleanup

* ui: recreate search dialog with the latest query

* make model year but display as platform

* move into settings directory

* move into dir

* sync

* equality

* use singleton directly

* also use singleton directly

* inherit from base class

* include all brands

* added refresh

* always assume it's subaru

* slight

* split get brand

* hyundai changes

* tesla changes

* do not allow while offroad

* fix

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: nayan <nayan8teen@gmail.com>
2025-12-02 14:44:50 -05:00
Jason Wen
138d637bbd ui: couple Platform Selector refresh in Vehicle panel state updates (#1545) 2025-12-02 13:34:35 -05:00
Jason Wen
eda189c564 ui: refine height calculations and action placement in ListViewSP (#1543)
* ui: refine height calculations and action placement in `ListViewSP`

* relative
2025-12-02 02:29:29 -05:00
Harald Schäfer
cfb0a1c18c URLFile multirange (#36740)
* url file multirange

* cleanup urlfile

* time

* fixup

* raise

* Diskfile
2025-12-01 23:11:03 -08:00
Maxime Desroches
fa18bb9261 ui: restart if crash (#36746)
* simpler

* mypy your are going to be replaced very soon
2025-12-01 22:55:14 -08:00
Trey Moen
cabfa7b735 Revert "esim: remove bootstrap and delete (#36732)" (#36747)
This reverts commit 6d04251517.
2025-12-01 22:45:11 -08:00
Maxime Desroches
65e551c671 Handle invalid frame fd when creating EGL image (#36743)
catch
2025-12-01 21:32:07 -08:00
Maxime Desroches
62b7abcd91 Fix raylib ui spamming API calls (#36745)
fix
2025-12-01 21:13:43 -08:00
James Vecellio-Grant
04504d47f3 ui: Platform Selector (#1508)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* dialog txt

* compare vs what used to be done before InputDialog

* introducing ui_state_sp for py

* param to control stock vs sp ui

* better

* add ui_update callback

* better padding

* this

* listitem -> listitemsp

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* lint

* no fancy toggles :(

* match them

* mici scroller - no touchy

* no

* more

* size adjustments

* fix scroller. yay

* ui vehicle panel: platform selector

* platform selector

* bruh

* ui_state_sp

* huh

* rebase

* rebae

* vic

* # Conflicts:
#	system/ui/sunnypilot/lib/styles.py
#	system/ui/sunnypilot/widgets/helpers/fuzzy_search.py

* loathing loathing, unadulterated loathing, i loathe it all

* more changes!

* Update styles.py

* add padding

* use symlink on sp side

* use make from json and show all actual makes

* all done!

* Revert "all done!"

This reverts commit 595c45f057.

* reimpl onroad/offroad confirmation

* use global offroad directly

* ui: highlight on pressed, and less indent

* inherit MultiOptionDialog main buttons

* align top level folders to the edge properly

* lint

* lint

* handle folder presses too

* ui: overridable title and subtitle for `TreeOptionDialog`

* override TreeOptionDialog title and subtitle

* lint

* more

* ui: magnifying glass icon and new search bar style in `TreeDialog`

* cleanup

* ui: recreate search dialog with the latest query

* make model year but display as platform

* move into settings directory

* move into dir

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-02 00:02:33 -05:00
Maxime Desroches
dc654b439a Revert "Fix raylib ui spamming API calls (#36700)" (#36744)
This reverts commit 26261387f8.
2025-12-01 20:48:04 -08:00
Jason Wen
7ba9876fa4 ui: recreate search dialog with the latest query (#1542) 2025-12-01 23:44:01 -05:00
Jason Wen
f312c011e8 ui: magnifying glass icon and new search bar style in TreeDialog (#1541)
* ui: magnifying glass icon and new search bar style in `TreeDialog`

* cleanup
2025-12-01 23:33:26 -05:00
Jason Wen
9ee965d2e0 ui: overridable title and subtitle for search query in TreeOptionDialog (#1538)
* ui: overridable title and subtitle for `TreeOptionDialog`

* lint
2025-12-01 21:35:28 -05:00
James Vecellio-Grant
859745ea86 ui: tree dialog improvements (#1537)
* ui: highlight on pressed, and less indent

* inherit MultiOptionDialog main buttons

* align top level folders to the edge properly

* lint

* handle folder presses too

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-12-01 17:31:37 -05:00
Dean Lee
693c83f74c replay: fix dangling pointers in logging calls (#36738)
fix dangling pointers in logging calls
2025-12-01 13:32:21 -08:00
James Vecellio-Grant
79fa8803b6 ui: add padding above tree dialog buttons (#1533)
add padding
2025-12-01 09:22:49 -05:00
Trey Moen
8ffe3f287e fix: openpilot build on ubuntu aarch64 (#36675)
breaks on linux
2025-11-30 16:09:50 -08:00
Dean Lee
749e236bc0 ui: fix EGL_BAD_MATCH error when running profile_onroad.py on device (#36608)
fix failed to create EGL image:12297 error on device
2025-11-30 16:06:33 -08:00
Adeeb Shihadeh
151d256dd6 add param for agnos power monitor 2025-11-30 15:29:40 -08:00
Adeeb Shihadeh
436e3dec3e manager: write power monitor flag atomically (#36734) 2025-11-30 15:14:31 -08:00
Adeeb Shihadeh
7521fd11e2 common: rename atomic_write_in_dir -> atomic_write (#36733)
rename
2025-11-30 15:08:32 -08:00
MVL
ff755ed4bf Honda - Rename AcuraWatch Plus to AcuraWatch (#36726)
* Rename AcuraWatch Plus to AcuraWatch

* Rename AcuraWatch Plus to AcuraWatch
2025-11-30 15:04:17 -08:00
Trey Moen
6d04251517 esim: remove bootstrap and delete (#36732)
init
2025-11-30 14:43:29 -08:00
Adeeb Shihadeh
970afa9683 bump to 0.10.3 2025-11-30 14:19:37 -08:00
David
cd7e362333 ui: Add RECORD=1 for direct frame recording (#36729)
* ui: add real-time video recording functionality with ffmpeg support

* fix: record at consistent frame rate

* add spaces

* fix type

* refactor: RECORD_FRAMES variable and related logic

* fix: remove unnecessary texture check

* support missing output extension

* add wait for close with timeout

* fix: ensure RECORD_OUTPUT has the correct file extension

* flush on close and terminate if times out closing

* ffmpeg hide banner

* reduce ffmpeg spam

* refactor: streamline ffmpeg arguments for video encoding

* refactor: move size arg to variable and add yub420p conversion for native support

* use render_width and render_height for size

* fix: ensure even dimensions for video encoding when recording

* rm itertools

* simple

* cleanup

* docs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-11-30 13:34:37 -08:00
Shane Smiskol
85a162dd43 more scons nodes 2025-11-30 02:48:05 -08:00
James Vecellio-Grant
c68c914444 ui: tree dialog widget (#1493)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* dialog txt

* compare vs what used to be done before InputDialog

* merge origin raylib toggles

* tree dialog

* less trees for the planet

* the heck

* save the trees we got icons

* Update process.py

* Remove 'sunnypilot_ui' 

Removed 'sunnypilot_ui' parameter from params_keys.h

* Update raylib_screenshots.py

Removed the parameter setting for 'sunnypilot_ui' in the test.

* ui: fuzzy search helper

* better tree. fully dynamic and stuff

* rm

* more indent

* only show if fav_param is used in the call

* conditional for mypy

* sunny's new x,y makes this even easier!

* loathing loathing, unadulterated loathing, i loathe it all

* more changes!

* more changes!

* Update BUTTON_DISABLED_BG_COLOR to a lighter shade

* Update tree_dialog.py

* final

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-30 01:21:15 -05:00
Nayan
0f7498e214 ui: UIStateSP (#1489)
* introducing ui_state_sp for py

* param to control stock vs sp ui

* better

* add ui_update callback

* Revert "add ui_update callback"

This reverts commit 4da32cc009.

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* add cp_sp to ui_state_sp

* fix ui crash

* update params

* more

* slightly more

* add directly to the list

* nah

* move around

* rename

* call before param time tracker is updated

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-30 00:54:03 -05:00
Dean Lee
8de8946374 ui: skip _draw_set_speed when alpha is 0 (#36709)
* Skip _draw_set_speed when alpha is 0 to reduce unnecessary draw calls

* Update selfdrive/ui/mici/onroad/hud_renderer.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-29 03:15:41 -08:00
Dean Lee
f1c2b1df7f ui: fix CameraView crash in mici due to stale frame (#36710)
fix CameraView crash caused by stale frame
2025-11-29 03:14:23 -08:00
Shane Smiskol
1b20567c98 Mici keyboard: alpha filter for key bg (#36720)
* filter

* tune

* fix
2025-11-29 02:30:32 -08:00
Dean Lee
6c39f6bb53 ui: Fix scroll logic for non-scrollable content (bounds_size > content_size) to prevent jitter (#36693)
* Fix scroll logic for non-scrollable content to prevent jitter

* one thing

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-29 02:21:15 -08:00
Shane Smiskol
22003fd10a rl.BLANK 2025-11-29 02:15:38 -08:00
Shane Smiskol
088fc1cab1 Unified label: add scrolling (#36717)
* almost

* works!

* clean up

* fix

* trash

* Revert "trash"

This reverts commit 951d63382810d444fe08103f406a8c490cfcbe25.

* fix some bugs and use

* clean up

* clean up

* fix clipping

* clean up

* fix
2025-11-29 02:15:10 -08:00
Shane Smiskol
cb718618d1 fix multi option dialog text centering 2025-11-29 02:12:09 -08:00
Shane Smiskol
d6de3572ca UnifiedLabel: split render (#36719)
* split

* rect
2025-11-29 01:26:17 -08:00
James Vecellio-Grant
ebca4fc901 ui: fuzzy search helper (#1507)
* ui: fuzzy search helper

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-29 04:19:48 -05:00
Jason Wen
023b842e3c controlsd_ext: use time.monotonic to check params intervals (#1481)
* controlsd_ext: use time.monotonic to check params intervals

* test

* Revert "test"

This reverts commit 151ac3bc68.
2025-11-29 03:58:58 -05:00
Shane Smiskol
d8c316faef Fix wifi settings NavWidget 2025-11-29 00:56:43 -08:00
DevTekVE
a4454721ea sunnylink: dynamic param metadata (#1522)
* feat(params): add support for parameter metadata retrieval

- Introduced `getKeyMetadata` method for accessing metadata associated with params.
- Enhanced `getParamsAllKeysV1` to include metadata parsing and optional dynamic enum generation.
- Extended unit tests to verify metadata parsing, enum mapping, and edge cases.

* Revert "feat(params): add support for parameter metadata retrieval"

This reverts commit 865b695ff9.

* update: integrate params metadata management and unit tests

- Added `update_params_metadata.py` to manage and update parameters metadata.
- Enhanced `getParamsAllKeysV1` to include metadata for params.
- Created comprehensive tests (`test_params_metadata.py`, `test_params_sync.py`) to validate metadata integrity and params consistency.

* update: improve params metadata readability and enhance enums

- Renamed params titles for clarity and consistency.
- Added enum options and mappings to selected params for better usability.

* update: enhance params metadata with improved enum structures

- Replaced plain enum lists with detailed objects (`value`, `label`) for clarity.
- Standardized parameter options for consistency across metadata.

* update: add validation constraints to params metadata

- Introduced `min`, `max`, and `step` attributes for improved parameter range validation.
- Enhances user input handling and ensures consistency in metadata.

* lint

* more lint stuff and permissions

* does this suffice?

* more lint

* update: refine params type hinting and remove unused shebang

- Adjusted type annotation in `params_dict` for better compatibility.
- Removed unnecessary shebang from `test_params_metadata.py`.

* update: expand test coverage for params metadata validation

- Added detailed test cases to ensure metadata consistency (`options`, `constraints`, `titles`).
- Validates API response alignment with `params_metadata.json`.

* the finals

* names

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-29 03:52:01 -05:00
James Vecellio-Grant
3e29a0ccfe ui: ProgressBarAction (#1492)
* raylib: progress bar

* freaking test dir

* easier to see

* smoother updating

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-29 03:30:18 -05:00
James Vecellio-Grant
bee820f8ed ui: InputDialogSP (#1484)
* dialog txt

* compare vs what used to be done before InputDialog

* rm

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-29 03:23:03 -05:00
Nayan
99ed90d459 ui: Option Control (#1479)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* Option Control

* Need this

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* simplify

* I. SAID. SIMPLIFY.

* AAARGGGGGG.....

* option control value fix

* forgot about the setter

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* ugh. no

* new style. old style.

* lint

* rename

* old but gold <3

---------

Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-11-29 03:10:59 -05:00
Shane Smiskol
65f18c363b Mici advanced network settings (#36716)
* add back

* forgot

* clean up
2025-11-28 23:41:55 -08:00
Shane Smiskol
c32e2898ac mici: split wifi and network settings (#36715)
* split

* clean up

* better
2025-11-28 23:29:13 -08:00
Jason Wen
aa5a7ecb31 ci: no parallelism for LiveLocationKalman compile (#1531)
* ci: no parallelism for locationd compile

* just LLK

* bump to 2
2025-11-29 02:24:12 -05:00
Jason Wen
9595a6f246 ui Qt: remove leftover files (#1530) 2025-11-28 20:46:09 -05:00
Harald Schäfer
d3532d7d6f URLFile: catch more (#36712)
* catch

* linter has a point
2025-11-28 17:25:54 -08:00
DevTekVE
1d6d0fb85c ci: prevent build OOM by throttling locationd concurrency (#1527)
* ci: add conditional swap creation to prebuilt workflow

- Dynamically creates an 8GB swap file on systems with less than 8GB RAM.
- Ensures builds complete reliably on low-memory environments.
- Introduced cleanup step to remove swap after workflow execution.

* Nice save

* clean

* reduce swap size in prebuilt workflow
- Adjusted swap file size from 8GB to 4GB to optimize resource usage.

* remove swap creation from prebuilt workflow
- Simplified workflow by removing dynamic swap file creation and cleanup.
- Adjusted resource management to rely on existing system resources.

* update sunnypilot build workflow to use explicit script calls

- Replaced `op` commands with explicit `/data/openpilot/tools/op.sh` script calls for better reliability and clarity.

* update sunnypilot build workflow to use systemd for process management

- Replaced `/data/openpilot/tools/op.sh` script calls with `systemctl` commands for improved compatibility and reliability.
- Ensures consistent resource management during start and stop operations.

* Splitting a bit the build then?

* split build steps in sunnypilot prebuilt workflow

- Added separate build steps for `modeld`, `modeld_v2`, and `locationd` with descriptive messages.
- Improves logging and clarity during the build process.

* limit locationd parallel processes aiming to help with resource consumption

* typo

* adding op's location d AND bumping to 4 cores for them

* Apply suggestion from @sunnyhaibin

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-28 20:19:30 -05:00
Jason Young
f07a40deb4 regen CARS.md (#36711) 2025-11-28 13:08:07 -05:00
Nayan
4914445415 ui: sunnypilot MultiButtonControl (#1478)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* multi-button

* Lint

* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* better padding

* this

* support for next line multi-button

* uhh

* disabled colors

* listitem -> listitemsp

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* use in toggles panel

* ugh. no

* better & animated

* lint

* cleanup

* lint. LINT

* slight

* default no inline ty <3

* style change

* move stuff around

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-28 01:02:31 -05:00
Dean Lee
1052435391 ui: speed up mici/AugmentedRoadView by optimizing _calc_frame_matrix caching (#36669)
speed up AugmentedRoadView by optimizing _calc_frame_matrix caching
2025-11-27 05:58:53 -08:00
Shane Smiskol
ce596424cf Fix steering arc artifacts (#36707)
* fix arc artifacts

* works but how

* also this

* Revert "also this"

This reverts commit e8d5ed9af15568dcb178dd6da7a14d2c6191010e.

* clean up

* nl

* clean up

* more

* print

* print
2025-11-27 04:16:38 -08:00
Shane Smiskol
3959200a5b Scroll panel 2: use float for offset (#36705)
* use float internally

* use it everywhere -- this fixes all the problemS?!

* round it everywhere

* this looks so much better than before

* rm
2025-11-27 03:25:30 -08:00
Dean Lee
f8d0f22344 ui: ensure auto-scroll stops correctly near target (#36686)
ensure auto-scroll stops correctly near target
2025-11-27 03:22:15 -08:00
Calvin Park
0a0fadb16a Skip onboarding on PC (#36688)
* Skip onboarding on PC

* do this instead

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-27 02:44:13 -08:00
Dean Lee
d0489062b5 ui: remove unused members and variables (#36677)
remove unused members and variables
2025-11-27 02:28:51 -08:00
Dean Lee
630e14fd7f ui: avoid unnecessary text cache invalidation in UnifiedLabel (#36676)
avoid unnecessary text cache invalidation in UnifiedLabel
2025-11-27 02:28:13 -08:00
Najib Muhammad
394f580f16 fix the CI Weekly Report workflow so it does not fail on forks (#36664) 2025-11-27 02:26:29 -08:00
Dean Lee
4ef82c4119 ui: optimize matrix operations in scroller rendering (#36668)
optimize matrix operations
2025-11-27 02:20:49 -08:00
Dean Lee
4bd6fb0995 ui: fix unconditional rl.end_scissor_mode() call in MiciLabel (#36660)
fix incorrect end_scissor_mode usage
2025-11-27 02:17:16 -08:00
Logesh R
ae534ddeab docs: Fix "Turn the speed blue" tutorial for Raylib UI (#36591)
* docs: Fix "Turn the speed blue" tutorial for Raylib UI

* just

* obv

* not replay

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-27 02:07:56 -08:00
David
ae6ada4162 lint: Add PLE rule to ruff (#36595)
* update linting rules to include new PLE (pylint error) rule

* fix lint error
2025-11-27 01:52:25 -08:00
Dean Lee
b8d55987c2 ui: extract and optimize mouse event processing (#36564)
* extract and optimize mouse event processing

* rm slot

* merge mici mastere

* add mouse

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-27 01:50:36 -08:00
Shane Smiskol
26261387f8 Fix raylib ui spamming API calls (#36700)
* intern

* start

* move

* common caching

* use constant for slep

* works

* add gating back

* clean up

* more

* match cache logic

* hate this circular

* not needed since sync

* no need for lock?

* even qt had something like _load_initial_state for tests, keep

* clean up

* clean up

* clean up

* loading json as string works, else it will fail to parse json, catch that and log, and next api call will overwrite

* move over firehose

* clean up

* fix test

* no

* flip

* more

* match qt

* consistent

* clean up

* cmt

* fix test!
2025-11-27 01:37:16 -08:00
Shane Smiskol
946fd3f387 NavWidget: draw black above top of widget when dismissing (#36702)
draw rec
2025-11-27 01:00:33 -08:00
Shane Smiskol
50a797b0be De-duplicate firehose layout (#36703)
* Reapply "De-duplicate firehose layout (#36701)"

This reverts commit 302e448b93.

* fix

* was here
2025-11-27 01:00:03 -08:00
Shane Smiskol
302e448b93 Revert "De-duplicate firehose layout (#36701)"
This reverts commit dd51bf2021.
2025-11-27 00:52:50 -08:00
Shane Smiskol
dd51bf2021 De-duplicate firehose layout (#36701)
* consistent name

* dedup

* FMT

* not sure why two
2025-11-27 00:46:33 -08:00
YassineYousfi
49178539f3 dm: DriverProb (#36687)
* wip

* ci

* fix
2025-11-25 18:52:35 -08:00
Jason Wen
c229eb4f38 ui: reimplement sunnypilot branding with Raylib (#1517)
* ui: sunnypilot branding

* fr??
2025-11-25 18:37:09 -05:00
Jason Wen
da35e60101 ui: display mouse coordinates with debug mode (#1512)
* ui: add debug to display mouse coordinates

* cleanup

* use mouse x and y directly

* even less

* try this out

* ui: increase `scroll` delay in UI Preview

* sleep for clicks too

* don't lol

* try 1 secs

* try this out

* wait a sec before doing a screenshot

* nah
2025-11-25 18:10:40 -05:00
Jason Wen
1e95e1cc01 Revert "ui: reduce sidebar scroll in UI Preview" (#1516)
Revert "ui: reduce sidebar `scroll` in UI Preview (#1513)"

This reverts commit ad88c306e9.
2025-11-25 18:04:21 -05:00
Jason Wen
ad88c306e9 ui: reduce sidebar scroll in UI Preview (#1513)
* ui: increase `scroll` delay in UI Preview

* sleep for clicks too

* don't lol

* try 1 secs

* try this out

* wait a sec before doing a screenshot

* nah
2025-11-25 17:51:03 -05:00
Jason Wen
42b2e1534b ci: disable macos builds (#1514)
* ci: fix macos builds

* Revert "ci: fix macos builds"

This reverts commit 433ca0d7f6.

* disable
2025-11-25 16:56:53 -05:00
felsager
f01391a7d9 latcontrol_torque: delay independent jerk and lower kp and lower friction threshold (#36619) 2025-11-25 10:23:02 -08:00
DevTekVE
c53e2134e2 sunnylink: centralize key pair handling in sunnylink registration (#1510)
* refactor(api): centralize key pair handling in SunnyLink registration

- Replaced manual key reading with `BaseApi.get_key_pair` for consistency.
- Simplifies code and improves maintainability of key management.

* cleanup
2025-11-24 23:33:40 +01:00
Bruce Wayne
c67afb45ae dead test 2025-11-24 14:20:20 -08:00
Nayan
844f4cbc74 ui: sunnypilot panels (#1477)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* Panels. With Icons. And Scroller.

* patience, grasshopper

* more patience, grasshopper

* sp raylib preview

* fix callback

* fix ui preview

* add ui previews

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* scroller -> scroller_tici

* scroller -> scroller_tici

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* use gui_app.sunnypilot_ui()

* lint

* no fancy toggles :(

* match them

* mici scroller - no touchy

* no

* more

* size adjustments

* fix scroller. yay

* more

* loopy loop

* update brand name

* ui preview fixes

* Revert "update brand name"

This reverts commit ad44c32fc7.

* fix sidebar scroller reset

* fix developer click

* more

* more

* try this out

* one more time

* bruh

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-24 14:43:33 -05:00
Nayan
9edc36ca66 ui: fix scroll panel mouse wheel behavior (#1506)
fix scroller. yay

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-24 11:18:12 -05:00
James Vecellio-Grant
3cd55260d9 modeld: remove SNPE accelerator (#1476)
* commaai/openpilot:d05cb31e2e916fba41ba8167030945f427fd811b

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* sunnypilot: remove Qt

* cabana: revert to stock Qt

* commaai/openpilot:5198b1b079c37742c1050f02ce0aa6dd42b038b9

* commaai/openpilot:954b567b9ba0f3d1ae57d6aa7797fa86dd92ec6e

* commaai/openpilot:7534b2a160faa683412c04c1254440e338931c5e

* sum more

* bump opendbc

* not yet

* should've been symlink'ed

* raylib says wut

* quiet mode back

* more fixes

* no more

* too extra red diff on the side

* need to bring this back

* too extra

* let's update docs here

* Revert "let's update docs here"

This reverts commit 51fe03cd51.

* del snpe

* reset min for safety catch as we killed snpe

* uhhh

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-23 15:22:23 -05:00
Nayan
457b6634fd ui: sunnypilot toggle style (#1475)
* param to control stock vs sp ui

* init styles

* SP Toggles

* Lint

* optimizations

* sp raylib preview

* fix callback

* fix ui preview

* better padding

* this

* listitem -> listitemsp

* add show_description method

* remove padding from line separator.
like, WHY? 😩😩

* ui: `GuiApplicationExt`

* add to readme

* use gui_app.sunnypilot_ui()

* lint

* no fancy toggles :(

* mici scroller - no touchy

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-21 23:37:03 -05:00
Jason Wen
d92d2cb683 ui: GuiApplicationExt (#1501)
* ui: `GuiApplicationExt`

* add to readme
2025-11-21 22:28:51 -05:00
Adeeb Shihadeh
d0c3972cc7 update release branches (#36671)
* update release branches

* Update README.md
2025-11-21 18:55:01 -08:00
Adeeb Shihadeh
be8c5491b1 even shorter 2025-11-21 14:25:21 -08:00
Jason Wen
4f13a0f775 ci: fix upstream merge conflicts with prebuilts (#1503) 2025-11-21 17:23:53 -05:00
Adeeb Shihadeh
ebc11fdbc8 make "update available" alert clickable (#36670)
* click to update

* that's it

* lil more
2025-11-21 13:44:22 -08:00
Jason Wen
0ba5cbea91 tools: add new Pythons configs to compile & run big/small UIs (#1500)
* init

* tools: add new Pythons configs to compile & build big/small UIs

* Revert "init"

This reverts commit 2e0704ace5.

* change
2025-11-21 15:55:18 -05:00
Nayan
8184cd8a6a ui: optimize gui_app & spinner (#1474)
remove gui_app_sp & use upstream gui_app

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-21 14:59:54 -05:00
Adeeb Shihadeh
a981f78e2f use release branch from system.version 2025-11-21 11:23:54 -08:00
github-actions[bot]
4d2ad45be6 [bot] Update Python packages (#1483)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-21 14:22:23 -05:00
Jason Wen
f43479aac5 ci: update workflow file name for prebuilt jobs (#1499) 2025-11-21 14:10:33 -05:00
Jason Wen
04eac60983 msgq: point back to comma's (#1498) 2025-11-21 14:03:02 -05:00
Jason Wen
a45b050b9f Sync: commaai/openpilot:master into sunnypilot/openpilot:master (#1491) 2025-11-21 13:41:41 -05:00
discountchubbs
ceed203de7 Merge remote-tracking branch 'openpilot/master' into nov-19-sync 2025-11-21 09:42:54 -08:00
Maxime Desroches
a49c68806a ui: fix confidence ball clipping (#36667)
fix
2025-11-20 19:28:21 -08:00
Adeeb Shihadeh
8bc6becce1 simplify mici onboarding (#36666)
* simplify mici onboarding

* shorter

* dead

* cleanup
2025-11-20 18:54:54 -08:00
Maxime Desroches
5151bb8bf2 installer: use release-mici for comma four 2025-11-20 17:06:24 -08:00
YassineYousfi
f19ff793f5 dm more typo 2025-11-20 16:27:58 -08:00
Adeeb Shihadeh
4378c4b8bb ramp up IR faster for driver view (#36663)
* ramp up IR faster for driver view

* set it
2025-11-20 14:55:16 -08:00
Dean Lee
61fffb9578 ui: avoid rendering off-viewport items in Scroller (#36659)
avoid rendering off-viewport items in Scroller
2025-11-20 14:41:08 -08:00
Maxime Desroches
a46af06baa document MAGIC_DEBUG=1 2025-11-20 14:28:48 -08:00
Adeeb Shihadeh
b6bfa13b70 onboarding touchups, thanks nabeel! 2025-11-20 14:22:54 -08:00
Adeeb Shihadeh
6f89473f33 Revert "fix: openpilot unavailable with replay (#36658)"
This reverts commit 5c10e7f6cf.
2025-11-20 13:50:35 -08:00
ZwX1616
be700bc825 fix rhd behavior during preview/onboarding (#36657)
* rhd learning not required for demo

* fix switching and saving

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-11-20 13:42:20 -08:00
YassineYousfi
38697ac628 Fix typo in phoneProbValidCount field name (#36662)
* Fix typo in phoneProbValidCount field name

* Fix typo in phoneProbValidCount key
2025-11-20 12:30:28 -08:00
YassineYousfi
fa56d539a7 dm: phone offseter class + log stats (#36656)
* dm: phone offseter class + log stats

* lint:/
2025-11-20 10:28:19 -08:00
Trey Moen
5c10e7f6cf fix: openpilot unavailable with replay (#36658)
fix: openpilot unavailable
2025-11-19 22:20:47 -08:00
Adeeb Shihadeh
a29fdbd024 enhance dcam a bit for onboarding (#36655) 2025-11-19 15:43:49 -08:00
Adeeb Shihadeh
f0d8ebd851 mici training guide tuneups (#36652)
* bump up size

* lil more

* rm param

* 5m timeout and 100% brightness

* set parasm:
2025-11-19 15:03:28 -08:00
Adeeb Shihadeh
3a001dd71c bump msgq 2025-11-19 14:42:03 -08:00
Adeeb Shihadeh
c8effae4eb ui/wifi: fix no attribute error (#36653) 2025-11-19 14:18:48 -08:00
YassineYousfi
9d0ab68f3b dm: settings w device type (#36650)
* dm: settings w device type

* lint

* fix
2025-11-19 11:14:04 -08:00
David
eeddfc058a ui(mici): remove duplicate draw_texture_pro call in mici_keyboard (#36647)
Remove duplicate draw_texture_pro call in IconKey class
2025-11-19 11:08:39 -08:00
Adeeb Shihadeh
0d9b4cdaed tmp bump this up 2025-11-19 10:39:01 -08:00
YassineYousfi
1398bdb10e dmonitoringmodeld: follow same pattern as modeld (#36636)
* dmonitoringmodeld: follow same pattern as modeld

* lint

* oops

* rename
2025-11-19 09:23:13 -08:00
Maxime Desroches
b89c717643 AGNOS 15.1 (#36638)
* stage

* staging

* prod
2025-11-19 00:23:42 -08:00
Shane Smiskol
85301e3a67 Remove unused mici images (#36644)
remove uused images
2025-11-18 23:52:00 -08:00
Shane Smiskol
b0b6bf8702 driving model -> openpilot 2025-11-18 23:37:54 -08:00
Adeeb Shihadeh
85b05998ed small release 2025-11-18 22:47:59 -08:00
Trey Moen
e899f46727 fix: block update if not connected (#36641) 2025-11-18 22:35:32 -08:00
Shane Smiskol
3aaf249236 comma four (#36639)
* squash squash squash

* scroller tici
2025-11-18 22:27:45 -08:00
Maxime Desroches
b73be441b3 bump updater 2025-11-18 21:56:17 -08:00
Shane Smiskol
e449ffcc36 Tuneup offroad alerts 2025-11-18 21:09:20 -08:00
Shane Smiskol
bca727a3cb Fix strength check 2025-11-18 19:48:04 -08:00
Adeeb Shihadeh
e1e41be1a9 common: add BounceFilter 2025-11-18 10:42:06 -08:00
Adeeb Shihadeh
ad7f3d2b24 selfdrived: prep for mici (#36633)
* selfdrived: prep for mici

* tizi reverts

* more revert

* lil more:

* invert it

* cleanup
2025-11-18 10:39:32 -08:00
Adeeb Shihadeh
4ef0d3ee99 setup sound for DM test mode 2025-11-18 10:11:06 -08:00
Adeeb Shihadeh
67cbeebc7b sensord: magnetometer is only for tizi 2025-11-18 10:10:32 -08:00
Adeeb Shihadeh
16abf93be8 reduce ruff noise with raylib 2025-11-17 22:40:33 -08:00
Adeeb Shihadeh
d3cc32ddca mici fcc 2025-11-17 21:40:08 -08:00
Adeeb Shihadeh
689f884810 DM test mode (#36631) 2025-11-17 21:37:40 -08:00
Adeeb Shihadeh
f653c1c0c5 ui: don't sleep on PC 2025-11-17 21:31:24 -08:00
Adeeb Shihadeh
b8a845fe93 ui: add GRID debug helper (#36630) 2025-11-17 20:46:34 -08:00
Alexandre Nobuharu Sato
a6d2297545 Multilang: update pt-BR translations (#36626) 2025-11-16 13:15:04 -08:00
Jason Wen
f1025f6ee9 Sync: commaai/openpilot:master into sunnypilot/openpilot:master (#1470) 2025-11-16 03:16:58 -05:00
Jason Wen
08e85808c5 Merge branch 'upstream/openpilot/master' into sync-20251114
# Conflicts:
#	.github/workflows/ci_weekly_run.yaml
#	.github/workflows/raylib_ui_preview.yaml
#	.github/workflows/tests.yaml
#	.gitmodules
#	README.md
#	SConstruct
#	common/api.py
#	common/params_keys.h
#	docs/CARS.md
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/latcontrol.py
#	selfdrive/controls/lib/latcontrol_angle.py
#	selfdrive/controls/lib/latcontrol_pid.py
#	selfdrive/controls/lib/latcontrol_torque.py
#	selfdrive/controls/tests/test_latcontrol.py
#	selfdrive/monitoring/helpers.py
#	selfdrive/ui/SConscript
#	selfdrive/ui/main.cc
#	selfdrive/ui/qt/body.h
#	selfdrive/ui/qt/home.cc
#	selfdrive/ui/qt/home.h
#	selfdrive/ui/qt/network/networking.cc
#	selfdrive/ui/qt/network/networking.h
#	selfdrive/ui/qt/network/wifi_manager.cc
#	selfdrive/ui/qt/offroad/developer_panel.cc
#	selfdrive/ui/qt/offroad/developer_panel.h
#	selfdrive/ui/qt/offroad/experimental_mode.cc
#	selfdrive/ui/qt/offroad/firehose.cc
#	selfdrive/ui/qt/offroad/firehose.h
#	selfdrive/ui/qt/offroad/onboarding.cc
#	selfdrive/ui/qt/offroad/onboarding.h
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/qt/offroad/settings.h
#	selfdrive/ui/qt/offroad/software_settings.cc
#	selfdrive/ui/qt/onroad/alerts.cc
#	selfdrive/ui/qt/onroad/annotated_camera.h
#	selfdrive/ui/qt/onroad/buttons.cc
#	selfdrive/ui/qt/onroad/buttons.h
#	selfdrive/ui/qt/onroad/driver_monitoring.cc
#	selfdrive/ui/qt/onroad/hud.cc
#	selfdrive/ui/qt/onroad/hud.h
#	selfdrive/ui/qt/onroad/model.cc
#	selfdrive/ui/qt/onroad/model.h
#	selfdrive/ui/qt/onroad/onroad_home.cc
#	selfdrive/ui/qt/onroad/onroad_home.h
#	selfdrive/ui/qt/request_repeater.h
#	selfdrive/ui/qt/sidebar.cc
#	selfdrive/ui/qt/sidebar.h
#	selfdrive/ui/qt/util.cc
#	selfdrive/ui/qt/widgets/cameraview.h
#	selfdrive/ui/qt/widgets/controls.cc
#	selfdrive/ui/qt/widgets/controls.h
#	selfdrive/ui/qt/widgets/input.cc
#	selfdrive/ui/qt/widgets/input.h
#	selfdrive/ui/qt/widgets/prime.cc
#	selfdrive/ui/qt/widgets/prime.h
#	selfdrive/ui/qt/widgets/ssh_keys.h
#	selfdrive/ui/qt/widgets/toggle.h
#	selfdrive/ui/qt/widgets/wifi.cc
#	selfdrive/ui/qt/widgets/wifi.h
#	selfdrive/ui/qt/window.cc
#	selfdrive/ui/qt/window.h
#	selfdrive/ui/tests/cycle_offroad_alerts.py
#	selfdrive/ui/tests/test_ui/run.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_nl.ts
#	selfdrive/ui/translations/main_pl.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	selfdrive/ui/ui.cc
#	selfdrive/ui/ui.h
#	system/manager/build.py
#	system/version.py
2025-11-16 02:50:28 -05:00
Jason Wen
cb03d08397 tools: add retry mechanism for API requests (#1480) 2025-11-16 01:55:19 -05:00
Adeeb Shihadeh
d0c6f845da ui: add burn in debug mode (#36625)
* ui: add burn in debug mode

* scary

* lil less

* lil cleanup

* revert that

* cleanup
2025-11-14 17:33:14 -08:00
Adeeb Shihadeh
81be78cd4d too aggressive for now 2025-11-14 15:48:55 -08:00
ZwX1616
b778da1d7c dmonitoringmodeld: clean up data structures (#36624)
* update onnx

* get meta

* start

* cast

* deprecate notready

* more

* line too long

* 2
2025-11-14 14:29:04 -08:00
James Vecellio-Grant
90cbb09482 tinygrad: sync tinygrad and recompile models (#1464)
* ref

* add in the fixes

* Update fetcher.py

* Update helpers.py

* force push same commit so we can restart CI
2025-11-14 00:03:00 -05:00
Harald Schäfer
a1795f80dd Latest tinygrad (#36615)
* Latest tinygrad

* jit batch size

* bump again

* limit upcast

* latest tgf

* upstream tg
2025-11-13 17:08:14 -08:00
Maxime Desroches
9c19ec8409 bump raylib 2025-11-13 15:09:33 -08:00
Shane Smiskol
fc253fe1ee Don't resize images that are the same size 2025-11-13 14:59:34 -08:00
Shane Smiskol
d72a01d739 raylib: fix texture wrapping filtering artifacts (#36618)
fix wrapping artifacts
2025-11-13 14:58:16 -08:00
Trey Moen
f93b3f51c9 fix: install missing x deps for building raylib from src (#36614)
* fix: install missing x deps for building raylib from src

* move here

* cleaner
2025-11-12 20:04:20 -08:00
Dean Lee
3d08a5048b replay: Only send bookmarkButton message when --all flag is set (#36612)
Only send BookmarkButton message when --all flag is set
2025-11-12 14:22:14 -08:00
Maxime Desroches
9ee66008db AGNOS 15 (#36611)
* stage

* production
2025-11-11 22:59:54 -08:00
Dean Lee
6a257fe2de ui: increase profile output from 25 to 100 functions (#36607)
increase profile output from 20 to 100 functions
2025-11-11 16:10:37 -08:00
Maxime Desroches
dad7bb53a2 ui: let ui_state set brightness 2025-11-10 22:24:35 -08:00
Maxime Desroches
47ba86af33 enable ADB in release 2025-11-10 19:57:59 -08:00
Trey Moen
9689de426b chore: adb rules (#36544)
* chore: adb rules

* i think 51 is common, lets use our own
2025-11-10 18:38:49 -08:00
Dean Lee
124eb42758 ui: fix CameraView crash caused by stale frame (#36563)
fix CameraView crash from stale frame
2025-11-10 18:10:50 -08:00
Trey Moen
85404c184b fix: badges (#36566)
* re-add

* need to validate

* ok looks good

* oops

* lint
2025-11-10 18:08:55 -08:00
Dean Lee
ed42cfe699 ui: refactor GuiApplication.render into smaller helper methods (#36569)
refactor render into smaller helper method
2025-11-10 18:08:02 -08:00
Dean Lee
3099f4f12d ui: cache the version text to avoid redundant Params.get calls every frame (#36601)
cache the version text to avoid redundant Params.get calls every frame
2025-11-10 18:05:55 -08:00
Dean Lee
8fceb9d957 cabana: replace deprecated Qt and OpenSSL functions (#36605)
replace deprecated functions
2025-11-10 13:58:23 -08:00
James Vecellio-Grant
dd074cb6ef ci: efficient model building (#1456)
* new new

* Simplify model removal

* use a var
2025-11-10 07:50:43 -08:00
Jason Young
d4185a5d57 docs: car porting (#36590)
* checkpoint

* door states, notes

* updates

* not worth it yet

* wordsmith

* more

* more reverse engineering script content

* Revise stationary ignition-only test steps

Updated the steps for stationary ignition-only tests to include closing the driver's door and fastening the seatbelt before pressing the accelerator and brake pedals.

* fix numbering
2025-11-07 20:37:40 -05:00
ZwX1616
1262fca36b add check driver camera alert (#36577)
* add event

* missing arg

* creation_delay is wrong

* add logging

* set offroad alert

* Update selfdrive/selfdrived/alerts_offroad.json

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* rm onard

* add details

* rename to DM

* log rename

* no poss

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-11-07 15:18:45 -08:00
Maxime Desroches
890b1cf512 AGNOS 14.7 (#36597)
* stage

* prod
2025-11-07 02:54:52 -08:00
Maxime Desroches
1633641055 bump raylib (#36596)
this
2025-11-06 21:00:26 -08:00
David
2dcb67091f remove unused MAX_POINTS constant from model_renderer.py (#36593) 2025-11-06 20:51:17 -08:00
Maxime Desroches
fb34601d5a Revert "bump panda" (#36594)
This reverts commit 36e53c7394.
2025-11-06 20:46:04 -08:00
Jason Wen
c1d3ae427b version: bump to 2025.003.000 2025-11-06 23:12:41 -05:00
Jason Wen
2ab45b552d Update CHANGELOG.md 2025-11-06 23:10:03 -05:00
github-actions[bot]
8c1d59fecd [bot] Update Python packages (#1434)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-06 22:47:55 -05:00
Adeeb Shihadeh
b6bcc8cca3 ui: fix running on macOS 2025-11-06 09:42:23 -08:00
DevTekVE
cde88fd8ed bug: Fix initial registration for sunnylink (#1457)
refactor(sunnylink): defer `SunnylinkApi` initialization to function scope

- Moved `SunnylinkApi` object creation into individual functions as needed.
- Prevents unnecessary initialization when the object isn't used.
2025-11-06 12:13:15 +01:00
Maxime Desroches
e5a7deb6ad AGNOS 14.6 (#36586)
* stage

* ver

* prod
2025-11-06 01:22:37 -08:00
Maxime Desroches
10100e34e1 bump raylib 2025-11-06 01:04:17 -08:00
Adeeb Shihadeh
2d31b422c8 ui: prep for 60fps (#36585) 2025-11-05 23:01:10 -08:00
Adeeb Shihadeh
89919c8832 this is not a good api 2025-11-05 18:55:50 -08:00
Adeeb Shihadeh
dc5f5eaf65 make github LFS work if you want it 2025-11-05 16:34:19 -08:00
Adeeb Shihadeh
ee8970dc42 ui: add route-based profiler (#36576)
* ui: add route-based profiler

* cleanup

* this is stupid
2025-11-05 16:23:33 -08:00
David
0a44b48e21 gitignore: add raylib test UI screenshots report path (#36570)
ui: update .gitignore to include raylib_report
2025-11-05 10:35:56 -08:00
Maxime Desroches
36e53c7394 bump panda 2025-11-04 19:18:16 -08:00
ZwX1616
38eb400e41 monitoring: account for OS cam distribution shift (#36567)
* this should match

* roughly matching FPR at 2 to 1 cost
2025-11-04 16:00:15 -08:00
DevTekVE
4b5de0eddb stats: sunnylink integration (#1454)
* sunnylink: add statsd process and related telemetry logging infrastructure

- Introduced `statsd_sp` process for handling Sunnylink-specific stats.
- Enhanced metrics logging with improved directory structure and data handling.

* sunnylink: re-enable and refine stat_handler for telemetry processing

- Reactivated `stat_handler` thread with improved path handling.
- Made `stat_handler` more flexible by allowing directory injection.

* statsd: fix formatting issue in telemetry string generation

- Corrected missing comma between `sunnylink_dongle_id` and `comma_dongle_id`.

* update statsd_sp process configuration for enhanced readiness logic

- Modified `statsd_sp` initialization to include `always_run` alongside `sunnylink_ready_shim`.
- Ensures robust process activation conditions.

* refactor(statsd): enhance and unify StatLogSP implementation

- Replaced custom `StatLogSP` in sunnylink with centralized implementation from `system.statsd`.
- Ensures consistent logic for StatLogSP handling across modules.

* fix

* refactor(statsd): add intercept parameter to StatLogSP for configurable logging

- Introduced optional `intercept` parameter to `StatLogSP` to manage `comma_statlog` initialization.
- Updated usage in `sunnylink` to disable interception where unnecessary.

* Dont complain

* feat(statsd): add raw metric type and SunnyPilot-specific stats collection

- Introduced `METRIC_TYPE.RAW` for base64-encoded raw data metrics.
- Added `sp_stats` thread to export SunnyPilot params as raw metrics.
- Enhanced telemetry handling with decoding and serialization updates.

* refactor(statsd): improve `sp_stats` error handling and param processing

- Enhanced exception handling for `params.get` to prevent crashes.
- Added support for nested dict values to be included in stats.

* refactor(statsd): adjust imports and minor code formatting updates

- Updated `Ratekeeper` import path for consistency with the `openpilot` module structure.
- Fixed minor formatting for improved readability.

* refactor(statsd): update typings and remove unused NoReturn annotation

- Removed unnecessary `NoReturn` typing for `stats_main` to simplify function definition.
- Adjusted `get_influxdb_line_raw` to refine typing for `value` parameter.

* cleanup

* init

* init

* slightly more

* staticmethod

* handle them all

* get them models

* log with route

* more

* car

* Revert "car"

This reverts commit fe1c90cf4d.

* handle capnp

* Revert "handle capnp"

This reverts commit c5aea68803.

* 1 more time

* Revert "1 more time"

This reverts commit a364474fa5.

* Cleaning to expose wider

* feat(interfaces, statsd): log car params to stats system

- Added `STATSLOGSP` import and logging to capture `carFingerprint` in metrics.
- Improved error handling in `get_influxdb_line_raw` for robust metric generation.

* refactor(interfaces): streamline car params logging to stats

- Simplified logging by directly converting `CP` to a dictionary.
- Removed legacy stats aggregation for clarity.

* feat(sunnylink): enable compression for stats in SunnyLink

- Added optional compression for stats payload to support large data.
- Updated `stat_handler` to handle compression and base64 encoding.

* fix(statsd): filter complex types in `get_influxdb_line_raw`

- Skips unsupported types (dict, list, bytes) to prevent formatting errors.
- Simplifies type annotation for `value` parameter.

* fix(statsd): use `json.dumps` for string conversion in `get_influxdb_line_raw`

- Ensures proper handling of special characters in values.
- Prevents potential formatting issues with raw `str()` conversion.

* refactor(interfaces, statsd): update parameter keys for stats logging

- Renamed logged keys for better clarity (`sunnypilot_params` → `sunnypilot.car_params`, `device_params`).
- Ensures consistency across data logs.

* bet

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-04 16:53:31 -05:00
Maxime Desroches
5198b1b079 support ECDSA (#36555)
* keys

* remove

* remove

* too small
2025-11-03 22:45:00 -08:00
Adeeb Shihadeh
e8a11591a8 ui: add render loop profiling (#36558) 2025-11-03 21:45:46 -08:00
Adeeb Shihadeh
cbc8f98682 ui: fix RuntimeError on exit on PC 2025-11-03 16:20:36 -08:00
Adeeb Shihadeh
ecdcb5d0c6 tici: affine DRM IRQ to same core as ui (#36554) 2025-11-03 14:36:19 -08:00
Adeeb Shihadeh
c7494aed0f ui: move to GPU core (#36553)
* ui: move to GPU core

* we're on the big boy core now
2025-11-03 14:31:45 -08:00
Dean Lee
215ef16803 ui: fix LineSeparator horizontal centering issue (#36533)
fix LineSeparator horizontal centering issue
2025-11-03 11:22:42 -08:00
Dean Lee
350b846d3a ui: fix vertical centering for multi-line labels (#36538)
fix vertical centering for multi-line labels
2025-11-03 11:21:41 -08:00
Dean Lee
9ce9920ff7 ui: fix label text eliding to account for icon width (#36539)
fix label text eliding to account for icon width
2025-11-03 11:21:20 -08:00
Dean Lee
1c0b087105 ui: fix keyboard.reset() to properly clear all interaction state (#36541)
fix keyboard.reset() to properly clear all interaction state
2025-11-03 11:20:24 -08:00
Dean Lee
137d4b89b4 ui: fix icon vertical positioning using width instead of height (#36542)
fix icon vertical positioning using width instead of height
2025-11-03 11:20:08 -08:00
Shane Smiskol
2cc4885a2e raylib: fix window freezing (#36517)
fix window freezing
2025-11-03 11:17:38 -08:00
felsager
736e1fa7b7 Revert "latcontrol_torque: make feed-forward jerk independent of individual platform lag (#36334)"
This reverts commit fc4e5007fd.
2025-11-03 10:31:27 -08:00
felsager
177c7f1cf3 Revert "latcontrol_torque: retune torque controller (#36392)"
This reverts commit 76c5cb6d87.
2025-11-03 10:31:22 -08:00
Dean Lee
9bf904e8a6 ui: scale mouse positions in touch history (#36530)
scale mouse position in touch history
2025-11-03 08:55:05 -08:00
Matt Purnell
071147baaf docs: Update README installation branches and discord links (#1453)
* Use sunnypilot CARS.md, update number of supported cars, add comma

* Update device reference

* Update discord links to forum links

* Update references to -c3-new branches and release

* Update broken link to branches table

* Update README.md

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-11-03 06:52:17 +01:00
Adeeb Shihadeh
5ea5f6f267 ui: timeout touch points (#36550) 2025-11-02 21:48:33 -08:00
DevTekVE
18af4d6ad6 ui: Fix spacing in sunnylink panel (#1450)
Fix spacing
2025-11-02 20:26:17 +01:00
Shane Smiskol
525b6e48e9 raylib: fix word wrap (#36545)
* fix word wrap underestimating width

* and that
2025-11-02 04:32:29 -08:00
Shane Smiskol
c7b115b68e raylib: fix text measure with emojis (#36546)
fix
2025-11-02 04:30:08 -08:00
DevTekVE
b81d5bca3c ui: update discord references and add forum widget (#1440)
* sunnylink: introduce community popup with QR code embedding

- Added `SunnylinkCommunityPopup` widget to promote the sunnypilot Community Forum.
- Integrated a QR code generator and display for quick access.
- Updated `WiFiPromptWidget` to include a "Learn More" button triggering the community popup.

* sunnylink: adjust community popup styling for better layout

- Reduced font size of description text slightly for consistency.
- Decreased QR code dimensions to improve visual balance.

* Making more space out of thin air

* sunnylink: update community references to use forum links

- Replaced Discord links with Community Forum URLs for better alignment.
- Improved clarity in sponsorship instructions.
2025-11-02 06:50:41 +01:00
Amy Jeanes
682d738ffa Tesla: Coop Steering (#1283)
* Tesla: Coop Steering

* bump

* bump

* sync with opendbc/master

* resolve comment

* add oscillation warning and add confirmation

* styling desc

* beta

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-11-01 22:47:30 -04:00
DevTekVE
f60c2b6a83 sunnylink: update uploader button logic to support novice tier and above (#1438)
* sunnylink: update uploader button logic to support novice tier and above

- Adjusted the enable condition to include SponsorTier::Novice and above.

* sunnylink: improve uploader button visibility and accessibility logic

- Made uploader button conditionally visible based on user tier and settings.
- Clarified button label to specify testing purposes only.
2025-11-01 12:14:57 +01:00
DevTekVE
f833819143 ci: update trigger for prebuilt (#1439)
Updated workflow `if` conditions to use `vars.PREBUILT_PR_LABEL`.
2025-10-31 17:54:39 +01:00
Dean Lee
62aef9cd34 tools: update README (#36531)
update readme
2025-10-31 08:16:55 -07:00
Adeeb Shihadeh
f57617c944 expose more state from gui_app 2025-10-30 16:03:28 -07:00
Adeeb Shihadeh
c4a0e57046 ui: add debug toggle (#36529)
* ui: add debug toggle

* initial state
2025-10-30 15:52:56 -07:00
felsager
76c5cb6d87 latcontrol_torque: retune torque controller (#36392) 2025-10-30 13:34:44 -07:00
felsager
fc4e5007fd latcontrol_torque: make feed-forward jerk independent of individual platform lag (#36334) 2025-10-30 13:29:38 -07:00
Dean Lee
af24fd6842 remove qrcode library from third_party (#36528) 2025-10-30 09:24:22 -07:00
Maxime Desroches
002a22a097 AGNOS 14.5 (#36523)
* stage

* updater

* prod
2025-10-28 23:05:44 -07:00
Maxime Desroches
9f20eb8ce6 setup: handle incompatible versions (#36520)
check
2025-10-28 19:15:43 -07:00
THERoenPR
707e2aedae controlsd: add CP_SP to get_pid_accel_limits (#1410)
* Add CP_SP to get_pid_accel_limits() call in controlsd

Match input parameters of CP_SP commit

* bump

* bump

---------

Co-authored-by: roenthomas <43324106+roenthomas@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-28 22:13:39 -04:00
Adeeb Shihadeh
2e636458a6 op adb: forward all openpilot service ports (#36518)
* op adb: forward all openpilot service ports

* cleanup
2025-10-28 16:47:22 -07:00
David
47d0a95fd6 font: remove unifont anti-aliasing and reduce font size to 16 (#36508)
remove unifont anti-aliasing and reduce font size to 16

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-10-28 14:49:33 -07:00
Dean Lee
5d142326f5 ui: remove unused get_width() method (#36512)
remove unused get_width() method
2025-10-28 14:47:17 -07:00
Dean Lee
ef9683ee79 ui: skip rendering when screen is off (#36510)
* skip rendering when screen is off

* continue and rename

* revert that

* flip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-10-28 13:09:49 -07:00
DevTekVE
55147d8a55 ci: use environment variable for PR label in query (#1436)
* ci: use environment variable for PR label in query

- Replaced static `PR_LABEL` references with `${{ env.PR_LABEL }}` for consistency.
- Ensures flexibility and reduces hardcoded values in the workflow.

* does this work better?

* fuck this

* aight
2025-10-28 18:58:04 +01:00
DevTekVE
de7acc5466 ci: integrate Discourse notifications and refactor notification logic (#1435)
* ci: integrate Discourse notifications and refactor notification logic

- Replaced Discord webhook notifications with Discourse topic updates.
- Introduced reusable `post-to-discourse` composite action.
- Added `test-discourse.yaml` workflow for debugging and verification.

* ci: adjust notification dependencies and prepare_strategy reference

- Updated `notify` step to depend on `prepare_strategy` instead of `build`.
- Adjusted variable references to use `prepare_strategy` outputs.

* Forcing debug

* ci: update environment variable references and add commit information

- Switched `PUBLIC_REPO_URL` source to environment variable for consistency.
- Added commit SHA variables to enhance template generation logic.

* more tweaks!

* more tweaks!

* bad bot lmao

* Test?

* i mean....

* i mean....

* getting there

* testing the if

* testing the if

* ci: re-enable notify steps for prebuilt workflow

- Uncommented `build` and `publish` dependencies.
- Restored conditional logic to trigger only for relevant events.

* ci: enhance Discourse action to support new topic creation

- Added support for creating new topics with `category-id` and `title`.
- Improved input validation and response handling for flexibility.

* ci: improve conditions for prebuilt workflow notifications

- Refined `if` clause to ensure branches in `DEV_FEEDBACK_NOTIFICATION_BRANCHES` are targeted.
- Adjusted logic for accurate topic ID mapping in Discourse integration.

* forgot to rename
2025-10-28 16:01:21 +01:00
Maxime Desroches
8a77534d02 fix zipapp with multilang (#36511)
* fix

* fix

* fix

* more
2025-10-27 22:47:41 -07:00
David
73ed45f9d7 ui screenshots: add screenshot for unifont rendering (#36506)
* ui: add homescreen setup for unifont language setting

* fix params
2025-10-27 20:00:01 -07:00
Shane Smiskol
2d6df2e125 raylib: minor tweaks (#36507)
* try

* generic

* check

* why was this here?!
2025-10-27 19:59:35 -07:00
Shane Smiskol
e754b738ad raylib: fix prime state thread (#36504)
fix
2025-10-27 15:15:48 -07:00
David
1dadb3fcc9 multilang: fix missing translation for longitudinal personality toggle description (#36446)
fix: add translation wrapper for longitudinal personality toggle description
2025-10-27 13:34:35 -07:00
Shane Smiskol
4e88245745 raylib: rename set_callbacks (#36462)
rn
2025-10-27 13:34:16 -07:00
David
debc9bf7cf screenshots: reuse alert setup function (#36473)
ui: refactor onroad alert setup functions for improved reusability
2025-10-27 13:32:15 -07:00
Dean Lee
e03673485b ui: unify cache key in AugmentedRoadView (#36477)
unified cache key
2025-10-27 13:31:55 -07:00
David
6efe4e1998 ci: fix selfdrive_tests weekly run and badge (#36500) 2025-10-27 13:28:27 -07:00
David
ff6ed7055d ci: include assets path for UI label and preview (#36499)
* workflow: include 'selfdrive/assets/**' path for triggering UI preview

* ui: include 'selfdrive/assets/**' path in labeler configuration
2025-10-27 13:28:09 -07:00
Nayan
e4aada10a4 Bug: Model UI Crash Fix (#1431)
Model UI Crash Fix
2025-10-26 21:43:30 -04:00
Maxime Desroches
6c85e2c697 ModemManager restart (#36433)
* res

* limit

* not needed

* comments + explicit
2025-10-26 18:30:57 -07:00
Adeeb Shihadeh
2d0340cefd ui: stop loading unused fonts (#36493)
Co-authored-by: Comma Device <device@comma.ai>
2025-10-26 14:18:48 -07:00
Adeeb Shihadeh
a974deeb59 ui: replace close button text with icon (#36492) 2025-10-26 14:13:53 -07:00
Adeeb Shihadeh
cf5bb4e16e reduce unifont impact on init time (#36490) 2025-10-26 13:47:47 -07:00
Adeeb Shihadeh
0d4b0ee116 pre-process fonts for raylib (#36489)
* pre-process fonts for raylib

* it's fast!

* raylib processing

* build with scons

* padding

* happy ruff

* all exported

* cleanup

* more pad
2025-10-26 13:20:11 -07:00
Adeeb Shihadeh
03cb3e9dc0 make ruff happy :) 2025-10-26 12:15:34 -07:00
Shane Smiskol
f0dd0b5c8c raylib ui: assert system time valid (#36486)
* assert system time valid

* nl
2025-10-26 00:47:07 -07:00
James Vecellio-Grant
b460d5804c LiveLocationKalman: skip tests on unsupported msgq (#1407)
* locationd llk: skip tests on unsupported msgq

* Update sunnypilot/selfdrive/locationd/tests/test_locationd.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-25 23:47:37 -04:00
James Vecellio-Grant
eecb8e5c19 models: bump model json to v8 (#1430)
models: bump model json to v8 post release

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-25 22:55:26 -04:00
Jason Wen
1a4ea66987 version: bump to 2025.002.000 2025-10-25 22:45:17 -04:00
Adeeb Shihadeh
94ca077e69 ui: add startup profiling (#36482)
* ui: add startup profiling

* lil more
2025-10-25 12:27:01 -07:00
eFini
e92e59ca78 multilang: add gettext package (#36476)
needed for gettext
2025-10-25 09:17:59 -07:00
Shane Smiskol
e0cabc1174 raylib: only load glyphs for unifont (#36475)
* again llm is terrible

* Revert "again llm is terrible"

This reverts commit 423dd289ae5701e2f5bb034efd9329175fc275cc.

* try this
2025-10-24 23:56:59 -07:00
Adeeb Shihadeh
5e2f142704 increase CPU budget 2025-10-24 22:02:25 -07:00
Jason Wen
c1e15e5544 changelog: add new contributor entry 2025-10-25 01:00:46 -04:00
Dean Lee
2beb0ffad1 ui: move INF_POINT to constant (#36470)
move INF_POINT to constant
2025-10-24 22:00:45 -07:00
Dean Lee
fa373af9b5 ui: cleanup .gitignore (#36471)
cleanup .gitignore
2025-10-24 22:00:38 -07:00
Adeeb Shihadeh
7909716c1f ui: realtime scheduling (#36467)
* ui: realtime scheduling

* try this

* update cpu

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-10-24 21:57:45 -07:00
Adeeb Shihadeh
c1cb971bca hardwared: disable power save when screen is on (#36466) 2025-10-24 21:34:37 -07:00
Adeeb Shihadeh
538ec25ad9 gc unused stuff in HW abstraction layer (#36465)
* gc unused stuff in HW abstraction layer

* lil more
2025-10-24 21:07:04 -07:00
Adeeb Shihadeh
17152484c2 selfdrive_tests -> tests 2025-10-24 20:54:13 -07:00
Adeeb Shihadeh
954b567b9b merge a bunch of misc stuff into common.utils (#36463)
just utils
2025-10-24 20:45:56 -07:00
Shane Smiskol
6061476d8e fix spinner (#36458) 2025-10-24 19:43:46 -07:00
Dean Lee
ad903aeaa1 ui: simplify draw_border (#36440)
simplify draw_border
2025-10-24 19:28:58 -07:00
Dean Lee
c8c1b0f781 ui: clear available camera streams after going offroad (#36441)
clear available camera streams after going offroad
2025-10-24 19:27:33 -07:00
Dean Lee
534f096bb8 ui: reset cached height when description changes (#36454)
reset cached height when description changes
2025-10-24 19:27:03 -07:00
David
7da36b2470 multilang: fix missing translations in developer panel (#36445)
fix: translate description strings in DeveloperLayout settings
2025-10-24 19:15:14 -07:00
Dean Lee
f2db7f7665 ui: cache emoji font to avoid repeated loading (#36451)
cache font to avoid repleated loads
2025-10-24 19:13:34 -07:00
David
40a1af97b9 ui: only auto scale on PC if SCALE env not set (#36455)
only use auto scale if SCALE env not set
2025-10-24 19:12:45 -07:00
MuskratGG
3a45fff1b9 ui: openpilot Longitudinal Control → sunnypilot Longitudinal Control (#1422)
* Update developer_panel.cc

Changed mentions of "openpilot Longitudinal Control" to "sunnypilot Longitudinal Control" to align with other UI elements pointing users towards enabling "sunnypilot Longitudinal Control"

* Update warning message for longitudinal control

* more

* a bit more

* slightly more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-24 21:09:01 -04:00
github-actions[bot]
ae9bd39883 [bot] Update Python packages (#1428)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-24 17:04:27 -04:00
Jason Wen
43e7d87176 version: more release branches (#1427) 2025-10-24 15:34:50 -04:00
github-actions[bot]
432c6050ed [bot] Update Python packages (#1338)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-24 15:28:08 -04:00
Jason Wen
4e3b1f1f6b interface: add is_release flag to get_params_sp (#1426)
* interface: add `is_release` flag to `get_params_sp`

* split and rename

* debump
2025-10-24 14:56:24 -04:00
Dean Lee
53ff5413cd ui: auto-size on PC if screen is smaller than tici (#36452)
auto-scale on PC to fit screen
2025-10-24 08:50:32 -07:00
Maxime Desroches
dc889587ce bump version to 0.10.2 2025-10-23 22:25:54 -07:00
David
6486ab6cab raylib: fix crash when toggling advanced network toggles (#36443)
use get_state()
2025-10-23 15:09:14 -07:00
Shane Smiskol
ab234c72a3 wait slightly longer to take screenshot 2025-10-23 00:55:31 -07:00
Shane Smiskol
485c7b2725 multilib: relative paths (#36439)
* relative

* clean up
2025-10-23 00:54:31 -07:00
Jason Wen
5d47ffdb8a Speed Limit Assist: Disable for Rivian (#1421)
* Speed Limit Assist: Disable for Tesla in release

* add test

* unused

* use constant

* eh

* flip

* universal it

* check release state and align in tests

* use this

* eh

* update changelog

* Speed Limit Assist: Disable for Rivian

* desc

* changelog
2025-10-23 03:48:04 -04:00
Shane Smiskol
4861d15056 reduce ui scons imports 2025-10-23 00:45:51 -07:00
Jason Wen
1c89e2b885 Speed Limit Assist: Disable for Tesla in release (#1418)
* Speed Limit Assist: Disable for Tesla in release

* add test

* unused

* use constant

* eh

* flip

* universal it

* check release state and align in tests

* use this

* eh

* update changelog
2025-10-23 03:26:32 -04:00
Shane Smiskol
1e73025f86 Remove Qt (#36427)
* rm qt from ui scons

* rm qt translation litter

* rm ccs

* more

* fix cabana

* more

* more

* more
2025-10-22 22:18:07 -07:00
Jason Wen
c552567ada ui: increase minimum button width in ButtonParamControlSP (#1419) 2025-10-23 01:08:19 -04:00
Dean Lee
378212e5ab cabana: remove dependency on selfdrive/ui (#36434)
remove dependency on selfdrive/ui
2025-10-22 21:24:07 -07:00
David
4f52f3f3c5 raylib: match QT colors for danger button style (#36431)
match colors for DANGER style
2025-10-22 19:48:44 -07:00
Shane Smiskol
a0d48b6c63 raylib: unifont for CJK languages (#36430)
* add rest of langs

* unifont

* all langs are supported

* add japanese translations

* fix strip!

* add language name chars

* use unifont in lang selection

* add korean

* test all langs

* doesn't work

* unifont font fallback for multilang

* add ar translations

* fix labels not updating until scrolling

* t chinese

* more chn

* we already default

* wrap

* update

* fix thai

* fix missing chinese langs and all are supported!

* clean up

* update

* ??? mypy r u ok ???

* fix default option font weight
2025-10-22 19:18:54 -07:00
YassineYousfi
b14270bd71 update RELEASES.md 2025-10-22 18:56:18 -07:00
Shane Smiskol
8f720a54f6 raylib: add branch switcher (#36359)
* it's adversarial

* try 2

* just do this

* kinda works but doesn' tmatch

* fine

* qt is banned word

* test

* fix test

* add elide support to Label

* fixup

* Revert "add elide support to Label"

This reverts commit 28c3e0e7457345083d93f7b6a909a4103bd50d55.

* Reapply "add elide support to Label"

This reverts commit 92c2d6694146f164f30060d7621e19006e2fe2df.

* todo

* elide button value properly + debug/stash

* clean up

* clean up

* yep looks good

* clean up

* eval visible once

* no s

* don't need

* can do this

* but this also works

* clip to parent rect

* fixes and multilang

* clean up

* set target branch

* whops
2025-10-22 18:54:09 -07:00
Shane Smiskol
2c41dbc472 raylib: hit rect for scroller items (#36432)
* hit rect

* clean up

* comment

* oh this is actually epic

* rm line

* type
2025-10-22 18:10:32 -07:00
Shane Smiskol
a8660b5b4f Revert "raylib: add branch switcher (#36411)"
This reverts commit 856f8d3d47.
2025-10-22 17:55:28 -07:00
Shane Smiskol
4ccafff123 raylib: multilang (#36195)
* fix multilang dialog height

* split to file

* stash

* Revert "stash"

This reverts commit deb4239fe69f0260420fad03f2350e622e31542f.

* add updater

* add files

* stuff

* try

rev

* stash

* works!

* works!

* this should be the flow?

* cursor wrapping -- it missed entire sections, changed formatting, and didn't use trn properly!!!!!!!!!!!!!!!!!

* update translations

* learned my lesson

* this should be the one thing it's good at

* update trans

* onroad wrap

* spanish

* rename

* clean up

* load all

* Revert "load all"

This reverts commit 6f2a45861c914ffb9d40a5edd15751afd798d614.

* jp translations

* try jp

* Revert "try jp"

This reverts commit d0524b10110104baafcdc1ec385c3d57bc5ef901.

* remove languages we can't add rn

* tr

* pt and fr

* ai cannot be trusted

* ai cannot be trusted

* missing trans

* add fonts

* Revert "remove languages we can't add rn"

This reverts commit 73dc75fae2b9e347d867b6636dab6e2b5fe59da7.

* painfully slow to startup

* only load what we need

* Reapply "remove languages we can't add rn"

This reverts commit 52cb48f3b838520a421f9b90e5ea4409c27d4bd0.

* add system

* that's sick that this just works (dynamic)

* fix description falling back to first str + support callable titles in list items

* device is now live!

* make firehose live

* developer

* network live

* software live

* and that

* toggles live

* regen

* start to clean up gpt

* revert op sans

* bruh

* update translations

* rm old script

* add noops for descriptions to fix translating away from non-english after startup

* missing de

* do filtering in multilang.py

* clean up

clean up

* codespell: ignore po

* fix update

* should not depend

* more live

* sidebar and offroad alert panel live

* fix issues with offroad alerts

* fix firehose live

* fix weird tr("") behavior

* sh key live bugfix

* setup.py live

* update

* update

* no fuzzy matching -- breaks dynamic translations

* rm this

* fix calib desc live trans

* change onroad

* rm dfonts

* clean up device

* missing live

* update

* op lint

* not true

* add to gitignore

* speed up startup by reducing chars by ~half

* fix scons

* fix crash going from qt

* preserve original lang

* cancel kb live translate

* no preserve

* fix lint
2025-10-22 16:28:28 -07:00
Dean Lee
856f8d3d47 raylib: add branch switcher (#36411)
* add branch switcher

* improve
2025-10-22 16:22:51 -07:00
David
00e20f1524 raylib: fix "Reboot" button pressed style (#36412)
use normal style for dual button action left button
2025-10-22 16:19:37 -07:00
Dean Lee
215acefbb4 raylib: precompile regex patterns for faster HTML parsing (#36417)
precompiled regex
2025-10-22 16:18:11 -07:00
Dean Lee
c33c9ff22a raylib: optimize html renderer with height caching (#36418)
optimize html renderer with height caching
2025-10-22 16:17:57 -07:00
Adeeb Shihadeh
99fdd59042 agnos 14.3 (#36426) 2025-10-22 16:11:37 -07:00
Adeeb Shihadeh
5af1099fbf rm watchdog (#36425) 2025-10-22 15:36:09 -07:00
ZwX1616
f983df0c70 camerad: faster exposure convergence at startup (#36424)
* might converge faster

* accept darker at start

* accept darker at start

* it was unreasonably lax
2025-10-22 15:35:58 -07:00
felsager
936740201c latcontrol_torque: refactor low speed factor into pid controller (#36364) 2025-10-22 11:50:37 -07:00
David
4489517eeb keyboard: replace duplicate period key (#36361)
switch between underscore and hypen instead of period
2025-10-22 11:35:58 -07:00
David
b1b7c505a1 raylib: add danger button pressed style (#36413)
add danger hover style
2025-10-22 11:28:37 -07:00
felsager
a2e7f3788f LateralTorqueState: log controller version and desired lateral jerk (#36421) 2025-10-22 10:56:34 -07:00
felsager
d2bb8fe537 latcontrol_torque: more descriptive variable names (#36422) 2025-10-22 10:44:14 -07:00
Jason Wen
7097e69aa3 Speed Limit Assist: generalize availability helper (#1416)
* init infra to disable sla in certain conditions

* a bit more

* in another PR

* in another PR

* since when?

* start here
2025-10-22 11:17:02 -04:00
Maxime Desroches
5289b08bcf bump retry count for micd and soundd (#36415)
retry
2025-10-21 21:54:40 -07:00
Jason Wen
657ff0f8ec ui: refine ICBM description handling and availability logic (#1414)
* ui: refine ICBM description handling and availability logic

* car -> platform

* retain
2025-10-22 00:09:10 -04:00
Jason Wen
641af6d7e7 changelog: more new contributors! (#1413) 2025-10-21 17:55:27 -04:00
Jason Wen
f57de1c5b2 version: a new beginning (#1411)
* version: a new beginning

* changelog

* singular

* show ours

* actual

* readjust

* updated

* more

* official spelling

* more

* sync

* fix

* send it

* push

* we never had this lol

* syncs
2025-10-21 17:12:57 -04:00
ZwX1616
cc8f6eadfe DM: Medium Fanta model 🥤 (#36409)
M fanta: e456b6c5-2dd0-400e-bf0f-6bb5a908971a
2025-10-21 13:58:48 -07:00
Jason Wen
cb5d120136 FCA: update minEnableSpeed and LKAS control logic (#1386)
* FCA: update minEnableSpeed and LKAS control logic

* bump
2025-10-21 14:22:37 -04:00
Jason Wen
c85b6a0d1c branches: track sunnypilot release branches separately (#1409)
* branches: track sunnypilot release branches separately

* more remotes for legacy support

* bruh

* revert
2025-10-21 00:53:16 -04:00
Shane Smiskol
9b2f7341d8 raylib: wrap text for multilang (#36410)
* fix multilang dialog height

* split to file

* stash

* Revert "stash"

This reverts commit deb4239fe69f0260420fad03f2350e622e31542f.

* add updater

* add files

* stuff

* try

rev

* stash

* works!

* works!

* this should be the flow?

* cursor wrapping -- it missed entire sections, changed formatting, and didn't use trn properly!!!!!!!!!!!!!!!!!

* update translations

* learned my lesson

* this should be the one thing it's good at

* update trans

* onroad wrap

* spanish

* rename

* clean up

* load all

* Revert "load all"

This reverts commit 6f2a45861c914ffb9d40a5edd15751afd798d614.

* jp translations

* try jp

* Revert "try jp"

This reverts commit d0524b10110104baafcdc1ec385c3d57bc5ef901.

* remove languages we can't add rn

* tr

* pt and fr

* ai cannot be trusted

* ai cannot be trusted

* missing trans

* add fonts

* Revert "remove languages we can't add rn"

This reverts commit 73dc75fae2b9e347d867b6636dab6e2b5fe59da7.

* painfully slow to startup

* only load what we need

* Reapply "remove languages we can't add rn"

This reverts commit 52cb48f3b838520a421f9b90e5ea4409c27d4bd0.

* stash!

* rm

* Revert "stash!"

This reverts commit 31d7c361079a8e57039a0117c81d59bf84f191c7.

* revert this

* revert that

* make this dynamic!

* device

* revert

* firehose

* stuff

* revert application

* back

* full revert

* clean up

* network

* more system

* fix dat

* fixy
2025-10-20 21:39:04 -07:00
Dean Lee
650946cd2a raylib:use context manager for BytesIO (#36407)
use context manager for BytesIO
2025-10-20 19:17:10 -07:00
Shane Smiskol
9801e486d9 fix incorrect Button argument 2025-10-20 18:36:13 -07:00
Shane Smiskol
3381192297 Multilang: remove main prefix (#36406)
* rename

* fix
2025-10-20 18:35:34 -07:00
Harald Schäfer
b2e3dd17ea torque gains not car specific (#36404)
* torque gains not car specific

* remove opendbc interfaces longitudinal control kf field assignment that makes hitl test fail

* typo

* another typo

* bump

* bump openbc

* update ref

---------

Co-authored-by: felsager <d.felsager@gmail.com>
2025-10-20 17:16:03 -07:00
Bruce Wayne
01715f6f9a test car model: use factor for torque 2025-10-20 16:26:22 -07:00
Adeeb Shihadeh
8720e5d712 tools: pass args to op adb 2025-10-20 16:14:02 -07:00
Shane Smiskol
8752093801 raylib: fix option dialog (#36405)
* fix dialog

* rm
2025-10-20 15:45:44 -07:00
YassineYousfi
3c957c6e9d The Cool People's model 😎 (#36249)
* cb8f0d7e-6627-4d7f-ad97-10d0078f2d2c/400

* ci?

* fd9a6816-8758-466b-bbde-3c1413b98f0a/400
2025-10-20 14:09:42 -07:00
Shane Smiskol
3ef5037c16 uploader: fix env var parsing 2025-10-20 11:40:03 -07:00
Harald Schäfer
7534b2a160 PID: no more ff gain (#36398)
* No more ff gain

* typo
2025-10-18 11:12:47 -07:00
Jason Wen
025a930ce8 ui: update longitudinal-related settings handling (#1401)
* ui: update ICBM-related settings handling

* oops

* oops

* single location

* some more

* fix cruise toggles

* always init true

* check this

* nah

* should be this
2025-10-18 04:04:48 -04:00
Jason Wen
523c92c6fe Speed Limit Assist: lower preActive timer for Non PCM Longitudinal and ICBM cars (#1403)
5 seconds preActive for non pcm long now
2025-10-17 23:41:33 -04:00
Jason Wen
72282f2d2e Speed Limit Assist: update events handling (#1400)
* Speed Limit Assist: update active event handling

* ok no more for non pcm long it was annoying

* 5 seconds preActive for non pcm long now

* Revert "5 seconds preActive for non pcm long now"

This reverts commit dfcc601035.

* dynamic alert size

* do the same here

* lint
2025-10-17 23:30:06 -04:00
Jason Wen
2825c00fcc controlsd: update lateral delay param in a separate thread (#1402) 2025-10-17 22:53:31 -04:00
Shane Smiskol
b28425b8c3 raylib: fix broken pairing dialog first 5m after startup (#36397)
* always try on dialog show

* except logging

* huge oof
2025-10-17 19:11:12 -07:00
Shane Smiskol
1f5e0b6f68 raylib: show dialog when attempting to pair without internet (#36396)
* match qt

* clean up

* bb

* ofc

* use alert_dialog
2025-10-17 19:00:06 -07:00
David
646f6a1006 raylib screenshots: alpha long toggle confirmation dialog (#36386)
add alpha long toggle confirmation test
2025-10-17 17:27:13 -07:00
Maxime Desroches
cc683f2040 AGNOS 14.2 (#36390)
* version

* env
2025-10-17 02:50:17 -07:00
Maxime Desroches
18e8f648c2 Revert "AGNOS 14.1 (#36389)"
This reverts commit 821e4da2c7.
2025-10-17 01:48:08 -07:00
Maxime Desroches
821e4da2c7 AGNOS 14.1 (#36389)
* stag

* prod
2025-10-17 01:12:55 -07:00
Maxime Desroches
13d98fd2d5 test_onroad: skip more frames for ui timings 2025-10-17 00:36:15 -07:00
Maxime Desroches
92cd656c68 ui: remove watchdog (#36388)
out
2025-10-17 00:26:29 -07:00
Maxime Desroches
727a750b34 ci: stop power_monitor once 2025-10-16 23:37:44 -07:00
Maxime Desroches
5dabb678ce ci: just stop power_monitor on devices 2025-10-16 23:35:31 -07:00
Maxime Desroches
ef988aca28 raylib: bump version 2025-10-16 23:23:39 -07:00
Maxime Desroches
64f3759fd0 cleanup release branches 2025-10-16 15:07:45 -07:00
Shane Smiskol
d71d2bd2d0 test_onroad: ignore first few ui timing frames (#36385)
clean up
2025-10-16 03:45:50 -07:00
Shane Smiskol
702bebf176 raylib: fix temporarily untoggleable onroad experimental mode button (#36383)
* gpt got it after 2 tries, but still not immed mergeable

* bad bot
2025-10-16 02:22:49 -07:00
Shane Smiskol
25da8e9d44 raylib: fix crash from too many colors (#36382)
* fix

* bump
2025-10-16 02:22:02 -07:00
Maxime Desroches
845f6ec8cf build new staging branch 2025-10-16 02:06:09 -07:00
Maxime Desroches
e1ad4daf8d installer: branch migration (#36315)
* mig

* fix

* fix

* more

* staging
2025-10-16 01:59:23 -07:00
Maxime Desroches
783b717af8 AGNOS 14 (#36313)
* version

* updater

* this order

* manifest

* update

* prod

* logic

* magic

* new

* bump

* bump

* new

* b

* bump

* prod
2025-10-16 00:49:05 -07:00
Shane Smiskol
65e1fd299e raylib: fix full size alert text (#36379)
* stash so far

* try this

* better

* fast

* rename

* revert

* clean up

* yes

* hack to make it work for now

* actually fix

* fix
2025-10-15 22:53:37 -07:00
Shane Smiskol
b29b1964ba raylib screenshots: test onroad (#36369)
* test onroad

* person

* onroad alert

* mid and full

* all

* can do this

* tf

* tf

* clean up
2025-10-15 22:10:55 -07:00
Nayan
063aa994d2 ui: Resize E2E Alerts (#1396)
because people be enabling ALL THE UI

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-16 01:03:45 -04:00
Jason Wen
50462a1d01 E2E Alert: universal state machine (#1395)
* E2E Helper: universal state machine

* not used

* rename

* 10 frames for both

* time based

* magic

* lead depart: only arm if we have a confirmed close lead for over a second after allowing alert

* less

* shorter trigger

* lol

* always update
2025-10-16 00:55:17 -04:00
Shane Smiskol
80a8df0643 raylib: fix emoji centering with Label (#36376)
* kinda works

* but spacing was off, so back to big emoji

* rm debug

* fixed!

* fixed!

* fix newline in emoji pattern

* fix

* fix dat
2025-10-15 21:53:52 -07:00
Shane Smiskol
d9fc6c0086 raylib: small Label clean up (#36377)
* do

* clean up

* text raw is the default!
2025-10-15 21:11:00 -07:00
Shane Smiskol
cb612a4b90 raylib: no Label padding (#36374)
* none

* try this

* fix

* stash

* remove text padding from label, but keep for button

* simpler is to default to 0

* fix
2025-10-15 20:13:42 -07:00
Shane Smiskol
36d77debd0 raylib: remove redundant text center enum (#36372)
* rm

* type

* fix

* fix
2025-10-15 19:32:13 -07:00
Maxime Desroches
530ad2925d ui: clean raylib even on SIGINT (#36368)
* fix

* keep

* fix
2025-10-15 17:03:49 -07:00
Jason Wen
437726b348 Speed Limit Mode: only cleanup param if Assist was selected (#1393)
Speed Limit Mode: only cleanup param if it was Assist
2025-10-15 18:05:50 -04:00
Nayan
9e6af5ba74 ui: Adjust UI Elements to account for Sidebar & Dev UI (#1390)
* resize & reposition

* Apply suggestion from @sunnyhaibin

* sir, this is Wendy's

* this is still a Wendy's

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-15 17:40:52 -04:00
Nayan
99bd9075d5 ui: Fix Onroad Screen-Off default param (#1389)
Change defaults

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-15 17:18:31 -04:00
Jason Wen
c438aeb5a5 ui: check for updated message before updating states in HUD (#1392) 2025-10-15 16:47:00 -04:00
Jason Wen
f1ca81debf ui: chevron should always be on top of driving path (#1391) 2025-10-15 16:20:31 -04:00
Jason Wen
d7e1c42c2b ui: move Dynamic Experimental Control (DEC) toggle to Longitudinal panel (#1388)
- Implemented a new toggle for enabling Dynamic Experimental Control (DEC) in longitudinal settings.
- Removed previous implementation for DEC from general settings.
- Updated accessibility based on longitudinal control status.
2025-10-15 12:25:23 -04:00
Jason Wen
6d51d64285 interfaces: clean up unsupported params during initialization (#1385)
* interfaces: clean up unsupported params during initialization

* fix

* logging and no DEC when no long

* ui

* ui
2025-10-15 09:46:53 -04:00
Shane Smiskol
ec33519dc7 raylib: revert 0 button padding (#36360)
* back to 20

* here only
2025-10-15 01:38:00 -07:00
Shane Smiskol
2fd4b53aaf raylib: smooth path distance (#36278)
* smooth max distance

* junk

* clean up

* final

* you can read

* Update selfdrive/ui/onroad/model_renderer.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* true

* fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-15 00:48:05 -07:00
Shane Smiskol
a2c4fe1c90 raylib: fix setup styles (#36322)
* hardcoding is bad for you

* do updater

* reset

* lint

* duh!

* fixup setup

* fixup updater

* unround
2025-10-15 00:11:16 -07:00
Shane Smiskol
3e56612990 raylib: fix emoji vertical centering (#36358)
* space

* font scale

* fix centering
2025-10-15 00:06:04 -07:00
Shane Smiskol
75858673c4 less rounded border 2025-10-15 00:01:52 -07:00
Shane Smiskol
57223958b5 raylib screenshots: add more homescreen states (#36356)
* hmm can do yeidl approach

* clean up

* clean up

* flip

* and add paired + prime

* sort and add update params

* try

* all should have branch name

* test

* clean up

* add offroad alert to update screen
2025-10-14 23:56:15 -07:00
Shane Smiskol
3553a754a4 Fix vendored emoji font (#36357)
* add font

* use it

* rm old one
2025-10-14 22:45:33 -07:00
David
f290fb1e05 keyboard: fix double space (#36345)
* support multiple characters added add cursor position

* fix

* remove double space

* Revert "fix"

This reverts commit c938a52995b6f5343b461f408af5838b78f453d2.

* Revert "support multiple characters added add cursor position"

This reverts commit d8225a768686a88f2bdaabae6d2a57c541ac7f77.
2025-10-14 22:15:31 -07:00
Jason Wen
e0ccc175e4 liveMapDataSP: improve speed limit validation logic (#1383) 2025-10-15 00:59:40 -04:00
David
0c64818f52 Add screenshot for advanced network settings (#36351)
add screenshot for advanced network settings
2025-10-14 21:36:04 -07:00
ZwX1616
c44548ba0f camerad: make wide brightness more consistent with road (#36355)
align
2025-10-14 21:27:52 -07:00
Shane Smiskol
59bddfba8d raylib: rounded onroad corners (#36348)
* rounded corners

* use scissor

* 0.1

* middle

* don't trust chatter

* round

* clean p

* cleanup

* rev
2025-10-14 21:24:36 -07:00
Shane Smiskol
8a1fcd8991 raylib: fix possible DM crash (#36354)
* fix

* bruh

* clean up

* here

* rm
2025-10-14 21:17:36 -07:00
James Vecellio-Grant
734151f59b Reapply "capnp: consolidate TurnDirection enum" (#1376) (#1382)
* Reapply "capnp: consolidate TurnDirection enum" (#1376)

This reverts commit 339bc0b8b3.

* cache it

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-14 23:32:10 -04:00
Nayan
9a14baac4d Green Light and Lead Departure alerts improvements (#1381) 2025-10-14 20:01:42 -04:00
felsager
3546b625e7 latcontrol_torque: change in kp should not affect effective low speed factor gain (#36335) 2025-10-14 13:22:17 -07:00
Jason Wen
d3e3628a95 ui: only draw ahead speed limit if it's parsed from OSM (#1380) 2025-10-14 11:40:42 -04:00
Nayan
fec6382b96 UI: Fix Speed Limit Assist (SLA) Translations (#1379)
Fix SLA Translations
2025-10-14 11:29:27 -04:00
Jason Wen
4bd020e92b Speed Limit Assist: audible alerts for certain states (#1378) 2025-10-14 09:19:26 -04:00
Shane Smiskol
87443cd34d raylib: background onboarding texture loading (#36343)
* this seems best so far

* better

* clean up

* debug

* debug

* clean up

* final
2025-10-14 00:45:03 -07:00
Shane Smiskol
5f0e9fce61 raylib: update experimental mode homescreen button (#36344)
* update homescreen exp mode button

* and here

* Apply suggestions from code review
2025-10-14 00:40:41 -07:00
Shane Smiskol
a2cce7f897 raylib: fix border radius (#36346)
* colors

* revert color

* rev
2025-10-14 00:39:22 -07:00
Shane Smiskol
f4041dc1f0 raylib: black sidebar (#36347)
black sidebar
2025-10-14 00:33:38 -07:00
Jason Wen
7f5342f378 soundd: custom audible alerts (#1377)
* Revert "capnp: consolidate TurnDirection enum (#1370)"

This reverts commit 7229c7541e.

* soundd: custom audible alerts

* comment
2025-10-14 01:13:20 -04:00
Jason Wen
339bc0b8b3 Revert "capnp: consolidate TurnDirection enum" (#1376)
Revert "capnp: consolidate TurnDirection enum (#1370)"

This reverts commit 7229c7541e.
2025-10-14 00:19:21 -04:00
Jason Wen
59c64acc29 Subaru: Stop and Go support (beta) (#1375)
* Subaru: Stop and Go auto-resume support

* bump

* bump

* fix

* bump

* fix init

* wat

* use just standstill for now

* Revert "use just standstill for now"

This reverts commit f72cce6892.

* bump

* bump

* fix it

* only send at 10

* bump

* fix type

* forget about planner resume, it sucks

* try to send off_accel

* still need it

* always send

* disable safety checks for now

* same

* more

* all the time for both

* don't need i guess

* bump

* try 15 frames per try

* all should have it

* try 3 for all

* use throttle for all preglobal?

* bump

* bump

* separate thresholds between preglobal and global

* longer wait before sending

* shorter time but immediately resend

* quick

* new timeout

* about to cry

* same thing but another try

* no need

* round 3

* try 1.4

* lower!

* 1.2

* last try

* beta asf

* bump
2025-10-13 22:26:47 -04:00
James Vecellio-Grant
7229c7541e capnp: consolidate TurnDirection enum (#1370)
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-13 22:02:53 -04:00
Kumar
39e73cc46e ui: add ModelRendererSP::draw (#1372)
* ModelRendererSP::draw

* match

* less

* huh?

* unused

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-13 21:45:59 -04:00
Jason Wen
285fd97606 ui: only draw speedCluster speed over "MAX" when ICBM is enabled (#1374) 2025-10-13 20:36:24 -04:00
Shane Smiskol
8e3757ac87 raylib: image dimensions are optional (#36332)
* meas

* now no resizing

* clean up
2025-10-13 16:49:39 -07:00
Jason Wen
e5f1f86ac2 params: helper to clamp out-of-range int params (#1373)
* params: helpers to clamp out-of-range values

* lint

* inline

* fix access

* actually fix the param

* inherit them

* more lint
2025-10-13 19:37:58 -04:00
David
41fa0cdf82 fix cycle offroad alerts (#36302)
* fix: use parse_release_notes in cycle_offroad_alerts

* fix: set update available param true

* Update selfdrive/ui/tests/cycle_offroad_alerts.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-10-13 14:07:11 -07:00
David
692f5fdd72 Add screenshot for experimental mode description (raylib UI test) (#36327)
* feat: add test case to expand experimental mode description

* Update selfdrive/ui/tests/test_ui/raylib_screenshots.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-10-13 13:56:47 -07:00
Shane Smiskol
de0a1e66d8 software download screenshot (#36326)
* software

* clean up

* Qt ButtonControl has 0 padding

* clean up

* clean up
2025-10-13 13:54:50 -07:00
Jason Wen
7e03277962 ui: bigger cluster set speed fonts when ICBM is active (#1369) 2025-10-13 03:06:39 -04:00
Jason Wen
bd9bb74d03 custom cereal: fix formatting (#1367) 2025-10-13 01:40:22 -04:00
Kirito3481
7d54b58b8d ui: Update Korean translations (#1359)
Update ko-kr translations

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-13 00:19:24 -04:00
Jason Wen
68d059fd5d ui: ensure Cruise panel widget is reset when hideEvent (#1366) 2025-10-12 23:48:58 -04:00
Nayan
728108f97f ui: Optimize Param Read for Onroad UI (#1365)
* Move params to uiscene

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-12 23:36:58 -04:00
Kumar
cb6fa622ee Visuals: Move custom chevron info to sunnypilot/qt (#1066)
* refactor: move to sp ui

* pr suggestion

* no need to check pcm just oplong

* no color, big front, long check

* Fix Rainbow Mode & Y Positioning

* Move param to uiscene

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: nayan <nayan8teen@gmail.com>
2025-10-12 23:11:23 -04:00
Nayan
5b29fd0f2c UI: Onroad Screen Timeout Fixes (#1364)
* Screen Timeout Fixes

* rename

* auto type

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-12 12:12:52 -04:00
Maxime Desroches
129445cd1d setup: don't wait for so long (#36323)
nice
2025-10-12 00:37:36 -07:00
Shane Smiskol
13d0aefd7c raylib: don't get old onroad alert on startup 2025-10-11 23:40:42 -07:00
Shane Smiskol
5f7b05e808 raylib: don't create vipc client twice first time 2025-10-11 23:36:05 -07:00
Shane Smiskol
32f65bae55 alpha long: allow toggle while onroad + restart op
it's alpha, and some cars don't fault (we allow other toggles which would fault, so why not enable)
2025-10-11 23:29:08 -07:00
Maxime Desroches
49d9b8bb00 ui: fix cloudlog spam (#36321)
* dark office

* check

* back

* fix

* remove

* remove
2025-10-11 23:06:06 -07:00
Nayan
6f42bbab18 Reapply "UI: Make Always Offroad more accessible" (#1327) (#1361)
* UI: Make Always Offroad more accessible

* conditional - based on offroad

* no need to delete

* account for always offroad

* fix offroad transition

* do this inside updateState on every invoke

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-12 01:59:03 -04:00
Nayan
b89393a5a2 UI: Blinker Size & State Fix (#1363)
Blinker Size & State Fix

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-12 00:34:15 -04:00
Nayan
1e5758e712 ui: Better E2E Alert UI Positioning (#1355)
Better E2E Alert UI Positioning
2025-10-12 00:21:38 -04:00
Shane Smiskol
b3eba70b7a raylib: flip! (#36319)
* flip!

* add ui

* ?

* qt is extra

* low node

* add uiDebug

* fix

* fix dat

* bump double increase for tol

* it's ~11ms but double for tol

* fix report

* Update selfdrive/test/test_onroad.py
2025-10-11 07:41:29 -07:00
Shane Smiskol
cec7a5dc98 raylib: fix styling for fullscreen alerts (#36318)
* fix that

* fix styling

* and this

* revert

* fix full

* revert
2025-10-11 06:55:35 -07:00
Shane Smiskol
14993f58e3 raylib: set speed fixes (#36317)
* remove msaa artifacting by heavily reducing segments and match radius

* always draw set speed with '-' like qt

* clean up

* match qt behavior for rivian
2025-10-11 06:28:49 -07:00
Shane Smiskol
e8a17b4963 raylib: fix stale frames going onroad (#36314)
* fix

* try

* flip

* now flip

* fix network nav button heights

* revert
2025-10-11 06:04:27 -07:00
Shane Smiskol
fb77212221 raylib: add more spacing to network nav buttons 2025-10-11 06:02:10 -07:00
Shane Smiskol
aa7f6973c0 raylib: match Qt onroad button disabling (#36316)
* fixxx

* clean up

* disable onroad: adb, joystick, alpha long
2025-10-11 06:01:17 -07:00
Maxime Desroches
c2af5a82ff add earcut python package 2025-10-11 04:29:05 -07:00
Shane Smiskol
348114e5bd raylib: remove cut stuff (#36310)
remove cut stuff
2025-10-11 04:27:19 -07:00
Shane Smiskol
a6e28ac2ee raylib: disable mouse thread lag print (#36312)
every other process disables this
2025-10-11 04:27:01 -07:00
Maxime Desroches
0e6f78a656 raylib is now a core dependancy 2025-10-11 04:23:16 -07:00
Shane Smiskol
2305fb59a2 raylib: fix mic indicator (#36309)
* fix mic

* move out
2025-10-11 03:40:40 -07:00
Shane Smiskol
cc816043c1 raylib: add non-inline b tag (#36305)
* debug

* here too

* clean up
2025-10-11 03:36:47 -07:00
Shane Smiskol
b6dbb0fd8d raylib: font sizes from QT should match (#36306)
* pt 2

* fix line height

* fixup html renderer

* fix sidebar

* fix label line height

* firehose fixups

* fix ssh value font styling

* fixup inputbot

* do experimental mode

* pairing dialog numbers

* fix radius for prime user

* add emoji to firehose mode

* full screen registration

* fix registration btn size

* fix update and alerts

* debugging

* Revert "debugging"

This reverts commit 0095372e9479d8c727bcc8a78061f582d852133d.

* firehose styling

* fix offroad alerts missing bottom spacing expansion

* huge oof

* huge oof
2025-10-11 03:29:24 -07:00
James Vecellio-Grant
974a7a3f7d ui: improve toggle states in Developer panel (#1352)
ui: quickboot toggle race condition

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-11 02:47:45 -04:00
Jason Wen
fe6edda23a Revert "UI: Make Always Offroad more accessible (#1327)" (#1358)
Reverts #1327
2025-10-11 01:52:33 -04:00
Shane Smiskol
fdcf8b592e raylib: reset scrollers and description expansions on show event (#36304)
* scroll up on hide

* switch to show

* dismiss descriptions too!

* all is show

* all is show

* clean up

* visible items helper

* Revert "visible items helper"

This reverts commit e64f05b69155483aa0f3d74bd511f5d7c1ecfb79.

* reset
2025-10-10 21:07:36 -07:00
Jason Wen
17e25f78b4 ui: dynamic ICBM status (#1357)
* ui: dynamic ICBM status

* straight up pls
2025-10-10 17:00:44 -04:00
Shane Smiskol
4ff77a4752 raylib: fix DMoji (#36301)
* wow first time cursor made a tiny change to fix a problem!

* rm
2025-10-10 04:10:24 -07:00
Shane Smiskol
f04ee80452 raylib: implement calibration description (#36300)
* this is all cursor

* also cursor

* inline reset calib

* calib desc

* way better

* huh

* clean up

* rcvr

* stash changes to change params

* Revert "stash changes to change params"

This reverts commit ee998f04c4235ed20493b83e35c9f28e182d89b0.
2025-10-10 03:57:12 -07:00
Shane Smiskol
ddbbcc6f5d raylib: add experimental mode + alpha long confirmation dialog + related fixes (#36295)
* here's everything

* just the dev part

* same for exp mode!

* use rich

* fix br not working in p

* html height needs to be different than content/text rect

* fix confirmation

* fix

* fix 2.5s lag

* clean up

* use correct param

* add offroad and engaged callback too

* nl

* lint
2025-10-10 03:03:35 -07:00
Shane Smiskol
0f40afa357 raylib: fix black updater bg for network (#36299)
fix black bg
2025-10-10 01:41:11 -07:00
Shane Smiskol
cac8d3f405 raylib: fix missing showing dialog in setup/updater (#36298)
* fix showing dialog

* here for safety
2025-10-10 01:40:29 -07:00
Shane Smiskol
b521a913ab raylib: confirm dialog uses HTML renderer 2 (#36297)
* start

* keep it simple

* rm
2025-10-10 01:18:07 -07:00
Shane Smiskol
d6651ccd82 raylib: implement developer panel (#36292)
* first pass by cursor

* fix

* tell it what's good

* stash

* desc

* clean up junk

* alpha long can't use onroad cycle again due to faults

* lint

* fix kb
2025-10-09 23:09:55 -07:00
Nayan
9b92cdd2cc ui: fix standstill timer reset when offroad (#1351)
Standstill timer fix
2025-10-09 23:57:09 -04:00
Shane Smiskol
2976798852 raylib: implement toggles (#36284)
* start on exp mode

* more

* fmt

* rm

* 2nd try

* almost there

* clean up

* and this

* fmt

* more

* exp is colored when active

* move out, and rm redudnant self.state

* revert html changes for now

* fix untagged text inheriting previous tag

* why would this be unknown

* here too

* update live with car

* clean up + refresh toggles on showEvent + catch from cursor about setting desc if no carparams

* not sure why

* fix disengaged re-enabling locked toggles
2025-10-09 19:50:27 -07:00
Shane Smiskol
1b90b42647 Html renderer: reset tag so untagged text doesn't inherit last tag 2025-10-09 19:10:10 -07:00
Jason Wen
d6317ffd20 mapd: script to update version and hash (#1349)
* init and hash for 1.11.0

* update version and example for 1.12.0
2025-10-09 19:04:43 -04:00
felsager
de805e4af7 Lateral torque controller: use measurement rate as error rate (#36291) 2025-10-09 14:57:12 -07:00
Nayan
3ba52bc6fe ui: New? Old? Different? Standstill Timer UI (#1347)
New Standstill Timer UI

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-09 17:30:59 -04:00
Nayan
d7fd78050b OSM: Search!! (#1341)
* OSM Search

* cleanup

* wat

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-09 16:29:55 -04:00
HazZelnutz
8864b79a6e Visuals: Turn signals on screen when blinker is used (#1291)
* get blinker state from car_state

* Draw turn signals when blinker is active

* reloacted and resized turning signals

* add turn signal display setting

* Lowered Blink Frequency

* Moved x and y Offsets to drawing Function

Co-authored-by: Nayan <nayan8teen@gmail.com>

* Grouped Settings

* Moved blinking Logic to pulseElement Function

Co-authored-by: Nayan <nayan8teen@gmail.com>

* Improved Blinker Size and Position

* Get laneChangeBlocked Event from onroadEvents

* Draw Blinker red if laneChangeBlocked event is set

* Revert "Get laneChangeBlocked Event from onroadEvents"

This reverts commit 4310931b6cd59aed22119c2b4b558f09d3ad9c90.

* Get left and right Blindspot

* Replaced laneChangeBlocked by Blindspot checks

* slight optimization

* more refinement

---------

Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-09 15:59:28 -04:00
YassineYousfi
4d085424f8 North Nevada Model 🏜️ (#36276)
* e2d9c622-25a8-4ccd-8c8e-c62537b7aa0c/400

* 0e620593-e85f-40c2-9adf-1e945651ed13/400
2025-10-09 12:58:27 -07:00
Nayan
e9f054b7ee UI: Adjust Alert display with Developer UI (#1299)
* Adjust Alert Rect for Dev UI

* split out into SP classes

* fix includes

* formatting

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-09 15:26:14 -04:00
Nayan
f429f3191f ui: Bug fix Search with special chars (#1344)
Fix Search with special chars

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-09 14:53:47 -04:00
felsager
d07981ea3c bump opendbc (#36289) 2025-10-09 11:48:13 -07:00
Jason Wen
3df1b53fab ui: update description of Speedometer: Hide from Onroad Screen (#1346) 2025-10-09 14:33:14 -04:00
Jason Wen
6bb87174b9 Revert "CarControlSP: live params (#943)" (#1345)
* Revert "`CarControlSP`: live params (#943)"

This reverts commit b5104377

* bump

* bump
2025-10-09 14:14:12 -04:00
felsager
22d5cbd0fa PID: coefficients should be in front, i_rate should be i_dt (#36288) 2025-10-09 11:10:44 -07:00
felsager
4c9ca91b98 Latcontrol: use more accurate naming for saturation time (#36286) 2025-10-09 10:34:26 -07:00
felsager
0736f325fc Latcontrol torque: cleaner low_speed_factor calculation (#36287) 2025-10-09 10:29:35 -07:00
Jason Wen
6d356d520e ui: HUD drawing optimizations and fixes (#1342)
* no duplicated speed drawing

* reuse polygon
2025-10-09 10:28:56 -04:00
Jason Wen
73123aa400 torqued_ext: adjust RELAXED_MIN_BUCKET_POINTS boundary values (#1340) 2025-10-09 07:48:35 -04:00
github-actions[bot]
7dfe03b7a3 [bot] Update translations (#1200)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-09 02:21:09 -04:00
kostas.pats
dcc5afa8fa improve webrtc stack for use in camera focusing (#36268)
* made LiveStreamVideoStreamTrack use system time to calculate pts

* fixes as requested

* Align panda submodule with master (panda@615009c)

* made loggerd accept a run time env variable to pick stream bitrate

* added /notify endpoint to send json to all session's data channel

* fixed static analysis error

* adapted webrtc stream test to new pts calculation method

* fixed static erro

* fixed wrong indent

* fixed import order

* delete accidental newline

* remove excess spaces

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>

* remove excess spaces

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>

* changed exeption handling based on review

* fixed typo on exception handling

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-10-08 22:30:32 -07:00
DevTekVE
12a4b1b561 sunnylink: enhance fault handling and parameter checks (#1323)
* enhance sunnylink fault handling and parameter checks

- Added `SunnylinkTempFault` to handle temporary registration issues.
- Updated methods to account for new fault state, improving robustness.
- Improved uploader logic by considering metered network restrictions.

* maybe it was overkill

* Lol, kinda important

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 23:37:21 -04:00
Jason Wen
7aac14e6fc ui: Speedometer: Hide from onroad screen (#1336)
* ui: Speedometer: Display True Speed

* update

* ui: Speedometer: Hide from onroad screen

* wrong

* use stock one
2025-10-08 21:54:24 -04:00
felsager
226465e882 Latcontrol: refactor pid error to factor out lateral jerk component (#36280) 2025-10-08 18:29:54 -07:00
Jason Wen
ae21d40a19 ui: Speedometer: Always display true speed (#1335)
* ui: Speedometer: Display True Speed

* update

* use stock one
2025-10-08 20:33:19 -04:00
Shane Smiskol
0b62dbe16b raylib: more closely match Qt alert sizes (#36283)
* hmm this doesn't work

* clean up

* more

* bad fmtr

* match sidebar net texts

* better
2025-10-08 17:29:45 -07:00
Nayan
41abede7f6 UI: Better layout for onroad screen-off settings (#1334)
* OCD FIX

* MORE FIX.. BECAUSE WE ALL HAVE OCD

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 17:55:56 -04:00
Kumar
f653566803 mapd: Bump version v1.11.0 -> v1.12.0 (#1288)
v1.12.0

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 17:39:14 -04:00
felsager
2deb4e6f65 Lateral controllers: pass dt (delta time) explictly (#36281) 2025-10-08 14:39:05 -07:00
felsager
9f32f217e6 Latcontrol: type annotate update inputs and clip_curvature output (#36282) 2025-10-08 14:26:53 -07:00
DevTekVE
e8a39c4a74 Reapply "sunnylink: enhanced param keys fetch with data type" (#1317)
Reapply "sunnylink: enhanced param keys fetch with data type" (#1316)"

This reverts commit 282a8b093d.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 15:01:33 -04:00
Nayan
517020ffb6 UI: Move Brightness & Interactivity Timeout to Display Panel (#1326)
* UI: Move Brightness & Interactivity Timeout to Display Panel

* why Qt.. WHYY

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 13:51:31 -04:00
Jason Wen
a85f3ce11c Device: Onroad Uploads button (#1332) 2025-10-08 13:03:15 -04:00
Nayan
014baf8e90 UI: Make Always Offroad more accessible (#1327)
* UI: Make Always Offroad more accessible

* conditional - based on offroad

* no need to delete

* account for always offroad

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-08 12:05:06 -04:00
Shane Smiskol
e62781cccb Revert "raylib: font sizes from QT should match (#36237)"
This reverts commit 7933c10c97.
2025-10-08 04:05:49 -07:00
Shane Smiskol
e1912fa5be raylib: speed up polygon shader (#36275)
* actually works

* fix shader grad

* switch

* our own triangulate

* this is amazing

* ok 100 is too much for 3x. 10?

* fix colors

* review intern chad

* fmt

* rm for the line count

* bye

* rm

* see the diff

* start to revert nulleffect

* fix

* fix

* always feather

* aliasing doesn't seem necessary

* aliasing doesn't seem necessary

* fix lane lines disappearing halfway up due to buggy deduping -- very simple triangulation function takes ~same CPU time + same GPU utilization on PC (nvidia-smi)

* remove old

* even simpler triangulate

* this is useless

* more revert

* split color out again

* clean up ai bs

* back to original names

* more clean up

* stop it

* this limiting logic split out feels more even // less super dense

* typing

* clean up a little

* move to get grad color

* RM

* flip

* document

* clean up

* clean up

* clean

* clean up

* not a "state"

* clean up

* that did nothing

* cmt
2025-10-08 03:51:37 -07:00
Nayan
8050c56a43 UI: OptionControlSP - Fix Inline Spacer (#1325)
OptionControlSP - Fix Inline Spacer issue!!

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-07 23:24:18 -04:00
Nayan
0b826002e9 UI: Expandable Row - Fix margins (#1324)
Expandable Row - Fix margins

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-07 22:44:27 -04:00
Jason Wen
408d52d72a NNLC: ensure PID is always initialized properly (#1304) 2025-10-07 21:45:33 -04:00
DevTekVE
aeaac22274 ci: refine PR search query to avoid querying whole github (#1330)
* ci: refine PR search query to improve label handling in GitHub Action workflow

- Replaced `label` with `search_query` for better flexibility.
- Added support for multiple labels (`PR_LABEL` and `${PR_LABEL}-c3`).

* ci: fix PR search query for proper label matching in workflow

- Adjusted `label` query syntax to correctly handle multiple labels.

* Update .github/workflows/sunnypilot-master-dev-prep.yaml
2025-10-07 07:45:04 +02:00
Maxime Desroches
a7fe9db773 fix installer build 2025-10-06 16:37:50 -07:00
Shane Smiskol
35296a8692 flip setting order (#36266)
flip
2025-10-06 00:56:13 -07:00
github-actions[bot]
f28cea759d [bot] Update Python packages (#1250)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-06 02:52:02 -04:00
Jason Wen
de64b99740 Torque Lateral Control: customized settings (#1314)
* init

* use internal frame

* exit early if toggle not enabled

* ui init

* ui: replace `static_cast<int>` with `std::nearbyint` for precise rounding

* revert

* update title

* handle live relaxed

* fix

* tweak ui

* toggle behaviors

* lint

* Update torqued_ext.py

* always update

* make sure it's updated properly with offroad states

* fix

* make sure to initialize

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
2025-10-05 23:41:31 -04:00
Nayan
0e1de37281 Bug: Fix Lead Departure Alert Chime (#1328)
make lead-alert ding again
2025-10-05 21:18:03 -04:00
dzid26
5a309daee6 docs: clarify pedal press (#1289)
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-05 03:38:49 -04:00
dzid26
520649b893 params: Fix loading delay on startup (#1297)
params frame counter init

make sure param_store.update gets processed on first call

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-05 03:34:12 -04:00
DevTekVE
18abe218d9 ci: Disable homebrew cache for MacOS builds (#1322)
* maybe

Revert "fuck"

This reverts commit cb072a73b1b44ac3abeb50196be0956f3b7a7e14.

Revert "i dunno anymore"

This reverts commit 4d3c84ecb0e7830a552237e824995bc255007a1b.

i dunno anymore

fuck

* maybe

* try to fix the pipelines
2025-10-04 18:19:16 +02:00
Maxime Desroches
31801a7312 no more wayland for installer 2025-10-04 02:47:25 -07:00
Maxime Desroches
cc7ecd53c7 raylib: bump commit 2025-10-04 02:45:40 -07:00
DevTekVE
cca3be3a96 relock after inplace metadrive update (#1321)
relock after inplace metadrive update (#36256)

* relock after inplace metadrive update

* Revert "relock after inplace metadrive update"

This reverts commit 18193ffe34b66085e18605e6c9289ddcd658844d.

* just the hash

(cherry picked from commit 4d53a26a06)

Co-authored-by: Armand du Parc Locmaria <adpl33@gmail.com>
2025-10-04 10:08:08 +02:00
Shane Smiskol
586e49cab3 Revert "Switch to raylib for UI (#36238)"
This reverts commit c88ab5cd12.
2025-10-04 01:04:20 -07:00
Shane Smiskol
ebe47a580c raylib: fix registration box height 2025-10-04 01:04:05 -07:00
Shane Smiskol
7933c10c97 raylib: font sizes from QT should match (#36237)
* debug

* hacks everywhere but kind of works

* by font

* fix sidebar

* stash

* test update

* just use a const

* just use a const

* better

* clean up

* fix label

* simplify

* gpt5 is yet again garbage

* rm that

* clean up

* rm

* blank

* clean up

* I really don't like this but shrug

* fix

* fix experimental text
2025-10-04 00:32:49 -07:00
Shane Smiskol
2bc97ee23f raylib: fix DM popup (#36265)
* come on

* try

* better

* better

* multiple places!

* debug

* works

* temp

* whoops

* wonder if this wortks

* ah need this!

* wtf is this when deleted?

* another day no modal show event

* clean

* fix

* ugh

* need this
2025-10-04 00:05:20 -07:00
Shane Smiskol
c88ab5cd12 Switch to raylib for UI (#36238)
* flip

* change this
2025-10-03 23:38:10 -07:00
Shane Smiskol
943aaef76a raylib: match Qt onroad alert colors (#36264)
fix alert colors
2025-10-03 23:32:17 -07:00
Shane Smiskol
3fd9e94a34 raylib: all system apps work without anything built (#36261)
* all system apps work without scons

* better

* fix

* revert

* fix

* dont add

* huh
2025-10-03 23:18:20 -07:00
Shane Smiskol
e423f8f605 raylib: elide version on homescreen (#36263)
* elide ver on hom

* rm line

* blank
2025-10-03 23:17:51 -07:00
Shane Smiskol
0eb90ecb3e raylib: elide list item actions (#36262)
fix
2025-10-03 23:04:55 -07:00
DevTekVE
282a8b093d Revert "sunnylink: enhanced param keys fetch with data type" (#1316)
Revert "sunnylink: enhanced param keys fetch with data type (#1308)"

This reverts commit dcd382ffb8.
2025-10-04 07:42:44 +02:00
Maxime Desroches
703f3d0573 disable sim test for now 2025-10-03 22:09:00 -07:00
Shane Smiskol
2337704602 raylib: release notes are drawn with HTML renderer (#36245)
* stash

* ok chatter is useful for once

* draw text outside tags

* hmm

* undo that shit

* i don't like this chatgpt

* Revert "i don't like this chatgpt"

This reverts commit 5b511911d81242457bfb5fc808a9b9f35fe9f7a2.

* more robust parsing (works with missing tags, markdown.py actually had bug) + add indent level

* the html looks weird but is correct - the old parser didn't handle it

* clean up

* some

* move out

* clean up

* oh this was wrong

* draft

* rm that

* fix

* fix indentation for new driving model

* clean up

* some clean up

* more clean up

* more clean up

* and this

* cmt

* ok this is egregious mypy
2025-10-03 21:47:53 -07:00
Shane Smiskol
bd9888a439 raylib screenshots: add software release notes (#36259)
add software
2025-10-03 21:29:20 -07:00
Shane Smiskol
12b3d0e08d raylib: cache wrap text (#36258)
* cache html height

* clean up

* todo
2025-10-03 20:52:50 -07:00
Shane Smiskol
89d350a791 raylib html renderer: fixups (#36257)
* this wasn't used

* override text size and color

* render untagged text as paragraph

* and indent

* cache expensive height calc

* fmt

* fix that

* unclear if this is even needed

* and that

* huh

* debug

* Revert "debug"

This reverts commit 7d446d2a37a96e6bd1001c566d4f8e8f417f8fb7.
2025-10-03 20:42:42 -07:00
Shane Smiskol
99a83e5522 Revert "raylib screenshots: find diff faster (#36255)"
This reverts commit a8328cb5ff.
2025-10-03 20:35:32 -07:00
Armand du Parc Locmaria
4d53a26a06 relock after inplace metadrive update (#36256)
* relock after inplace metadrive update

* Revert "relock after inplace metadrive update"

This reverts commit 18193ffe34b66085e18605e6c9289ddcd658844d.

* just the hash
2025-10-03 19:43:03 -07:00
Shane Smiskol
a8328cb5ff raylib screenshots: find diff faster (#36255)
* ?

* run it

* wrong

* here too

* revert
2025-10-03 17:59:42 -07:00
Shane Smiskol
844c328625 raylib screenshots: prevent saving black frame
raylib screenshots: prevent saving black frame
2025-10-03 17:59:19 -07:00
Shane Smiskol
39b97d4e18 raylib screenshots: use long branch name (#36254)
* stress test

* everything
2025-10-03 17:50:02 -07:00
Shane Smiskol
45f497e8f6 raylib screenshots: add mouse click helper (#36253)
* add helper

* rm

* name

* fix
2025-10-03 17:46:39 -07:00
Shane Smiskol
edc5a0412c rename to setup_settings 2025-10-03 17:35:10 -07:00
Shane Smiskol
9670e3a5eb raylib: add confirmation dialog (#36252)
* conf

* update case

* fix

* fix

* rm

* back

* alread setup

* avail
2025-10-03 17:34:53 -07:00
Shane Smiskol
7b2b10bc9e raylib screenshots: raise ui delay 2025-10-03 17:34:22 -07:00
YassineYousfi
bd357adb8b update release notes for 0.10.1 2025-10-03 17:01:20 -07:00
Shane Smiskol
670b6011da raylib: match QT confirmation dialog size (#36248)
* closer to qt

* this too

* eval
2025-10-03 16:13:40 -07:00
Jason Wen
1e7fc15a04 Speed Limit Assist: Update state machine for PCM long cars (#1311)
* Speed Limit Assist: Update state machine for PCM long cars

* new test to catch this wrong transition

* tldr
2025-10-03 18:24:24 -04:00
Jason Wen
e999839a57 ui: replace static_cast<int> with std::nearbyint for convert & rounding (#1313)
* ui: replace `static_cast<int>` with `std::nearbyint` for precise rounding

* revert
2025-10-03 17:46:13 -04:00
Armand du Parc Locmaria
150ff72646 Dockerfile.openpilot: don't set UV_PROJECT_ENVIRONMENT (#36246)
* Dockerfile.openpilot: don't uv sync with root

* Revert "Dockerfile.openpilot: don't uv sync with root"

This reverts commit 2c271d0b5b55d6ae2ece6b28dc90a96e6e891ded.

* don't set UV_PROJECT_ENVIRONMENT
2025-10-03 14:36:12 -07:00
DevTekVE
1bfecbc9c2 sunnylink: Enabled by default (#1312)
Enable sunnylink by default
2025-10-03 19:43:13 +02:00
DevTekVE
dcd382ffb8 sunnylink: enhanced param keys fetch with data type (#1308)
* refactor: enhance parameter handling and add new parameter retrieval method

- Refactored `get_param_as_byte` for better modularity and added `_to_bytes` helper function.
- Introduced `getParamsAllKeysV1` to retrieve all keys with enhanced metadata.

* refactor: update parameter handling and response structure in sunnylink

- Modified `_to_bytes` to accept `bytes` type for improved type consistency.
- Adjusted response keys in `sunnylinkd` for clarity.

* fix: update `get_param_as_byte` to use corrected method for default values

- Replaced `get_default` with `get_default_value` for accurate param retrieval.
- Ensures consistent handling of default parameter values.

* refactor: remove redundant `None` check in `sunnylinkd.py`

- Streamlined parameter iteration by eliminating unnecessary `None` validation.
- Simplifies logic for constructing `params_dict`.

* refactor: streamline `sunnylinkd` response by removing redundant `keys_v1` field

- Simplified return structure by excluding unused `keys_v1` key.
- Reduces response payload for improved efficiency.

* refactor: split `getParamsAllKeys` into distinct functions for improved clarity

- Added `getParamsAllKeysV1` to preserve original metadata-rich behavior.
- Revised `getParamsAllKeys` to return a simplified list of parameter keys.

* style: remove extraneous newline in `sunnylinkd.py`

- Ensures consistent formatting and adheres to style guidelines.

* Test
2025-10-03 19:42:46 +02:00
Shane Smiskol
d567442136 raylib: split out HTML renderer (#36244)
* stash

* ok chatter is useful for once

* why doesn't it understand?!

* rm that

* clean up
2025-10-03 00:37:47 -07:00
Shane Smiskol
540fff5226 raylib: draw update button and fix incorrect font (#36243)
* always update layout rects

* don't ever use raylib font

* use it

* such as
2025-10-03 00:20:30 -07:00
Shane Smiskol
21273c921e raylib: excessive actuation offroad alert (#36242)
* excessive actuation check

* from gpt

* back

* use buttons

* use widgets for ultimate clean up - no ai slop

* feature parity

* revert

* clean up
2025-10-02 23:54:31 -07:00
Shane Smiskol
75e52427d1 raylib: fix when we show offroad alerts and styles (#36240)
* fix how we show alerts

* test this too

* match border radius

* simplifty

* keep

* back

* fix alert spacing

* fix alert text padding

* cmt

* cmt
2025-10-02 22:53:02 -07:00
Shane Smiskol
21fd3d0320 raylib: use extra text in offroad alerts (#36241)
* replace properly

* test
2025-10-02 21:21:50 -07:00
Shane Smiskol
1ee798439a raylib: WiFi fixes (#36239)
* proces in AN and WM

* clean

* ban api

* fix

* fiix

* fix pairing dialog

* cleanup

* fix multi action button hard to click

* fix

* fix right margin of multi action

* clean up
2025-10-02 21:09:17 -07:00
Armand du Parc Locmaria
cc52f980b3 Dockerfile.openpilot uv run scons (#36236)
* Dockerfile.openpilot_base use UV_PROJECT_ENVIRONMENT

* Revert "Dockerfile.openpilot_base use UV_PROJECT_ENVIRONMENT"

This reverts commit 3725e54ce0727077ca4347d24ca38e25d5864d47.

* Reapply "Dockerfile.openpilot_base use UV_PROJECT_ENVIRONMENT"

This reverts commit 11b04f57acb9c81fcc5a22a6a6d78d666c59ca6c.

* use uv run to pick up correct ppath
2025-10-02 15:31:39 -07:00
Jason Wen
09d165a85b Tesla: MADS full support with VEHICLE bus harness (#1310)
* Tesla: MADS full support with VEHICLE bus harness

* bump

* need new arg

* uh

* block cruise main for these cars still

* continue to block tesla

* oops

* always allow for tesla
2025-10-02 16:37:57 -04:00
Nayan
4c4964a740 Device: Wake for all visual alerts (#1309)
this should do it
2025-10-02 14:42:15 -04:00
Nayan
225ce45d31 feat: Lead Departure Alert (#1302)
* init

* fix

* event

* UI

* events..for real

* SP

* ugh

* toggles

* read params first

* stoopid it is

* fix green light img

* fix green light image. for real this time

* move events to longitudinal_planner

* move events to longitudinal_planner

* move e2e alerts to separate class

* fix

* fixxxxxxx

* blinky blink

* blinky blink

* refactor

* more refactor

---------

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-02 13:53:23 -04:00
Shane Smiskol
ec7e3192bb revert that 2025-10-02 04:00:09 -07:00
Shane Smiskol
3fd352a7ef raylib: updater UI (#36235)
* auto attempt

* gpt5

* Revert "gpt5"

This reverts commit 556d6d9ee4d53aca0f4612023db6cfb2bed7ce29.

* clean up

* fixes

* use raylib

* fixes

* debug

* test update

* more

* rm

* add value to button like qt

* bump

* bump

* fixes

* bump

* fix

* bump

* clean up

* time ago like qt

rm

* bump

* clean up

* updated can fail to respond on boot leading to stuck state

* fix color

fix

* bump

* bump

* add back

* test update

* no unknown just ''

* ffix
2025-10-02 03:57:10 -07:00
Shane Smiskol
49570c11c6 Remove animation from networking 2025-10-02 02:04:09 -07:00
Nayan
92214b69d8 feat: Green Traffic Light Alert (#1287)
* init

* fix

* event

* UI

* events..for real

* SP

* ugh

* toggles

* read params first

* stoopid it is

* fix green light img

* fix green light image. for real this time

* move events to longitudinal_planner

* move events to longitudinal_planner

* move e2e alerts to separate class

* green light alert only for this PR

* fix

* fixxxxxxx

* blinky blink

* blinky blink

* slight cleanup

* only used for params

* a bit more

* only when long is not engaged

* too long

* update description

* always 3 seconds if not moving

* initialize in constructor instead

* less

* rename

* always init at 0

---------

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-10-01 12:37:10 -04:00
Shane Smiskol
b8ae62a0b1 raylib scroll panel: check bounds (#36233)
check in bounds rect for scroll panel!!
2025-10-01 01:02:35 -07:00
Shane Smiskol
29a6f0504a raylib: fix WiFi in setup and updater (#36232)
move back to more base class
2025-10-01 00:46:51 -07:00
Shane Smiskol
eadab06f59 raylib: remove gui_button (#36229)
* vibing can be good

* and listview

* rm that

* html render

* text.py

* ssh keys

* updater w/ Auto

* wow gpt5 actually is better

* well this is better

* huh wifi still doesn't work

* lfg

* lint

* manager waits for exit

* wait a minute this changes nothing

* this will work

* whoops

* clean up html

* actually useless

* clean up option

* typing

* bump
2025-10-01 00:32:09 -07:00
Shane Smiskol
9493f2a0eb raylib: remove functional confirmation dialog (#36231)
* rm

* yess

* clean up
2025-09-30 23:48:04 -07:00
Shane Smiskol
b593b7cc43 raylib: SSH key text entry works more than once (#36230)
* impossible

* jarn

* actually space

* forgot
2025-09-30 23:43:23 -07:00
Shane Smiskol
5c0c2a17b0 raylib: add mic indicator (#36207)
* update lang

* mic indicator

* clean up

* clean up

* switch

* fix

* revert
2025-09-30 22:30:45 -07:00
Shane Smiskol
5f33b2fb2d raylib: frame independent scroller (#36227)
* rm that

* almost

* yess

* some work

* more

* todo

* okay viber is good once in a while

* temp

* chadder can't do this

* revert

* this was broken anyway

* fixes

* mouse wheel scroll

* some clean up

* kinda works

* way better

* can tap to stop

* more clean up

* more clean up

* revert last mouse

* fix

* debug only

* no print

* ahh setup.py fps doesn't affect DEFAULT_FPS ofc

* rest

* fix text

* fix touch valid for network
2025-09-30 22:25:43 -07:00
Shane Smiskol
63e0e038fa raylib: don't use DEFAULT_FPS (#36228)
* dont use DEFAULT_FPS

* replace
2025-09-30 22:11:21 -07:00
ZwX1616
d24a14cb39 DM: Large Donut model 🍩 (#36198)
* 59cfd731-6f80-4857-9271-10d952165079/225

* deprecate at the end
2025-09-30 20:32:19 -07:00
Shane Smiskol
3efa52f53b fix missing import 2025-09-30 20:05:40 -07:00
Jason Wen
f3ed577870 Longitudinal: reimplement Gas Interceptor (comma Pedal) support (#1290)
* init

* bump

* bump

* bump

* recheck openpilot long availability

* bump

* bump

* bump

* bump

* bump

* just base for now

* bump

* bump

* bump

* bump

* flipped

* apparently it's yucky, reverting most

* bump

* need to add for toyota

* should've been remove

* flipped

* bump

* no way

* fix

* test sdsu distance

* final tuning for pedal

* bump
2025-09-30 22:37:13 -04:00
Nayan
49e58a2532 Device: Driving Screen Off (#1252)
* init

* onroad brightness control

* new icon

* update touch handlling

* don't touch me

* now i feel every touch

* resolve review comments

* tired of this shit

* ugh

* translate

* duplicate

* fix

* adjust

* update param in the same function

* flip

* format

* reorder

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-30 21:06:11 -04:00
Jason Wen
ae901d1562 ui: add Display settings panel (#1301)
* init

* onroad brightness control

* new icon

* update touch handlling

* don't touch me

* now i feel every touch

* resolve review comments

* tired of this shit

* ugh

* just panel for now

* more

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
2025-09-30 20:17:53 -04:00
Shane Smiskol
16a4206720 Revert "Reapply "raylib: 20 FPS onroad (#36208)""
This reverts commit ed185e90f6.
2025-09-30 16:34:45 -07:00
Jason Wen
85d2653fda Speed Limit Assist: No Easter Eggs 2025-09-30 17:50:35 -04:00
Maxime Desroches
e4784d44f6 bump panda (#36226)
bump
2025-09-30 14:33:10 -07:00
Jason Wen
0f4828df82 ui: only longitudinal cars can use Speed Limit Assist (#1300) 2025-09-30 13:39:11 -04:00
Jason Wen
dc0fd4ca96 Longitudinal: Speed Limit Assist (SLA) (#833)
* formatting

* more

* create directory if does not exist

* mypy my bt

* policy param catch exceptions

* handle all params with exceptions

* more

* single method

* define types in init

* rename

* simpler op enabled check

* more mypy stuff

* rename

* no need for brake pressed

* don't reset if gas pressed

* type hint all

* type hint all

* back to upstream

* in another pr

* no longer need data type

* qlog

* slc in another pr

* use horizontal accuracy

* use horizontal accuracy

* set core affinity for all realtime processes

* unused

* sort

* unused

* type hint and slight cleanup

* from old implementation

* use directly

* combine pm

* slight more cleanup

* type hints

* even more type hint

* Revert "slc in another pr"

This reverts commit 3a6987e6

* Revert "in another pr"

This reverts commit a29bccff12.

* rebump

* no need to check alive

* use it directly

* fix test

* refactor

* use gps data directly

* quote...?

* lint

* fix tests

* use CC.longActive

* user confirm in another PR

* rename

* fix import

* params fix

* no more

* fix

* drop new state machine for now

* more fixes

* internalize output

* unused

* rearrange

* auto draft

* rename

* this

* no

* no need

* use existing

* wrong cruise speed

* fix

* not used for now

* Revert "not used for now"

This reverts commit f0083d6241.

* some

* use frames instead

* split speed limit resolver out of slc

* no need to pass sm

* fix params

* test init

* use frame instead of time

* track session

* some tests

* too limiting

* bump

* always reset state

* end session if long_active but slc inactive at any given time

* off

* no warning in this PR

* no speed factor engage type yet

* wide open

* no

* introduce disabled, no longer transitions at inactive

* fix tests

* no more tempinactive

* clean

* rename

* offset default > off

* new tests, fixes controller

* more tests

* not really needed yet

* lint

* fix

* some more tests

* wrap

* more

* more

* use vCruiseCluster for set speed

* init better

* finish it up

* no

* typo

* one method state machine

* refactor preactive timeout check

* refactor new session check

* directly return statuses

* comments

* v_target

* refactor speed limit resolver

* turn off debug

* more resolver refactor

* no longer needed

* lint

* more lint

* fix

* move around

* fix events

* update event

* already happens while in enabled

* add carstateSP

* less

* Speed Limit Control -> Speed Limit Assist

* in another PR

* more rename

* overriding state

* fix

* make sure to return the correct type

* sync with latest

* housekeeping

* use v cruise cluster instead

* fix var

* show it in UI!

* actually show it

* update event texts

* todo

* no override for now

* wrong timer!

* add vtarget and atarget

* fix

* handle no speed limit events

* fix size

* unused

* skip preActive if init max speed was already reached

* display last known speed limit and its state with SLA

* pending event

* much shorter disable guard

* update events

* convert max init for metric

* fix even if unused atm

* just use it

* red for all

* not disabled

* rename

* 10s pre active

* kumar wants it higher, blame him

* fix

* pcm long only

* some fixes

* rename

* use consolidate method to evaluate set speed status

* init non pcm cruise

* tests

* disable non pcm long state machine for now

* lint

* lint

* let the non PCM party begins

* fix event

* update event

* use speed limit final last

* only do direction checks if preActive

* use resolver

* use it directly

* no longer applies

* do it globally

* non pcm long: adapting or pending unused

* use button events instead of raw vals

* need to initialize

* move

* what?

* what #2???

* cst!

* circular

* slight fixes for tests

* change up checks for user confirm

* get buttonEvents at 100 hz and process for 20 hz consumption

* get v cruise cluster from outer loop

* Revert "get v cruise cluster from outer loop"

This reverts commit be8068e8ab.

* Revert "get buttonEvents at 100 hz and process for 20 hz consumption"

This reverts commit a739d4d437.

* don't need

* do not allow target speed confirm if inactive

* do not allow preActive if no valid speed limit

* gimme them arrow pls

* less

* descriptive direction

* fix event

* update cs in 100 hz

* Revert "don't need"

This reverts commit 1eec763be7.

* missed

* wrong

* stop

* throw them to helpers class

* property

* hold speed behavior changes

* abstract it

* use converted to check last set speed change

* Revert "do not allow target speed confirm if inactive"

This reverts commit 9840e74e

* pre active too short

* slight fixes

* fix tests

* linty lint

* speed limit changed hold timer for non pcm long

* should be 0

* less loopy

* some gates

* special sauce for sla

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-09-30 13:13:45 -04:00
Shane Smiskol
aaf2aac050 raylib: training guide (#36224)
* fix regulatory

* debug slow loading

* easy gather step coords

* gotcha

* and fix

* dm option

* fix final

* fixes

* progress bar!

* "vibe coding is great"

* wtf gpt5

* jfc

* hand crafted >> vibe

* it's slow so only load images if we're doing any kind of training

* tf

* format

* clean up

* clean up

* no float

* cmt

* more clean up

* clean up

* eww

* rm

* no debug

* match y

* clean that up

* here too

* windows
2025-09-30 03:11:42 -07:00
Shane Smiskol
b5ec0e9744 raylib: fix regulatory 2025-09-30 02:39:19 -07:00
Jason Wen
90adc18032 MADS: enforce certain soft disable events by user when in motion (#1298)
* MADS: enforce soft disable events by user when the vehicle is in motion

* flipped
2025-09-29 19:18:52 -04:00
Shane Smiskol
070a13096b raylib: add todo for niceness (#36210)
* not nice

* hmm

* debug

* todo

* revert

* yep
2025-09-29 13:03:03 -07:00
commaci-public
7ccab2bdb9 [bot] Update Python packages (#36220)
* Update Python packages

* revert tg, model diff looks a bit fishy

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-28 13:50:13 -07:00
Shane Smiskol
e9434befaa Refactor offroad alerts loading to use OFFROAD_ALERTS (#36214)
* Refactor offroad alerts loading to use OFFROAD_ALERTS

* clean up
2025-09-27 03:37:23 -07:00
Shane Smiskol
56c77fd5fa re-run 2025-09-27 03:32:19 -07:00
Shane Smiskol
e6bd88371e fix! 2025-09-27 02:55:40 -07:00
Shane Smiskol
bc30b01eb7 Fix raylib ui report (#36215)
hmm
2025-09-27 02:53:21 -07:00
Shane Smiskol
ef93981bfa raylib: ui diff test (#36213)
* add raylib ui test

* match qt

* exe

* vibing is epic

* this is epic

* format

* add more settings

* fix to actually use raylib

* add kb

* global

* pair

* rm cmts

* show event

* this is so stupid

clean up

* clean up

* rename dir

* clean up

* no more vibe

* rm

* ugh it's always slightly different for no reason

* nvm region is actually broken

* 1l
2025-09-27 02:37:35 -07:00
Shane Smiskol
35e2fc7dd9 raylib: use touch thread in all places (#36212)
* fix not opening alerts

* whops

* rm mouse pressed from offroad alerts

* ah its a base class

* one last place

* fix

* rm lines
2025-09-26 23:49:17 -07:00
Shane Smiskol
2feddf32b2 raylib: fix lost onroad tap events (#36211)
* debug

* see it's good to have abstraction

* clean up

* fine

* wtf do you mean mypy? how can you not coerce this?
2025-09-26 22:40:38 -07:00
Shane Smiskol
ed185e90f6 Reapply "raylib: 20 FPS onroad (#36208)"
This reverts commit 5cbfc7705b.
2025-09-26 21:43:15 -07:00
Shane Smiskol
19fc66f88a Fix tearing offroad 2025-09-26 21:41:51 -07:00
Shane Smiskol
5cbfc7705b Revert "raylib: 20 FPS onroad (#36208)"
This reverts commit 8de8c3eb00.
2025-09-26 21:41:12 -07:00
Shane Smiskol
8de8c3eb00 raylib: 20 FPS onroad (#36208)
* 20

* dynamic fps

* flip

* init to be safe

* fix possible fps weirdness

* gate on change

* not now

* rev
2025-09-26 21:38:59 -07:00
Shane Smiskol
04365f12ff raylib: remove unused globals 2025-09-26 21:10:09 -07:00
Shane Smiskol
9297cd2f3e raylib: use filter for allow throttle (#36209)
* use time here

* use epic filter

* rm

* intermediary

* tune
2025-09-26 21:08:39 -07:00
Shane Smiskol
0711160b1c raylib: dismiss dialog on pair (#36205)
* show for unknown

* use Button to make clicking work

* close on pair

* close on pair

* make widget!

* dynamic pairing btn

* whyyy

* clean up

* can do this

* this button is also hard to tap
2025-09-26 18:59:15 -07:00
Shane Smiskol
33f01084d1 raylib: implement cell settings (#36204)
* get vibing

* simplify

* vibing is bad

* simplify

* fix that

* now update

* clean up

* last two

* cell is UpdateUnsaved so we don't need to disable

* we only need actions

* we only need actions

* sort

* stuff

* dont deactivate

* clean up

* clean up

* more

* ipv4 fwd

* warns

* fixz

* rm

* clean up

* one return point

* format

* top
2025-09-25 23:44:12 -07:00
Adeeb Shihadeh
1fbec6f601 remove .clang-tidy 2025-09-25 21:02:26 -07:00
Adeeb Shihadeh
cf5b743de6 build system cleanups (#36202)
* it's all common

* never getting fixed

* it's just tici

* reorders

* qcom2 -> tici

* Revert "qcom2 -> tici"

This reverts commit f4d849b2952cb0e662975805db6a1d32511ed392.

* Reapply "qcom2 -> tici"

This reverts commit 58b193cb8de872830f8a7821a339edca14e4a337.

* is tici

* lil more

* Revert "is tici"

This reverts commit a169be18d3fdcb3ef8317a63a89d8becadabfad8.

* Revert "Reapply "qcom2 -> tici""

This reverts commit 26f9c0e7d068fc8a1a5f07383b3616e619cd4e8c.

* qcom2 -> __tici__

* lil more

* mv lenv

* clean that up

* lil more]

* fix

* lil more
2025-09-25 20:55:14 -07:00
Shane Smiskol
2c377e534f raylib: wifi manager initialize function (#36203)
* init func

* rm print

* rm

* use get_conn settings in another place
2025-09-25 20:48:12 -07:00
Shane Smiskol
1ca9fe35c2 raylib: networking parity with QT (#36197)
* match style

* all this was not naught

* cool can do this

* fix toggle callback - also not for naught

* always process callbacks

* toggle stuff

* cleaner

* tethering password

* clean up

* todos for later

* this is fineee

* add metered options

* wifi metered button

* add hidden network buutton and fix instant modal to modal

* damped filter

* Revert "damped filter"

This reverts commit f9f98d5d708fb15cf1ebef4bdace577f0e347658.

* fix metered toggle when disconnected

* fix tethering enabled

* ohh

* fix keyboard title

* disable edit button temp

* move here

* proper disable

* clean up

* more

* move for loop into enqueue function

* flippy

* got more :(

* todo

* clean up

* mypy

* rename

* todo

* rename

* again

* again

* format
2025-09-25 20:16:14 -07:00
Adeeb Shihadeh
56c49b3b42 cleanup dead build flags 2025-09-25 19:28:16 -07:00
Shane Smiskol
5429748767 raylib: fix button clicking on device (#36201)
* fix button clicking on device

* clean up
2025-09-25 19:27:13 -07:00
Greg Hogan
6aecf59536 add ssh hostname comma- prefix for convenience (#36199) 2025-09-25 17:42:11 -07:00
Jason Wen
db65937fc7 Revert "ui: generic check with ICBM param" (#1286)
Revert "ui: generic check with ICBM param (#1274)"

This reverts commit d5a873ed86.
2025-09-25 19:15:36 -04:00
James Vecellio-Grant
8ebe9b69af bug: fix Speed Limit Resolver initialization (#1285)
bug: fix speedlimitresolver init
2025-09-25 10:11:51 -04:00
Jason Wen
4c40be8b1f ui: always convert speedLimitFinalLast 2025-09-25 07:01:32 -04:00
Jason Wen
082ea8119b Speed Limit Resolver: abstract more speed limit attributes (#1284)
* Speed Limit Resolver: abstract more speed limit attributes

* update ui

* lint
2025-09-24 22:17:03 -04:00
Shane Smiskol
afc7ff1b7a raylib: fix multilang dialog height (#36196)
* fix multilang dialog height

* clean up
2025-09-24 17:14:06 -07:00
Jason Young
222e880561 Honda: Add 2021 Acura TLX to release (#36193)
* bump opendbc

* regen CARS.md

* add to RELEASES.md
2025-09-24 15:24:15 -04:00
Jason Wen
1465e38c7b SCC-M: overriding is an enabled state (#1281) 2025-09-23 10:11:52 -04:00
Jason Wen
ecee67dd64 Locationd: reimplement liveLocationKalman and use position_geodetic in liveMapDataSP (#1275)
* init

* desc

* llk welcome back

* more

* new param to write

* update mapd

* no migration

* no refactor for now

* exec

* rename

* bearing

* fix test

* lint
2025-09-22 23:39:55 -04:00
Jason Wen
ea6178e53e Smart Cruise Control: Map (SCC-M) (#1280)
* init

* more

* a bit more

* expose

* bruh

* some fixes

* ui

* lint

* Update map_controller.py

* add overriding

* draw in orders
2025-09-22 22:54:45 -04:00
Jason Wen
01a0ad496d ui: more speed limit improvements (#1278)
* ui: more speed limit improvements

- show speed limit offset with last valid speed limit
- show last valid speed limit if current speed limit is not valid

* rename

* round it

* update logic

* in its own var and 5 frames now

* new offset vals

* slightly more

* apply suggestions
2025-09-22 19:50:59 -04:00
Maxime Desroches
6901e3417b add 3X release branch to RELEASE_BRANCHES (#36190)
add
2025-09-22 15:18:43 -07:00
commaci-public
cd33562379 [bot] Update Python packages (#36188)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-09-22 13:43:26 -07:00
Jason Wen
b64d5a0fa4 liveMapDataSP: parse bearing from GPS (#1279)
* simpler approach pls

* fix
2025-09-22 09:39:22 -04:00
Jason Wen
005c6aed95 ui: separate road name toggle param and bigger fonts (#1277)
* ui: separate road name toggle param and bigger fonts

* slightly lower
2025-09-22 08:54:16 -04:00
Maxime Desroches
073503a6f2 fix is_dirty when fetching branch with updated (#36187)
fix is_dirty
2025-09-21 23:53:07 -07:00
Maxime Desroches
61d5a50534 Revert "fix is_dirty when switching branch with updated (#36162)"
This reverts commit 30c388aea8.
2025-09-21 22:44:14 -07:00
Jason Wen
2fa66d6f4d ui: include Speed Limit Offset for Speed Limit Warning (#1276)
* ui: include Speed Limit Offset for Speed Limit Warning

* fix
2025-09-22 01:35:13 -04:00
Jason Wen
d5a873ed86 ui: generic check with ICBM param (#1274) 2025-09-21 02:53:03 -04:00
Jason Wen
563ae65443 ui: Road Name param should be persistent (#1273) 2025-09-21 00:33:43 -04:00
commaci-public
b6e0d4807a [bot] Update Python packages (#36184)
* Update Python packages

* not available anymore

* also this

* also this

* maybe?

* version

* try

* Revert "version"

This reverts commit 9ac4401b9ca59677b82736faff8baf66861df5f2.

* revert

* cffi

* issue

* comment

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-09-20 20:10:51 -07:00
Jason Wen
2efe78a4ef ICBM: allow button commands at all speeds (#1271)
* ICBM: allow button commands at all speeds

* use openpilot state
2025-09-20 17:48:13 -04:00
Jason Wen
569a9216db ui: only draw speed limit offset when speed limit is valid (#1270) 2025-09-20 17:36:13 -04:00
Jason Wen
629cfd845f ui: fix scrolling behavior in Speed Limit settings (#1269)
* rename

* ui: fix scrolling behavior in Speed Limit settings
2025-09-20 17:23:24 -04:00
Jason Wen
2892dc05c8 mapd: use SubMaster polling to validate GPS status (#1268) 2025-09-20 16:20:22 -04:00
Jason Wen
632b416f2a ICBM: use longitudinalPlanSP.vTarget directly for evaluation (#1266)
* ICBM: add SCC-V to v_targets list

* Longitudinal planner: expose custom vTarget and aTarget

* use the source directly
2025-09-20 14:22:10 -04:00
Jason Wen
5f3821c1f9 Longitudinal planner: expose custom vTarget and aTarget (#1267) 2025-09-20 12:21:13 -04:00
Jason Wen
55b7529ca4 ui: Road Name (#1265) 2025-09-20 05:23:02 -04:00
Jason Wen
c248f307f8 ui: Speed Limit Warning (#1263)
* ui: Speed Limit Warning

* missed

* behind toggle

* missed

* reorder

* fix type
2025-09-20 01:59:07 -04:00
Jason Wen
bdb83b6be1 ui: remove redundant code (#1262) 2025-09-20 01:40:51 -04:00
Kumar
c55f40e77d ui: Speed Limit Information (#995)
* less for now

* always on and fix conv

* update api

* missed

* fix convert

* only draw when decreasing, seems like a bug from mapd

* use frame check, otherwise too jumpy

* only update when mapd updates

* count up and down

* introduce toggle

* more ui

* slightly wider

* desc

* rename

* slight cleanup

* fix offset position

* more vienna fix

* fix ahead alignment

* road name in another PR

* cleanup

* single place

* adjust ahead distance display

* cleanup

* Near

* bump it

* cleanup logic

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-20 01:01:08 -04:00
Shane Smiskol
c7a37c06d8 Revert "Capnp memoryview (#36163)"
This reverts commit 6ed8f07cb6.

bump
2025-09-19 17:18:08 -07:00
Shane Smiskol
efbd0b9ea0 cabana typo 2025-09-19 16:47:07 -07:00
Shane Smiskol
6ed8f07cb6 Capnp memoryview (#36163)
* lock

* bump opendbc

* fix one

* and

* Add a memoryview fallback in webrtcd

* fix

* revert

* rerevert

* bump to master

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2025-09-19 16:46:23 -07:00
mvl-boston
5164555c4f Steering Assist warning clarification (#36135)
* clarifying warning message

* more clarity with steering assist warnings
2025-09-19 16:46:05 -07:00
Jason Young
c5999702ae Honda: Add 2026 Honda Passport to release (#36179)
* bump opendbc

* regen CARS.md

* update RELEASES.md
2025-09-19 19:40:20 -04:00
Jason Wen
ddf63701e8 Speed Limit: Resolver (#1256)
* init

* some fixes

* move

* more

* old navd helpers

* bring back cereal

* fix linting

* more

* add to cereal first

* sp events

* lint

* implement in long plan

* fixme-sp

* refactor state machine

* wrong state

* start refactor controller

* some type hints

* init these

* enable debug print

* ui? ui!

* print them out

* fix spinner import

* fix path

* let's use gps chips directly for now

* service missing

* publish events

* no nav for now

* need to sub

* no car state speed yet

* missed event

* Car: `CarStateSP`

* fix tests

* bring back car state speed limit

* fix

* use old controller for now

* fix

* fix source

* type hints

* none for now

* formatting

* more

* create directory if does not exist

* mypy my bt

* policy param catch exceptions

* handle all params with exceptions

* more

* single method

* define types in init

* rename

* simpler op enabled check

* more mypy stuff

* rename

* no need for brake pressed

* don't reset if gas pressed

* type hint all

* type hint all

* back to upstream

* in another pr

* no longer need data type

* qlog

* slc in another pr

* use horizontal accuracy

* use horizontal accuracy

* set core affinity for all realtime processes

* unused

* sort

* unused

* type hint and slight cleanup

* from old implementation

* use directly

* combine pm

* slight more cleanup

* type hints

* even more type hint

* Revert "slc in another pr"

This reverts commit 3a6987e6

* Revert "in another pr"

This reverts commit a29bccff12.

* rebump

* no need to check alive

* use it directly

* fix test

* refactor

* use gps data directly

* quote...?

* lint

* fix tests

* use CC.longActive

* user confirm in another PR

* rename

* fix import

* params fix

* no more

* fix

* drop new state machine for now

* more fixes

* internalize output

* unused

* rearrange

* auto draft

* rename

* this

* no

* no need

* use existing

* wrong cruise speed

* fix

* not used for now

* Revert "not used for now"

This reverts commit f0083d6241.

* some

* use frames instead

* split speed limit resolver out of slc

* no need to pass sm

* fix params

* test init

* use frame instead of time

* track session

* some tests

* too limiting

* bump

* always reset state

* end session if long_active but slc inactive at any given time

* off

* no warning in this PR

* no speed factor engage type yet

* wide open

* no

* introduce disabled, no longer transitions at inactive

* fix tests

* no more tempinactive

* clean

* rename

* offset default > off

* new tests, fixes controller

* more tests

* not really needed yet

* lint

* fix

* some more tests

* wrap

* more

* more

* use vCruiseCluster for set speed

* init better

* finish it up

* no

* typo

* one method state machine

* refactor preactive timeout check

* refactor new session check

* directly return statuses

* comments

* v_target

* refactor speed limit resolver

* turn off debug

* more resolver refactor

* no longer needed

* lint

* more lint

* fix

* move around

* fix events

* update event

* already happens while in enabled

* add carstateSP

* less

* Speed Limit Control -> Speed Limit Assist

* in another PR

* more rename

* overriding state

* fix

* make sure to return the correct type

* just slr in this one

* more

* update

* redundant

* fix

* fix

* lint

* fix

* fix

* match toggle

* fix priority checks

* fix combined source for picking 0 limit

* no need to wrap

* add speed limit offset to resolver

* add speed limit offset

* make sure it displays distance when higher

* Revert "make sure it displays distance when higher"

This reverts commit 15c6834d4e.

* some rename

* translations

* unused for now

* more

* lint

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-09-19 18:32:20 -04:00
Jason Wen
28098bb7c4 ICBM: disable hysteresis (#1260)
* ICBM: disable hysteresis

* notes
2025-09-19 17:36:33 -04:00
Kumar
60e056cc0a mapd: Bump version v1.10.0 -> v1.11.0 (#1111)
* bump mapd v1.10.1

* v1.11.0

* v1.11.0

* permission

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-19 00:34:03 -04:00
Shane Smiskol
2a5de8e0f8 raylib: fix shader antialiasing (#36176)
* fix

* np
2025-09-18 17:11:53 -07:00
Shane Smiskol
d05cb31e2e raylib: fix pairing url 2025-09-18 17:03:16 -07:00
Jason Wen
fb743d313e Reapply "Intelligent Cruise Button Management (ICBM)" (#1257) (#1258)
* Reapply "Intelligent Cruise Button Management (ICBM)" (#1257)

This reverts commit 4441671227.

* ICBM: `pcmCruiseSpeed` is true during initialization

* bump

* fix tests
2025-09-18 16:47:40 -04:00
Jason Wen
4441671227 Revert "Intelligent Cruise Button Management (ICBM)" (#1257)
Revert "Intelligent Cruise Button Management (ICBM) (#1242)"

This reverts commit 1f8941367d.
2025-09-18 16:02:51 -04:00
Adeeb Shihadeh
c7a9ea2bf4 add back libbz2-dev (#36172)
* add back libbz2-dev

* try this

* revert
2025-09-18 10:59:03 -07:00
Adeeb Shihadeh
b637ad49d9 vendor all fonts (#36170)
add noto color
2025-09-18 09:25:41 -07:00
Adeeb Shihadeh
c6a2c99123 prep for vendoring (#36169)
* prep for vendoring

* less stuff

* comment
2025-09-18 09:17:26 -07:00
Adeeb Shihadeh
852598fa0a fix mac build (#36168) 2025-09-18 08:34:28 -07:00
Adeeb Shihadeh
3751d9cf51 Remove libsystemd-dev from Ubuntu dependencies (#36167)
Removed 'libsystemd-dev' from the list of dependencies.
2025-09-18 08:22:15 -07:00
Maxime Desroches
30c388aea8 fix is_dirty when switching branch with updated (#36162)
* clean

* fix
2025-09-18 00:07:06 -07:00
Jason Wen
1f8941367d Intelligent Cruise Button Management (ICBM) (#1242)
* init

* slightly more

* check across all

* publish on CC_SP

* more infra setup

* try it out for HKG for now

* slight cleanup

* oops

* legacy

* send

* actually take over

* expose toggle

* icbm

* need to allow

* fix

* name

* small fixes

* actually send it now

* set default

* use cs is_metric

* offroad only lol

* allow them all

* fix

* send desire as-is

* use stock method

* clean up hysteresis

* speed cluster may be more accurate

* rename

* allow init and resume from pcmCruise

* just send it

* fix

* only allow custom v cruise after no button press at initial enabled

* no hysteresis for now

* fix tests

* fix min check

* only apply to non pcm changes

* add ICBM

* some more ui

* bump

* slight cleanup

* fixup

* cleanup

* type hints

* type hints

* bump

* bump

* bring back hysteresis

* fix ui

* do not spam if overriding or below allowed speed
2025-09-18 00:06:16 -04:00
Jason Wen
784e1d6658 Smart Cruise Control: Vision (SCC-V) (#997)
* Controls: Vision Turn Speed Control

* fix

* Data type temp fix

* format

* more

* even more

* self contain targets

* state cleanup

* fix

* param updates

* no need

* use similar state machine

* raise exception if not found

* new state

* entirely internal

* use long active

* more

* rename and expose aTarget

* rename to SCC-V

* init tests

* slight tests

* expose toggle

* lint

* todo

* remove lat planner sub and mock sm data

* introduce aTarget

* rename

* rename

* update fill_model_msg.py to calculate PLAN_T_IDXS for lanelines and road edges

* sync upstream

* no SCC-V yet

* Revert "no SCC-V yet"

This reverts commit b67281bcac.

* wrap it with SCC main

* leave enabled out of here

* wat

* enabled and active on cereal

* OP long for now, enable for ICBM once merged

* need this

* unused

* let's go hybrid

* fix

* add override state

* update tests

* huh

* don't math here if not enabled

* ui: Smart Cruise Control - Vision (SCC-V) (#1253)

* vtsc-ui

* slight cleanup

* more cleanup

* unused

* a bit more

* pulse like it's hot

* draw only enabled and active

* let's try this for now

* settle

* finalize UI

* brighter color so we blind devtekve

* add long override

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* slight cleanup

* more

* type hints

---------

Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
2025-09-17 22:55:36 -04:00
Shane Smiskol
b622e3e0a7 raylib: generic click callback (#36166)
* not to be used outside

* same

* rm

* fix that

* another fix

* ehh probably better to still have

* optional
2025-09-17 16:33:48 -07:00
Jason Wen
cb94d3b055 Longitudinal: Smart Cruise Control prerequisites (#1249)
* Controls: Vision Turn Speed Control

* fix

* Data type temp fix

* format

* more

* even more

* self contain targets

* state cleanup

* fix

* param updates

* no need

* use similar state machine

* raise exception if not found

* new state

* entirely internal

* use long active

* more

* rename and expose aTarget

* rename to SCC-V

* init tests

* slight tests

* expose toggle

* lint

* todo

* remove lat planner sub and mock sm data

* introduce aTarget

* rename

* rename

* update fill_model_msg.py to calculate PLAN_T_IDXS for lanelines and road edges

* sync upstream

* no SCC-V yet

* Revert "no SCC-V yet"

This reverts commit b67281bcac.

* wrap it with SCC main

* no SCC-V yet

* noqa now

* fix

* OP long for now, enable for ICBM once merged

* type hints

* let's get it straight from carcontrol instead

* not needed

* unused

* add source to track

* we can do this

---------

Co-authored-by: discountchubbs <alexgrant990@gmail.com>
2025-09-16 22:51:32 -04:00
Mitchell Goff
086e33dd6e Revert "minimal ffmpeg build (#36138)"
This reverts commit 347b23055d.
2025-09-16 14:25:18 -07:00
DevTekVE
94f93a9f26 ui: Add standstill timer to HUD (#1251)
* Add standstill timer to HUD

- Introduced a timer displaying elapsed time when the car is at a standstill.
- Added settings toggle to enable/disable this feature.
- Updated UI elements and related logic to support the standstill timer.

* ruff be happy

* stop screaming

* c stands for not cereal

* slight cleanup

* a bit more cleanup

* unused

---------

Co-authored-by: nayan <nayan8teen@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-16 10:05:34 +02:00
Kacper Rączy
889ce4c4fb torqued: add DEBUG flag (#36161)
Add a debug flag to torqued
2025-09-15 21:04:33 +00:00
Jason Young
96c00271e3 pin pycapnp (#36160) 2025-09-15 14:37:52 -04:00
Jason Wen
747460363f panda: consolidate supported panda checks (#1248)
* panda: fix upstream merge conflicts

* move it higher

* consolidate checks

* update

* bump

* actual bump
2025-09-14 23:51:29 -04:00
James Vecellio-Grant
b32c6dafee modeld: add laneline helper for plan indices calculation (#1240)
* modeld: add laneline_helper for plan X indices calculation

* spacing

* keep type hints

* openpilot

* sunnypilot/models/helpers

add modeld helpers to helpers

* Send it from each fill message

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-14 21:45:22 -04:00
DevTekVE
bffb2fb6fa bugfix: param store to support the latest param changes (#1244)
* bugfix: update parameter handling to use custom CarControlSP.Param and improve param retrieval

* bump opendbc
2025-09-14 20:22:51 +02:00
Jason Wen
688b694266 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1229) 2025-09-13 17:42:17 -04:00
Jason Wen
ec8f036850 Merge branch 'upstream/openpilot/master' into sync-20250908
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	README.md
#	docs/CARS.md
#	opendbc_repo
#	panda
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/modeld/modeld.py
#	selfdrive/selfdrived/selfdrived.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	system/hardware/hardwared.py
#	system/updated/updated.py
#	tinygrad_repo
#	uv.lock
2025-09-13 15:23:36 -04:00
Adeeb Shihadeh
a6adedf6e0 prep for python pandad (#36155) 2025-09-13 11:58:49 -07:00
commaci-public
eb821ceb5c [bot] Update Python packages (#36118)
* Update Python packages

* revert tinygrad

* can cnt

* bump panda

* bump panda

* update panda test

* revert that

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-13 11:48:35 -07:00
Jimmy
98d61982f9 jotpluggler: add README (#36153)
* add README

* fix typo
2025-09-13 00:35:35 -07:00
Jimmy
04a26ada69 jotpluggler: fix bug with char width after scaling text (#36154)
fix bug with char width after scaling text
2025-09-13 00:35:12 -07:00
Jimmy
3e0dd06374 jotpluggler: accept --layout argument to pluggle (#36152)
accept layouts as arg to pluggle
2025-09-13 00:20:53 -07:00
Jimmy
f18828228a jotpluggler: fix layout folder path loading and total segment (#36151)
* forgot to commit this earlier with total segments

* look in correct directory
2025-09-13 00:13:27 -07:00
Jimmy
c812c3192d jotpluggler: fix hidpi/mac font scaling (#36150)
fix hidpi/mac font scaling
2025-09-12 23:53:41 -07:00
Jimmy
8d3b919ef6 jotpluggler: better defaults for zooming/fitting (#36149)
better defaults for zooming/fitting
2025-09-12 23:28:23 -07:00
Jimmy
63df46bf22 jotpluggler: store and load layouts (#36148)
* store and load layouts

* torque controller layout

* ignore missing yaml stubs for mypy
2025-09-12 23:20:12 -07:00
Jimmy
826c5e96a1 jotpluggler: migrate logs (#36147)
migrate logs
2025-09-12 22:15:56 -07:00
Jimmy
1870d4905b jotpluggler: add tabs to layout (#36146)
* queue syncs in main thread to avoid Glfw Error/segfault

* tabs
2025-09-12 21:52:01 -07:00
Adeeb Shihadeh
347b23055d minimal ffmpeg build (#36138)
* min ffmpeg

* remove avfilter

* x264

* merge x264

* simpler

* pin x264

* mac

* rm that

* lil more

* move includes to lfs

* try this

* cleanup

* larch

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-09-12 18:59:15 -07:00
Maxime Desroches
cbea5f198f op.sh: more robust switch for submodules 2025-09-12 16:05:49 -07:00
Jimmy
be379e188b jotpluggler: fix off by one error (#36144)
fix off by one error sometimes causing missed items in datatree
2025-09-12 14:37:00 -07:00
Jimmy
42d9bd0516 jotpluggler: sync x axes and autofit y axis (#36143)
* sync x axes of all timeseries plots

* always autofit y-axis

* fix typing
2025-09-12 14:36:50 -07:00
Armand du Parc Locmaria
3ca9f351a0 nevada model 🌵 (#36114)
cd29ffcf-01dd-4f1c-8808-dc197c174f1d
2025-09-12 12:45:52 -07:00
YassineYousfi
a1d6a062a9 add PR ref to new driving model in RELEASES.md 2025-09-12 12:44:11 -07:00
Nayan
4f44d6e643 Reapply "UI: Developer UI" (#1238) (#1239)
This reverts commit 1be13fdc55.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-09-12 10:58:59 -04:00
Jason Wen
1be13fdc55 Revert "UI: Developer UI" (#1238)
* Revert "Revert & Reapply "UI: Developer UI" temporarily due to QT version mismatch (#1237)"

This reverts commit 810a2d9448.

* Revert "UI: Developer UI (#1233)"

This reverts commit 1bb4ca2547.
2025-09-12 08:37:24 -04:00
DevTekVE
810a2d9448 Revert & Reapply "UI: Developer UI" temporarily due to QT version mismatch (#1237)
* Revert "UI: Developer UI (#1233)"

This reverts commit 1bb4ca2547.

* Reapply "UI: Developer UI (#1233)"

This reverts commit b0a77049da.

* QColorConstants is not on device's QT version. Thanks @kumar for the fix
2025-09-12 09:03:17 +02:00
Jimmy
c9dbf97649 jotpluggler: add icons, use monospace font, and fix ui quirks (#36141)
* use play/pause icons

* use monospace font

* x button for delete

* add icons for splitting

* many scaling + scrollbar fixes and niceties

* simplify texture loading code
2025-09-11 23:31:32 -07:00
Nayan
1bb4ca2547 UI: Developer UI (#1233) 2025-09-12 01:00:05 -04:00
Adeeb Shihadeh
2c04a27a2a ubloxd: cleanup unused files 2025-09-11 14:03:37 -07:00
DevTekVE
b7f8dd11a5 SL: bugfix parameter handling in sunnylink restore and remote setting (#1234)
* refactor: improve parameter handling in sunnylink for robustness

- Updated `get_param_as_byte` to return `None` for nonexistent parameters.
- Enhanced param compression and encoding in `sunnylinkd`.

* refactor: centralize parameter restoration with new helper function

- Added `save_param_from_base64_encoded_string` to handle param decoding and saving.
- Updated backup manager and sunnylinkd to use the new method.
- Improved code readability and reduced duplication in parameter handling logic.

* don't bother

* clean
2025-09-11 21:44:43 +02:00
Adeeb Shihadeh
70c0592e84 CI: re-enable macOS build (#36120)
* CI: re-enable macOS build

* Update selfdrive_tests.yaml with new env variable
2025-09-11 11:03:59 -07:00
Jimmy
572c03dbac jotpluggler: fix flashing while searching (#36128)
* modify in place instead of recreating nodes

* don't delete DataTreeNodes and simplify code

* faster: more efficient state tracking, better handler deletion
2025-09-11 10:48:45 -07:00
Adeeb Shihadeh
fa498221da still thinking about this one 2025-09-11 10:48:32 -07:00
vanillagorillaa
67238d5045 Update release notes (#36137)
Update RELEASES.md
2025-09-11 10:47:23 -07:00
Jimmy
994170ddb5 fix qcom decoder compilation on mac with platform check (#36131) 2025-09-11 10:45:36 -07:00
Jason Young
3c28188d7a Honda: Add Honda N-Box 2018 to release (#36134)
* bump opendbc

* regen CARS.md

* add to RELEASES.md
2025-09-11 07:04:15 -04:00
Jason Young
4ccd17903b correction to Honda release notes (#36133)
correction to release notes
2025-09-11 05:59:15 -04:00
Jason Young
0e1b573f89 Honda: Add Honda Odyssey 2021-25 to release (#36132)
* bump opendbc

* regen CARS.md

* add to RELEASES.md

* forgot this was originally VG's PR

* correctly typo the typo

* follow recent DBC cleanup
2025-09-11 05:32:44 -04:00
Maxime Desroches
10580aca92 ci: adjust power draw bounds (#36130)
* consider min

* bounds
2025-09-10 15:06:25 -07:00
Jimmy
6b13175338 jotpluggler: better handle sparse message data and bools (#36124)
* better handle sparse message data

* fix plotting of of bools

* add type for msg._valid

* fix typing

* add assert in case something changes in future
2025-09-10 00:09:08 -07:00
YassineYousfi
d0171084b5 Update RELEASES.md 0.10.1 2025-09-09 15:40:39 -07:00
Jason Young
2bfdd0d61d PlotJuggler: Updated layout for torque controller (#36123)
* PlotJuggler: Updated layout for torque controller

* yeah, no
2025-09-09 18:02:31 -04:00
Jimmy
ea53111afc basic jotpluggler (#36045)
* jotpluggler!

* demo, executable, fontfile

* calc max and min, numpy, cloudlog

* mypy things

* simplified data.py

* multiprocessed data ingest

* allow verrryyy long search results

* stream in multiprocessed segments

* bug fixes

* simplify and speed up timeseries

* small fixes

* rewrite layout

* resizable layouts

* cleanup

* downsampling

* deque for consistency

* use item_visible_handler

* only build visible UI

* don't delete item handlers, add locks, don't expand large lists

* delete item handlers after a frame

* small data tree improvements

* seperate datatree into its own file

* reset when loading new segments

* fix plot window resizing and recursive split resizing logic
2025-09-09 10:56:07 -07:00
github-actions[bot]
0739d4ac2d [bot] Update translations (#36089)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-09-08 09:01:53 -07:00
Jason Wen
698e0ca00f migration: new branch names (#1225)
* migration: new branch names

* more migration

* update channel type

* no more var

* update

* more

* more
2025-09-07 23:23:03 -04:00
Adeeb Shihadeh
8dca43881a Rewrite ubloxd in Python (#36112)
* Rewrite ubloxd in Python

* lil more

* rm from third_party/

* cleanup

* ubx replay

* try this

* back to kaitai

* Revert "ubx replay"

This reverts commit 570bd3d25fbabc590379ce0a9f98d30de55cf1b3.
2025-09-07 15:40:48 -07:00
Adeeb Shihadeh
a885111c0c agnos 13.1 (#36113) 2025-09-07 14:21:14 -07:00
Adeeb Shihadeh
bd73664f4c add kaitai python package 2025-09-07 12:21:13 -07:00
Adeeb Shihadeh
608c16007e Rewrite logcatd in Python (#36111)
* Add Python logcatd implementation

* lil more
2025-09-07 11:32:44 -07:00
Adeeb Shihadeh
275abc1eb5 Rewrite proclogd in Python (#36110)
* Rewrite proclogd in Python

* lil more

* lil more

* Update system/proclogd.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update system/proclogd.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update system/proclogd.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-07 11:13:39 -07:00
Jason Young
ff34b8af76 selfdrived: disable HUD VisualAlert for belowSteerSpeed events (#36109) 2025-09-07 11:59:48 -04:00
Jason Wen
ff4d1923f0 tici: fix staging root updates (#1223) 2025-09-06 18:46:10 -04:00
Jason Wen
3a91ae08a9 update: actually detect device type as TICI (#1221) 2025-09-06 18:03:16 -04:00
Jason Wen
b161764b1e update: sunnypilot branch migrations for tici (#1212)
* update: sunnypilot branch migrations for tici

* block onroad and notify

* type

* check channel type

* update

* ui init

* no search and locked list for tici

* whenever available
2025-09-06 15:26:32 -04:00
DevTekVE
03e9777c3f Improve debugging for safety (#36055)
* feat: add debugging configurations for replay drive and LLDB attachment

* Add readme with video demo

* clean

* docs: update debugging safety documentation with demo link

* no need for mp4 then added on PR

* Update SConstruct

* bump opendbc

* updating readme

* updating readme

* updating readme

* is this better / worth it?

* final cleanups

* hacky. but does it work?

* Yep that worked!

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-06 12:05:15 -07:00
Shane Smiskol
1033d3d80e Desire helper: set lane change direction on entering preLaneChange state (#36074)
* set immediately to avoid flash on right lane changes

* one function

* name

* comment
2025-09-05 22:34:04 -07:00
Jason Wen
7057c57419 ui: cleanup cereal event params parsing (#1219)
* Revert "bugfix: streamline LiveDelay parameter loading with safe handling (#1204)"

This reverts commit 288a5e14da.

* ui: use AlignedBuffer for cereal data processing for Models panel

* align

* separate

* split

* event it

* no more backup

* Revert "no more backup"

This reverts commit fa66ce5e77.
2025-09-05 20:51:58 -04:00
pencilpusher
1f1efec4c9 replay: C3/C3X hardware decoder (#35821)
* bump msgq

* add third_party/linux/include/media/msm_vidc.h

* add sde_rotator hw interface

* add msm_vidc hw decoder interface

* update SConscript to build qcom decoder and rotator

* use qcom decoder in replay framereader

* decode directly to NV12 with the correct stride without using the hw rotator

* bump msgq back to master

* don't compile rotator

* cleanup

* works now but much to simplify

* rm signals

* rm header

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-05 16:05:06 -07:00
DevTekVE
7d4df73ea5 hotfix: model fetcher warning instead of exception when fetching fail 2025-09-05 14:42:08 +02:00
James Vecellio-Grant
29fe152bd3 modeld_v2: desire rename and add many parts from thneed modeld (#1197)
* Add model metadata lookup and update desire handling

* Bump selector version to 10

* meh

* Refactor shape mode parameters for desire handling in test buffer logic

* loop more models

* Refactor buffer handling for temporal inputs and streamline desire updates

* Refactor lateral control input handling and remove unused code
2025-09-04 22:26:59 -04:00
Jason Wen
31918c067a events: add sunnypilot/openpilot to remote origin check (#1216)
events: add sunnypilot/openpilot to remote origin check
2025-09-04 22:22:48 -04:00
Jason Wen
daf5ea2783 update: remove git cleanup in finalized stage (#1210)
* updater: remove git cleanup in finalized stage for quicker updates

* nah
2025-09-04 22:10:08 -04:00
Harald Schäfer
f0f04d4b5b Firehose model (#36087)
816ce390-c41a-42fa-a5df-f393cbe2dcc4/400
2025-09-04 18:51:29 -07:00
Shane Smiskol
2b7707ecf6 Deduplicate car interface test (#36101)
deduplicate test car interfaces
2025-09-04 18:20:43 -07:00
Shane Smiskol
ef870d5533 bump opendbc (#36103)
* bump

* update refs
2025-09-04 18:11:44 -07:00
github-actions[bot]
fd7295c980 [bot] Update Python packages (#1214)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-04 14:31:01 -04:00
Jason Wen
220cfff04d ci: skip uv lock upgrade on forks (#1213) 2025-09-04 14:29:11 -04:00
Jason Wen
ee0fb6bf8e Revert "[bot] Update Python packages" (#1211)
Revert "[bot] Update Python packages (#1201)"

This reverts commit 0cd2bbf6c0.
2025-09-04 14:19:31 -04:00
github-actions[bot]
0cd2bbf6c0 [bot] Update Python packages (#1201)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-04 10:08:51 -04:00
DevTekVE
0871abcf55 bugfix: fix fetching params for sunnylink and backup (#1177)
* Hotfix for the params stuff until I rework this properly and leverage the new data types

* Revert "Hotfix for the params stuff until I rework this properly and leverage the new data types"

This reverts commit c6031b29d92d3ff5b679ffce3ba53611bb2dba0e.

* refactor: enhance getParams function to support JSON and bytes types with optional compression

* refactor: add TODO for enhancing server support of metadata in sunnylinkd.py

* lint and clean

* refactor: update value handling in getParams to return decoded values for JSON serialization

* refactor: simplify params_dict initialization by removing type hint

* refactor: update response handling in getParams to include JSON serialization of params

* refactor: update response handling in getParams to include JSON serialization of params

* Add to dic types

* refactor: extract get_param_as_byte function for improved parameter handling and fix backup inconsistencies

* cleanup

* ensure error propagates on backup fail
2025-09-04 14:45:37 +02:00
DevTekVE
8ccb777192 bugfix: improve exception handling for sunnylinkd (SUN-89) (#1207)
* bugfix: improve exception handling for WebSocket connections in sunnylinkd

* bugfix: enhance exception handling for WebSocket connections in sunnylinkd

* bugfix: improve OSError handling in sunnylinkd for better error reporting
2025-09-04 14:45:03 +02:00
DevTekVE
0593667601 bugfix: improve error handling in model fetching process (SUN-87) (#1205)
* bugfix: improve error handling in model fetching process

* cleanup

* bugfix: refine error handling in model fetching process
2025-09-04 14:44:42 +02:00
Shane Smiskol
a5044302a2 auto source: auto source 2025-09-03 16:06:41 -07:00
Trey Moen
6a4f685d04 feat(esim): bootstrap (#36094)
* bootstrap

* more

* fix

* simple

* moar

* clarify

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-09-03 11:34:03 -07:00
Trey Moen
355499a8de feat(esim): hotswap (#36096)
feat(esim): device hw reboot modem
2025-09-03 11:31:48 -07:00
DevTekVE
288a5e14da bugfix: streamline LiveDelay parameter loading with safe handling (#1204) 2025-09-03 17:18:18 +02:00
James Vecellio-Grant
9447aa0e3d modeld: turn desires (#1182)
* Add modelDataV2SP and lane turn logic implementation

Note: still need to hook up to other modeld's create unit test, fix stuff, and do the UI for it

* add unit tests for lane turn logic

* Add lane turn desire controls to models panel

* use `events_sp` instead of `events`

* integrate modelDataV2SP messaging to the other modeld controllers

* move this to that

* use min for general population here, on custom branches, change this to max :)

* Update events.py

Co-authored-by: royjr <royjr96@gmail.com>

* Update events.py

Co-authored-by: royjr <royjr96@gmail.com>

* refactor lane turn value control into one method

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/models_panel.cc

* add integration tests for lane turn desire

* 10 updates is possibly more representative of real life

* real objects ofc

* desc: add toggle description for clarity

---------

Co-authored-by: royjr <royjr96@gmail.com>
2025-09-03 05:49:12 -07:00
commaci-public
67fd6c80dd [bot] Update Python packages (#36090)
* Update Python packages

* no more stall

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-09-01 09:37:18 -07:00
Kumar
43c12ae7b3 Visual: 🌈 road (#1067)
* 🌈

* Update selfdrive/ui/qt/onroad/model.cc

Co-authored-by: royjr <royjr96@gmail.com>

* ui: enhance rainbow mode description and add colorized text rendering

---------

Co-authored-by: royjr <royjr96@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-08-31 10:30:20 +02:00
Nayan
1894a312d3 Bug: Fix OSM Download Time & ETA (#1194)
fix osm download time
2025-08-31 08:46:20 +02:00
DevTekVE
3e9545670b feature: Adding support for copyparty (#1116)
* feat: add support for copyparty-sfx

* feat: add toggle for Copyparty service in developer panel

* feat: enhance Copyparty configuration with additional volume mounts and options

* Update system/manager/process_config.py

* remove f string

* lint
2025-08-31 08:29:45 +02:00
Nayan
45ee58b1f6 ui: Favorite Models (#1168)
* init model favorites

* fix fav buttons

* fix blank favs

* switch to ref

* new favs at top

* remove debug prints & add some comments

* button style

* fix current selection

* !@%#$%(@^%$#(@!%#^

* add last update date to folders
2025-08-31 08:27:08 +02:00
Michael
3f3c293559 reeadme: Reorder tables to show -new branches first (#1191)
* Update to Readme.MD install instructions

This commit changes a few things in the installation guide. I moved the the tables that have the branches and install URLs. I also added a TIP that let's users know that they can install with sunnypilot/staging-c3-new.

* Update README.md with proposed changes from DevTek

Added header text over the legacy branches to bring in separation and let users know they are not recommended.

* bit of change

* Reorganizing a bit more

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-08-31 07:35:14 +02:00
DevTekVE
5d110bcee5 ci: prebuilt process improvement & tag of staging prebuilt source (#1190)
* ci: add validate-test-on-staging-c3 branch to deployment triggers and enhance stable branch handling

* fix long overdue mistake lol

* ci: add condition to wait for start on push events in build workflow

* Fix extra version identifier

* no need for this, i validated what I needed

* only care for release tags, not any

* fix: update versioning logic to use build date and run number for tagging

* fix: update tagging logic and enhance commit message format in build scripts

* fix: refine tagging condition to exclude tag pushes for stable branches

* fix: add extra version identifier to output for better version tracking

* trying to keep things clean and simple

* bugfix
2025-08-30 14:35:05 +02:00
DevTekVE
62bf9fcc27 ci: tweaking the deploy with delay process + fixing bugs (#1189)
* ci: disable cancel-in-progress for publish concurrency

* check using var

* typo

* ci: update publish concurrency settings to use dynamic cancel-in-progress flag

* typoooo

* ci: update cancel-in-progress condition for publish concurrency

* ci: enhance publish concurrency handling to queue jobs based on commit SHA

* typos and new commit hash to test cancel in progress

* see if this helps?

* tired of waiting

* ci: add publish concurrency group to deployment configuration

* ci: update publish concurrency handling to improve job queuing and cancellation logic

* ci: output GITHUB_OUTPUT contents for better debugging of publish concurrency

* ci: remove prebuilt output from strategy and streamline GITHUB_OUTPUT handling

* ci: refine publish concurrency handling for flexible job cancellation

- Default `cancel_publish_in_progress` to `true` if undefined in config.
- Adjust concurrency group logic to handle null and true conditions properly.

* another ocmmit shouldnt cancel publish

* ci: enhance job cancellation logic for publish concurrency handling

* ci: add prepare_strategy job for dynamic deploy strategy extraction

* ci: ensure job execution always proceeds on success and skips failure

* ci: improve job execution conditions to handle cancellation and failure states

* ci: enhance versioning logic to support stable and unstable branch differentiation

* ci: add checkout step to ensure code is available for deploy strategy extraction

* ci: add extra version identifier for stable branch environments

* ci: update extra version identifier format for stable branches

* Grammar, oh, grammar.

* test this
2025-08-30 11:52:57 +02:00
DevTekVE
205863b71f ci: add deploy strategy extraction and refactor publish dependencies (#1118)
* ci: add deploy strategy extraction and refactor publish dependencies

- Introduced `prepare_strategy` step to dynamically extract deployment configurations.
- Adjusted `publish` job to depend on `prepare_strategy` and use its outputs.

* what happens if I do this...

* cleaning

* other test

* ci: update auto_deploy logic in build configuration

* cleaning
2025-08-30 07:26:31 +02:00
YassineYousfi
c990515eaf update RELEASES.md for 0.10.1 2025-08-29 14:16:52 -07:00
Jason Wen
ba1da60c25 NNLC: compute error in torque space (#1185)
* NNLC: compute error in torque space

* bump

* sp happy too

* bump

* lint

* update path

* oops

* test entire loop

* bump

* test gm

* bump

* bump
2025-08-29 22:39:25 +02:00
DevTekVE
54174d1ef0 agnos: split launch for c3 and c3x to support custom agnos (#1186)
* refactor: skip AGNOS update for tici models in launch script

* back to stock on chffrplus

* feat: enhance launch script for Tici model with error handling and fallback

* empty new line pls
2025-08-29 22:23:58 +02:00
Kacper Rączy
76e91da3ad process_replay: use LiveParametersV2 in custom params (#36080)
Fill LiveParametersV2 in get_custom_params_from_lr
2025-08-28 20:11:20 +00:00
Adeeb Shihadeh
9fcac06297 op.sh: fix switch on fresh install 2025-08-28 11:49:31 -07:00
Adeeb Shihadeh
3e2549f2b8 remove tici-specific code (#36078)
* remove tici-specific code

* lil more

* update those
2025-08-28 08:19:39 -07:00
Maxime Desroches
63961dec45 jenkins: run pandad test once 2025-08-27 19:04:16 -07:00
Maxime Desroches
7a19a11001 jenkins: tizi loopback device 2025-08-27 18:46:50 -07:00
Maxime Desroches
93f7925c4d jenkins: tizi ox 2025-08-27 18:36:10 -07:00
ZwX1616
a2c5fca787 modeld input queues class (#36072)
* move from xx

* no get_single

* stupid name

* thats fine

* desire_pulse

* 1less

* desire->desire_pulse

* simplify

* reduce copies

* more less
2025-08-27 17:54:53 -07:00
Adeeb Shihadeh
bb06468ead safety standards for forks (#36077)
standards for forks
2025-08-27 16:41:57 -07:00
Adeeb Shihadeh
1d8dc8a69a camerad: remove AR0231 (#36070) 2025-08-27 15:11:58 -07:00
Maxime Desroches
a254a05df0 jenkins: replace tici-common (#36073)
* common

* remove

* test

* Revert "test"

This reverts commit 2c76a8f818e42e0af1d4540dede3595fe0d59ed9.

* Reapply "test"

This reverts commit d9974dd8564d0699dcfa3aac0ffb2dca33f3b47d.

* Revert "Reapply "test""

This reverts commit 2377c6ab20df5dd06886f3dd9a0be07abfce9df6.

* tizi bounds
2025-08-27 14:39:02 -07:00
Maxime Desroches
2aa7648bb8 jenkins: remove ar device 2025-08-27 14:29:39 -07:00
Maxime Desroches
b309bf4173 jenkins: sensord device 2025-08-27 14:26:56 -07:00
Maxime Desroches
a3fcde2ae8 jenkins: tizi-replay 2025-08-27 14:19:23 -07:00
ZwX1616
f8ff156869 modeld: desire->desire_pulse (#36076)
consistent naming
2025-08-27 13:48:23 -07:00
Maxime Desroches
375dfe16a8 jenkins: remove bmx device 2025-08-27 13:39:21 -07:00
felsager
b976135d2f torqued: apply offset (with more robust unit test) (#36075)
* torqued: apply latAccelOffset to torque control feed forward

* test learned latAccelOffset captures roll compensation bias on straight road driving, when the device is not flush in roll relative to the car

* test correct torqued latAccelOffset parameter convergence
2025-08-27 13:06:01 -07:00
Maxime Desroches
f40f7f9ece Revert "torqued: apply offset (#36005)"
This reverts commit 1d74a97ba6.
2025-08-26 21:45:49 -07:00
Maxime Desroches
ea6677c464 AGNOS 13 (#36069)
* staging

* prod
2025-08-26 17:16:57 -07:00
Maxime Desroches
8258257658 ci: modernize test onroad (#36059)
* start

* fix

* better

* more

* test

* Revert "test"

This reverts commit 17066ac123668cb7280cf85e3f21a3043b4785b0.

* remove
2025-08-26 15:34:34 -07:00
Jaume Balust
f5d67b5eee cereal: fix frequency precision by changing from int to float (#36060) 2025-08-26 15:23:24 -07:00
Maxime Desroches
8ee3c7b485 add back dbus-next 2025-08-26 11:52:58 -07:00
Adeeb Shihadeh
8450f9f333 update: more migration 2025-08-26 09:57:23 -07:00
royjr
342ff24510 feature: external storage (#979)
* external storage

* fix mountStorage

* fix perms

* works for now

* better

* lagless

* move to sp qt

* orderish

* fix ui crash

* cleanup

* fix format

* offroad only

* debug external storage

* dont care about delete

* just use cloudlog

* show logs if using external storage

* better text

* wipe entire drive

* allow partitionless drive to be formatted

* label while formatting

* this works

* better

* cleaner

* cleaner logs

* keep upstream happy

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-08-26 11:49:55 -04:00
Shane Smiskol
4cd76f4966 raylib networking: prevent concurrently updating networks (#36066)
* dont run by multiple threads at the same time!

* this doesn't work since we rely on is_connected

* Revert "this doesn't work since we rely on is_connected"

This reverts commit 7455b2fe831bf5c9524e8ee71a9966de32a9755a.
2025-08-26 03:55:05 -07:00
Shane Smiskol
ec254074d1 raylib: prevent Firehose from blocking UI (#36067)
* stop blocking ui thread for 1s!!

* rm

* whoopsiedaisy

whoopsiedaisy

* meh
2025-08-26 03:51:45 -07:00
Shane Smiskol
8059106cae raylib networking: reduce DBus calls (#36065)
* this reduces getsettings calls from n*n to n

* these are combined now

* same check
2025-08-26 03:33:08 -07:00
Shane Smiskol
23b4aaf2a5 raylib networking: remove locking on UI thread (#36063)
* use callback queue to make this thread safe and remove locks (which lag ui thread?)

* woah this works

* no more lock!

* always run signal handler and store callbacks, like qt

* debug

* more

* okay not for now

* combine _get_connections and _connection_by_ssid, closer to qt and not an explosion of GetSettings dbus calls

* debug

* try this

* skip

* len

* skip hidden networks

* actually slower

* stash

* back to 8929f37d495a524d4a996d66b82d4a947fbf4f1c

* clean up
2025-08-26 03:25:01 -07:00
Shane Smiskol
5359f6d354 raylib: clean up networking (#36039)
* stasj

* remove one of many classes

* clean up and fix

* clean up

* stash/draft: oh this is sick

* so epic

* some clean up

* what the fuck, it doesn't even use these

* more epic initializers + make it kind of work

* so simple, wonder if we should further 2x reduce line count

* i've never ever seen this pattern b4, rm

* remove bs add niceness

* minor organization

* set security type and support listing and rming conns

* forget and connect

* jeepney is actually pretty good, it's 2x faster to get wifi device (0.005s to 0.002s)

* temp

* do blocking add in worker thread

* add jeepney

* lets finish with python-dbus first then evaluate - revert jeepney

This reverts commit 7de04b11c2285c298bb1ec907782026c795ab207.

and

* safe wrap

* missing

* saved connections

* set rest of callbacks

* skip hidden APs, simplify _running

* add state management

* either wrong password or disconnected for now

* i can't believe we didn't check this...

* disable button if unsupported!!!

* hide/show event no lag hopefully yayay

* fix hide event

* remove old wifi manager

* cache wifi device path + some clean up

* more clean up

* more clean up

* temp disable blocking prime thread

* hackily get device path once

* ok

* debug

* fix open networks

* debug

* clean up

* all threads wait for device path, and user functions dont ever attempt to get, just skip

* same place

* helper

* Revert "helper"

This reverts commit e237d9a720915fb6bd67c539123d3e2d9d582ce1.

* organize?

* Revert "organize?"

This reverts commit 3aca3e5d629c947711ade88799febeb3f61eda87.

* c word is a bad word

* rk monitor debug for now

* nothing crazy

* improve checkmark responsiveness

* when forgetting: this is correct, but feels unresponsive

* this feels good

* need these two to keep forgetting and activating responsive

* sort by connected, strength, then name

* handle non-critical race condition

* log more

* unused

* oh jubilee is sick you can block on signals!!

* proof of concept to see if works on device

whoiops

* so sucking fick

* ah this is not generic, it's a filter on the return vals

* flip around to not drop

* oh thank god

* fix

* stash

* atomic replace

* clean up

* add old to keep track of what's moved over

* these are already moved

* so much junk

* so much junk

* more

* tethering wasn't used so we can ignore that for now

* no params now

* rm duplicate imports

* not used anymore

* move get wifi device over to jeepney! ~no additional lines

* request scan w/ keepney

* get_conns

* _connection_by_ssid_jeepney is 2x faster (0.01 vs 0.02s)

* do forget and activate

* _update_networks matches!

* rm old update_networks

* replace connect_to_network, about same time (yes i removed thread call)

* no more python-dbus!k

* doesn't hurt

* AP.from_dbus: actually handle incorrect paths w/ jeep + more efficient single call

* properly handle errors

* it's jeepney now

* less state

* using the thread safe router passes a race condition test that conn failed!

* bad to copy from old wifimanager

* fix conn usage

* clean up

* curious if locks are lagging

* not for now

* Revert "curious if locks are lagging"

This reverts commit 085dd185b083f5905a4e71ba3e8c0565175e04aa.

* clean up _monitor_state

* remove tests

* clean up dataclasses

* sort

* lint: okay fine it can be non by virtue of exiting right at the perfect time

* some network clean up

* some wifi manager clean up

* this is handled

* stop can be called manually, from deleting wifimanager, or exiting python. some protection

* its not mutable anymore

* scan on enter

* clean up

* back

* lint

* catch dbus fail to connect

catch dbus fail to connect
2025-08-26 01:23:59 -07:00
Shane Smiskol
a70e4c3074 raylib: rm debug print 2025-08-25 22:30:27 -07:00
Shane Smiskol
7a2f2ddf32 raylib: speed up network panel first load (#36062)
* debug

* debug

* clean up
2025-08-25 22:30:09 -07:00
Shane Smiskol
2dc0f97c93 raylib: fix slow Toggles panel first load (#36061)
fix slow load on toggles page
2025-08-25 22:29:14 -07:00
github-actions[bot]
6bbf42c16a [bot] Update translations (#1183)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-25 23:50:58 -04:00
github-actions[bot]
73e66c4a0b [bot] Update Python packages (#1178)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-25 21:22:20 -04:00
Shane Smiskol
15fcbf24f1 raylib home ui: show/hide events (#36058)
* it's a widget

* proper events

* bottom
2025-08-25 15:52:13 -07:00
Shane Smiskol
e89c6b3b88 raylib: remove redundant networking class (#36057)
remove a class
2025-08-25 15:23:14 -07:00
Shane Smiskol
c4a7f25b62 raylib: refactor NetworkManager constants (#36056)
* new file

* import

* and this
2025-08-25 15:17:37 -07:00
Harald Schäfer
1d74a97ba6 torqued: apply offset (#36005)
* torqued: apply latAccelOffset to torque control feed forward 

* test learned latAccelOffset captures roll compensation bias on straight road driving, when the device is not flush in roll relative to the car

* test correct torqued latAccelOffset parameter convergence

---------

Co-authored-by: felsager <d.felsager@gmail.com>
2025-08-25 13:50:10 -07:00
commaci-public
aea467ff02 [bot] Update Python packages (#36053)
* Update Python packages

* bump

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-08-25 11:43:49 -07:00
Nayan
9579d331fc ui: sunnylink panel title & message (#1181)
add title & message to clarify sponsorship isn't required for basic functions
2025-08-25 19:49:49 +02:00
James Vecellio-Grant
7c6d887187 modeld_v2: infer model shapes from inputs (#1162)
* modeld_v2: dynamify temporal buffer management.

* skip redundant reshaping and flattening.

* simplify MHP checks for lead and plan

* modeld_v2: add unit tests for buffer logic and refactor index mapping

* Let’s possibly fail a test :)

* Update test_buffer_logic_inspect.py

* Update test_buffer_logic_inspect.py

* modeld_v2: better temporal mapping for non-split

* Bump to 10 I guess

* Downgrade CURRENT_SELECTOR_VERSION to 9

* red diff ya know?

* add dynamic buffer update tests and compare against legacy logic.

 Cover modelState.init and modelState.run

* send

* Revert "send"

This reverts commit 9e6c95fbfd.

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-24 22:08:55 -04:00
github-actions[bot]
f89796033c [bot] Update translations (#1179)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-24 15:52:38 -07:00
Jason Wen
c8249f3657 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1176) 2025-08-24 14:56:35 -04:00
Jason Wen
798e9071d8 Merge branch 'upstream/openpilot/master' into sync-20250823
# Conflicts:
#	.github/workflows/release.yaml
#	README.md
#	RELEASES.md
#	common/params_keys.h
#	docs/CARS.md
#	opendbc_repo
#	panda
#	release/build_stripped.sh
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/modeld/modeld.py
#	selfdrive/ui/feedback/feedbackd.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	system/version.py
#	uv.lock
2025-08-24 14:52:21 -04:00
Comma Device
b501ad4d51 nice encoder debugging script 2025-08-24 00:48:54 +00:00
github-actions[bot]
d6af554db4 [bot] Update translations (#1172)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-23 20:38:19 -04:00
github-actions[bot]
9e50a1b660 [bot] Update Python packages (#1175)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-23 20:34:53 -04:00
Jason Wen
2b86cc1373 param_store: update list every 3 seconds (#1174) 2025-08-23 09:42:05 -04:00
Shane Smiskol
dd7de180ea raylib: cache API token (#36050)
* cache with time

* safety

* rm

* clean up
2025-08-23 04:56:00 -07:00
Shane Smiskol
2b46e1450a raylib: simplify network state (#36049)
* wtf

* we never disabled unsupported networks

* dont be a hero

* i hate mypy

* fix
2025-08-23 00:49:19 -07:00
Adeeb Shihadeh
7ed8abb66c camerad: garbage collect CL files (#36046) 2025-08-22 20:11:50 -07:00
Adeeb Shihadeh
ef2bb7f2fc release: build orphaned branch (#36047) 2025-08-22 20:06:12 -07:00
github-actions[bot]
de56b21103 [bot] Update Python packages (#1165)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-22 19:50:09 -04:00
Jason Wen
5491a61384 ci: skip tinygrad bump in repo-maintenance (#1173) 2025-08-22 19:46:24 -04:00
Adeeb Shihadeh
ae3b74245f sgo is just o now! 2025-08-22 09:08:40 -07:00
Shane Smiskol
c0a74f7a20 raylib: change default tethering password 2025-08-22 01:55:01 -07:00
James Vecellio-Grant
7f035bae39 ui: bugfix visibility for developer panel (#1131)
* yes

idk

move up

* patch

* updates

* Update developer_panel.cc

* Update developer_panel.cc

* Update developer_panel.cc

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-21 21:04:57 -04:00
Shane Smiskol
cea3572b74 raylib: fix mouse scale for Widgets (#36040)
fix mouse scale for mousestate
2025-08-21 16:54:15 -07:00
kostas.pats
cd9ec6b240 Compressed vipc name pick (#36036)
* add custom vipc server name argument

* Update compressed_vipc.py

* add custom vipc server name argument + fixes

* Update compressed_vipc.py
2025-08-20 15:45:05 -07:00
Adeeb Shihadeh
b4cc4ea8e2 Update README.md 2025-08-20 15:44:23 -07:00
Adeeb Shihadeh
154f655335 update release checklist 2025-08-20 15:44:13 -07:00
Warren Togami
638dfb68ba ui: display thousandths place on lagd toggle (#1166)
lagd: display thousandth place so typical variation is visible

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-20 10:18:07 -07:00
Shane Smiskol
2ff707d82f Fix gradient point ignore 2025-08-19 22:37:55 -07:00
Shane Smiskol
8320934d91 raylib: cleanup experimental mode gradient color calculations (#36035)
* dfebug

* simplify

* come on man
2025-08-19 22:33:07 -07:00
Maxime Desroches
63441c048c test_onroad: relax first fid assertion (#36032)
* fid

* test

* Revert "test"

This reverts commit 38e6635dd0b0b9fb9c08bcc3a74b9283207b0c2f.

* r

* Revert "r"

This reverts commit 4037a321f89af137a645345a0fffb73da6071c72.
2025-08-19 22:30:48 -07:00
Shane Smiskol
d0069c136b raylib: fix experimental mode path gradient (#36033)
* fix!

* this is enough to fix the broken colors

* clean up

* fix

* use last colors -- need this so we don't have to always pass perfect gradient

* clean up

* clean up

* clean up
2025-08-19 22:19:56 -07:00
Jason Wen
fa0017fafc car: initialize brand-related settings in opendbc (#1146) 2025-08-19 23:54:07 -04:00
Shane Smiskol
870d19f33d Reapply "File sourcing: Not all files are logs (#36025)"
This reverts commit 3570022b9a.

Fix test
2025-08-19 19:59:50 -07:00
Shane Smiskol
60c34a0837 LogReader: run source test (#36031)
run "slow" test
2025-08-19 19:58:47 -07:00
Shane Smiskol
22e79479d2 unit tests: add comment (#36030)
* remove collection

* test

* back

* wtf it actually saves 10s?!

* ah that makes sense

* rm

* ?

* ugh

* qq

* bc
2025-08-19 19:39:27 -07:00
Maxime Desroches
3570022b9a Revert "File sourcing: Not all files are logs (#36025)"
This reverts commit 18b7ddef8f.
2025-08-19 17:11:53 -07:00
Maxime Desroches
dd5f5fdb98 ci: show all unit test failures (#36029)
* testci

* fix

* Revert "testci"

This reverts commit b62a0aacb604fc0fd39c6e50a726b686979b9880.
2025-08-19 17:11:29 -07:00
Harald Schäfer
18b7ddef8f File sourcing: Not all files are logs (#36025)
* Not all files are logs

* more refactor

* linting ok

* fix tests

* import exception

* whoops forgot to git add

* fix

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-08-19 16:25:13 -07:00
Shane Smiskol
5ec9aee216 File sourcing: simplify return type (#36028)
* rm str | none pattern

* clean up

* more clean up

* stash

* Revert "stash"

This reverts commit 3e2472160cc97e9d11922137757d9ef942a0312d.

* fix da prints

* fix cmt
2025-08-19 15:39:44 -07:00
Maxime Desroches
927548621b update to latest userdata partition (#36027)
bump
2025-08-19 15:37:39 -07:00
Shane Smiskol
6005b12f94 format logreader 2025-08-19 15:04:17 -07:00
Jason Young
09aa21390d Honda: Adding support for Honda City (#36026)
* bump opendbc

* release notes

* regen CARS.md

* bump opendbc correctly this time
2025-08-19 15:38:55 -04:00
YassineYousfi
d097a0c201 model parser: fix lead mhp out shape (#36024)
* model parser: fix lead mhp out shape

* fix for real
2025-08-19 11:35:22 -07:00
Adeeb Shihadeh
560c503871 new release flow (#36021)
* new release flow

* Update README.md
2025-08-19 11:19:58 -07:00
YassineYousfi
3d24225cc1 model parser: use check missing for mhp checks (#36023)
* model parser: use check missing for mhp checks

* lint + support re

* lint...

* no walrus

* just remove

* forgot this
2025-08-19 10:19:00 -07:00
YassineYousfi
51314fa9fe Revert "model parser: use check missing for mhp checks" (#36022)
Revert "model parser: use check missing for mhp checks (#36020)"

This reverts commit 803b54ebdb.
2025-08-19 10:09:59 -07:00
YassineYousfi
803b54ebdb model parser: use check missing for mhp checks (#36020)
* model parser: use check missing for mhp checks

* lint + support re

* lint...

* no walrus

* just remove
2025-08-19 10:09:09 -07:00
Jimmy
c085b8af19 feedbackd: remove lkas toggle for this release (#36018)
remove lkas toggle for this release
2025-08-19 09:18:32 -07:00
Adeeb Shihadeh
2cec2587be bump panda 2025-08-19 09:18:14 -07:00
Kirito3481
9e3a35035a Update ko-kr translation (#1167) 2025-08-19 07:24:53 +02:00
Adeeb Shihadeh
2148e2dff2 build_devel: clean submodules 2025-08-18 19:48:08 -07:00
Shane Smiskol
f55f3bb7cd setup is a noun! 2025-08-18 19:33:34 -07:00
Adeeb Shihadeh
4d55671b17 feedbackd: temp disable LKAS button as feedback (#36017)
* feedbackd: temp disable LKAS button as feedback

* disable that

* mark
2025-08-18 18:57:16 -07:00
commaci-public
dfc66d7807 [bot] Update Python packages (#36014)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-18 18:52:05 -07:00
Maxime Desroches
31101ecaab AGNOS 12.8 (#36008)
* staging

* prod
2025-08-18 15:37:44 -07:00
James Vecellio-Grant
80d702c866 models panel ui: live description for lagd toggle (#1139)
* Handle decoding directly in ui bc why not

* dynamic max

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-08-18 13:02:17 -07:00
commaci-public
3d879dd1ae [bot] Update Python packages (#36012)
* Update Python packages

* add psa

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-17 17:53:50 -07:00
Muhammed Jaseem Pallikkal
ef9e430992 Fixed development environment link in CONTRIBUTING.md (#36011)
* Fixed development environment link in CONTRIBUTING.md

This is my first PR to openpilot 🎉 excited to contribute!

* Using absolute path for tools
2025-08-17 13:51:12 -07:00
Adeeb Shihadeh
63fa250f29 Add note around excessive actuation check (#36010)
* Add note around excessive actuation check

* Update selfdrived.py
2025-08-17 11:53:20 -07:00
Harald Schäfer
ceb557058c Steam Powered model (#36000)
* f3e67f3e-6079-48cf-92a4-dee5eebd1d73/360

* f3e67f3e-6079-48cf-92a4-dee5eebd1d73/400

* No more action head: a8f96b93-bde2-4e28-a732-4df21ebba968/400
2025-08-17 10:18:30 -07:00
Maxime Desroches
6a67f9e56f setup: custom software warning (#36003)
* warn

* msg

* label

* space

* Revert "space"

This reverts commit ae9b8ad1149612c5741ae3b091740170238473ed.
2025-08-15 23:10:47 -07:00
Maxime Desroches
372682d4a9 updated: branch migration (#35993)
* release

* Update system/updated/updated.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-15 14:46:20 -07:00
github-actions[bot]
102ac66fab [bot] Update Python packages (#1145)
* Update Python packages

* revert tinygrad

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-15 16:42:35 -04:00
Shane Smiskol
ab44c9a4ff Torque controller: refactor calculations to be in accel space (#35790)
* clean up

* little confusing but works

* clean up

* fix

* pid outputs torque again, fix windup above max torque

* clean up

* fix

* fix

* typo

* fix conflicts

* fix PID

* cleanups

* seems correct

* updte

* inverse

* whitespace

* move

* small cleanup

* more cleanup

* update ref

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-08-15 11:39:56 -07:00
Adeeb Shihadeh
1805a47139 USB takes forever to come up... 2025-08-15 11:13:45 -07:00
Adeeb Shihadeh
5417efaa1d bump opendbc (#36001) 2025-08-15 11:12:18 -07:00
eFini
4536719353 longitudinal_planner: Convert self.mode to a local variable in update() (#35999)
Make 'mode' variable local
2025-08-15 09:02:38 -07:00
James Vecellio-Grant
34f4aadca5 ci: enforce runner cutoff above 9.0V threshold (#1156)
* ci: github runner auto off when voltage is above 9.0v .

This ensures that a runner in vehicle doesn't accidentally break everything lol.

* suggestion for clarity.

* refactor: rename and update handling of `GithubRunnerVoltage` parameter

- Improve clarity by renaming to `GithubRunnerSufficientVoltage`.
- Changed attribute to `CLEAR_ON_MANAGER_START` for improved runtime state management.
- No need for this value to be backed up!

* refactor: streamline voltage check for GithubRunnerSufficientVoltage

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-08-15 07:42:56 -07:00
Adeeb Shihadeh
b54d5997de Update RELEASES.md 2025-08-14 21:59:25 -07:00
Maxime Desroches
385ad9e839 updated: connectivity check with new setup (#35998)
* default

* fix
2025-08-14 21:38:27 -07:00
Maxime Desroches
7c6bc70312 params: fix default boolean params (#35997)
* fix

* update test
2025-08-14 20:14:12 -07:00
Shane Smiskol
8ec61991ee LogReader sourcing: remove redundant file existence checks (#35991)
* speed up sourcing but avoiding checking for existence of collected files already from previous sources

* clean up

* been meaning to make them return dicts

* no longer true

* no longer true

* clean up

* more

* more

* revert
2025-08-14 19:28:37 -07:00
Shane Smiskol
1eef956cad LogReader sourcing: return dict (#35994)
* new return type

* fix test

* why not
2025-08-14 19:19:37 -07:00
Maxime Desroches
daef43f620 ci: show all tests durations (#35995)
show
2025-08-14 18:54:56 -07:00
Shane Smiskol
aa91a02db8 LogReader sourcing: check comma API source before CI source (#35992)
sort
2025-08-14 18:26:19 -07:00
eFini
a6d0a88b1e Multilang: update chs/cht translations (#35981) 2025-08-14 10:27:44 -07:00
Jason Young
f2c806f8a0 bump opendbc for fingerprint updates (#35990)
bump opendbc
2025-08-14 11:39:02 -04:00
Jason Young
349c0ec662 Honda: Add several new cars to release (#35989)
* bump opendbc

* regen CARS.md

* update RELEASES.md
2025-08-14 10:30:42 -04:00
Maxime Desroches
741ea44aba AGNOS 12.7 (#35988)
* agnos12.7

* prod
2025-08-13 23:25:09 -07:00
github-actions[bot]
56a89eb4fb [bot] Update translations (#35975)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-13 18:32:10 -07:00
Maxime Desroches
3f830827b2 setup: new flow (#35960)
* start

* remove

* path

* fix

* prepare

* url

* format

* better

* better

* consist

* check

* not real

* ref

* simpler

* fix

* fix

* more

* more

* path

* clean

* line

* progress

* fast

* no

* ori

* flag

* remove

* install

* line

* wait time

* wait install

* Revert "wait time"

This reverts commit 14f750971c3d19b93e4609e9344cb3a8ce9175f4.

* move

* fix

* install

* universal service resources

* fix

* safer

* this is stupid

* time

* cleaner

* comment
2025-08-13 16:07:12 -07:00
Alexandre Nobuharu Sato
a2a385336e Multilang: update pt-BR translation (#35971)
Multilang: update pt-BR translations
2025-08-13 15:20:58 -07:00
Harald Schäfer
be934b3881 fancontroller: remove weird minus (#35983)
* fancontroller: remove weird minus

* another minus
2025-08-13 11:43:50 -07:00
Jimmy
3d6dfc864d clip: terminate processes in clip() instead of in main() (#35984)
* terminate processes in clip() instead of in main()

* context manager for proc
2025-08-13 11:43:35 -07:00
Warren Togami
3cf81c081c bug: Fix "Default" interactivity timeout display (#1154)
If param `InteractivityTimeout` does not exist, timeoutValue == "",
resulting in the Interactivity Timeout UI displaying "s" by default.

Fix displayed "Default" by checking for "0" or "".

Co-authored-by: Nayan <nayan8teen@gmail.com>
2025-08-13 12:12:22 -04:00
DevTekVE
8910668e4e sunnylink: enable uploader option for admins (#1152)
* feat: add sunnylink uploader option for admins in sunnylink panel

* feat: enhance uploader to support zstd compression and improve route handling

* feat: update sunnylink uploader description and enablement criteria for admin tiers

* ui cleanup

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-13 12:12:01 -04:00
Jason Wen
bed8da06dc sunnylink: cleanup unused code in uploader (#1155) 2025-08-13 12:06:03 -04:00
Jason Wen
c490b3ca12 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1153) 2025-08-13 00:31:44 -04:00
Jason Wen
6c4c0c00b4 Merge branch 'upstream/openpilot/master' into sync-20250812
# Conflicts:
#	opendbc_repo
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/latcontrol_angle.py
#	selfdrive/controls/lib/latcontrol_pid.py
#	selfdrive/controls/lib/latcontrol_torque.py
2025-08-12 23:11:18 -04:00
James Vecellio-Grant
68625222b6 chore: sync tinygrad (#1151)
* commence the sync!

* !cancelled

* Thats it folks
2025-08-12 22:33:06 -04:00
YassineYousfi
8deb1bf285 Down To Ride model 🏎️ (#35982)
* e9237324-4b92-48f5-acaa-ebdf7fe46339/400

* ff4c292c-8e5a-44c0-9b75-e79c60152da2/400

* 1496451e-897b-4a1b-a284-37d244bfddb3/400

* Revert "Revert TR again (#35179)"

This reverts commit e9cea3ae5c.

* try stopping closer

* 5e4cb3d3-b9cc-45c7-a476-38083e75029c/400

* 2164d501-7d2c-467d-b132-be4f85db4164/60

* Revert "2164d501-7d2c-467d-b132-be4f85db4164/60"

This reverts commit 1f4b98ed7d63971507dff94e5ac20223ee15e067.

* 9a836aee-dec6-4f26-8d7e-6db4bb9c8176

* no replace ln

* Revert "no replace ln"

This reverts commit fb5173ced84bb8a07a4e06a5bec43d115404973b.

* opset_version 17

* rebase

* 5f255b73-2e54-46bc-8f80-82c5838165a3/400

* a423dec7-7dcc-4523-aaae-a4012d56b9b5/400

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-08-12 19:01:56 -07:00
James Vecellio-Grant
28b17858be sunnypilot modeld: refactor gen12 parsing (#1150)
* gen12

* lint

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-12 19:07:07 -04:00
commaci-public
91aec49cee [bot] Update Python packages (#35976)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-11 18:43:52 -07:00
Harald Schäfer
cd087a561e Simple plan (#35980)
* squash

* double

* proper merge

* better organization
2025-08-11 17:42:03 -07:00
Shane Smiskol
10cc87b80b raylib: rm some common colors (#35979)
common colors
2025-08-11 17:06:11 -07:00
Jimmy
13d4c6a167 ui: replace "Hotspot" with link icon (#35978)
replace "Hotspot" with link icon
2025-08-11 16:26:07 -07:00
Harald Schäfer
455a6a586a Misc PID refactors (#35844)
* Misc PID refactors

* dead

* finish rename

* unused import

* whitespace

* typo

* fix fan controller

* pid_log

* whitespace

* integral clipping in pid

* update ref

* cleaner

* rm print

* update ref

* revert fan changes

* forgot this
2025-08-11 14:25:29 -07:00
YassineYousfi
c78b302b93 Space Lab 3 🛰️🛰️🛰️ (#35905)
* c147a591-1f86-4ea4-b2b7-391eff1178b5/400

* 6d6639ee-643e-4f72-bd1c-dda546383854/400
2025-08-11 14:07:01 -07:00
Maxime Desroches
a11a8591e4 bump version to 0.10.1 2025-08-11 13:14:48 -07:00
Nayan
ec3f044c83 ui: refresh model list (#1074)
that's all folks

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-08-11 10:24:05 -04:00
Jason Wen
6eaae848c9 Revert "registration required to go onroad" (#1143)
This reverts commit f4b017a7
2025-08-11 08:47:52 -04:00
Jason Wen
fc9a79406f NNLC: cleanup unused attributes (#1142)
* NNLC: cleanup unused attributes

* more cleanup
2025-08-11 08:28:29 -04:00
Maxime Desroches
0bbceb8539 wifi_manager: wait for wifi device (#35974)
wait
2025-08-10 19:41:13 -07:00
royjr
e97ae07589 macOS: fix font-noto-color-emoji (#35972)
Update mac_setup.sh
2025-08-10 09:49:52 -07:00
Jason Wen
f45ad6bab9 panda: skip flash and firmware check if deprecated panda is detected (#1117)
* flash: skip if deprecated panda is detected

* skip firmware checks

* wrong

* typing

* fix

* revert
2025-08-10 02:52:02 -04:00
github-actions[bot]
b5cbb980fb [bot] Update translations (#1140)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-10 02:47:39 -04:00
github-actions[bot]
876738e96a [bot] Update Python packages (#1141)
* Update Python packages

* revert

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-10 02:42:02 -04:00
Jason Wen
4116b412a3 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1134) 2025-08-10 02:20:07 -04:00
Jason Wen
75509aec16 Disable record feedback with LKAS button when MADS is enabled 2025-08-10 02:05:09 -04:00
Jason Wen
97c2d7e655 Merge branch 'upstream/openpilot/master' into sync-20250809
# Conflicts:
#	common/params_keys.h
#	opendbc_repo
#	panda
#	selfdrive/car/cruise.py
#	selfdrive/controls/controlsd.py
#	selfdrive/selfdrived/selfdrived.py
#	selfdrive/test/process_replay/process_replay.py
#	selfdrive/ui/qt/setup/setup.cc
#	tinygrad_repo
2025-08-10 02:05:05 -04:00
Jason Wen
1bc12f1e21 Reapply "LagdToggle: refactor and only instantiate once" (#1137) (#1138)
* Reapply "`LagdToggle`: refactor and only instantiate once" (#1137)

This reverts commit b4f19d4860.

* infinite woo gone

* use them hz
2025-08-09 22:50:29 -04:00
Jason Young
430079113c Revert "Honda: Temporary test exception for driver regen paddle" (#35969)
Revert "Honda: Temporary test exception for driver regen paddle (#35929)"

This reverts commit d15d3c73b8.
2025-08-09 20:57:04 -04:00
Jason Wen
b4f19d4860 Revert "LagdToggle: refactor and only instantiate once" (#1137)
Revert "`LagdToggle`: refactor and only instantiate once (#1130)"

This reverts commit 6ae668e987.
2025-08-09 20:06:10 -04:00
Adeeb Shihadeh
1c46640ea6 Remove more Qt, part 2 (#35968) 2025-08-09 15:04:26 -07:00
Adeeb Shihadeh
2d8030de0b ui: move watch3 to raylib (#35967)
* move to py

* cleaner

* clean that up
2025-08-09 15:00:36 -07:00
Jason Wen
80a4ace1ab ci: use upstream docker build script for cereal validation (#1136) 2025-08-09 17:57:49 -04:00
Jason Wen
b391708b3d Revert "ci: update cereal validation repo reference to sunnypilot" (#1135)
Revert "ci: update cereal validation repo reference to sunnypilot (#1108)"

This reverts commit 08216c1ea4.
2025-08-09 17:40:29 -04:00
Jason Wen
6ef386da3d NNLC: fix friction not being applied to error (#1113)
* params: fix type

* NNLC: fix friction not being applied to error

* another PR

* apply suggestions

* lint
2025-08-09 16:56:37 -04:00
Jason Wen
6ae668e987 LagdToggle: refactor and only instantiate once (#1130)
* wrap the params

* just 1 class and use a single param for now

* refactor

* fix

* cache itself

* no longer

* rename

* type hint

* in helpers instead

* lint

* all

* init as 0 to pass ci

* init as 0 to pass ci

* return_default

* fix init

* add LAT_SMOOTH_SECONDS directly in modeld, temp remove dynamic desc, red difffffffff
2025-08-09 16:51:31 -04:00
github-actions[bot]
72b71d57bc [bot] Update translations (#35965)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-09 12:21:05 -07:00
commaci-public
5339a89e81 [bot] Update Python packages (#35964)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-09 12:19:52 -07:00
James Vecellio-Grant
2f60026c22 ci: crosscheck tinygrad ref during tests (#1106)
* Add tinygrad ref testing

* BaseDir and give a fake ref id to test

* one more before the real thing

* Add the correct ref

* test

* Update test_tinygrad_ref.py

* Update tinygrad_ref

* Update test_tinygrad_ref.py

* Update tinygrad_ref

* This SHOULD FAIL

* Revert "This SHOULD FAIL"

This reverts commit 58862f8a73.

* bit of red

* Move ref to models so compiled branches can read it

* step one

* step 2

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update tinygrad_ref.py

* Update build-all-tinygrad-models.yaml

* bump to fail test

* Revert "bump to fail test"

This reverts commit 4f58991f32.

* pytest should take care of it

* lint

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-09 14:55:52 -04:00
Shane Smiskol
e0f51bdbb6 Reapply "LogReader: wrap events to cache which() (#35882)" (#35909)
* Reapply "LogReader: wrap events to cache which() (#35882)"

This reverts commit ba2dced54c.

* fix lr

* speed up

* clean up

* more

* should be fast

* clean up

* only supports Event

* rmrmr

* bye

* simple

* gix
2025-08-08 23:42:54 -07:00
Maxime Desroches
63d8c6c7f7 ui: adapt InputBox to new touch api (#35962)
new
2025-08-08 22:50:35 -07:00
Maxime Desroches
83f6843a48 ci: run all unit tests (#35959)
* more please

* back
2025-08-08 20:07:33 -07:00
Maxime Desroches
4bb5986c14 setup: fix url for urllib (#35958)
fix
2025-08-08 19:57:20 -07:00
Maxime Desroches
e596704644 ui: remove gui_label usages from setup (#35955)
clean
2025-08-08 16:00:00 -07:00
James Vecellio-Grant
bcc416c7eb ci: adjusting build-single to comply with githubs new input type (#1132) 2025-08-08 15:12:47 -07:00
DevTekVE
38de06232e bugfix: fix backup manager after params change (#1123)
* why? because why not!? damn.

* test

* more disable

* i am hating this

* fuck mypy.

* hopefully this is fixing json

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-08-08 18:02:31 +02:00
Jason Wen
567c5459db params: fix auto type cast (#1127)
* params: fix auto type cast on put

* literally

* lint

* pls comma why dis a string but actually json
2025-08-08 10:26:58 -04:00
Shane Smiskol
fd32fcd20d raylib ui: only process mouse events when enabled (#35948) 2025-08-08 01:09:03 -07:00
Shane Smiskol
a79a5e5a16 revert
i thought i pushed!
2025-08-08 00:36:13 -07:00
Shane Smiskol
5117a8c3a6 ui: test raylib ui (#35949)
* add raylib ui

* test

* this is better for now

* rm

rm

* finalize it

* need this?

* ?

* shite

shite

* try

* ?

* huh

* simp

* ?

* wtf is going on

* ???????????????

* lock

* stash

* no 2 packages

* Revert "stash"

This reverts commit 9efb0d9bda6a6309e7a567634d1921bf1cd0fb59.

* debug

* noo

* debug

* ?

* and

* yeah yeah

* init one

* 2

* i wonder

* oooh

* make sure

* fix dat

* try this

* see if wifiman

* forgot

* ?

* ???

* fuck this we can rewrite it later
2025-08-08 00:34:53 -07:00
Maxime Desroches
1555c0b5fe ui: custom software warning (#35953)
cu
2025-08-07 23:19:48 -07:00
Maxime Desroches
0e9de8f1b1 ui: support text wrapping in Label (#35952)
* lb

* t

* Revert "t"

This reverts commit a9b8e2b9faa5e9d1b189c1dc2ed1aa876e4df476.

* tr

* Revert "tr"

This reverts commit 8de8719ded0fed2b0e5469230e83c13714f88319.

* better

* much better
2025-08-07 23:08:42 -07:00
Shane Smiskol
7bfac9d050 raylib ui: improve is_pressed (#35950)
* stash

* clean up exp

* come on

* fix

* ?

* maybe better

* fix

* same order

* clean up
2025-08-07 16:28:16 -07:00
Maxime Desroches
a800c129b0 run setup and reset at 20FPS for now 2025-08-07 14:33:40 -07:00
Maxime Desroches
f13ec6cb27 wifi manager: correctly handle emoji ssid 2025-08-07 14:22:34 -07:00
Maxime Desroches
f04bb6b9fa ui: reduce network selection lag (#35945)
lag
2025-08-07 13:43:27 -07:00
Brett Sanderson
ed0346980c Update plotjuggler README.md (#35946)
Update README.md

Real example using segment range.  Remove segment count as its not a parameter.
2025-08-07 11:47:50 -07:00
Shane Smiskol
6cf710d4cb Widget: add enabled property (#35944)
* add enabled

* sort

* rename

* rest

* rm that
2025-08-06 22:00:12 -07:00
ZwX1616
8b90c210f8 encoderd: more efficient compression for low res frames (#35924)
* shein says inline

* Update system/loggerd/loggerd.h

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Revert "Update system/loggerd/loggerd.h"

This reverts commit 3602523cefdeb2a46d77946f7f2cc7fc21bd5a4f.

* Revert "shein says inline"

This reverts commit d3c079e137c5d98068501df636975c5fbf8810ee.

* EncoderSettings

* getter

* update test_encoder

* def

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-08-06 21:17:10 -07:00
Maxime Desroches
62bbf6db8d ui: use label in confirm dialog (#35943)
forget
2025-08-06 20:11:30 -07:00
Maxime Desroches
a51477d40d ui: use Label in keyboard (#35941)
better
2025-08-06 18:07:06 -07:00
ZwX1616
a84089c6e5 EncoderInfo: encoder setting factorys (#35940) 2025-08-06 16:53:16 -07:00
Jimmy
bb8a2ff65b Remove rerun (#35939)
remove rerun
2025-08-06 16:50:26 -07:00
Maxime Desroches
3a78eee2f9 ui: emoji (#35913)
* emoji

* label

* back

* default

* type

* more

* ico

* device

* clean

* brew
2025-08-06 16:04:19 -07:00
Shane Smiskol
52a4b52628 FileName clean up (#35938)
two spaces!
2025-08-06 14:07:02 -07:00
Jason Young
839a773345 enable lateral accel factor learning for Honda (#35936)
enable torqued for Honda
2025-08-06 16:11:07 -04:00
DevTekVE
c236f472a9 update ISO_LATERAL_ACCEL import + VM changes (#35865)
* refactor: move lateral methods from init to lateral.py (#2594)

* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Merge branch 'master' into move-common-vm-methods. dunno what happend with ci

* now we need to move this import

* bump opendbc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-06 11:53:57 -07:00
Bruce Wayne
ac3d96d2fd Revert "selfdrive.ui.feedback: add init (#35935)"
This reverts commit eca2f40341.
2025-08-05 23:11:19 -07:00
Harald Schäfer
eca2f40341 selfdrive.ui.feedback: add init (#35935)
add init
2025-08-05 23:08:09 -07:00
Maxime Desroches
5e6f942234 gitignore .cache/ from clangd 2025-08-05 22:02:10 -07:00
Maxime Desroches
69ca699773 clip: fix params (#35934)
fix
2025-08-05 21:50:30 -07:00
Harald Schäfer
d1e0a60408 Filename refactor: no enum (#35930)
* conflict

* typing

* typing

* no value

* fix typing

* whitespace

* whitespace

* unused

* Reapply "Filename: minor refactor (#35927)"

This reverts commit 8c7d53004f.

* unused import

* done
2025-08-05 20:37:09 -07:00
Harald Schäfer
999db5b426 Update RELEASES.md 2025-08-05 20:14:01 -07:00
Harald Schäfer
e8135c5431 Update RELEASES.md 2025-08-05 20:11:56 -07:00
Adeeb Shihadeh
978d1c38f1 clip: add speed up support (#35933) 2025-08-05 19:17:58 -07:00
Adeeb Shihadeh
8c7d53004f Revert "Filename: minor refactor (#35927)"
This reverts commit 96313fa4c0.
2025-08-05 19:07:17 -07:00
Mitchell Goff
7413982f0d Lower ALLOW_THROTTLE_THRESHOLD (#35928)
* Lower ALLOW_THROTTLE_THRESHOLD

* Bumped process_replay refs
2025-08-05 17:35:54 -07:00
Maxime Desroches
c95cac3b06 update to latest userdata partition (#35931)
update
2025-08-05 17:11:19 -07:00
Maxime Desroches
fbbb2ef5d0 update release checklist 2025-08-05 16:57:39 -07:00
Jason Young
d15d3c73b8 Honda: Temporary test exception for driver regen paddle (#35929)
Honda: Test exception for driver regen
2025-08-05 19:35:06 -04:00
Harald Schäfer
96313fa4c0 Filename: minor refactor (#35927)
* Filename

* rest of refactor
2025-08-05 16:29:25 -07:00
Shane Smiskol
c35494c19f Check for excessive lateral acceleration (#35921)
* here?

* nah card shouldn't become bloated

* better

* import

* actually selfdrived is probably best since it already manages alerts

card is car interfacing, controlsd is for calculating control input, selfdrived is rest

* consistent name

* add to params

* ai

* maybe better?

* shorter

* build out lockout

* do

* check active

* descriptive

* this is a terrible experience just to get lat accel

* just pass sm

* not iso

* type

* rm

* math

* use calibrated roll

* fix

* fix borkenness

* cmt

* compare some methods

* rolling window

* 1 and 2 are the same

* rm it

* stuff

* plot

* plot kf

* generic implementation

* adjust limits

* fix from merge

* clean up

* revert filter to master

* and here

* and

* run_process_on_route imps

* clean up

* why not

* extrapolate

* this doesn't generically work for angle/curvature cars

Revert "extrapolate"

This reverts commit 556f0c3a92b82f07ceb6422f0e39322e79a10dcd.

* cmt

* move

* rm debug

rm debug

and

* others use helpers

* two counters might be too much to return

* turn into class

* clean up

* cmt

* kinda obvious

* impossible for this not to be true, but make it explicit

* clean up
2025-08-05 16:15:07 -07:00
Adeeb Shihadeh
c321fa72e2 one more 2025-08-05 16:08:14 -07:00
Adeeb Shihadeh
2c654500d2 update release README 2025-08-05 16:07:29 -07:00
YassineYousfi
bb4f9651ba Update RELEASES.md 2025-08-05 14:57:57 -07:00
Adeeb Shihadeh
c23537b4d5 lil copy updates 2025-08-05 14:55:30 -07:00
Adeeb Shihadeh
865e6fa9d8 update release notes 2025-08-05 13:42:51 -07:00
Jimmy
d7b0a5fa7e Record feedback with LKAS button (#35888)
* record feedback with LKAS button

* fix alert test

* slightly simplify feedbackd

* "Audio Feedback Saved" upon time expiration or early stop

* earlySend --> earlyStop

* userFlag --> userBookmark

* RecordAudioFeedback param/toggle

* add audioFeedback test

* simplify feedbackd

* send bookmark regardless of toggle, show feedback event with higher priority

* add userBookmark to selfdrived sm

* fix mispelled param name

* default off and move to main

* segmentNum --> blockNum, earlyStop --> lastBlock

* preserve audioFeedback

* get rid of lastBlock and just send bookmark saved at the end

* update raylib side

* update toggle description and add raylib toggle

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-05 13:41:41 -07:00
Maxime Desroches
112d615ac9 ci: fix setup device variable 2025-08-04 21:28:43 -07:00
Maxime Desroches
fb34e7ccd3 ci: kick power watchdog on ci devices 2025-08-04 21:06:28 -07:00
Maxime Desroches
f08d95b95a AGNOS 12.6 (#35922)
* bump

* production
2025-08-04 20:40:20 -07:00
Shane Smiskol
1c9bbb290a run_process_on_route.py: qol improvements (#35923)
* take from upstrema/exc-lat-accel

* see ya

* sort

* rm

* duh

duh
2025-08-04 17:11:53 -07:00
Shane Smiskol
2c8415f81c ui.py: gas is deprecated 2025-08-04 16:21:20 -07:00
mvl-boston
bae7a610fa Honda: allow sport gear (#35911)
add honda sport gear
2025-08-04 16:19:26 -07:00
Adeeb Shihadeh
aecb6d13e7 cabana: add independent panda lib (#35920)
* cabana: add separate panda lib

* cleanup
2025-08-04 16:09:22 -07:00
Maxime Desroches
1ca8a4ca75 raylib: bump commit 2025-08-04 15:43:50 -07:00
Maxime Desroches
c316c400f8 reset: proper button scale (#35919)
* reset scale

* r
2025-08-04 15:41:29 -07:00
Adeeb Shihadeh
408cef2d46 Delete Jenkins trigger comments (#35916) 2025-08-04 13:29:22 -07:00
pencilpusher
be0626f7e3 improved safe_ioctl (#35908)
* improved safe_ioctl

* readability

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* use correct ioctl command

* ameliorated api

* use try/catch to prevent spi_fd leak

* Update common/util.h

* use correct ioctl command

* error log message is more readable

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-04 13:25:24 -07:00
commaci-public
f06c98018f [bot] Update Python packages (#35915)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-08-04 09:44:14 -07:00
Maxime Desroches
976dfa3982 ui: multi touch keyboard support (#35912)
* start

* better

* 2

* dumb
2025-08-03 18:14:48 -07:00
Willem Melching
623de0e22a cabana: PandaStream use noOutput safety mode instead silent (#35910) 2025-08-03 09:22:52 -07:00
Maxime Desroches
86146981c4 ui: fix connection check 2025-08-03 01:32:51 -07:00
Maxime Desroches
56dcf71774 ui: fix non-ascii access points 2025-08-03 01:21:40 -07:00
Maxime Desroches
a1f073921c test_messaging: less flaky wait time check 2025-08-03 00:31:01 -07:00
Maxime Desroches
cccd60a28b ui: make wifi selection usable (#35895)
* start

* wrong

* more

* more

* better

* better

* more better
2025-08-03 00:14:36 -07:00
Maxime Desroches
181ea39a83 ui: re-compute text size (#35907)
* one

* app

* fix
2025-08-02 20:38:37 -07:00
Jason Wen
a93f1caf1f ci: dynamic submodule check for build_release (#1114)
* ci: dynamic submodule check for build_release

* test opendbc diff

* somem fix

* this way

* use path

* use master branch instead

* less verbose

* test bump

* test 1 more sub change

* unbump

* only echo if there's a diff
2025-08-02 23:11:59 -04:00
Maxime Desroches
8cce8cf3f3 ui: keyboard improvements (#35906)
* better

* miss this one
2025-08-02 19:01:59 -07:00
Simon Kuang
0b855a93d7 scons: support build on single processor (#35904)
Update SConstruct
2025-08-02 16:50:45 -07:00
Jason Young
8c78749846 sim: fix "msg not found" errors (#35903)
* garbage-collect CRUISE_PARAMS

* follow GEARBOX message refactor
2025-08-02 19:10:49 -04:00
Adeeb Shihadeh
aa2a3b3c8f hw: remove unused volume properties 2025-08-02 16:08:58 -07:00
Adeeb Shihadeh
ba2dced54c Revert "LogReader: wrap events to cache which() (#35882)"
This reverts commit 0ebee55050.
2025-08-02 15:53:20 -07:00
DevTekVE
582671e006 fix: update LastSunnylinkPingTime parameter type from string to integer (#1112) 2025-08-02 22:24:59 +02:00
Shane Smiskol
2e15ac5f4f test manager in CI (#35900)
* test manager

* not now

* try

* fix
2025-08-02 13:18:30 -07:00
Shane Smiskol
c92add1280 process replay: don't wait for process to start (#35897)
* hmm

* test proc replay determinism

* clean up

* rm

* clean up
2025-08-02 12:34:13 -07:00
Adeeb Shihadeh
bab251b287 fix conversions import path (#35899) 2025-08-02 12:02:17 -07:00
DevTekVE
9dc98b36be refactor: cleanup gravity constant handling (#35866)
* refactor: move lateral methods from init to lateral.py (#2594)

* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* No need to change order of import

* refactor: consolidate ACCELERATION_DUE_TO_GRAVITY import path

* bump opendbc

* update refs

* don't import from opendbc

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-02 11:20:18 -07:00
Shane Smiskol
313f36712c process replay: lock polled socket only (#35887)
* stash

* Revert "stash"

This reverts commit 333818b80f498e8e3dac3c1cd36e669e97521d52.

* works for paramsd

* INSANE

* format

* fater

* clean up

* more

* huh i thought order matterred?

* clean that up

* can remove this

* cmt

* check isisntance

* rename

* clean up

* clean up

* more

* more!

* sounds better
2025-08-02 00:45:29 -07:00
Maxime Desroches
3ff874d6c2 ui: fix keyboard lint 2025-08-02 00:24:52 -07:00
Maxime Desroches
eb751a3804 setup: convert to raylib touch api (#35862)
* first

* lint

* c

* simple first

* btn

* n

* more

* more

* bring back
2025-08-02 00:22:28 -07:00
Shane Smiskol
5a8e3470ff selfdrived: feed PoseCalibrator with updates (#35893)
this is also slow
2025-08-02 00:09:54 -07:00
Shane Smiskol
07909906d4 controlsd: speed up number checking (#35890)
Update controlsd.py
2025-08-02 00:08:18 -07:00
Shane Smiskol
7c87ada8d8 Simplify radarFault handling (#35891)
* Revert "Fix up `radarFault` handling (#35880)"

This reverts commit 4d01b7bec8.

* Reapply "Fix up `radarFault` handling (#35880)"

This reverts commit 597d7ec1ed78206035b924a6e8464cd9239b5db4.

* can do this

* yeah this is fine
2025-08-01 23:55:16 -07:00
Jason Wen
08216c1ea4 ci: update cereal validation repo reference to sunnypilot (#1108) 2025-08-02 02:04:25 -04:00
Jason Wen
baa9e91fd7 tinygrad: unbump to previous ref (#1107) 2025-08-02 01:46:40 -04:00
Jason Wen
f3c4501db1 docker: sunnypilot images (#1104)
* docker: sunnypilot images

* update ref for now

* update

* actually nightly

* rename

* enable now

* revert
2025-08-02 01:15:07 -04:00
Shane Smiskol
bdd6ff4f3e process replay: remove frequency based recv callback (#35886)
* wtf is going on?

* rm it

* default
2025-08-01 21:46:32 -07:00
Jason Wen
1f5096956b Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#1101) 2025-08-02 00:39:53 -04:00
Shane Smiskol
f2e100b0e1 process replay: clean up recv callbacks (#35889)
clean up callbacks
2025-08-01 21:36:15 -07:00
Jason Wen
d6474aa0a9 Merge branch 'upstream/openpilot/master' into sync-20250731
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	common/params.h
#	common/params_keys.h
#	common/params_pyx.pyx
#	docs/CARS.md
#	opendbc_repo
#	panda
#	selfdrive/car/tests/test_models.py
#	selfdrive/pandad/pandad.cc
#	selfdrive/pandad/pandad.h
#	selfdrive/selfdrived/selfdrived.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	system/athena/athenad.py
#	system/athena/manage_athenad.py
#	system/manager/manager.py
#	system/sentry.py
#	uv.lock
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master`

Sync: `commaai/panda:master` into `sunnypilot/panda:master`
2025-08-02 00:21:14 -04:00
Shane Smiskol
8b0bfd7910 match on /test/ 2025-08-01 20:52:36 -07:00
Shane Smiskol
db55f1275d process replay: set selfdrived main_pub (#35885)
* save 1-2s for full route

* now more than halve the time on top of previous speedup!

* stash

* default should be most common!

* revert

* revert

* clean up

* clean up

* clean up

* clean up
2025-08-01 20:49:45 -07:00
Shane Smiskol
8f9ee43d34 process replay: flip main_pub_drained default 2025-08-01 20:44:33 -07:00
Shane Smiskol
37c4ee1532 process replay: only enter prefix when interacting with process (#35884)
* save 1-2s for full route

* cu

* stock

* Revert "stock"

This reverts commit 7cfb550817b124c3085cf005fda8c102ae53ae9d.

* clean up
2025-08-01 20:13:02 -07:00
Shane Smiskol
0ebee55050 LogReader: wrap events to cache which() (#35882)
* speed up lr

* lazy caching

* clean up

* it fast

* stash

* stash

* chatgpt code is bad as usual

* clean up

* clean up

* clean up

* clean up

* clean up

* clean up

* match behavior

* cmt
2025-08-01 19:07:16 -07:00
Maxime Desroches
cb5299be5a ui: adapt network to raylib touch api (#35881)
* start

* for now

* con

* more
2025-08-01 18:40:43 -07:00
Shane Smiskol
5c73681be8 process replay: rm dummy sockets (#35883)
* rm dummy sockets

* debug

* clean up

* cu
2025-08-01 18:38:42 -07:00
Shane Smiskol
dd09c4f341 process replay: speed up startup (#35879)
* format

* containers might not be set

* opts

* halves startup time for 12 procs (1.6 to 0.8s)

* stash

* clean up

* who knew going through entire list of msgs each time is so slow

* rewrite this to be more readable

* speed up lr

* clean up

* more

* more
2025-08-01 17:51:39 -07:00
Adeeb Shihadeh
4d01b7bec8 Fix up radarFault handling (#35880)
* fixup radarFault handling

* catch all

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-08-01 16:27:26 -07:00
Maxime Desroches
42ebab1334 ui: add missing keyboard function 2025-08-01 16:02:25 -07:00
Shane Smiskol
9117a414bb process replay clean up (#35878)
* format

* containers might not be set

* opts

* halves startup time for 12 procs (1.6 to 0.8s)

* stash

* Revert "stash"

This reverts commit 3e119a9602e495bd5a57b94e73fa53d4f45051b1.

* Revert "halves startup time for 12 procs (1.6 to 0.8s)"

This reverts commit a39edf0a579f0c861ccb904a2718254fe32e03d0.

* Revert "opts"

This reverts commit 4dc1f75f0909a93650f8f7e8525af3e4eae08205.

* already set!
2025-08-01 15:20:50 -07:00
DevTekVE
1966845fc9 refactor: move lateral methods from init to lateral.py (#35856)
* refactor: move lateral methods from init to lateral.py (#2594)

* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* No need to change order of import

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-08-01 15:17:37 -07:00
Maxime Desroches
889e386dbc ui: adapt keyboard to raylib touch api (#35875)
* key

* cancel

* more

* wow mypy very usefull as always

* _

* b

* std
2025-08-01 14:07:12 -07:00
Maxime Desroches
4e97a29e83 ui: add icon to Button (#35874)
ico
2025-08-01 12:03:22 -07:00
Adeeb Shihadeh
b695715753 sensord: reset LSM (#35872)
* sensord: reset LSM

* they'll be ready in time

* switch to SW_RESET, BOOT not working for some reason
2025-08-01 10:13:39 -07:00
Jason Wen
f5991caf6f params: update AthenadPid to use integer type (#35871)
* params: update `AthenadPid` to use integer type

* fix type
2025-08-01 09:29:25 -07:00
James Vecellio-Grant
40f298f033 sunnypilot modeld: Raise Min Selector Version (#1103)
Bump to Min 8 to prevent loading conflicts
2025-08-01 07:18:03 -07:00
royjr
c5eb41fe37 mapd: suppress output
Update process_config.py
2025-08-01 09:45:41 -04:00
Shane Smiskol
2e4de9b7d8 process replay: speed up multi-process replay (#35867)
* holy shit

* benchmark without this main pub drain stuff

* revert

* ??

* actually this is what we want

* what is going on this is python 3.11 sir

* stash

* this is how you dew it

* minor clean up

* fix

* clean up

* clean up

* this is madness!

* typing

* clean up
2025-08-01 03:32:03 -07:00
Shane Smiskol
f2c17dd688 process replay: ordered dict is in Python 2025-08-01 03:26:45 -07:00
Shane Smiskol
c4298ce287 process replay: create openpilot prefix directories once (#35864)
this is so slow
2025-07-31 23:42:02 -07:00
Maxime Desroches
1de1640689 ui: improve Button widget (#35861)
* bnt

* more

* dup
2025-07-31 22:28:58 -07:00
Adeeb Shihadeh
fc58c866c6 AGNOS power monitoring watchdog (#35860)
* AGNOS power monitoring watchdog

* manager should do this
2025-07-31 19:43:21 -07:00
Maxime Desroches
c4b63cd439 reset: timeout after prolonged inactivity (#35859)
* reset

* pc

* const

* x
2025-07-31 14:53:00 -07:00
kostas.pats
e32a2ce164 rescale ir power (#35858)
* rescale ir value pandad sends to Hardware and changed max ir value in Hardware

* changed ir_percentage type

* refactored pandad.cc ir_pwr setting

* cleaned up ir update condition

---------

Co-authored-by: kostas pats <kostas@comma.ai>
2025-07-31 14:17:22 -07:00
Jason Wen
6e76d0ca86 ci: more ref change to master 2025-07-31 14:10:45 -04:00
Jason Wen
259e2fd5af ci: change ref to master (#1099) 2025-07-31 13:45:48 -04:00
Jason Wen
713f8bfc21 carControlSP: parse radarState's leadOne & leadTwo (#1089)
* `carControlSP`: parse `radarState`'s `leadOne` & `leadTwo`

* typo

* bump

* convert first

* rename

* directly
2025-07-31 12:56:33 -04:00
James Vecellio-Grant
6d41ce2032 ci: Refactor model building workflows (#1096)
* Tinygrad bump from sync-20250627

* bump tinygrad_repo

* Reformat metadata generator to match driving_models.json

* bump tinygrad

* Revert "bump tinygrad"

This reverts commit f479dfd502.

* revert me after SP model compiled

* Model recompiled successfully, initiate "revert me after SP model compiled"

This reverts commit 95706eb688.

* The "FillMe" placeholder caused an extra 10 seconds of work

* bump to 22Jul2025

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Allow more dynamic short names

This should hopefully be future-proof for now.. It's robust enough to return the correct word-digit format (see example on how it generates from given display name below):

'Last Horizon V2 (November 22, 2024)' -> LHV2
'Alabama (November 25, 2024)' -> ALABAMA
'PlayStation (December 03, 2024)' -> PLAYSTAT
'Postal Service (December 09, 2024)' -> PS
'Null Pointer (December 13, 2024)' -> NP
'North America (December 16, 2024)' -> NA
'National Public Radio (December 18, 2024)' -> NPR
'Filet o Fish (March 7, 2025)' -> FOF
'Tomb Raider 2 (April 18, 2025)' -> TR2
'Tomb Raider 3 (April 22, 2025)' -> TR3
'Tomb Raider 4 (April 25, 2025)' -> TR4
'Tomb Raider 5 (April 25, 2025)' -> TR5
'Tomb Raider 6 (April 30, 2025)' -> TR6
'Tomb Raider 7 (May 07, 2025)' -> TR7
'Down to Ride (Revision: May 10, 2025)' -> DTR
'SP Vikander Model (May 16, 2025)' -> SPVM
'VFF Driving (May 15, 2025)' -> VFFD
'Secret Good Openpilot (May 16, 2025)' -> SGO
'Vegetarian Filet o Fish (May 29, 2025)' -> VFOF
'Down To Ride (Revision: May 30, 2025)' -> DTR
'Vegetarian Filet o Fish v2 (June 05, 2025)' -> VFOFV2
'Kerrygold Driving (June 08, 2025)' -> KD
'Tomb Raider 10 (June 16, 2025)' -> TR10
'Organic Kerrygold (June 17, 2025)' -> OK
'Liquid Crystal Driving (June 21, 2025)' -> LCD
'Vegetarian Filet o Fish v3 (June 21, 2025)' -> VFOFV3
'Vibe Model [Custom Model]' -> VMCM
'Tomb Raider 13 (June 27, 2025)' -> TR13
'Aggressive TR (June 28, 2025)' -> ATR
'Tomb Raider 14 (June 30, 2025)' -> TR14
'Cookiemonster Tomb Raider (July 02, 2025)' -> CTR
'Down to Ride (Revision: July 07, 2025)' -> DTR
'Simple Plan Driving (July 07, 2025)' -> SPD
'Down to Ride (Revision: July 08, 2025)' -> DTR
'Tomb Raider 15 (July 09, 2025)' -> TR15
'Tomb Raider 15 rev-2 (July 11, 2025)' -> TR15R2
'Le Tomb Raider 14 (July 14, 2025)' -> LTR14
'Le Tomb Raider 14h (July 17, 2025)' -> LTR14H
'Tomb Raider 16 (July 18, 2025)' -> TR16
'Tomb Raider 16v2 (July 21, 2025)' -> TR16V2

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* No need to sleep 3 seconds, just send it

* try dynamic

* cleanup

* Update build-single-tinygrad-model.yaml

* bc devtekve said. also, this is repetitive af

* Revert "bc devtekve said. also, this is repetitive af"

This reverts commit 3a0c1562de.

* maybe we could use a script instead that both build all

That both build all and sunnypilot-build-model reference

* refactor: consolidate model building steps into a single workflow

* tweak

* tweakx2

* tweakx3

* tweakx4

* dunno dunno...

* output dir

* lots of changes

* Revert "lots of changes"

This reverts commit 4aadb0ee29.

* fail if all fail

* no inputs needed

* make it easier for us

* note failure and exit 0

* Update build-all-tinygrad-models.yaml

* not needed unless we really want it

* Update build-single-tinygrad-model.yaml

* Merge branch 'sync-20250627-tinygrad' of github.com:sunnypilot/sunnypilot into sync-20250627-tinygrad

* retry for failed ?

* always run this step because sometimes one build fails

which causes the matrix to fail, but most builds still have uploaded artifacts.

* strip

* no escape

* Update build-all-tinygrad-models.yaml

* Test case from terminal run

(openpilot) james@Mac sunnypilot % jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' \
  /Users/james/Documents/GitHub/sunnypilot-docs/docs/driving_models_v6.json > matrix.json

mkdir -p output
touch "output/model-Tomb Raider 16v2 (July 21, 2025)-544"
touch "output/model-Space Lab Model (July 24, 2025)-547"
touch "output/model-Space Lab Model v1 (July 24, 2025)-548"

built=(); while IFS= read -r line; do built+=("$line"); done < <(
  ls output | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
)

jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
  'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' \
  matrix.json > retry_matrix.json

cat retry_matrix.json

[]
(openpilot) james@Mac sunnypilot %

* always

* great success

* add suffix to retry artifact so it doesn't conflict

* retry to get_model too

* and there haha

* unnecessary hyphen

* compare built to missing. include retries

* adjust copy of artifacts.

* Update build-all-tinygrad-models.yaml

* Update model selector versioning and add documentation

* Update retry condition for failed models in build-all-tinygrad-models.yaml

* Update retry condition for failed models in build-all-tinygrad-models.yaml

* Update build-single-tinygrad-model.yaml

* false

* default none because why not

* red diff? i think?

* meh ... not needed i guess

* error error error

* Nayan is watching... always watching mike wazowski

* string all the way

* lots of retries just in case because im scared

* more robust

* ONLY ONE!!!!!!

* delete.... a lot

* fix artifacts

* fix artifacts

* make sure each is unique :)

* skip files like artifact duhhhh

* artifact name dir

* concurrency

* copy here

* Update build-single-tinygrad-model.yaml

* Update build-single-tinygrad-model.yaml

* bump

* bump tinygrad

* max parallel? if not, i have the other remedy ready in build-all

* revert me!

* I resynced tinygrad woo hoo

* setup shouldnt fail

* pull

* big ole diff

* condition

* Update build-all-tinygrad-models.yaml

* not always() never always() never!!!

* not failure instead of great success

* Update build-all-tinygrad-models.yaml

* yay that worked. lets invoke build-single one last time

* these arent used and are just taking up 250MB space

* really frog?

* bump back to 3

* self-hosted, tici

* rename to trigger tests

* 2 and done

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-31 09:15:06 -07:00
Robbe Derks
3187631935 bump panda 2025-07-31 17:53:19 +02:00
James Vecellio-Grant
c47aadee19 sunnypilot modeld: Sync Tinygrad (#1081)
* Tinygrad bump from sync-20250627

* bump tinygrad_repo

* Reformat metadata generator to match driving_models.json

* bump tinygrad

* Revert "bump tinygrad"

This reverts commit f479dfd502.

* revert me after SP model compiled

* Model recompiled successfully, initiate "revert me after SP model compiled"

This reverts commit 95706eb688.

* The "FillMe" placeholder caused an extra 10 seconds of work

* bump to 22Jul2025

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* Allow more dynamic short names

This should hopefully be future-proof for now.. It's robust enough to return the correct word-digit format (see example on how it generates from given display name below):

'Last Horizon V2 (November 22, 2024)' -> LHV2
'Alabama (November 25, 2024)' -> ALABAMA
'PlayStation (December 03, 2024)' -> PLAYSTAT
'Postal Service (December 09, 2024)' -> PS
'Null Pointer (December 13, 2024)' -> NP
'North America (December 16, 2024)' -> NA
'National Public Radio (December 18, 2024)' -> NPR
'Filet o Fish (March 7, 2025)' -> FOF
'Tomb Raider 2 (April 18, 2025)' -> TR2
'Tomb Raider 3 (April 22, 2025)' -> TR3
'Tomb Raider 4 (April 25, 2025)' -> TR4
'Tomb Raider 5 (April 25, 2025)' -> TR5
'Tomb Raider 6 (April 30, 2025)' -> TR6
'Tomb Raider 7 (May 07, 2025)' -> TR7
'Down to Ride (Revision: May 10, 2025)' -> DTR
'SP Vikander Model (May 16, 2025)' -> SPVM
'VFF Driving (May 15, 2025)' -> VFFD
'Secret Good Openpilot (May 16, 2025)' -> SGO
'Vegetarian Filet o Fish (May 29, 2025)' -> VFOF
'Down To Ride (Revision: May 30, 2025)' -> DTR
'Vegetarian Filet o Fish v2 (June 05, 2025)' -> VFOFV2
'Kerrygold Driving (June 08, 2025)' -> KD
'Tomb Raider 10 (June 16, 2025)' -> TR10
'Organic Kerrygold (June 17, 2025)' -> OK
'Liquid Crystal Driving (June 21, 2025)' -> LCD
'Vegetarian Filet o Fish v3 (June 21, 2025)' -> VFOFV3
'Vibe Model [Custom Model]' -> VMCM
'Tomb Raider 13 (June 27, 2025)' -> TR13
'Aggressive TR (June 28, 2025)' -> ATR
'Tomb Raider 14 (June 30, 2025)' -> TR14
'Cookiemonster Tomb Raider (July 02, 2025)' -> CTR
'Down to Ride (Revision: July 07, 2025)' -> DTR
'Simple Plan Driving (July 07, 2025)' -> SPD
'Down to Ride (Revision: July 08, 2025)' -> DTR
'Tomb Raider 15 (July 09, 2025)' -> TR15
'Tomb Raider 15 rev-2 (July 11, 2025)' -> TR15R2
'Le Tomb Raider 14 (July 14, 2025)' -> LTR14
'Le Tomb Raider 14h (July 17, 2025)' -> LTR14H
'Tomb Raider 16 (July 18, 2025)' -> TR16
'Tomb Raider 16v2 (July 21, 2025)' -> TR16V2

* Update build-all-tinygrad-models.yaml

* Update build-all-tinygrad-models.yaml

* No need to sleep 3 seconds, just send it

* try dynamic

* cleanup

* Update build-single-tinygrad-model.yaml

* bc devtekve said. also, this is repetitive af

* Revert "bc devtekve said. also, this is repetitive af"

This reverts commit 3a0c1562de.

* maybe we could use a script instead that both build all

That both build all and sunnypilot-build-model reference

* refactor: consolidate model building steps into a single workflow

* tweak

* tweakx2

* tweakx3

* tweakx4

* dunno dunno...

* output dir

* lots of changes

* Revert "lots of changes"

This reverts commit 4aadb0ee29.

* fail if all fail

* no inputs needed

* make it easier for us

* note failure and exit 0

* Update build-all-tinygrad-models.yaml

* not needed unless we really want it

* Update build-single-tinygrad-model.yaml

* Merge branch 'sync-20250627-tinygrad' of github.com:sunnypilot/sunnypilot into sync-20250627-tinygrad

* retry for failed ?

* always run this step because sometimes one build fails

which causes the matrix to fail, but most builds still have uploaded artifacts.

* strip

* no escape

* Update build-all-tinygrad-models.yaml

* Test case from terminal run

(openpilot) james@Mac sunnypilot % jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' \
  /Users/james/Documents/GitHub/sunnypilot-docs/docs/driving_models_v6.json > matrix.json

mkdir -p output
touch "output/model-Tomb Raider 16v2 (July 21, 2025)-544"
touch "output/model-Space Lab Model (July 24, 2025)-547"
touch "output/model-Space Lab Model v1 (July 24, 2025)-548"

built=(); while IFS= read -r line; do built+=("$line"); done < <(
  ls output | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
)

jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
  'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' \
  matrix.json > retry_matrix.json

cat retry_matrix.json

[]
(openpilot) james@Mac sunnypilot %

* always

* great success

* add suffix to retry artifact so it doesn't conflict

* retry to get_model too

* and there haha

* unnecessary hyphen

* compare built to missing. include retries

* adjust copy of artifacts.

* Update build-all-tinygrad-models.yaml

* Update model selector versioning and add documentation

* Update retry condition for failed models in build-all-tinygrad-models.yaml

* Update retry condition for failed models in build-all-tinygrad-models.yaml

* Update build-single-tinygrad-model.yaml

* false

* default none because why not

* red diff? i think?

* meh ... not needed i guess

* error error error

* Nayan is watching... always watching mike wazowski

* string all the way

* lots of retries just in case because im scared

* more robust

* ONLY ONE!!!!!!

* delete.... a lot

* fix artifacts

* fix artifacts

* make sure each is unique :)

* skip files like artifact duhhhh

* artifact name dir

* concurrency

* copy here

* Update build-single-tinygrad-model.yaml

* Update build-single-tinygrad-model.yaml

* bump

* bump tinygrad

* max parallel? if not, i have the other remedy ready in build-all

* revert me!

* I resynced tinygrad woo hoo

* setup shouldnt fail

* pull

* big ole diff

* condition

* Update build-all-tinygrad-models.yaml

* not always() never always() never!!!

* not failure instead of great success

* Update build-all-tinygrad-models.yaml

* yay that worked. lets invoke build-single one last time

* these arent used and are just taking up 250MB space

* really frog?

* bump back to 3

* self-hosted, tici

* rename to trigger tests

* split sync

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-31 06:50:23 -07:00
Jason Wen
72a6c9fd65 ci: refactor PR handling and input parsing for squash-and-merge (#1094)
* ci: refactor PR handling with output file storage and streamlined input parsing

* try runner.temp

* base64 it

* simple simple

* double it and give it to the next person

* One more test

* Apply suggestions from code review

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-31 06:41:08 +02:00
Lee Jong Mun
825ee01f0b Multilang: update kor translation (#35849) 2025-07-30 19:41:14 -07:00
Adeeb Shihadeh
09eccd1aaf pandad: spiErrorCount is a better name (#35852)
* pandad: spiErrorCount is a better name

* bump panda
2025-07-30 18:27:03 -07:00
Maxime Desroches
44da3da1c4 updated: uptime connectivity check (#35836)
* start

* p

* comment

* 2

* p

* no time

* order

* space

* fix
2025-07-30 15:40:13 -07:00
programanichiro
31c4bf8a4a Multilang: Multilang: update ja translation (#35847)
日本語訳を追加。
Add Japanese translation.
2025-07-30 10:25:48 -07:00
Jason Wen
24699f3e54 events: Update startup event to support sunnypilot remote origin detection (#1092) 2025-07-29 23:09:58 -04:00
commaci-public
3e2325a632 [bot] Update Python packages (#35845)
* Update Python packages

* bump

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-29 19:45:17 -07:00
Maxime Desroches
04a20bd349 bump panda 2025-07-29 17:58:04 -07:00
Adeeb Shihadeh
a53746f8df ugh api is duplicated 2025-07-29 15:00:11 -07:00
Adeeb Shihadeh
b0f32717b7 op: add prime SSH helper (#35841)
* op: add prime SSH helper

* ssh key

* py
2025-07-29 12:02:43 -07:00
hungpham3112
69f4b4a6b7 op.sh: fix submodule cloning for older git version (#35840)
Update op.sh
2025-07-29 11:35:50 -07:00
Jason Wen
fd8cebf2c3 Revert "carControlSP: parse radarState's leadOne & leadTwo" (#1088)
Revert "`carControlSP`: parse `radarState`'s `leadOne` & `leadTwo` (#1082)"

This reverts commit 5b137d666f.
2025-07-29 13:49:58 -04:00
Jason Wen
5b137d666f carControlSP: parse radarState's leadOne & leadTwo (#1082)
* `carControlSP`: parse `radarState`'s `leadOne` & `leadTwo`

* typo

* bump
2025-07-29 10:53:06 -04:00
github-actions[bot]
bbdbb55a2a [bot] Update translations (#1077)
Update translations

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-07-29 10:24:34 -04:00
github-actions[bot]
5cb9f84c4c [bot] Update Python packages (#1076)
Update Python packages

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-28 22:36:43 -04:00
Adeeb Shihadeh
1cadcf6192 CI: remove test_models (#35837) 2025-07-28 17:10:25 -07:00
Alexandre Nobuharu Sato
1003498761 Multilang: update pt-BR translation (#35835)
Mutilang: update pt_BR translation
2025-07-28 13:49:11 -07:00
Shane Smiskol
64d8be9176 DM: fix always on permanent lockout (#35834)
fix check and comments
2025-07-28 13:17:02 -07:00
commaci-public
18970781ba [bot] Update Python packages (#35824)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-28 13:06:07 -07:00
github-actions[bot]
66e6b95833 [bot] Update translations (#35823)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-28 10:27:16 -07:00
Maxime Desroches
50371637dc Reapply "Save onroad/offroad uptime to param (#35769)" (#35796)
This reverts commit 87270952c4.
2025-07-27 21:29:11 -07:00
Harald Schäfer
5c252ded72 Space Lab 2 (#35816)
* d2971977-a56f-44a2-b368-434af987b731/400

* f35eaf21-ef51-413d-9857-398bcdabb7da
2025-07-26 21:21:33 -07:00
Harald Schäfer
35ed6bc3a9 Tinygrad DEV=DEVICE (#35814)
* Reapply "Tinygrad DEV=DEVICE (#35809)"

This reverts commit 5e07636d54.

* bump tg
2025-07-26 21:21:25 -07:00
Nayan
0c73798049 ui: fix descriptions visibility on models panel (#1079)
i just want to hide the descriptions 🥺
2025-07-26 10:00:23 -04:00
Shane Smiskol
1123773fbd uv lock for xdist (#35819)
* xdist: latest version

* lock
2025-07-25 20:49:32 -07:00
Shane Smiskol
e461d18d54 pytest: faster xdist startup (#35817)
* faster

* cmt
2025-07-25 20:29:06 -07:00
Maxime Desroches
e7b80b78cc params: auto type cast on put (#35810)
* start

* fix

* fix

* more

* more

* more

* fix

* fix

* []

* f

* f

* fix

* lint

* back

* fix

* yep

* better msg

* fix

* fix

* fix

* fix

* more

* more
2025-07-25 19:20:49 -07:00
Bao
26a9760afc util: fix read_file for files > 2GB (#35787)
* util: fix read_file for files > 2GB

* fix tellg on directory not returning -1

---------

Co-authored-by: Ngô Việt Hoài Bảo <baonvh@phenikaa-x.com>
2025-07-25 13:53:37 -07:00
Simon Kuang
b4ae64358e Update vehicle model reference to 2023 edition of Guiggiani's book (#35805)
Update car_kf.py
2025-07-25 12:57:13 -07:00
Bruce Wayne
5e07636d54 Revert "Tinygrad DEV=DEVICE (#35809)"
This reverts commit 47f23828d2.
2025-07-25 12:54:11 -07:00
Adeeb Shihadeh
b99c73e1fa bump opendbc (#35813)
* bump opendbc

* update tests
2025-07-25 12:50:15 -07:00
Harald Schäfer
47f23828d2 Tinygrad DEV=DEVICE (#35809)
* bump tg

* step one cleanup

* cleanup

* typo

* cleaner

* cleaner

* Revert "cleaner"

This reverts commit 9c1abd0dc06b4564e61dd32b0e93375badbc9ca5.

* usbgpu

* bit cleaner

* cleaner sconscript
2025-07-25 11:53:08 -07:00
YassineYousfi
938981dce9 Space Lab Model 🛰️ (#35804)
* 95c34be5-4fa1-4875-8b1d-fb7162140f10/400

* 660235c5-1647-40c4-8493-880de8f662d0/400
2025-07-25 11:38:07 -07:00
Jason Wen
e4ac9af404 ci: enable repo maintenance workflow (#1071)
* ci: enable repo maintenance workflow

* feature branch for now

* gate this

* back to sp master

* update later

* fix format
2025-07-25 12:02:57 -04:00
royjr
0a2e8dd81b mapd: bump version and fix missing folder (#994)
* fix mapd folder

* not needed

* unnecessary

* Remove unused import from mapd_installer.py

Deleted the unused import of Paths from openpilot.system.hardware.hw to clean up the code.

* Undo changes

* update: adjust `mapd` process to conditionally start based on readiness

- Added `mapd_ready` function to check `mapd` readiness.
- Modified `mapd` process to use this readiness condition.

* update: bump mapd version to v1.10.0 and add readiness utility

- Updated `VERSION` to v1.10.0 for `mapd_installer.py`.

* update: integrate `MapdInstallManager` versioning into main thread

- Added a call to `MapdInstallManager.update_installed_version` with `VERSION`.
- Ensures version management for `mapd` is synchronized during runtime.

* refactor: centralize `MAPD_PATH` and `MAPD_BIN_DIR` definitions in module init

- Moved constants to `sunnypilot/mapd/__init__.py` for cleaner imports and reuse.
- Updated references in `mapd_manager.py` and `mapd_installer.py`.

* revert back the file permission

* do this

* no longer static

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-07-25 11:25:31 -04:00
Shane Smiskol
09d8327a14 bump opendbc (#35811)
* bump

* bump

* bump

* update refs
2025-07-24 23:56:04 -07:00
Shane Smiskol
ff223260b2 Lock out for excessive actuation (#35792)
* excessive actuation

* text

* software

* check

* logic

* whoops

* dont want to lose alert unless user interacts with it

* implement

* try x2

* counter

* try to false trigger

* use livepose

* need to check for livePose noise

* cmt

* nl

* add back

* organization

* setVisible and isVisible consecutively don't work

* style

* cant do this sadly

* actually we can!

* clean up

* clean up

* clean up

* need to match torqued, paramsd, lagd, etc. (fix op sim)
2025-07-24 19:21:38 -07:00
Maxime Desroches
bddeca6998 Reapply "params: unique default value (#35798)" (#35806)
* Reapply "params: unique default value (#35798)"

This reverts commit 267acfb73b.

* more

* more

* test for this

* better name;
2025-07-24 17:58:16 -07:00
Maxime Desroches
267acfb73b Revert "params: unique default value (#35798)"
This reverts commit abd657edfa.
2025-07-24 14:58:46 -07:00
Adeeb Shihadeh
347cee4b09 big opendbc bump (#35799)
* bump

* bump

* bump

* bump

* bump

* update refs

* that doesn't work anymore

* bump

* update refs

* bump
2025-07-23 23:23:59 -07:00
Maxime Desroches
abd657edfa params: unique default value (#35798)
* default

* None vs ""

* athena

* more

* more

* this

* better

* better

* now

* name

* better
2025-07-23 21:17:21 -07:00
Maxime Desroches
c382245a41 ui: fix wrong param.get usage 2025-07-23 20:18:02 -07:00
Shane Smiskol
b5d5894a2d hardwared: add all checks to onroad_conditions init (#35793)
not sure why not here
2025-07-22 22:42:13 -07:00
Maxime Desroches
bc5336d805 params: auto decode based on type (#35794)
* type

* test

* more

* might as well use this

* one more

* live

* athena

* b

* also

* more

* now

* ah

* pigeon
2025-07-22 21:58:06 -07:00
Adeeb Shihadeh
dc1219d13f bump opendbc (#35795)
* bump opendbc

* update refs
2025-07-22 20:19:09 -07:00
Maxime Desroches
58d3038241 auto type cast for Params (#35786)
* first

* fix

* fix

* this

* real

* time

* time

* more

* more

* fix

* subclass

* fix

* fix

* test

* fix

* ruff

* revert

* default

* json

* more

* test

* test

* d

* better

* better

* test

* one

* test

* space
2025-07-22 19:30:47 -07:00
Harald Schäfer
4d39d50858 Route: add more helpers for now (#35783)
* add helpers

* another name

* whitespace

* f string

* add log id

* add logid

* another dumb function

* add more crap

* fix naming

* whitespace

* fstring
2025-07-22 18:50:56 -07:00
Jimmy
7e0d3c22f4 modeld: skip redundant cast, reshape, and flatten (#35735)
* skip redundant cast, reshape, and flatten

* accidentally deleted a newline lol
2025-07-22 16:35:19 -07:00
commaci-public
a931ed5c15 bump opendbc (#35789)
* Update Python packages

* bump

* update refs:

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-22 11:35:18 -07:00
commaci-public
6fee91ad64 [bot] Update Python packages (#35778)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-22 10:12:30 -07:00
Nayan
358c0a8747 ui: proper capitalization for default interactivity timeout (#1065)
No More Neuron Triggering Scream
2025-07-22 01:02:28 -04:00
Shane Smiskol
bc7d6f2677 torque controller: clean up friction (#35781)
* conditional friction inside here is confusing

* do it here

* one line

* run

* bump
2025-07-21 20:27:34 -07:00
Shane Smiskol
4b73f3b169 bump opendbc (#35782)
* bump

* bump

* bump

* bump

* update refs
2025-07-21 20:16:36 -07:00
github-actions[bot]
d02f78a59c [bot] Update translations (#35777)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-21 20:02:59 -07:00
Adeeb Shihadeh
e0656f9b44 bump panda (#35784) 2025-07-21 18:42:32 -07:00
Adeeb Shihadeh
87270952c4 Revert "Save onroad/offroad uptime to param (#35769)"
This reverts commit 8ca0b82181.
2025-07-21 14:41:53 -07:00
Maxime Desroches
8ca0b82181 Save onroad/offroad uptime to param (#35769)
* default

* 60

* safer

* consist

* f
2025-07-20 21:02:58 -07:00
Adeeb Shihadeh
ad337f8830 CI: temp disable macOS build 2025-07-20 14:32:42 -07:00
James Vecellio-Grant
9f6f7896b0 sunnypilot modeld: Fix SP Model Generation (#1062)
simplify and fix SP model
2025-07-19 20:22:31 -07:00
Harald Schäfer
103b4df18c Log filenames: make tuples (#35771)
* make tuples

* spelling: this linter is hardcore
2025-07-19 19:19:13 -07:00
Nayan
c46ecd18fa UI: Clear Model Cache (#1058)
* clear model cache

* add cache size

* move to model manager

* fix handling for default model

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-07-19 21:40:16 +02:00
DevTekVE
8e3e5b13aa sunnylink: Adding more keys to be backed up (#1061)
* Enhance parameter backup capabilities

- Added `BACKUP` attribute to various persistent parameters to ensure their inclusion in backup processes.

* Add more keys

---------

Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-07-19 20:05:32 +02:00
James Vecellio-Grant
08f075ab23 ui: Link Advanced Controls (#1060) 2025-07-19 10:35:34 -07:00
Nayan
7555683105 UI: Advanced Controls Toggle (#1053)
* add advancedControl bool to SP Controls

* add Advanced Controls toggle in SP Dev Panel

* merge - ui: Init Developer Panel SP#1054

* because @discountchubbs did not want to commit directly to the pr 🤷‍♂️

* enable onroad too

* hide by default only on staging & release

---------

Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 19:11:49 +02:00
James Vecellio-Grant
0d0f764a79 ui: Quickboot Mode Toggle (#1045)
* Fast boot mode

* Unused

* FastBoot -> QuickBoot

* Move down, since name change

* Chronological in manager too

* last one b4 merge

---------

Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 07:55:13 -07:00
Nayan
e955590f11 chore: remove compile_db from build targets (#1059)
remove --compile_db flag
2025-07-19 16:39:34 +02:00
James Vecellio-Grant
1b570ef418 sunnypilot modeld: Refactor Modeld to Allow Dynamic Plan and Lead (#1030)
* Introduce zero inputs for Lead, and plan to conform with new SP model introduced Monday, July 7, 2025

* Clean this up

* We can revert this after dev-c3-new testing and ready to merge.

* This needs to be apart of the conditional else fail

* Add full conditional

* Update longitudinal_planner.py

* Mypy from myphone!

* red diff

* Make generation a property for clarity

* Even clearer!

* Affix to generation, while allowing older models to use this IF param is set.

* seems a bit repetitive yea?

* dynamic

* Make most outputs dynamic

* Rm toggle from refactor

* refactor(modeld): simplify MHP output parsing logic

- Introduced `_parse_mhp_output` helper to remove redundancy and streamline `parse_dynamic_outputs`.
- Ensures improved code maintainability and clarity.

* refactor(longitudinal_planner): streamline generation handling logic

- Simplified `generation` assignment with inline conditional for better readability.
- Adjusted `mlsim` logic to default to model simulation when `generation` is unset.

* for ease of syncs from now on

* fix

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 16:22:02 +02:00
James Vecellio-Grant
eae44df688 ui: Models panel Refine Software Delay Adjustments (#1048)
Allow lower values to match some makes liveDelay

Co-authored-by: Nayan <nayan8teen@gmail.com>
2025-07-19 15:57:01 +02:00
Nayan
7c1f3f646c UI: Model Folders (#1031)
* model folders.. yay

* scroll expanded item in view

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 15:52:54 +02:00
Kumar
3faf709387 ui: Visuals Panel Lead Chevron Info (#1033)
* lead info

* ui:chevron params

* Update system/manager/manager.py.

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 15:17:19 +02:00
James Vecellio-Grant
47833ed73a ui: Disable Updates Toggle (#1040)
* Disable Updates

* Add default to manager.py

* Add enabled state and alternate descriptions

---------

Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 15:01:39 +02:00
James Vecellio-Grant
517919c7b7 ui: display recorded timestamp on error view (#827)
* Error log clear on manager start

* Error log clear on manager start

* 12 hour reset. may change soon

* Add last modified date

* unused

* rm space

* Squashed commit of the following:

commit bcf5b06c82
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Thu Jul 17 14:14:29 2025 -0700

    Init Developer panel SP

commit cf8bbb70ab
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Thu Jul 17 06:22:18 2025 -0700

    Chronological in manager too

commit ff9b873468
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Thu Jul 17 06:19:59 2025 -0700

    Move down, since name change

commit 38f6cb8c57
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Thu Jul 17 06:17:36 2025 -0700

    FastBoot -> QuickBoot

commit 38562db8dd
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Jul 16 11:20:17 2025 -0700

    Unused

commit c7a751b02d
Author: discountchubbs <alexgrant990@gmail.com>
Date:   Wed Jul 16 10:24:47 2025 -0700

    Fast boot mode

* * Depends on  #1054

* Update developer_panel.h

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-19 09:41:01 +02:00
Warren Togami
0b15b88104 NNLC: SIENNA_4TH_GEN gen 1, KIA_NERO_PHEV_2022 (#1013)
* `SIENNA_4TH_GEN` tuning Gen 1 (June 14th, 2025)
   2021-2023 Toyota Sienna
* `KIA_NIRO_PHEV_2022` tuning (July 15th, 2025)
   2021-2022 Kia Niro PHEV
* Fix: rename files to remove spaces in filenames for build compatibility
2025-07-19 09:30:39 +02:00
Jason Wen
f4f368e129 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#1034) 2025-07-19 00:48:41 -04:00
Jason Wen
beaec753ab Merge branch 'upstream/openpilot/master' into sync-20250710
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	README.md
#	common/params_keys.h
#	opendbc_repo
#	panda
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/controls/lib/tests/test_latcontrol.py
#	selfdrive/ui/soundd.py
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	tinygrad_repo
2025-07-19 00:28:43 -04:00
Shane Smiskol
ffc8ea5a86 LogReader: use file name constants (#35765)
use common
2025-07-18 20:29:22 -07:00
Shane Smiskol
e1fa04b678 Remove qcamera.ts.gz filename (#35766)
rm
2025-07-18 20:20:34 -07:00
Maxime Desroches
1936c42ee7 Port reset to new raylib events handling (#35762)
* test

* more

* type

* type

* order

* _

* __
2025-07-18 20:09:35 -07:00
Shane Smiskol
48892e339d LogReader: remove testing closet source (#35763)
rm
2025-07-18 19:21:04 -07:00
Shane Smiskol
8ead5db670 raylib: add style guide (#35764)
* add style guide

* more
2025-07-18 19:19:26 -07:00
Shane Smiskol
fbbad834f3 LogReader: cache internal source available (#35761)
* cache

* fix

* match behavioir
2025-07-18 18:18:02 -07:00
Shane Smiskol
278781e5af LogReader: extend FileName (#35760)
extend filename
2025-07-18 17:00:39 -07:00
Shane Smiskol
43ad1754da LogReader: fix broken test (#35758)
fix lr test
2025-07-18 16:17:01 -07:00
Shane Smiskol
4a5385a5b0 LogReader: support connect URLs (#35757)
* support connect

* clean up
2025-07-18 16:03:30 -07:00
Bruce Wayne
dbe172f7fd Fragile xx code needs this 2025-07-18 15:39:00 -07:00
Dean Lee
22e54af238 cabana: fix bit mask calculation bug (#35755)
Fix bit mask calculation bug
2025-07-18 16:21:46 +00:00
Shane Smiskol
618a25a612 LogReader: simplify sourcing logic and improve AUTO performance (#35753)
* sourcing supports any file type!

* stuff

* no camera for now

* i guess these are fine without

* rename

* get rid of these too!

* fix

* fix

* this is better

* start to clean up!

* better

* holy

holy

* clean up sources

* more robust

* working but needs some clean up

* clean up

* remove some trash

* nl

* auto_source can only return if it finds acceptable logs from sources

* double negative is confusing

* default

* list isn't hashable

* fix typing

* clean up

* speed up -- test_models got zst before bz2 in openpilotci, so do that (some segments have both bz2 and zst!)

* don't be a hero

* same behavior for now
2025-07-18 05:15:55 -07:00
Shane Smiskol
b50b351b15 LogReader: remove commaCarSegments selector (#35750)
* a source should not be a readmode... and readmode should be logtype

* fix that

* fixup
2025-07-18 02:17:11 -07:00
Shane Smiskol
862a816215 LogReader: add data endpoint option (#35751)
* add data endpoint option

* clean up
2025-07-17 23:12:08 -07:00
Harald Schäfer
cbba571845 LeTR14h (#35746)
f497b976-1ad4-4ef9-a6b8-172c68df12ea/400
2025-07-17 22:00:12 -07:00
Shane Smiskol
239646b20b Revert "clean up"
This reverts commit 5339a13c34.

don't push to master, kids
2025-07-17 21:43:21 -07:00
Shane Smiskol
5339a13c34 clean up 2025-07-17 21:42:47 -07:00
Shane Smiskol
c553c1f872 LogReader: support passing list of sources (#35749)
* far too long

* this is a better experience

* no rename for now
2025-07-17 19:54:38 -07:00
Harald Schäfer
54da96dbdf Route: add name format (#35743)
* needed for now

* TODO

* Add TODO
2025-07-17 18:22:36 -07:00
Shane Smiskol
632f7594a4 Ban time v2 (#35744)
* ban it!

* some legitimate blunders

* even more!

* this is from commaai/one

* here too

* this too

* ignore rest

* one liner

* Revert "one liner"

This reverts commit d96a1624032aaad829a005b523e579d953cfe690.
2025-07-17 16:50:52 -07:00
Adeeb Shihadeh
7d400cb00c reduce venv bloat (#35742) 2025-07-17 10:46:41 -07:00
Adeeb Shihadeh
e9d78958c1 bye bye qt, part 1 (#35741) 2025-07-17 10:15:22 -07:00
Adeeb Shihadeh
a8fd55740b Remove NVMe logging (#35740) 2025-07-17 10:05:27 -07:00
Shane Smiskol
ddb0d7c1a5 pandad: close relay when openpilot goes offroad (#35739)
* fix not resetting safety mode when op goes offroad

* hmm can do this but not needed

* revert

* rm check

* fix loopback

* ugh

* might have to do this

* Revert "might have to do this"

This reverts commit abd8a7ed74ca11874de1360f9630dc67bc4d02ee.

* fix

* also works but ehhh

* actually this is better, we already get IsOnroad at 10Hz

* top looks better

* fix
2025-07-16 23:35:58 -07:00
Shane Smiskol
39673deb77 Add CLEAR_ON_IGNITION_ON (#35710)
* add CLEAR_ON_IGNITION_ON

* hardwared is the only place that currently checks all ignition sources. doing it in pandad wouldn't make sense. this okay?

* remember

* only two usages but meh

* manager should probably be the only daemon to manage params

* clean up

* oh this is craze

* Update selfdrive/monitoring/helpers.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* together

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-16 20:59:12 -07:00
YassineYousfi
aac09d1d92 LeTR14 🇫🇷 (#35730)
* 9e9f8657-4e39-43d4-b36d-2d90ab18f6e9

* fix parsing
2025-07-16 19:52:39 -07:00
David
6c7abc42f6 fix(raylib): Horizontally center each line of metrics label and value (#35731)
* fix: horizontally center each line of metrics label and value

* fix: adjust vertical positioning of metric labels based on measured text size
2025-07-16 15:53:41 -07:00
Dean Lee
006c06027b loggerd: fix audio truncation by processing remaining partial frames (#35718)
fix audio truncation by processing remaining partial frames
2025-07-15 09:28:15 -07:00
Dean Lee
203b2e75d3 loggerd: remove deprecated av_init_packet usage (#35733)
remove deprecated av_init_packet
2025-07-15 09:27:12 -07:00
Dean Lee
97f6dc6e8c replay: fix video decoding from files with audio streams (#35715)
* fix video decoding from files with audio streams

* use av_find_best_stream

* streamlined logic
2025-07-14 14:49:52 -07:00
commaci-public
3a2c4a855a [bot] Update Python packages (#35726)
* Update Python packages

* dep

* ref

* hint

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-07-14 13:48:55 -07:00
James Vecellio-Grant
e43c60c004 ci: Automate model build, publish, and update docs with JSON metadata (#1036)
* gh workflows: Create build single and build all models

Recompile action, and build single model action...

I'm tired, and this could definitely most probably be wrong.

on push : Revert me!

Revert "on push : Revert me!"

This reverts commit c6ab17adad981585f93c285e9d8a418e4c975879.

checkout gitlab

Update build-single-tinygrad-model.yaml

Whoops. ubuntu-latest not self-hosted

self-hosted is comma device

gh api because artifacts

Dynamic long

Update build-single-tinygrad-model.yaml

* FoF to FOF, because spellchecker is no fun

* ignore

* Create new dir and json by default since its full recompile

red diff, who doesn't like it

* Minimal patch to ssh agent from yesterday

* Update .codespellignore

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-14 11:39:19 -07:00
Harald Schäfer
052ada6a07 Revert "TR15 (#35673)" (#35727)
This reverts commit 0aaefdee37.
2025-07-14 10:24:07 -07:00
Jason Young
b1972af6db tools: fix log suffix for commaCarSegments v2 (#35725) 2025-07-14 05:37:33 -04:00
eFini
0b65a04bc1 Multilang: update zh translations (#35721) 2025-07-13 19:09:24 -07:00
Adeeb Shihadeh
8142dba137 camerad: fixup EOF check in stress test (#35717)
Co-authored-by: Comma Device <device@comma.ai>
2025-07-13 17:33:17 -07:00
Harald Schäfer
0aaefdee37 TR15 (#35673)
* 35d665f7-f4fb-4bc0-ac72-e6e85cd7fff5/400

* 3baefdb6-55f1-417b-b73d-19ba041eb574/400
2025-07-13 17:27:33 -07:00
Joshua Mack
d9b5f259ab Multilang: update es translation (#35664)
* Update Spanish Translations

* Fix translation and invisible space

* Remove
2025-07-13 16:01:18 -07:00
Dean Lee
12f766f8c3 cabana: optimize sparkline rendering by reducing points in horizontal segments (#35689)
Optimize sparkline rendering by reducing redundant points in flat segments
2025-07-13 09:34:52 -07:00
Dean Lee
631a067257 cabana: implement custom CameraWidget (#35713)
implement custom CameraView
2025-07-13 09:34:18 -07:00
Alexandre Nobuharu Sato
45ea4a1f75 Multilang: update pt_BR translation (#35714) 2025-07-13 09:33:41 -07:00
Dean Lee
55579c8c08 ui: flip driver camera horizontally (#35712)
flip driver camera horizontally
2025-07-13 09:33:27 -07:00
Shane Smiskol
db37f4187e selfdrived: rename temporary variable
not obvious it's not to be used after
2025-07-13 01:30:19 -07:00
Adeeb Shihadeh
41619a0174 unpin numpy (#35704) 2025-07-12 13:16:14 -07:00
Shane Smiskol
6f1a1b3213 Revert "modeld: autodetect tinygrad backend" (#35701)
Revert "modeld: autodetect tinygrad backend (#35405)"

This reverts commit ce92fd1a0f.
2025-07-12 00:52:18 -07:00
commaci-public
9deac8c800 [bot] Update Python packages (#35669)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-11 19:59:03 -07:00
github-actions[bot]
5dc4254619 [bot] Update translations (#35699)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-11 19:54:34 -07:00
Dean Lee
9d7b18c7e3 cabana: Fix slider visual inconsistency by adjusting groove height (#35688)
Fix slider visual inconsistency by adjusting groove height to match handle
2025-07-11 19:49:30 -07:00
Andrei Radulescu
ce92fd1a0f modeld: autodetect tinygrad backend (#35405)
* modeld: autodetect tinygrad backend

* modeld: autodetect tinygrad CUDA backend

* Revert "modeld: autodetect tinygrad CUDA backend"

This reverts commit 0e9755fb3c5c2021de27f4d230bd0a162883bc37.

* comment why llvm@19

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* backend from jit

* fix static analysis

* simplify

* compile flags log

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-11 19:48:35 -07:00
Adeeb Shihadeh
f4b017a75b registration required to go onroad 2025-07-11 19:06:45 -07:00
Shane Smiskol
d1922efa4c Toyota: allow sport gear (#35696)
* Toyota: allow sport gear

* revvy

* add todo
2025-07-11 16:17:07 -07:00
David
5751c61de0 refactor(raylib): Move widgets to the widgets folder (#35680)
* refactor: move button to widgets folder

* refactor: move inputbox to widgets folder

* refactor: move label to widgets folder

* refactor: move list_view to widgets

* refactor: move scroll_panel to widgets

* refactor: move scroller to widgets

* refactor: move toggle to widgets

* refactor: Move widget.py to widgets/__init__.py

* fix: remove extra list_view

* refactor: rearrange some of the imports

* fix: remove extra scroller.py

* fix: Add scroller back

* fix: delete right scroller.py this time

* move scroll_panel back to system/ui/lib

* add todos for label and button
2025-07-11 15:15:39 -07:00
David
d913e4d349 refactor(raylib): Use font file as FontWeight enum value (#35675)
* refactor(raylib): use dictionary to map font weight to file name

* refactor: add space

* refactor: format

* refactor: Switch FontWeight to a StrEnum with font file values
2025-07-11 15:11:38 -07:00
Shane Smiskol
67dc69d3db Fix stock ACC resume signal (#35691)
* use this

* missing

* clean up
2025-07-11 14:59:27 -07:00
Dean Lee
be4e995d9b cabana: fix dark theme detection to work with system theme (#35690)
fix dark theme detection to work with system theme
2025-07-11 09:16:38 -07:00
David
bd5586da55 fix(raylib): Correct icon for metric system toggle (#35681)
fix: update icon for metric system toggle
2025-07-11 01:26:57 -07:00
David
68bc36b1a5 fix(raylib): Show correct alert status (#35687)
* refactor: Import AlertStatus and AlertSize as vars

* fix: Get raw int value of alertSize and alertStatus enums
2025-07-11 01:22:15 -07:00
David
989278dfe7 raylib: Improve close settings x button (#35677)
* update settings close text to use multiplication x character

* add todo

* fix: Add settings close text char to loaded glyphs

* refactor: Use font medium for settings close button text and remove font bold property; change font_)medium property to font_weight

* move close icon down a bit

* fix: offset settings close text in button to correct centering

* fix: remove horizontal offset

* refactor: it's actually a font, so rename back
2025-07-11 01:21:06 -07:00
Maxime Desroches
eb41875675 ci: gate timeout on setup time (#35686)
* gate

* more

* more

* check

* more

* fix

* more

* check

* Revert "check"

This reverts commit c30941bae0cbdb8f908883658bf1b0a4839c2be1.

* back

* more

* like before

* again

* more
2025-07-10 21:07:36 -07:00
Armand du Parc Locmaria
9bd7e3e36d bump opendbc (#35685)
* bump opendbc

* bump less

* bump more

* update refs
2025-07-10 19:40:54 -07:00
Adeeb Shihadeh
fb4d9c542c pigeond: power cycle on reinit (#35684)
* pigeond: power cycle on reinit

* fix

* one more
2025-07-10 19:36:46 -07:00
Armand du Parc Locmaria
3c43a000cd acados: relative rpath (#35624)
* opendbc/SharedLibrary

* acados, mpc don't link to absolute paths

* update opendbc

* include gen path, dont include abs path

* escape escape

* move rpath to relative path in mpc SConscripts

* clean up

* missing libs

* don't update opendbc

* rpath literal and rel_path

* ld library path is for runtime?

* same for darwin

* build on macos

* Update selfdrive/controls/lib/lateral_mpc_lib/SConscript

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript"

This reverts commit a55077f39ea248428e5916b85f24542293edefc9.

* Reapply "Update selfdrive/controls/lib/longitudinal_mpc_lib/SConscript"

This reverts commit 07a6a26292ea7f436ff43fb7efe1ad826eef689b.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 18:59:09 -07:00
Nayan
92f1977666 UI: Custom Interactivity Timeout (#1032)
custom interactivity timeout
2025-07-10 07:30:10 +02:00
Shane Smiskol
501fddac82 raylib ui: add brightness and display power (#35676)
* add constant

* fix initial interaction time

* from ui.cc
2025-07-09 22:04:22 -07:00
Shane Smiskol
a48a08bc80 scroll panel: remove useless return 2025-07-09 21:45:52 -07:00
Shane Smiskol
13c5c4dacc raylib: don't drop touch events on device (#35672)
* mouse thread

* instanciate mouse

* type that

* pc handling

* use mouse event list in widget

* use events in scroll panel

* no stop that

* hack for now

* typing

* run

* clean up
2025-07-09 21:33:19 -07:00
Shane Smiskol
65381279f4 raylib: disable vsync (#35674)
disable vsync
2025-07-09 20:24:05 -07:00
github-actions[bot]
ddfda8a6ec [bot] Update translations (#35668)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-09 20:22:40 -07:00
Maxime Desroches
ccc2e9297b pigeond: save almanac periodically (#35661)
* save

* save

* check

* comments

* remove
2025-07-09 19:42:39 -07:00
Shane Smiskol
c9731d6aa9 raylib: show touches flag for debugging (#35671)
* show touches

* type
2025-07-09 17:15:04 -07:00
Maxime Desroches
17d9b12693 ci: don't push process replay diff automatically to Azure (#35670)
remove
2025-07-09 16:56:49 -07:00
Adeeb Shihadeh
2b56a6c37e Revert "tools: update to commaCarSegments v2 (#35660)"
This reverts commit 12a5d8c2db.
2025-07-09 10:58:47 -07:00
Adeeb Shihadeh
f5bbedb5c5 lagd enable in release 2025-07-09 10:53:46 -07:00
Lee Jong Mun
a82ff7536d Multilang: update kor translation (#35666)
Multilang: kor translation update
2025-07-09 08:34:11 -07:00
Shane Smiskol
9f9940c5a3 ui.py: add bg to radar points
fix
2025-07-08 23:10:45 -07:00
eFini
f088b4320c Multilang: update zh translation (#35662) 2025-07-08 18:32:32 -07:00
Jason Young
12a5d8c2db tools: update to commaCarSegments v2 (#35660) 2025-07-08 18:31:44 -04:00
Jimmy
c284edcd33 test: fix test_rotation in test_loggerd.py (#35658)
fix test_rotation
2025-07-08 14:20:34 -07:00
Harald Schäfer
20fdb686ca latcontrol torque: remove option to feed back on localizer (#35659)
* Localizer is too laggy for control

* typo

* typo

* fix test

* fix imports

* Revert "fix imports"

This reverts commit 5074f8050170f974b451e00d9fdc752f09a47d57.

* fix improt

* import
2025-07-08 14:12:46 -07:00
Alexandre Nobuharu Sato
147ce02178 Multilang: update pt-BR translation (#35657) 2025-07-08 14:12:32 -07:00
Bruce Wayne
9aed28a216 bump opendbc 2025-07-08 14:07:16 -07:00
Jimmy
de16c6fbe1 test: RecordFront and RecordAudio (fixed) (#35654)
* record front and record audio tests

* set tests to same group so they are sequential

* add comment
2025-07-08 13:20:00 -07:00
programanichiro
2a5c628d86 Multilang: update ja translation. (#35655)
* 日本語訳、追加&調整。

* 調整。
2025-07-08 10:39:57 -07:00
Shane Smiskol
2b8a956f41 athena: lower upload DHCP priority (#35648)
* try this

* draft

* works

* caps

* should only need https

* fix test
2025-07-07 21:39:00 -07:00
Jimmy
684f770435 Revert "test: RecordFront and RecordAudio" (#35652)
Revert "test: RecordFront and RecordAudio (#35650)"

This reverts commit 1b92dbb46f.
2025-07-07 21:14:22 -07:00
Jimmy
1b92dbb46f test: RecordFront and RecordAudio (#35650)
record front and record audio tests
2025-07-07 21:10:37 -07:00
Adeeb Shihadeh
8e3b5f6210 bump to 0.10 2025-07-07 18:52:18 -07:00
Harald Schäfer
13019da855 Update RELEASES.md 2025-07-07 18:43:30 -07:00
Harald Schäfer
53da5fa6b1 Update RELEASES.md 2025-07-07 18:42:57 -07:00
Harald Schäfer
5b70c78902 bump opendbc (#35649)
* bump opendbc

* update ref
2025-07-07 18:40:06 -07:00
Shane Smiskol
74ebcd2249 Missing NM params for raylib wifi manager (#35646)
stuff missing
2025-07-07 16:30:04 -07:00
commaci-public
9ff322cff8 [bot] Update Python packages (#35644)
* Update Python packages

* revert for now

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-07-07 14:48:57 -07:00
github-actions[bot]
3238cd42cd [bot] Update translations (#35643)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-07-07 14:45:48 -07:00
Kacper Rączy
44c8cc4cb0 Revert "lagd: disable in release (#35426)" and "lagd calib: hide on release (#35523)" (#35633)
* Revert "lagd: disable in release (#35426)"

This reverts commit 6f6adc10a8.

* Revert "lagd calib: hide on release (#35523)"

This reverts commit e345f25ce4.

* Fix conflict
2025-07-07 10:18:31 +02:00
James Vecellio-Grant
af53db3b07 Longitudinal Planner: Allow Non-MLSIM Models to Use MPC (#1012)
* gen 11 only api limit exceeded maybe not

* Try this for ModelDataV2.Action

* mpc mode

* Fix This

* Revert "Try this for ModelDataV2.Action"

This reverts commit e7db17980b.

* fix logic flaw

* Address comments for readability.

---------

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
2025-07-05 21:23:32 -07:00
James Vecellio-Grant
394603727e Bug: Param Store Cache (#1025)
* cache

* Clear every 10 iterations, which means 100hz * 10

* Revert "Clear every 10 iterations, which means 100hz * 10"

This reverts commit 4eda3079e6.

* Apply suggestion from @devtekve

* Apply suggestion from @devtekve

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-05 14:58:34 -07:00
James Vecellio-Grant
d0bd8cc4a3 liveDelay: Add live delay toggle to vehicles using torqued (#1001)
* Add live delay toggle to torqued.py and twilsonco NNLC

* Set this in init

* Clean up

* Live delay toggle refactor

* ModeldLagd -> LagdToggle

* This is for lagd_toggle.py

* Add to NNLC

* Lagd toggle:

Display current values on UI

* Add break

* LagdToggleDelay

Live edit software_delay when livedelay is toggled `off`

* Always show description

* Add description as to why values don't update offroad

---------

Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
2025-07-05 14:42:36 -07:00
Adeeb Shihadeh
a8ec08e5bb modeld: remove redundant process config (#35639) 2025-07-05 13:52:57 -07:00
Kumar
00eb0e983d DEC: Kalman and the Magic Mode Switcheroo (#1026)
* dec with kalmanfilter

* updat pytest

* Update sunnypilot/selfdrive/controls/lib/dec/constants.py

Co-authored-by: DevTekVE <devtekve@gmail.com>

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-07-05 12:27:16 -07:00
DevTekVE
9bdfd46b8f ci: updating gh runner and adjust restore process (#1022)
* chore(ci): parameterize and update GitHub runner version to 2.325.0

* ci: refactor GitHub runner service installation logic

Improved service installation workflow by introducing service template creation and cleaning up redundant checks. Enhanced restoration logic with clearer system state assessment and simplified flow for better maintainability.
2025-07-05 20:55:27 +02:00
Jimmy
baaa502b55 move record mic toggle (#35622)
move toggle
2025-07-05 11:33:35 -07:00
Jimmy
a4e4a8afef include audio in qcamera.ts (#35608)
* encode/store audio as part of video file

* better match write_audio() with write()

* handle different FFmpeg versions, flush audio encoder, suppress encoder QAvg/info messages

* use audio_buffer.size() instead of keeping track of size separately

* no more for loops

* save to qcam and rlog

* assert audio support check

* microphone --> soundPressure, audioData --> rawAudioData

* deque much more efficient if buffer ever >> frame_size, ~ same performance for defaults

* cleanup and fix time scaling

* initialize audio separately and pass sample_rate in

* update comments

* ensure header is written before writing audio

* buffer audio frame but do not process before header written

* handle buffer overflow now that we are using as an actual buffer

* spelling
2025-07-05 11:03:13 -07:00
Maxime Desroches
c807ecd7e1 revert fixed pytest seed 2025-07-03 18:57:59 -07:00
Maxime Desroches
8ae0026d8d remove coverage package (#35634)
cov
2025-07-03 18:49:06 -07:00
Maxime Desroches
ebe9ab85af ci: remove codecov (#35631)
* debug

* coverage??

* remove all coverage

* remove old hack

* Revert "remove old hack"

This reverts commit 32ee5f589f98f548afac46a539a4b5ab095630e5.

* remove

* read
2025-07-03 18:28:57 -07:00
Maxime Desroches
1209c2a6c0 ci: format tests yaml (#35632)
format
2025-07-03 17:14:24 -07:00
Adeeb Shihadeh
7e4c9ee612 tici: reduce GPU pwrlevel (#35630) 2025-07-03 12:57:08 -07:00
DevTekVE
2183b4ca7b Add support for generating clang compilation database by default (#35629)
compilation db by default
2025-07-03 10:06:55 -07:00
Harald Schäfer
e503e657bc Model error deprecated with TR (#35628)
* Model error deprecated with TR

* no get speed error

* import
2025-07-02 23:36:41 -07:00
Harald Schäfer
64fd3f9860 Tomb Raider 14 (#35620)
* f7db6a09-43c5-4db9-b856-7fe1a1c231eb/400

* bd99d079-9afb-4af5-9f31-236d5c9ff15f/400

* aggressive tr: 7707a4ca-7d5e-47a2-8760-93b5004695cd/400

* bd99d079-9afb-4af5-9f31-236d5c9ff15f/400

* ae82d7a8-b74d-43b5-ab6d-d72e6040dab3/400

* revert stop distance

* comments
2025-07-02 21:50:55 -07:00
Harald Schäfer
a5630eb7b7 Bump opendbc
* bronco special

* ignore low speed

* fixes

* update ref

* bump

* update ref
2025-07-02 21:25:08 -07:00
Shane Smiskol
f726717c72 Update stale.yaml 2025-06-30 20:34:47 -07:00
commaci-public
5c56037742 [bot] Update Python packages (#35617)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-30 15:07:53 -07:00
Adeeb Shihadeh
f79f7b6584 sensord: fix temp scale (#35621) 2025-06-30 14:50:25 -07:00
Adeeb Shihadeh
08be179b8f update release notes 2025-06-30 13:46:06 -07:00
Jimmy
dcd56ae09a store mic audio with toggle (#35595)
* store/send mic audio with toggle

* script to extract audio from logs

* change description and add translation placeholders

* microphone icon

* apply toggle in loggerd

* add legnth and counter

* startFrameIdx counter

* Revert "change description and add translation placeholders"

This reverts commit 7baa1f6de99c6ebe9f9906193da7e83dad79511a.

* send mic data first and then calc

* restore changed description/icon after revert

* adjust fft samples to keep old time window

* remove extract_audio.py since audio is now stored in qcam isntead of rlog

* qt microphone recording icon

* Revert "remove extract_audio.py since audio is now stored in qcam isntead of rlog"

This reverts commit 7a3a75bd8db5376d1e442a3ba931c67550b5f132.

* move extract_audio script and output file by default

* remove length field

* recording indicator swaps sides based on lhd/rhd

* use record icon from comma body

* Update toggle description

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* update raylib toggle desc cause I did earlier

* microphone --> soundPressure, audioData --> rawAudioData

* cleanup unused var

* update README

* sidebar mic indicator instead of annotated camera

* improve logic readability

* remove startFrameIdx and sequenceNum

* use Q_PROPERTY/setProperty so that update() is actually called on value change

* specify old id for SoundPressure

* fix typo

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-06-30 13:42:21 -07:00
Shane Smiskol
082f4c0aee micd: deprecate unused field (#35618)
deprecate
2025-06-30 11:50:34 -07:00
Adeeb Shihadeh
41f95dc581 separate stale thresholds for draft PRs 2025-06-30 09:09:24 -07:00
eFini
c3c5992f88 modeld: avoid using USB GPU on a AMD laptop (#35602)
modeld: avoid using usb GPU if 'USBGPU' is not in os.environ

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-06-29 14:37:51 -07:00
Andrei Radulescu
9e2fc078cb remove thneed from gitignore (#35615) 2025-06-29 08:13:28 -07:00
Andrei Radulescu
0f1a9d5c8c webcam: changes for comma zero (#35464)
* Revert "webcam: remove other cv2 usage (#33236)"

This reverts commit 0cade54015.

* Revert "remove cv2 usage (#33101)"

This reverts commit 144e9e271c.

* Revert "remove opencv-python-headless (#33082)"

This reverts commit 488e08507a.

* webcam: set width, height, fps; flip image; use av reformat

* 1280x720 @ 25fps
2025-06-28 11:30:13 -07:00
Harald Schäfer
713c02cc3f Torque control: more integrator (#35610)
* Torque control: more integrator

* bump opendbc

* update ref
2025-06-27 22:28:59 -07:00
1518 changed files with 79680 additions and 90752 deletions

View File

@@ -1,19 +0,0 @@
---
Checks: '
bugprone-*,
-bugprone-integer-division,
-bugprone-narrowing-conversions,
performance-*,
clang-analyzer-*,
misc-*,
-misc-unused-parameters,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-deprecated-headers,
-modernize-use-auto,
-modernize-use-using,
-modernize-use-nullptr,
-modernize-use-trailing-return-type,
'
CheckOptions:
...

View File

@@ -2,3 +2,5 @@ Wen
REGIST
PullRequest
cancelled
FOF
NoO

View File

@@ -13,40 +13,6 @@
*.o-*
*.os
*.os-*
*.so
*.a
venv/
.venv/
**/.idea
**/.hypothesis
**/.mypy_cache
**/.venv
**/.venv/
**/.ci_cache
**/*.rlog
**/Dockerfile*
**/dockerfile*
**/build_output
notebooks
phone
massivemap
neos
installer
chffr/app2
chffr/backend/env
selfdrive/nav
selfdrive/baseui
selfdrive/test/simulator2
**/cache_data
xx/plus
xx/community
xx/projects
!xx/projects/eon_testing_master
!xx/projects/map3d
xx/ops
xx/junk

4
.gitattributes vendored
View File

@@ -7,10 +7,12 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.otf filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
selfdrive/car/tests/test_models_segs.txt filter=lfs diff=lfs merge=lfs -text
system/hardware/tici/updater filter=lfs diff=lfs merge=lfs -text
system/hardware/tici/updater_weston filter=lfs diff=lfs merge=lfs -text
system/hardware/tici/updater_magic filter=lfs diff=lfs merge=lfs -text
third_party/**/*.a filter=lfs diff=lfs merge=lfs -text
third_party/**/*.so filter=lfs diff=lfs merge=lfs -text
third_party/**/*.so.* filter=lfs diff=lfs merge=lfs -text

View File

@@ -1,6 +1,6 @@
ci:
- changed-files:
- any-glob-to-all-files: "{.github/**,**/test_*,Jenkinsfile}"
- any-glob-to-all-files: "{.github/**,**/test_*,**/test/**,Jenkinsfile}"
chore:
- changed-files:
@@ -16,7 +16,7 @@ simulation:
ui:
- changed-files:
- any-glob-to-all-files: '{selfdrive/ui/**,system/ui/**}'
- any-glob-to-all-files: '{selfdrive/assets/**,selfdrive/ui/**,system/ui/**}'
tools:
- changed-files:

View File

@@ -1,58 +0,0 @@
name: 'automatically cache based on current runner'
inputs:
path:
description: 'path to cache'
required: true
key:
description: 'key'
required: true
restore-keys:
description: 'restore-keys'
required: true
save:
description: 'whether to save the cache'
default: 'true'
required: false
outputs:
cache-hit:
description: 'cache hit occurred'
value: ${{ (contains(runner.name, 'nsc') && steps.ns-cache.outputs.cache-hit) ||
(!contains(runner.name, 'nsc') && inputs.save != 'false' && steps.gha-cache.outputs.cache-hit) ||
(!contains(runner.name, 'nsc') && inputs.save == 'false' && steps.gha-cache-ro.outputs.cache-hit) }}
runs:
using: "composite"
steps:
- name: setup namespace cache
id: ns-cache
if: ${{ contains(runner.name, 'nsc') }}
uses: namespacelabs/nscloud-cache-action@v1
with:
path: ${{ inputs.path }}
- name: setup github cache
id: gha-cache
if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }}
uses: 'actions/cache@v4'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
- name: setup github cache
id: gha-cache-ro
if: ${{ !contains(runner.name, 'nsc') && inputs.save == 'false' }}
uses: 'actions/cache/restore@v4'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
# make the directory manually in case we didn't get a hit, so it doesn't fail on future steps
- id: scons-cache-setup
shell: bash
run: |
mkdir -p ${{ inputs.path }}
sudo chmod -R 777 ${{ inputs.path }}
sudo chown -R $USER ${{ inputs.path }}

View File

@@ -1,7 +1,7 @@
name: "PR review"
on:
pull_request_target:
types: [opened, reopened, synchronize, edited]
types: [ opened, reopened, synchronize, edited ]
jobs:
labeler:
@@ -12,12 +12,12 @@ jobs:
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: false
# Label PRs
- uses: actions/labeler@v5.0.0
- uses: actions/labeler@v6
with:
dot: true
configuration-path: .github/labeler.yaml
@@ -29,21 +29,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: /^(?!master-new$).*/
target: /^(?!master$).*/
exclude: /sunnypilot:.*/
change-to: ${{ github.base_ref }}
already-exists-action: close_this
already-exists-comment: "Your PR should be made against the `master-new` branch"
already-exists-comment: "Your PR should be made against the `master` branch"
update-pr-labels:
name: Update fork's PR Labels
runs-on: ubuntu-latest
if: (github.event.pull_request.head.repo.fork && (contains(github.event_name, 'pull_request') && github.event.action == 'synchronize'))
env:
PR_LABEL: 'dev-c3'
env:
PR_LABEL: 'dev'
TRUST_FORK_PR_LABEL: 'trust-fork-pr'
steps:
- name: Check if PR has dev-c3 label
- name: Check if PR has dev label
id: check-labels
uses: actions/github-script@v7
with:
@@ -55,33 +55,33 @@ jobs:
repo: context.repo.repo,
issue_number: prNumber
});
const hasDevC3Label = labels.some(label => label.name === process.env.PR_LABEL);
const hasTrustLabel = labels.some(label => label.name === process.env.TRUST_FORK_PR_LABEL);
console.log(`PR #${prNumber} has ${process.env.PR_LABEL} label: ${hasDevC3Label}`);
console.log(`PR #${prNumber} has ${process.env.TRUST_FORK_PR_LABEL} label: ${hasTrustLabel}`);
core.setOutput('has-dev-c3', hasDevC3Label ? 'true' : 'false');
core.setOutput('has-dev', hasDevC3Label ? 'true' : 'false');
core.setOutput('has-trust', hasTrustLabel ? 'true' : 'false');
- name: Remove trust-fork-pr label if present
if: steps.check-labels.outputs.has-dev-c3 == 'true' && steps.check-labels.outputs.has-trust == 'true'
if: steps.check-labels.outputs.has-dev == 'true' && steps.check-labels.outputs.has-trust == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prNumber = context.payload.pull_request.number;
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
name: process.env.TRUST_FORK_PR_LABEL
});
console.log(`Removed '${process.env.TRUST_FORK_PR_LABEL}' label from PR #${prNumber} as it received new commits`);
// Add a comment to the PR
await github.rest.issues.createComment({
owner: context.repo.owner,

View File

@@ -5,9 +5,7 @@ on:
workflow_dispatch:
env:
BASE_IMAGE: openpilot-base
DOCKER_REGISTRY: ghcr.io/commaai
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $DOCKER_REGISTRY/$BASE_IMAGE:latest /bin/bash -c
PYTHONPATH: ${{ github.workspace }}
jobs:
badges:
@@ -17,13 +15,13 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- run: ./tools/op.sh setup
- name: Push badges
run: |
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/ui/translations/create_badges.py"
python3 selfdrive/ui/translations/create_badges.py
rm .gitattributes

View File

@@ -0,0 +1,304 @@
name: Build and push all tinygrad models
on:
workflow_dispatch:
inputs:
set_min_version:
description: 'Minimum selector version required for the models (see helpers.py or readme.md)'
required: true
type: string
jobs:
setup:
runs-on: ubuntu-latest
outputs:
json_version: ${{ steps.get-json.outputs.json_version }}
recompiled_dir: ${{ steps.create-recompiled-dir.outputs.recompiled_dir }}
json_file: ${{ steps.get-json.outputs.json_file }}
model_matrix: ${{ steps.set-matrix.outputs.model_matrix }}
tinygrad_ref: ${{ steps.get-tinygrad-ref.outputs.tinygrad_ref }}
steps:
- name: Checkout sunnypilot repo
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot
path: sunnypilot
submodules: recursive
- name: Get tinygrad_repo ref
id: get-tinygrad-ref
run: |
cd sunnypilot
export PYTHONPATH=$(pwd)
ref=$(python3 sunnypilot/models/tinygrad_ref.py)
echo "tinygrad_ref=$ref" >> $GITHUB_OUTPUT
echo "tinygrad_ref is $ref"
- name: Checkout docs repo (sunnypilot-docs, gh-pages)
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
- name: Get next JSON version to use (from GitHub docs repo)
id: get-json
run: |
cd docs/docs
latest=$(ls driving_models_v*.json | sed -E 's/.*_v([0-9]+)\.json/\1/' | sort -n | tail -1)
next=$((latest+1))
json_file="driving_models_v${next}.json"
cp "driving_models_v${latest}.json" "$json_file"
echo "json_file=docs/docs/$json_file" >> $GITHUB_OUTPUT
echo "json_version=$((next+0))" >> $GITHUB_OUTPUT
echo "SRC_JSON_FILE=docs/docs/driving_models_v${latest}.json" >> $GITHUB_ENV
- name: Extract tinygrad models
id: set-matrix
working-directory: docs/docs
run: |
jq -c '[.bundles[] | select(.runner=="tinygrad") | {ref, display_name: (.display_name | gsub(" \\([^)]*\\)"; "")), is_20hz}]' "$(basename "${SRC_JSON_FILE}")" > matrix.json
echo "model_matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
- run: |
mkdir -p ~/.ssh
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- name: Clone GitLab docs repo and create new recompiled dir
id: create-recompiled-dir
env:
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
run: |
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
cd gitlab_docs
git checkout main
git sparse-checkout set --no-cone models/
cd models
latest_dir=$(ls -d recompiled* 2>/dev/null | sed -E 's/recompiled([0-9]+)/\1/' | sort -n | tail -1)
if [[ -z "$latest_dir" ]]; then
next_dir=1
else
next_dir=$((latest_dir+1))
fi
recompiled_dir="${next_dir}"
mkdir -p "recompiled${recompiled_dir}"
touch "recompiled${recompiled_dir}/.gitkeep"
cd ../..
echo "recompiled_dir=$recompiled_dir" >> $GITHUB_OUTPUT
- name: Push empty recompiled dir to GitLab
run: |
cd gitlab_docs
git add models/recompiled${{ steps.create-recompiled-dir.outputs.recompiled_dir }}
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "Add recompiled${{ steps.create-recompiled-dir.outputs.recompiled_dir }} for build-all" || echo "No changes to commit"
git push origin main
- name: Push new JSON to GitHub docs repo
run: |
cd docs
git pull origin gh-pages
git add docs/"$(basename ${{ steps.get-json.outputs.json_file }})"
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "Add new ${{ steps.get-json.outputs.json_file }} for build-all" || echo "No changes to commit"
git push origin gh-pages
get_and_build:
needs: [setup]
strategy:
matrix:
model: ${{ fromJson(needs.setup.outputs.model_matrix) }}
fail-fast: false
uses: ./.github/workflows/build-single-tinygrad-model.yaml
with:
upstream_branch: ${{ matrix.model.ref }}
custom_name: ${{ matrix.model.display_name }}
recompiled_dir: ${{ needs.setup.outputs.recompiled_dir }}
json_version: ${{ needs.setup.outputs.json_version }}
secrets: inherit
retry_failed_models:
needs: [setup, get_and_build]
runs-on: ubuntu-latest
if: ${{ needs.setup.result != 'failure' && !cancelled() }}
outputs:
retry_matrix: ${{ steps.set-retry-matrix.outputs.retry_matrix }}
steps:
- uses: actions/download-artifact@v4
with:
pattern: model-*
path: output
- id: set-retry-matrix
run: |
echo '${{ needs.setup.outputs.model_matrix }}' > matrix.json
built=(); while IFS= read -r line; do built+=("$line"); done < <(
find output -maxdepth 1 -name 'model-*' -printf "%f\n" | sed -E 's/^model-//' | sed -E 's/-[0-9]+$//' | sed -E 's/ \([^)]*\)//' | awk '{gsub(/^ +| +$/, ""); print}'
)
jq -c --argjson built "$(printf '%s\n' "${built[@]}" | jq -R . | jq -s .)" \
'map(select(.display_name as $n | ($built | index($n | gsub("^ +| +$"; "")) | not)))' matrix.json > retry_matrix.json
echo "retry_matrix=$(cat retry_matrix.json)" >> $GITHUB_OUTPUT
retry_get_and_build:
needs: [setup, get_and_build, retry_failed_models]
if: ${{ needs.get_and_build.result == 'failure' || (needs.retry_failed_models.outputs.retry_matrix != '[]' && needs.retry_failed_models.outputs.retry_matrix != '') }}
strategy:
matrix:
model: ${{ fromJson(needs.retry_failed_models.outputs.retry_matrix) }}
fail-fast: false
uses: ./.github/workflows/build-single-tinygrad-model.yaml
with:
upstream_branch: ${{ matrix.model.ref }}
custom_name: ${{ matrix.model.display_name }}
recompiled_dir: ${{ needs.setup.outputs.recompiled_dir }}
json_version: ${{ needs.setup.outputs.json_version }}
artifact_suffix: -retry
secrets: inherit
publish_models:
name: Publish models sequentially
needs: [setup, get_and_build, retry_failed_models, retry_get_and_build]
if: ${{ !cancelled() && (needs.get_and_build.result != 'failure' || needs.retry_get_and_build.result == 'success' || (needs.retry_failed_models.outputs.retry_matrix != '[]' && needs.retry_failed_models.outputs.retry_matrix != '')) }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
model: ${{ fromJson(needs.setup.outputs.model_matrix) }}
env:
RECOMPILED_DIR: recompiled${{ needs.setup.outputs.recompiled_dir }}
JSON_FILE: ${{ needs.setup.outputs.json_file }}
ARTIFACT_NAME_INPUT: ${{ matrix.model.display_name }}
steps:
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
- name: Add GitLab.com SSH key to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- name: Clone GitLab docs repo
env:
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
run: |
echo "Cloning GitLab"
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
cd gitlab_docs
echo "checkout models/${RECOMPILED_DIR}"
git sparse-checkout set --no-cone models/${RECOMPILED_DIR}
git checkout main
cd ..
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
- name: Validate recompiled dir and JSON version
run: |
if [ ! -d "gitlab_docs/models/$RECOMPILED_DIR" ]; then
echo "Recompiled dir $RECOMPILED_DIR does not exist in GitLab repo"
exit 1
fi
if [ ! -f "$JSON_FILE" ]; then
echo "JSON file $JSON_FILE does not exist!"
exit 1
fi
- name: Download artifact name file
uses: actions/download-artifact@v4
with:
name: artifact-name-${{ env.ARTIFACT_NAME_INPUT }}
path: artifact_name
- name: Read artifact name
id: read-artifact-name
run: |
ARTIFACT_NAME=$(cat artifact_name/artifact_name.txt)
echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
- name: Download model artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.read-artifact-name.outputs.artifact_name }}
path: output
- name: Remove onnx files bc not needed for recompiled dir since they already exist from single build
run: |
find output -type f -name '*.onnx' -delete
find output -type f -name 'big_*.pkl' -delete
find output -type f -name 'dmonitoring_model_tinygrad.pkl' -delete
- name: Copy model artifacts to gitlab
env:
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
run: |
ARTIFACT_DIR="gitlab_docs/models/${RECOMPILED_DIR}/${ARTIFACT_NAME}"
mkdir -p "$ARTIFACT_DIR"
for path in output/*; do
if [ "$(basename "$path")" = "artifact_name.txt" ]; then
continue
fi
name="$(basename "$path")"
if [ -d "$path" ]; then
mkdir -p "$ARTIFACT_DIR/$name"
cp -r "$path"/* "$ARTIFACT_DIR/$name/"
echo "Copied dir $name -> $ARTIFACT_DIR/$name"
else
cp "$path" "$ARTIFACT_DIR/"
echo "Copied file $name -> $ARTIFACT_DIR/"
fi
done
- name: Push recompiled dir to GitLab
env:
GITLAB_SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
run: |
cd gitlab_docs
git checkout main
git pull origin main
for d in models/"$RECOMPILED_DIR"/*/; do
git sparse-checkout add "$d"
done
git add models/"$RECOMPILED_DIR"
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "Update $RECOMPILED_DIR with model from build-all-tinygrad-models" || echo "No changes to commit"
git push origin main
- run: |
cd docs
git pull origin gh-pages
- name: update json
run: |
ARGS=""
[ -n "${{ inputs.set_min_version }}" ] && ARGS="$ARGS --set-min-version \"${{ inputs.set_min_version }}\""
ARGS="$ARGS --sort-by-date"
ARGS="$ARGS --tinygrad-ref \"${{ needs.setup.outputs.tinygrad_ref }}\""
eval python3 docs/json_parser.py \
--json-path "$JSON_FILE" \
--recompiled-dir "gitlab_docs/models/$RECOMPILED_DIR" \
$ARGS
- name: Push updated json to GitHub
run: |
cd docs
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git checkout gh-pages
git add docs/"$(basename $JSON_FILE)"
git commit -m "Update $(basename $JSON_FILE) after recompiling model" || echo "No changes to commit"
git push origin gh-pages

View File

@@ -0,0 +1,228 @@
name: Build Single Tinygrad Model and Push
on:
workflow_call:
inputs:
upstream_branch:
description: 'Upstream commit to build from'
required: true
type: string
custom_name:
description: 'Custom name for the model (no date, only name)'
required: false
type: string
recompiled_dir:
description: 'Existing recompiled directory number (e.g. 3 for recompiled3)'
required: true
type: string
json_version:
description: 'driving_models version number to update (e.g. 5 for driving_models_v5.json)'
required: true
type: string
artifact_suffix:
description: 'Suffix for artifact name'
required: false
type: string
default: ''
bypass_push:
description: 'Bypass pushing to GitLab for build-all'
required: false
default: true
type: boolean
workflow_dispatch:
inputs:
upstream_branch:
description: 'Upstream commit to build from'
required: true
type: string
custom_name:
description: 'Custom name for the model (no date, only name)'
required: false
type: string
recompiled_dir:
description: 'Existing recompiled directory number (e.g. 3 for recompiled3)'
required: true
type: string
json_version:
description: 'driving_models version number to update (e.g. 5 for driving_models_v5.json)'
required: true
type: string
model_folder:
description: 'Model folder'
type: choice
default: 'None'
options:
- None
- Simple Plan Models
- Space Lab Models
- TR Models
- DTR Models
- Custom Merge Models
- FOF series models
- Other
custom_model_folder:
description: 'Custom model folder name (if "Other" selected)'
required: false
type: string
generation:
description: 'Model generation'
required: false
type: string
version:
description: 'Minimum selector version'
required: false
type: string
env:
RECOMPILED_DIR: recompiled${{ inputs.recompiled_dir }}
JSON_FILE: docs/docs/driving_models_v${{ inputs.json_version }}.json
jobs:
build_model:
uses: ./.github/workflows/sunnypilot-build-model.yaml
with:
upstream_branch: ${{ inputs.upstream_branch }}
custom_name: ${{ inputs.custom_name || inputs.upstream_branch }}
is_20hz: true
artifact_suffix: ${{ inputs.artifact_suffix }}
secrets: inherit
publish_model:
if: ${{ !inputs.bypass_push && !cancelled() }}
concurrency:
group: gitlab-push-${{ inputs.recompiled_dir }}
cancel-in-progress: false
needs: build_model
runs-on: ubuntu-latest
steps:
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
- name: Add GitLab.com SSH key to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- name: Clone GitLab docs repo
env:
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=~/.ssh/known_hosts'
run: |
echo "Cloning GitLab"
git clone --depth 1 --filter=tree:0 --sparse git@gitlab.com:sunnypilot/public/${{ vars.MODELS_GITLAB }} gitlab_docs
cd gitlab_docs
echo "checkout models/${RECOMPILED_DIR}"
git sparse-checkout set --no-cone models/${RECOMPILED_DIR}
git checkout main
cd ..
- name: Checkout docs repo
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot-docs
ref: gh-pages
path: docs
ssh-key: ${{ secrets.CI_SUNNYPILOT_DOCS_PRIVATE_KEY }}
- name: Validate recompiled dir and JSON version
run: |
if [ ! -d "gitlab_docs/models/$RECOMPILED_DIR" ]; then
echo "Recompiled dir $RECOMPILED_DIR does not exist in GitLab repo"
exit 1
fi
if [ ! -f "$JSON_FILE" ]; then
echo "JSON file $JSON_FILE does not exist!"
exit 1
fi
- name: Download artifact name file
uses: actions/download-artifact@v4
with:
name: artifact-name-${{ inputs.custom_name || inputs.upstream_branch }}
path: artifact_name
- name: Read artifact name
id: read-artifact-name
run: |
ARTIFACT_NAME=$(cat artifact_name/artifact_name.txt)
echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
- name: Download and extract model artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.read-artifact-name.outputs.artifact_name }}
path: output
- name: Remove unwanted files
run: |
find output -type f -name 'dmonitoring_model_tinygrad.pkl' -delete
find output -type f -name 'dmonitoring_model.onnx' -delete
- name: Copy model artifact(s) to GitLab recompiled dir
env:
ARTIFACT_NAME: ${{ steps.read-artifact-name.outputs.artifact_name }}
run: |
ARTIFACT_DIR="gitlab_docs/models/${RECOMPILED_DIR}/${ARTIFACT_NAME}"
mkdir -p "$ARTIFACT_DIR"
for path in output/*; do
if [ "$(basename "$path")" = "artifact_name.txt" ]; then
continue
fi
name="$(basename "$path")"
if [ -d "$path" ]; then
mkdir -p "$ARTIFACT_DIR/$name"
cp -r "$path"/* "$ARTIFACT_DIR/$name/"
echo "Copied dir $name -> $ARTIFACT_DIR/$name"
else
cp "$path" "$ARTIFACT_DIR/"
echo "Copied file $name -> $ARTIFACT_DIR/"
fi
done
- name: Push recompiled dir to GitLab
env:
GITLAB_SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
run: |
cd gitlab_docs
git checkout main
git pull origin main
for d in models/"$RECOMPILED_DIR"/*/; do
git sparse-checkout add "$d"
done
git add models/"$RECOMPILED_DIR"
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git commit -m "Create/Update $RECOMPILED_DIR with new/updated model from build-single-tinygrad-model" || echo "No changes to commit"
git push origin main
- run: |
cd docs
git pull origin gh-pages
- name: Run json_parser.py to update JSON
run: |
FOLDER="${{ inputs.model_folder }}"
if [ "$FOLDER" = "Other" ]; then
FOLDER="${{ inputs.custom_model_folder }}"
fi
ARGS=""
if [ "$FOLDER" != "None" ] && [ -n "$FOLDER" ]; then
ARGS="$ARGS --model-folder \"$FOLDER\""
fi
[ -n "${{ inputs.generation }}" ] && ARGS="$ARGS --generation \"${{ inputs.generation }}\""
[ -n "${{ inputs.version }}" ] && ARGS="$ARGS --version \"${{ inputs.version }}\""
eval python3 docs/json_parser.py \
--json-path "$JSON_FILE" \
--recompiled-dir "gitlab_docs/models/$RECOMPILED_DIR" \
--sort-by-date \
$ARGS
- name: Push updated JSON to GitHub docs repo
run: |
cd docs
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git checkout gh-pages
git add docs/"$(basename $JSON_FILE)"
git commit -m "Update $(basename $JSON_FILE) after recompiling model" || echo "No changes to commit"
git push origin gh-pages

View File

@@ -4,7 +4,6 @@ on:
push:
branches:
- master
- master-new
pull_request:
paths:
- 'cereal/**'
@@ -17,31 +16,27 @@ on:
type: string
concurrency:
group: cereal-validation-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
group: cereal-validation-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
PYTHONWARNINGS: error
BASE_IMAGE: openpilot-base
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
CI: 1
jobs:
generate_cereal_artifact:
name: Generate cereal validation artifacts
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- run: ./tools/op.sh setup
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
run: scons -j$(nproc) cereal
- name: Generate the log file
run: |
${{ env.RUN }} "cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema_instances.bin" && \
ls -la
ls -la cereal/messaging/tests
export PYTHONPATH=${{ github.workspace }}
python3 cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema_instances.bin
- name: 'Prepare artifact'
run: |
mkdir -p "cereal/messaging/tests/cereal_validations"
@@ -58,20 +53,26 @@ jobs:
runs-on: ubuntu-24.04
needs: generate_cereal_artifact
steps:
- uses: actions/checkout@v4
- name: Checkout sunnypilot
uses: actions/checkout@v6
- name: Checkout upstream openpilot
uses: actions/checkout@v6
with:
repository: 'commaai/openpilot'
path: openpilot
submodules: true
ref: "refs/heads/master"
- uses: ./.github/workflows/setup-with-retry
- run: ./tools/op.sh setup
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
working-directory: openpilot
run: scons -j$(nproc) cereal
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: cereal_validations
path: cereal/messaging/tests/cereal_validations
path: openpilot/cereal/messaging/tests/cereal_validations
- name: 'Run the validation'
run: |
chmod +x cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
${{ env.RUN }} "cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f cereal/messaging/tests/cereal_validations/schema_instances.bin"
export PYTHONPATH=${{ github.workspace }}/openpilot
chmod +x openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
python3 openpilot/cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f openpilot/cereal/messaging/tests/cereal_validations/schema_instances.bin

View File

@@ -1,101 +0,0 @@
name: weekly CI test report
on:
schedule:
- cron: '37 9 * * 1' # 9:37AM UTC -> 2:37AM PST every monday
workflow_dispatch:
inputs:
ci_runs:
description: 'The amount of runs to trigger in CI test report'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI_RUNS: ${{ github.event.inputs.ci_runs || '50' }}
jobs:
setup:
if: github.repository == 'sunnypilot/sunnypilot'
runs-on: ubuntu-latest
outputs:
ci_runs: ${{ steps.ci_runs_setup.outputs.matrix }}
steps:
- id: ci_runs_setup
name: CI_RUNS=${{ env.CI_RUNS }}
run: |
matrix=$(python3 -c "import json; print(json.dumps({ 'run_number' : list(range(${{ env.CI_RUNS }})) }))")
echo "matrix=$matrix" >> $GITHUB_OUTPUT
ci_matrix_run:
needs: [ setup ]
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.setup.outputs.ci_runs)}}
uses: sunnypilot/sunnypilot/.github/workflows/ci_weekly_run.yaml@master
with:
run_number: ${{ matrix.run_number }}
report:
needs: [ci_matrix_run]
runs-on: ubuntu-latest
if: always()
steps:
- name: Get job results
uses: actions/github-script@v7
id: get-job-results
with:
script: |
const jobs = await github
.paginate("GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt}/jobs", {
owner: "commaai",
repo: "${{ github.event.repository.name }}",
run_id: "${{ github.run_id }}",
attempt: "${{ github.run_attempt }}",
})
var report = {}
jobs.slice(1, jobs.length-1).forEach(job => {
if (job.conclusion === "skipped") return;
const jobName = job.name.split(" / ")[2];
const runRegex = /\((.*?)\)/;
const run = job.name.match(runRegex)[1];
report[jobName] = report[jobName] || { successes: [], failures: [], canceled: [] };
switch (job.conclusion) {
case "success":
report[jobName].successes.push({ "run_number": run, "link": job.html_url}); break;
case "failure":
report[jobName].failures.push({ "run_number": run, "link": job.html_url }); break;
case "canceled":
report[jobName].canceled.push({ "run_number": run, "link": job.html_url }); break;
}
});
return JSON.stringify({"jobs": report});
- name: Add job results to summary
env:
JOB_RESULTS: ${{ fromJSON(steps.get-job-results.outputs.result) }}
run: |
cat <<EOF >> template.html
<table>
<thead>
<tr>
<th></th>
<th>Job</th>
<th>✅ Passing</th>
<th>❌ Failure Details</th>
</tr>
</thead>
<tbody>
{% for key in jobs.keys() %}<tr>
<td>{% for i in range(5) %}{% if i+1 <= (5 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }}) %}🟩{% else %}🟥{% endif %}{% endfor%}</td>
<td>{{ key }}</td>
<td>{{ 100 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }} }}%</td>
<td>{% if jobs[key]["failures"]|length > 0 %}<details>{% for failure in jobs[key]["failures"] %}<a href="{{ failure['link'] }}">Log for run #{{ failure['run_number'] }}</a><br>{% endfor %}</details>{% else %}{% endif %}</td>
</td>
</tr>{% endfor %}
</table>
EOF
pip install jinja2-cli
echo $JOB_RESULTS | jinja2 template.html > report.html
echo "# CI Test Report - ${{ env.CI_RUNS }} Runs" >> $GITHUB_STEP_SUMMARY
cat report.html >> $GITHUB_STEP_SUMMARY

View File

@@ -1,17 +0,0 @@
name: weekly CI test run
on:
workflow_call:
inputs:
run_number:
required: true
type: string
concurrency:
group: ci-run-${{ inputs.run_number }}-${{ github.ref }}
cancel-in-progress: true
jobs:
selfdrive_tests:
uses: sunnypilot/sunnypilot/.github/workflows/selfdrive_tests.yaml@master
with:
run_number: ${{ inputs.run_number }}

View File

@@ -1,21 +0,0 @@
name: 'compile openpilot'
runs:
using: "composite"
steps:
- shell: bash
name: Build openpilot with all flags
run: |
${{ env.RUN }} "scons -j$(nproc)"
${{ env.RUN }} "release/check-dirty.sh"
- shell: bash
name: Cleanup scons cache and rebuild
run: |
${{ env.RUN }} "rm -rf /tmp/scons_cache/* && \
scons -j$(nproc) --cache-populate"
- name: Save scons cache
uses: actions/cache/save@v4
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new')
with:
path: .ci_cache/scons_cache
key: scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}

View File

@@ -22,7 +22,7 @@ jobs:
steps:
- uses: commaai/timeout@v1
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
@@ -34,7 +34,7 @@ jobs:
mkdocs build
# Push to docs.comma.ai
- uses: actions/checkout@v4
- uses: actions/checkout@v6
if: github.ref == 'refs/heads/master' && github.repository == 'sunnypilot/sunnypilot'
with:
path: openpilot-docs

View File

@@ -5,14 +5,54 @@ on:
types: [created, edited]
jobs:
# TODO: gc old branches in a separate job in this workflow
cleanup-branches:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Delete stale Jenkins branches
uses: actions/github-script@v8
with:
script: |
const cutoff = Date.now() - 24 * 60 * 60 * 1000;
const prefixes = ['tmp-jenkins', '__jenkins'];
for await (const response of github.paginate.iterator(github.rest.repos.listBranches, {
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
})) {
for (const branch of response.data) {
if (!prefixes.some(p => branch.name.startsWith(p))) continue;
const { data: commit } = await github.rest.repos.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
ref: branch.commit.sha,
});
const commitDate = new Date(commit.commit.committer.date).getTime();
if (commitDate < cutoff) {
console.log(`Deleting branch: ${branch.name} (last commit: ${commit.commit.committer.date})`);
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branch.name}`,
});
}
}
}
scan-comments:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
permissions:
contents: write
issues: write
steps:
- name: Check for trigger phrase
id: check_comment
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const triggerPhrase = "trigger-jenkins";
@@ -32,7 +72,7 @@ jobs:
- name: Checkout repository
if: steps.check_comment.outputs.result == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: refs/pull/${{ github.event.issue.number }}/head
@@ -43,3 +83,14 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b tmp-jenkins-${{ github.event.issue.number }}
GIT_LFS_SKIP_PUSH=1 git push -f origin tmp-jenkins-${{ github.event.issue.number }}
- name: Delete trigger comment
if: steps.check_comment.outputs.result == 'true' && always()
uses: actions/github-script@v8
with:
script: |
await github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
});

View File

@@ -9,11 +9,11 @@ on:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
push:
branches:
- 'master-new'
- 'master'
pull_request:
branches:
- 'master-new'
workflow_dispatch: # enables manual triggering
- 'master'
workflow_dispatch: # enables manual triggering
inputs:
upstream_branch:
default: 'master'
@@ -30,7 +30,7 @@ jobs:
with:
repository: 'commaai/openpilot'
ref: ${{ inputs.upstream_branch }}
- name: LFS Fetch
run: |
git lfs fetch
@@ -48,7 +48,7 @@ jobs:
- name: Add GitLab public keys
run: |
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- name: Ensure branch
run: |
if git symbolic-ref -q HEAD >/dev/null; then

View File

@@ -16,23 +16,23 @@ jobs:
if: github.repository == 'commaai/openpilot'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Checkout master
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: master
path: base
- run: git lfs pull
- run: cd base && git lfs pull
- run: pip install onnx
- name: scripts/reporter.py
id: report
run: |
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "## Model Review" >> $GITHUB_OUTPUT
MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
PYTHONPATH=${{ github.workspace }} MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Post model report comment

View File

@@ -0,0 +1,105 @@
name: 'Post to Discourse'
description: 'Posts a message to a Discourse topic (existing or new)'
inputs:
discourse-url:
description: 'Discourse instance URL (e.g., https://discourse.example.com)'
required: true
api-key:
description: 'Discourse API key'
required: true
api-username:
description: 'Discourse API username'
required: true
topic-id:
description: 'Discourse topic ID to post to (use this OR category-id + title)'
required: false
category-id:
description: 'Category ID for new topic (required if topic-id not provided)'
required: false
title:
description: 'Title for new topic (required if topic-id not provided)'
required: false
message:
description: 'Message content (markdown supported)'
required: true
outputs:
post-number:
description: 'The post number in the topic'
value: ${{ steps.post.outputs.post_number }}
post-url:
description: 'Direct URL to the post'
value: ${{ steps.post.outputs.post_url }}
topic-id:
description: 'The topic ID (useful when creating a new topic)'
value: ${{ steps.post.outputs.topic_id }}
runs:
using: "composite"
steps:
- name: Post to Discourse
id: post
shell: bash
run: |
# Validate inputs
if [ -z "${{ inputs.topic-id }}" ] && ([ -z "${{ inputs.category-id }}" ] || [ -z "${{ inputs.title }}" ]); then
echo "❌ Error: Must provide either topic-id OR both category-id and title"
exit 1
fi
if [ -n "${{ inputs.topic-id }}" ] && ([ -n "${{ inputs.category-id }}" ] || [ -n "${{ inputs.title }}" ]); then
echo "⚠️ Warning: Both topic-id and category-id/title provided. Will post to existing topic."
fi
# Determine if creating new topic or posting to existing
if [ -n "${{ inputs.topic-id }}" ]; then
echo "📝 Posting to existing topic ID: ${{ inputs.topic-id }}"
# Create JSON payload for posting to existing topic
PAYLOAD=$(jq -n \
--arg content '${{ inputs.message }}' \
--arg topic_id "${{ inputs.topic-id }}" \
'{topic_id: $topic_id, raw: $content}')
else
echo "✨ Creating new topic: ${{ inputs.title }}"
# Create JSON payload for new topic
PAYLOAD=$(jq -n \
--arg content '${{ inputs.message }}' \
--arg title "${{ inputs.title }}" \
--arg category "${{ inputs.category-id }}" \
'{title: $title, category: ($category | tonumber), raw: $content}')
fi
# Post to Discourse
RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST "${{ inputs.discourse-url }}/posts.json" \
-H "Content-Type: application/json" \
-H "Api-Key: ${{ inputs.api-key }}" \
-H "Api-Username: ${{ inputs.api-username }}" \
-d "$PAYLOAD")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
echo "✅ Successfully posted to Discourse!"
POST_NUMBER=$(echo "$BODY" | jq -r '.post_number // "unknown"')
TOPIC_ID=$(echo "$BODY" | jq -r '.topic_id // "${{ inputs.topic-id }}"')
POST_URL="${{ inputs.discourse-url }}/t/${TOPIC_ID}/${POST_NUMBER}"
echo "post_number=${POST_NUMBER}" >> $GITHUB_OUTPUT
echo "post_url=${POST_URL}" >> $GITHUB_OUTPUT
echo "topic_id=${TOPIC_ID}" >> $GITHUB_OUTPUT
echo "Topic ID: ${TOPIC_ID}"
echo "Post number: ${POST_NUMBER}"
echo "URL: ${POST_URL}"
else
echo "❌ Failed to post to Discourse"
echo "HTTP Code: ${HTTP_CODE}"
echo "Response: ${BODY}"
exit 1
fi

View File

@@ -6,7 +6,7 @@ on:
env:
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: selfdrive/test/docker_build.sh prebuilt
BUILD: release/ci/docker_build_sp.sh
jobs:
build_prebuilt:
@@ -28,8 +28,8 @@ jobs:
wait-interval: 30
running-workflow-name: 'build prebuilt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
check-regexp: ^((?!.*(build master-ci).*).)*$
- uses: actions/checkout@v4
check-regexp: ^((?!.*(build master-ci|create badges).*).)*$
- uses: actions/checkout@v6
with:
submodules: true
- run: git lfs pull

View File

@@ -3,7 +3,6 @@ name: Release Drafter
on:
push:
branches:
- master-new
- master
tags:
- 'v*'

View File

@@ -5,38 +5,27 @@ on:
workflow_dispatch:
jobs:
build_masterci:
name: build master-ci
env:
ImageOS: ubuntu24
container:
image: ghcr.io/commaai/openpilot-base:latest
build___nightly:
name: build __nightly
runs-on: ubuntu-latest
if: github.repository == 'sunnypilot/sunnypilot'
permissions:
checks: read
contents: write
steps:
- name: Install wait-on-check-action dependencies
run: |
sudo apt-get update
sudo apt-get install -y libyaml-dev
- name: Wait for green check mark
if: ${{ github.event_name == 'schedule' }}
uses: lewagon/wait-on-check-action@ccfb013c15c8afb7bf2b7c028fb74dc5a068cccc
with:
ref: master
wait-interval: 30
running-workflow-name: 'build master-ci'
running-workflow-name: 'build __nightly'
repo-token: ${{ secrets.GITHUB_TOKEN }}
check-regexp: ^((?!.*(build prebuilt).*).)*$
- uses: actions/checkout@v4
check-regexp: ^((?!.*(build prebuilt|create badges).*).)*$
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
- name: Pull LFS
run: |
git config --global --add safe.directory '*'
git lfs pull
- name: Push master-ci
run: BRANCH=__nightly release/build_devel.sh
- run: ./tools/op.sh setup
- name: Push __nightly
run: BRANCH=__nightly release/build_stripped.sh

View File

@@ -6,24 +6,23 @@ on:
workflow_dispatch:
env:
BASE_IMAGE: openpilot-base
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
PYTHONPATH: ${{ github.workspace }}
jobs:
update_translations:
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/setup-with-retry
- name: Update translations
run: |
${{ env.RUN }} "python3 selfdrive/ui/update_translations.py --vanish"
- name: Create Pull Request
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
- uses: actions/checkout@v6
with:
author: Vehicle Researcher <user@comma.ai>
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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
commit-message: "Update translations"
title: "[bot] Update translations"
body: "Automatic PR from repo-maintenance -> update_translations"
@@ -35,38 +34,67 @@ jobs:
package_updates:
name: package_updates
runs-on: ubuntu-latest
container:
image: ghcr.io/commaai/openpilot-base:latest
if: github.repository == 'sunnypilot/sunnypilot'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: uv lock
run: uv lock --upgrade
- name: uv pip tree
id: pip_tree
run: |
python3 -m ensurepip --upgrade
pip3 install uv
uv lock --upgrade
echo 'PIP_TREE<<EOF' >> $GITHUB_OUTPUT
uv pip tree >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: venv size
id: venv_size
run: |
echo 'VENV_SIZE<<EOF' >> $GITHUB_OUTPUT
echo "Total: $(du -sh .venv | cut -f1)" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "Top 10 by size:" >> $GITHUB_OUTPUT
du -sh .venv/lib/python*/site-packages/* 2>/dev/null \
| grep -v '\.dist-info' \
| grep -v '__pycache__' \
| sort -rh \
| head -10 \
| while IFS=$'\t' read size path; do echo "$size ${path##*/}"; done >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: bump submodules
run: |
git config --global --add safe.directory '*'
git config submodule.msgq.update none
git config submodule.rednose_repo.update none
git config submodule.teleoprtc_repo.update none
git config submodule.tinygrad.update none
git submodule update --remote
git add .
- name: update car docs
run: |
export PYTHONPATH="$PWD"
scons -j$(nproc) --minimal opendbc_repo
python selfdrive/car/docs.py
git add docs/CARS.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
with:
author: Vehicle Researcher <user@comma.ai>
token: ${{ secrets.ACTIONS_CREATE_PR_PAT }}
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
token: ${{ github.repository == 'commaai/openpilot' && secrets.ACTIONS_CREATE_PR_PAT || secrets.GITHUB_TOKEN }}
commit-message: Update Python packages
title: '[bot] Update Python packages'
branch: auto-package-updates
base: master
delete-branch: true
body: 'Automatic PR from repo-maintenance -> package_updates'
body: |
Automatic PR from repo-maintenance -> package_updates
```
$ du -sh .venv && du -sh .venv/lib/python*/site-packages/* | sort -rh | head -10
${{ steps.venv_size.outputs.VENV_SIZE }}
```
```
$ uv pip tree
${{ steps.pip_tree.outputs.PIP_TREE }}
```
labels: bot

View File

@@ -1,366 +0,0 @@
name: selfdrive
on:
push:
branches:
- master
- master-new
pull_request:
workflow_dispatch:
workflow_call:
inputs:
run_number:
default: '1'
required: true
type: string
concurrency:
group: selfdrive-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
REPORT_NAME: report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && 'master' || github.event.number }}
PYTHONWARNINGS: error
BASE_IMAGE: openpilot-base
AZURE_TOKEN: ${{ secrets.AZURE_COMMADATACI_OPENPILOTCI_TOKEN }}
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
PYTEST: pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append --durations=0 --durations-min=5 --hypothesis-seed 0 -n logical
jobs:
build_release:
if: github.repository == 'commaai/openpilot' # build_release blocked for the time being to only comma as we may have a different process.
name: build release
runs-on:
- 'ubuntu-24.04'
env:
STRIPPED_DIR: /tmp/releasepilot
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Getting LFS files
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e
with:
timeout_minutes: 2
max_attempts: 3
command: git lfs pull
- name: Build devel
timeout-minutes: 1
run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot and run checks
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "python3 system/manager/build.py"
- name: Run tests
timeout-minutes: 1
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "release/check-dirty.sh"
- name: Check submodules
if: github.repository == 'sunnypilot/sunnypilot'
timeout-minutes: 3
run: release/check-submodules.sh
build:
runs-on:
- 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup docker push
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
run: |
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
$DOCKER_LOGIN
- uses: ./.github/workflows/setup-with-retry
- uses: ./.github/workflows/compile-openpilot
timeout-minutes: 30
build_mac:
name: build macOS
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- name: Homebrew cache
uses: ./.github/workflows/auto-cache
with:
path: ~/Library/Caches/Homebrew
key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
brew-macos-${{ env.CACHE_COMMIT_DATE }}
brew-macos
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
# package install has DeprecationWarnings
PYTHONWARNINGS: default
- name: Save Homebrew cache
uses: actions/cache/save@v4
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new')
with:
path: ~/Library/Caches/Homebrew
key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
- run: git lfs pull
- name: Getting scons cache
uses: ./.github/workflows/auto-cache
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}-macos
- name: Building openpilot
run: . .venv/bin/activate && scons -j$(nproc)
- name: Save scons cache
uses: actions/cache/save@v4
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new')
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
static_analysis:
name: static analysis
runs-on:
- 'ubuntu-latest'
env:
PYTHONWARNINGS: default
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Static analysis
timeout-minutes: 1
run: ${{ env.RUN }} "scripts/lint/lint.sh"
unit_tests:
name: unit tests
runs-on:
- 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Run unit tests
timeout-minutes: ${{ contains(runner.name, 'nsc') && 1 || 20 }}
run: |
${{ env.RUN }} "$PYTEST --collect-only -m 'not slow' &> /dev/null && \
MAX_EXAMPLES=1 $PYTEST -m 'not slow' && \
./selfdrive/ui/tests/create_test_translations.sh && \
QT_QPA_PLATFORM=offscreen ./selfdrive/ui/tests/test_translations && \
chmod -R 777 /tmp/comma_download_cache"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
process_replay:
name: process replay
if: github.repository == 'commaai/openpilot' # disable process_replay for forks
runs-on:
- 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Cache test routes
id: dependency-cache
uses: actions/cache@v4
with:
path: .ci_cache/comma_download_cache
key: proc-replay-${{ hashFiles('selfdrive/test/process_replay/ref_commit', 'selfdrive/test/process_replay/test_processes.py') }}
- name: Build openpilot
run: |
${{ env.RUN }} "scons -j$(nproc)"
- name: Run replay
timeout-minutes: ${{ contains(runner.name, 'nsc') && (steps.dependency-cache.outputs.cache-hit == 'true') && 1 || 20 }}
run: |
${{ env.RUN }} "coverage run selfdrive/test/process_replay/test_processes.py -j$(nproc) && \
chmod -R 777 /tmp/comma_download_cache && \
coverage combine && \
coverage xml"
- name: Print diff
id: print-diff
if: always()
run: cat selfdrive/test/process_replay/diff.txt
- uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
with:
name: process_replay_diff.txt
path: selfdrive/test/process_replay/diff.txt
- name: Upload reference logs
if: ${{ failure() && steps.print-diff.outcome == 'success' && github.repository == 'commaai/openpilot' && env.AZURE_TOKEN != '' }}
run: |
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python3 selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
- name: Run regen
if: false
timeout-minutes: 4
run: |
${{ env.RUN }} "ONNXCPU=1 $PYTEST selfdrive/test/process_replay/test_regen.py && \
chmod -R 777 /tmp/comma_download_cache"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test_cars:
name: cars
runs-on:
- 'ubuntu-24.04'
strategy:
fail-fast: false
matrix:
job: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Cache test routes
id: routes-cache
uses: actions/cache@v4
with:
path: .ci_cache/comma_download_cache
key: car_models-${{ hashFiles('selfdrive/car/tests/test_models.py', 'opendbc/car/tests/routes.py') }}-${{ matrix.job }}
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Test car models
timeout-minutes: ${{ contains(runner.name, 'nsc') && (steps.routes-cache.outputs.cache-hit == 'true') && 1 || 6 }}
run: |
${{ env.RUN }} "MAX_EXAMPLES=1 $PYTEST selfdrive/car/tests/test_models.py && \
chmod -R 777 /tmp/comma_download_cache"
env:
NUM_JOBS: 4
JOB_ID: ${{ matrix.job }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}-${{ matrix.job }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
car_docs_diff:
name: PR comments
runs-on: ubuntu-latest
#if: github.event_name == 'pull_request'
if: false # TODO: run this in opendbc?
steps:
- uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.base.ref }}
- run: git lfs pull
- uses: ./.github/workflows/setup-with-retry
- name: Get base car info
run: |
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/debug/dump_car_docs.py --path /tmp/openpilot_cache/base_car_docs"
sudo chown -R $USER:$USER ${{ github.workspace }}
- uses: actions/checkout@v4
with:
submodules: true
path: current
- run: cd current && git lfs pull
- name: Save car docs diff
id: save_diff
run: |
cd current
${{ env.RUN }} "scons -j$(nproc)"
output=$(${{ env.RUN }} "python3 selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
output="${output//$'\n'/'%0A'}"
echo "::set-output name=diff::$output"
- name: Find comment
if: ${{ env.AZURE_TOKEN != '' }}
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: This PR makes changes to
- name: Update comment
if: ${{ steps.save_diff.outputs.diff != '' && env.AZURE_TOKEN != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: "${{ steps.save_diff.outputs.diff }}"
edit-mode: replace
- name: Delete comment
if: ${{ steps.fc.outputs.comment-id != '' && steps.save_diff.outputs.diff == '' && env.AZURE_TOKEN != '' }}
uses: actions/github-script@v7
with:
script: |
github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: ${{ steps.fc.outputs.comment-id }}
})
simulator_driving:
name: simulator driving
runs-on:
- 'ubuntu-24.04'
if: (github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: |
${{ env.RUN }} "scons -j$(nproc)"
- name: Driving test
timeout-minutes: 1
run: |
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
source selfdrive/test/setup_vsound.sh && \
CI=1 pytest -s tools/sim/tests/test_metadrive_bridge.py"
create_ui_report:
# This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml
name: Create UI Report
runs-on:
- 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: caching frames
id: frames-cache
uses: actions/cache@v4
with:
path: .ci_cache/comma_download_cache
key: ui_screenshots_test_${{ hashFiles('selfdrive/ui/tests/test_ui/run.py') }}
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Create Test Report
timeout-minutes: ${{ ((steps.frames-cache.outputs.cache-hit == 'true') && 2 || 4) }}
run: >
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
source selfdrive/test/setup_xvfb.sh &&
CACHE_ROOT=/tmp/comma_download_cache python3 selfdrive/ui/tests/test_ui/run.py &&
chmod -R 777 /tmp/comma_download_cache"
- name: Upload Test Report
uses: actions/upload-artifact@v4
with:
name: ${{ env.REPORT_NAME }}
path: selfdrive/ui/tests/test_ui/report_1/screenshots

View File

@@ -1,37 +0,0 @@
name: 'openpilot env setup, with retry on failure'
inputs:
docker_hub_pat:
description: 'Auth token for Docker Hub, required for BuildJet jobs'
required: false
default: ''
sleep_time:
description: 'Time to sleep between retries'
required: false
default: 30
runs:
using: "composite"
steps:
- id: setup1
uses: ./.github/workflows/setup
continue-on-error: true
with:
is_retried: true
- if: steps.setup1.outcome == 'failure'
shell: bash
run: sleep ${{ inputs.sleep_time }}
- id: setup2
if: steps.setup1.outcome == 'failure'
uses: ./.github/workflows/setup
continue-on-error: true
with:
is_retried: true
- if: steps.setup2.outcome == 'failure'
shell: bash
run: sleep ${{ inputs.sleep_time }}
- id: setup3
if: steps.setup2.outcome == 'failure'
uses: ./.github/workflows/setup
with:
is_retried: true

View File

@@ -1,56 +0,0 @@
name: 'openpilot env setup'
inputs:
is_retried:
description: 'A mock param that asserts that we use the setup-with-retry instead of this action directly'
required: false
default: 'false'
runs:
using: "composite"
steps:
# assert that this action is retried using the setup-with-retry
- shell: bash
if: ${{ inputs.is_retried == 'false' }}
run: |
echo "You should not run this action directly. Use setup-with-retry instead"
exit 1
- shell: bash
name: No retries!
run: |
if [ "${{ github.run_attempt }}" -gt ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.author_association == 'NONE' && 2 || 1}} ]; then
echo -e "\033[0;31m##################################################"
echo -e "\033[0;31m Retries not allowed! Fix the flaky test! "
echo -e "\033[0;31m##################################################\033[0m"
exit 1
fi
# do this after checkout to ensure our custom LFS config is used to pull from GitLab
- shell: bash
run: git lfs pull
# build cache
- id: date
shell: bash
run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- shell: bash
run: echo "$CACHE_COMMIT_DATE"
- id: scons-cache
uses: ./.github/workflows/auto-cache
with:
path: .ci_cache/scons_cache
key: scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}
# as suggested here: https://github.com/moby/moby/issues/32816#issuecomment-910030001
- id: normalize-file-permissions
shell: bash
name: Normalize file permissions to ensure a consistent docker build cache
run: |
find . -type f -executable -not -perm 755 -exec chmod 755 {} \;
find . -type f -not -executable -not -perm 644 -exec chmod 644 {} \;
# build our docker image
- shell: bash
run: eval ${{ env.BUILD }}

View File

@@ -5,14 +5,15 @@ on:
workflow_dispatch:
env:
DAYS_BEFORE_PR_CLOSE: 2
DAYS_BEFORE_PR_STALE: 9
DAYS_BEFORE_PR_CLOSE: 7
DAYS_BEFORE_PR_STALE: 24
DAYS_BEFORE_PR_STALE_DRAFT: 30
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
with:
exempt-all-milestones: true
@@ -24,6 +25,28 @@ jobs:
exempt-pr-labels: "ignore stale,needs testing" # if wip or it needs testing from the community, don't mark as stale
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
exempt-draft-pr: false
# issue config
days-before-issue-stale: -1 # ignore issues for now
# same as above, but give draft PRs more time
stale_drafts:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
exempt-all-milestones: true
# pull request config
stale-pr-message: 'This PR has had no activity for ${{ env.DAYS_BEFORE_PR_STALE_DRAFT }} days. It will be automatically closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days if there is no activity.'
close-pr-message: 'This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.'
stale-pr-label: stale
delete-branch: ${{ github.event.pull_request.head.repo.full_name == 'commaai/openpilot' }} # only delete branches on the main repo
exempt-pr-labels: "ignore stale,needs testing" # if wip or it needs testing from the community, don't mark as stale
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE_DRAFT }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
exempt-draft-pr: true
# issue config
days-before-issue-stale: -1 # ignore issues for now

View File

@@ -9,6 +9,27 @@ env:
MODELS_DIR: ${{ github.workspace }}/selfdrive/modeld/models
on:
workflow_call:
inputs:
upstream_branch:
description: 'Upstream branch to build from'
required: true
default: 'master'
type: string
custom_name:
description: 'Custom name for the model (no date, only name)'
required: false
type: string
is_20hz:
description: 'Is this a 20Hz model'
required: false
type: boolean
default: true
artifact_suffix:
description: 'Suffix for artifact name'
required: false
type: string
default: ''
workflow_dispatch:
inputs:
upstream_branch:
@@ -32,34 +53,53 @@ run-name: Build model [${{ inputs.custom_name || inputs.upstream_branch }}] from
jobs:
get_model:
runs-on: ubuntu-latest
env:
REF: ${{ inputs.upstream_branch }}
outputs:
model_date: ${{ steps.commit-date.outputs.model_date }}
steps:
- uses: actions/checkout@v4
# Note: To allow dynamic models from both openpilot and sunnypilot (merges/mashups), we try commaai as default,
# and fallback to sunnypilot if the ref checkout fails.
- name: Checkout commaai/openpilot
id: checkout_upstream
continue-on-error: true
uses: actions/checkout@v4
with:
repository: ${{ env.UPSTREAM_REPO }}
ref: ${{ github.event.inputs.upstream_branch }}
repository: commaai/openpilot
ref: ${{ inputs.upstream_branch }}
submodules: recursive
path: openpilot
- name: Fallback to sunnypilot/sunnypilot
if: steps.checkout_upstream.outcome == 'failure'
uses: actions/checkout@v4
with:
repository: sunnypilot/sunnypilot
ref: ${{ inputs.upstream_branch }}
submodules: recursive
path: openpilot
- name: Get commit date
id: commit-date
run: |
# Get the commit date in YYYY-MM-DD format
cd ${{ github.workspace }}/openpilot
commit_date=$(git log -1 --format=%cd --date=format:'%B %d, %Y')
echo "model_date=${commit_date}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- run: git lfs pull
- run: |
cd ${{ github.workspace }}/openpilot
git lfs pull
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: models
path: ${{ github.workspace }}/selfdrive/modeld/models/*.onnx
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models/*.onnx
build_model:
runs-on: self-hosted
runs-on: [self-hosted, tici]
needs: get_model
env:
MODEL_NAME: ${{ inputs.custom_name || inputs.upstream_branch }} (${{ needs.get_model.outputs.model_date }})
REF: ${{ inputs.upstream_branch }}
steps:
- uses: actions/checkout@v4
with:
@@ -71,7 +111,7 @@ jobs:
with:
path: ${{env.SCONS_CACHE_DIR}}
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model-${{ github.sha }}
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
# for security. Only caches from the default branch are shared across all builds. This is by design and cannot be overridden.
restore-keys: |
scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model
@@ -114,8 +154,10 @@ jobs:
- name: Download model artifacts
uses: actions/download-artifact@v4
with:
name: models
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
path: ${{ github.workspace }}/selfdrive/modeld/models
- run: |
rm -f ${{ github.workspace }}/selfdrive/modeld/models/{dmonitoring_model,big_driving_policy,big_driving_vision}.onnx
- name: Build Model
run: |
@@ -131,9 +173,18 @@ jobs:
echo "Compiling: $onnx_file -> $output_file"
QCOM=1 python3 "${{ env.TINYGRAD_PATH }}/examples/openpilot/compile3.py" "$onnx_file" "$output_file"
QCOM=1 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
DEV=QCOM FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
done
- name: Validate Model Outputs
run: |
source /etc/profile
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
--validate-only \
--model-dir "${{ env.MODELS_DIR }}"
- name: Prepare Output
run: |
sudo rm -rf ${{ env.OUTPUT_DIR }}
@@ -142,7 +193,6 @@ jobs:
# Copy the model files
rsync -avm \
--include='*.dlc' \
--include='*.thneed' \
--include='*.pkl' \
--include='*.onnx' \
--exclude='*' \
@@ -157,12 +207,22 @@ jobs:
--upstream-branch "${{ inputs.upstream_branch }}" \
${{ inputs.is_20hz && '--is-20hz' || '' }}
- name: Write artifact name to file
run: echo "model-${{ env.MODEL_NAME }}${{ inputs.artifact_suffix }}-${{ github.run_number }}" > ${{ env.OUTPUT_DIR }}/artifact_name.txt
- name: Upload Build Artifacts
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: model-${{ env.MODEL_NAME }}-${{ github.run_number }}
name: model-${{ env.MODEL_NAME }}${{ inputs.artifact_suffix }}-${{ github.run_number }}
path: ${{ env.OUTPUT_DIR }}
- name: Upload artifact name file
uses: actions/upload-artifact@v4
with:
name: artifact-name-${{ inputs.custom_name || inputs.upstream_branch }}
path: ${{ env.OUTPUT_DIR }}/artifact_name.txt
- name: Re-enable powersave
if: always()
run: |

View File

@@ -6,57 +6,121 @@ env:
CI_DIR: ${{ github.workspace }}/release/ci
SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache
PUBLIC_REPO_URL: "https://github.com/sunnypilot/sunnypilot"
# Branch configurations
STAGING_C3_SOURCE_BRANCH: ${{ vars.STAGING_C3_SOURCE_BRANCH || 'master-new' }} # vars are set on repo settings.
DEV_C3_SOURCE_BRANCH: ${{ vars.DEV_C3_SOURCE_BRANCH || 'master-dev-c3-new' }} # vars are set on repo settings.
# Target branch configurations
STAGING_TARGET_BRANCH: ${{ vars.STAGING_TARGET_BRANCH || 'staging-c3-new' }} # vars are set on repo settings.
DEV_TARGET_BRANCH: ${{ vars.DEV_TARGET_BRANCH || 'dev-c3-new' }} # vars are set on repo settings.
RELEASE_TARGET_BRANCH: ${{ vars.RELEASE_TARGET_BRANCH || 'release-c3-new' }} # vars are set on repo settings.
STAGING_SOURCE_BRANCH: 'master'
# Runtime configuration
SOURCE_BRANCH: "${{ github.head_ref || github.ref_name }}"
on:
push:
branches: [ master, master-new, master-dev-c3-new ]
tags: [ '*' ]
branches: [ master, master-dev ]
tags: [ 'release/*' ]
pull_request_target:
types: [ labeled ]
workflow_dispatch:
inputs:
wait_for_tests:
description: 'Wait for selfdrive_tests to finish'
description: 'Wait for tests to finish'
required: false
type: boolean
default: false
jobs:
prepare_strategy:
runs-on: ubuntu-24.04
if: (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
outputs:
environment: ${{ steps.strategy.outputs.environment }}
new_branch: ${{ steps.strategy.outputs.new_branch }}
extra_version_identifier: ${{ steps.strategy.outputs.extra_version_identifier }}
version: ${{ steps.strategy.outputs.version }}
cancel_publish_in_progress: ${{ steps.strategy.outputs.cancel_publish_in_progress }}
publish_concurrency_group: ${{ steps.strategy.outputs.publish_concurrency_group }}
is_stable_branch: ${{ steps.strategy.outputs.is_stable_branch }}
build: ${{ steps.strategy.outputs.build }}
steps:
- uses: actions/checkout@v4
- name: Extract deploy strategy
id: strategy
run: |
echo '::group::Strategy Extraction'
BRANCH="${{ github.head_ref || github.ref_name }}"
echo "Current branch: $BRANCH"
STRATEGY_JSON='${{ vars.DEPLOY_STRATEGY }}'
CONFIG=$(echo "$STRATEGY_JSON" | jq -r --arg branch "$BRANCH" '
.configs[] | select(.branch == $branch)
')
BUILD="$(date '+%Y.%m.%d')-${{ github.run_number }}"
if [[ -z "$CONFIG" || "$CONFIG" == "null" ]]; then
echo "No exact strategy match found. Falling back to feature/fork logic."
IS_FORK="${{ github.event.pull_request.head.repo.fork && 'true' || 'false' }}"
FORK_SUFFIX=$( [[ "$IS_FORK" == "true" ]] && echo "-fork" || echo "" )
NEW_BRANCH="${BRANCH}${FORK_SUFFIX}-prebuilt"
echo "new_branch=$NEW_BRANCH" >> $GITHUB_OUTPUT
echo "version=$BUILD" >> $GITHUB_OUTPUT
echo "cancel_publish_in_progress=true" >> $GITHUB_OUTPUT
echo "publish_concurrency_group=publish-${BRANCH}" >> $GITHUB_OUTPUT
echo "environment=feature-branch" >> $GITHUB_OUTPUT
echo "extra_version_identifier=feature-branch" >> $GITHUB_OUTPUT
else
echo "Matched config: $CONFIG"
environment=$(echo "$CONFIG" | jq -r '.environment')
echo "environment=$environment" >> $GITHUB_OUTPUT
echo "new_branch=$(echo "$CONFIG" | jq -r '.target_branch')" >> $GITHUB_OUTPUT
cancel="$(echo "$CONFIG" | jq -r '.cancel_publish_in_progress')";
echo "cancel_publish_in_progress=$( [ "$cancel" = "null" ] && echo "true" || echo $cancel)" >> $GITHUB_OUTPUT
echo "publish_concurrency_group=publish-${BRANCH}$( [ "$cancel" = "null" ] || [ "$cancel" = "true" ] || echo "${{ github.sha }}" )" >> $GITHUB_OUTPUT
is_stable_branch="$(echo "$CONFIG" | jq -r '.stable_branch // false')";
echo "is_stable_branch=$is_stable_branch" >> $GITHUB_OUTPUT
stable_version=$(cat sunnypilot/common/version.h | grep SUNNYPILOT_VERSION | sed -e 's/[^0-9|.]//g');
echo "version=$([ "$is_stable_branch" = "true" ] && echo "$stable_version" || echo "$BUILD")" >> $GITHUB_OUTPUT
echo "extra_version_identifier=${environment}" >> $GITHUB_OUTPUT
fi
echo "build=$BUILD" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
validate_tests:
runs-on: ubuntu-24.04
if: ((github.event_name == 'workflow_dispatch' && inputs.wait_for_tests) || contains(github.event_name, 'pull_request') && (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
needs: [ prepare_strategy ]
if: ${{
((github.event_name == 'workflow_dispatch' && inputs.wait_for_tests) ||
(github.event_name == 'push' && needs.prepare_strategy.outputs.is_stable_branch == 'true') ||
contains(github.event_name, 'pull_request') && (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
}}
steps:
- uses: actions/checkout@v4
- name: Wait for Tests
uses: ./.github/workflows/wait-for-action # Path to where you place the action
with:
workflow: selfdrive_tests.yaml # The workflow file to monitor
workflow: tests.yaml # The workflow file to monitor
github-token: ${{ secrets.GITHUB_TOKEN }}
should-wait-for-start: ${{ github.event_name == 'push' && 'true' || 'false' }}
build:
needs: [ validate_tests ]
needs: [ validate_tests, prepare_strategy ]
concurrency:
group: build-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
runs-on: self-hosted
runs-on: [self-hosted, tici]
outputs:
new_branch: ${{ steps.set-env.outputs.new_branch }}
version: ${{ steps.set-env.outputs.version }}
extra_version_identifier: ${{ steps.set-env.outputs.extra_version_identifier }}
commit_sha: ${{ steps.set-env.outputs.commit_sha }}
if: ${{ (always() && !failure() && !cancelled()) && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
new_branch: ${{ needs.prepare_strategy.outputs.new_branch }}
version: ${{ needs.prepare_strategy.outputs.version }}
extra_version_identifier: ${{ needs.prepare_strategy.outputs.extra_version_identifier }}
commit_sha: ${{ github.sha }}
if: ${{
(always() && !cancelled() && !failure()) &&
needs.prepare_strategy.result == 'success' &&
(needs.validate_tests.result == 'success' || needs.validate_tests.result == 'skipped') &&
(!contains(github.event_name, 'pull_request') ||
(github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
}}
steps:
- uses: actions/checkout@v4
with:
@@ -70,70 +134,21 @@ jobs:
with:
path: ${{env.SCONS_CACHE_DIR}}
key: scons-${{ runner.os }}-${{ runner.arch }}-${{ env.SOURCE_BRANCH }}-${{ github.sha }}
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
# Note: GitHub Actions enforces cache isolation between different build sources (PR builds, workflow dispatches, etc.)
# for security. Only caches from the default branch are shared across all builds. This is by design and cannot be overridden.
restore-keys: |
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.SOURCE_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.STAGING_C3_SOURCE_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.STAGING_SOURCE_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}
- name: Set Feature Branch Prebuilt Configuration
id: set_feature_configuration
if: (
!(env.SOURCE_BRANCH == env.DEV_C3_SOURCE_BRANCH) &&
!(env.SOURCE_BRANCH == env.STAGING_C3_SOURCE_BRANCH) &&
!(startsWith(github.ref, 'refs/tags/'))
)
run: |
echo "NEW_BRANCH=${{ env.SOURCE_BRANCH }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}-prebuilt" >> $GITHUB_ENV
echo "VERSION=$(date '+%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_ENV
- name: Set dev-c3-new prebuilt Configuration
id: set_dev_configuration
if: (
steps.set_feature_configuration.outcome == 'skipped' &&
env.SOURCE_BRANCH == env.DEV_C3_SOURCE_BRANCH
)
run: |
echo "NEW_BRANCH=${{ env.DEV_TARGET_BRANCH }}" >> $GITHUB_ENV
echo "VERSION=$(date '+%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_ENV
echo "EXTRA_VERSION_IDENTIFIER=${{ github.run_number }}" >> $GITHUB_ENV
- name: Set staging-c3-new prebuilt Configuration
id: set_staging_configuration
if: (
steps.set_feature_configuration.outcome == 'skipped' &&
!contains(github.event_name, 'pull_request') &&
steps.set_dev_configuration.outcome == 'skipped' &&
(env.SOURCE_BRANCH == env.STAGING_C3_SOURCE_BRANCH)
)
run: |
echo "NEW_BRANCH=${{ env.STAGING_TARGET_BRANCH }}" >> $GITHUB_ENV
echo "EXTRA_VERSION_IDENTIFIER=staging" >> $GITHUB_ENV
echo "VERSION=$(cat common/version.h | grep COMMA_VERSION | sed -e 's/[^0-9|.]//g')-staging" >> $GITHUB_ENV
- name: Set release-c3-new prebuilt Configuration
id: set_tag_configuration
if: (
steps.set_feature_configuration.outcome == 'skipped' &&
!contains(github.event_name, 'pull_request') &&
steps.set_staging_configuration.outcome == 'skipped' &&
startsWith(github.ref, 'refs/tags/')
)
run: |
echo "NEW_BRANCH=${{ env.RELEASE_TARGET_BRANCH }}" >> $GITHUB_ENV
echo "EXTRA_VERSION_IDENTIFIER=release" >> $GITHUB_ENV
echo "VERSION=$(cat common/version.h | grep COMMA_VERSION | sed -e 's/[^0-9|.]//g')-release" >> $GITHUB_ENV
- name: Set environment variables
id: set-env
run: |
# Write to GITHUB_OUTPUT from environment variables
echo "new_branch=$NEW_BRANCH" >> $GITHUB_OUTPUT
[[ ! -z "$EXTRA_VERSION_IDENTIFIER" ]] && echo "extra_version_identifier=$EXTRA_VERSION_IDENTIFIER" >> $GITHUB_OUTPUT
[[ ! -z "$VERSION" ]] && echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "new_branch=${{ needs.prepare_strategy.outputs.new_branch }}" >> $GITHUB_OUTPUT
echo "version=${{ needs.prepare_strategy.outputs.version }}" >> $GITHUB_OUTPUT
echo "extra_version_identifier=${{ needs.prepare_strategy.outputs.extra_version_identifier }}" >> $GITHUB_OUTPUT
echo "commit_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
# Set up common environment
source /etc/profile;
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
@@ -165,6 +180,13 @@ jobs:
./release/release_files.py | sort | uniq | rsync -rRl${RUNNER_DEBUG:+v} --files-from=- . $BUILD_DIR/
cd $BUILD_DIR
sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py
echo "Building sunnypilot's modeld_v2..."
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/modeld_v2
echo "Building sunnypilot's locationd..."
scons -j2 cache_dir=${{env.SCONS_CACHE_DIR}} --minimal sunnypilot/selfdrive/locationd
echo "Building openpilot's locationd..."
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal selfdrive/locationd
echo "Building rest of sunnypilot"
scons -j$(nproc) cache_dir=${{env.SCONS_CACHE_DIR}} --minimal
touch ${BUILD_DIR}/prebuilt
if [[ "${{ runner.debug }}" == "1" ]]; then
@@ -176,37 +198,27 @@ jobs:
sudo rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}
rsync -am${RUNNER_DEBUG:+v} \
--include='**/panda/board/' \
--include='**/panda/board/obj' \
--include='**/panda/board/obj/panda.bin.signed' \
--include='**/panda/board/obj/panda_h7.bin.signed' \
--include='**/panda/board/obj/bootstub.panda.bin' \
--include='**/panda/board/obj/bootstub.panda_h7.bin' \
--exclude='.sconsign.dblite' \
--exclude='*.a' \
--exclude='*.o' \
--exclude='*.os' \
--exclude='*.pyc' \
--exclude='moc_*' \
--exclude='*.cc' \
--exclude='__pycache__' \
--exclude='Jenkinsfile' \
--exclude='supercombo.onnx' \
--exclude='**/panda/board/*' \
--exclude='**/panda/board/obj/**' \
--exclude='**/panda/certs/' \
--exclude='**/panda/crypto/' \
--exclude='**/release/' \
--exclude='**/.github/' \
--exclude='**/selfdrive/ui/replay/' \
--exclude='**/__pycache__/' \
--exclude='**/selfdrive/ui/*.h' \
--exclude='**/selfdrive/ui/**/*.h' \
--exclude='**/selfdrive/ui/qt/offroad/sunnypilot/' \
--exclude='${{env.SCONS_CACHE_DIR}}' \
--exclude='**/.git/' \
--exclude='**/SConstruct' \
--exclude='**/SConscript' \
--exclude='**/.venv/' \
--exclude='selfdrive/modeld/models/driving_vision.onnx' \
--exclude='selfdrive/modeld/models/driving_policy.onnx' \
--exclude='third_party/*x86*' \
--exclude='third_party/*Darwin*' \
--delete-excluded \
--chown=comma:comma \
${BUILD_DIR}/ ${OUTPUT_DIR}/
@@ -230,12 +242,15 @@ jobs:
publish:
concurrency:
group: publish-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
if: ${{ (always() && !failure() && !cancelled()) && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
needs: [ build ]
# We do a bit of a hack here to avoid canceling the publishing job if a new commit comes in while we're publishing by adding the sha to the group name.
# This means that if multiple commits come in while we're publishing, they will be queued up and publish one after the other.
# Otherwise, if a job is waiting to be published due to environment wait time, it would be canceled by a new commit and restart the wait time.
group: ${{ needs.prepare_strategy.outputs.publish_concurrency_group }}
cancel-in-progress: ${{ needs.prepare_strategy.outputs.cancel_publish_in_progress == 'true' }}
if: ${{ (always() && !cancelled() && !failure()) && needs.build.result == 'success' && needs.prepare_strategy.result == 'success' && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
needs: [ build, prepare_strategy ]
runs-on: ubuntu-24.04
environment: ${{ (contains(fromJSON(vars.AUTO_DEPLOY_PREBUILT_BRANCHES), github.head_ref || github.ref_name) || contains(github.event.pull_request.labels.*.name, 'prebuilt')) && 'auto-deploy' || 'feature-branch' }}
environment: ${{ needs.prepare_strategy.outputs.environment }}
steps:
- uses: actions/checkout@v4
@@ -267,8 +282,8 @@ jobs:
"${{ needs.build.outputs.new_branch }}" \
"${{ needs.build.outputs.version }}" \
"https://x-access-token:${{github.token}}@github.com/sunnypilot/sunnypilot.git" \
"-${{ needs.build.outputs.extra_version_identifier }}"
"${{ needs.build.outputs.extra_version_identifier }}"
echo ""
echo "---- To update the list of branches that auto deploy prebuilts -----"
echo ""
@@ -276,38 +291,60 @@ jobs:
echo "2. Current value: ${{ vars.AUTO_DEPLOY_PREBUILT_BRANCHES }}"
echo "3. Update as needed (JSON array with no spaces)"
- name: Tag ${{ needs.prepare_strategy.outputs.environment }}
if: ${{ needs.prepare_strategy.outputs.is_stable_branch == 'true' && (github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/')) }}
run: |
TAG="${{ needs.prepare_strategy.outputs.environment }}/${{ needs.prepare_strategy.outputs.version }}/${{ needs.prepare_strategy.outputs.build }}"
git tag -f -a ${TAG} -m "${{ needs.prepare_strategy.outputs.environment }} @ ${{ needs.prepare_strategy.outputs.version }} of build ${{ needs.build.outputs.build }}."
git push -f origin ${TAG}
notify:
needs: [ build, publish ]
needs:
- prepare_strategy
- build
- publish
runs-on: ubuntu-24.04
if: ${{ (always() && !failure() && !cancelled()) && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
if: ${{ (always() && !cancelled() && !failure())
&& needs.publish.result == 'success'
&& (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
&& (fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES_V2)[github.head_ref || github.ref_name] != null) }}
steps:
- uses: actions/checkout@v4
- name: Setup Alpine Linux environment
uses: jirutka/setup-alpine@v1.2.0
with:
packages: 'jq gettext curl'
- name: Send Discord Notification
env:
DISCORD_WEBHOOK: ${{ contains(fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES), env.SOURCE_BRANCH) && secrets.DISCORD_DEV_FEEDBACK_CHANNEL_WEBHOOK || secrets.DISCORD_DEV_PRIVATE_CHANNEL_WEBHOOK }}
- name: Prepare notification message
id: message
run: |
TEMPLATE='${{ vars.DISCORD_GENERAL_UPDATE_NOTICE }}'
export EXTRA_VERSION_IDENTIFIER="${{ needs.build.outputs.extra_version_identifier }}"
export VERSION="${{ needs.build.outputs.version }}"
export branch_name=${{ env.SOURCE_BRANCH }}
export new_branch=${{ needs.build.outputs.new_branch }}
export extra_version_identifier=${{ needs.build.outputs.extra_version_identifier || github.run_number}}
echo ${TEMPLATE} | envsubst | jq -c '.' | tee payload.json
curl -X POST -H "Content-Type: application/json" -d @payload.json $DISCORD_WEBHOOK
echo ""
echo "---- To update the list of branches that notify to dev-feedback -----"
echo ""
echo "1. Go to: ${{ github.server_url }}/${{ github.repository }}/settings/variables/actions/DEV_FEEDBACK_NOTIFICATION_BRANCHES"
echo "2. Current value: ${{ vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES }}"
echo "3. Update as needed (JSON array with no spaces)"
shell: alpine.sh {0}
TEMPLATE='${{ vars.DISCOURSE_GENERAL_UPDATE_NOTICE }}'
export VERSION="${{ needs.prepare_strategy.outputs.version }}"
export branch_name="${{ env.SOURCE_BRANCH }}"
export new_branch="${{ needs.prepare_strategy.outputs.new_branch }}"
export commit_sha="${{ github.sha }}"
export commit_short_sha="${{ github.sha }}"
export commit_short_sha="${commit_short_sha:0:7}"
export extra_version_identifier="${{ needs.prepare_strategy.outputs.extra_version_identifier || github.run_number }}"
export PUBLIC_REPO_URL="${{ env.PUBLIC_REPO_URL }}"
MESSAGE=$(cat << 'EOF' | envsubst
${{ vars.DISCOURSE_GENERAL_UPDATE_NOTICE }}
EOF
)
{
echo 'content<<EOFMARKER'
echo "$MESSAGE"
echo 'EOFMARKER'
} >> $GITHUB_OUTPUT
shell: bash
- name: Post to Discourse
uses: ./.github/workflows/post-to-discourse
with:
discourse-url: ${{ vars.DISCOURSE_URL }}
api-key: ${{ secrets.DISCOURSE_API_KEY }}
api-username: "system"
topic-id: ${{ fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES_V2)[github.head_ref || github.ref_name].topic_id }}
message: ${{ steps.message.outputs.content }}
manage-pr-labels:
name: Remove prebuilt label
runs-on: ubuntu-latest

View File

@@ -1,9 +1,8 @@
name: Build dev-c3-new
name: Build dev
env:
DEFAULT_SOURCE_BRANCH: "master-new"
DEFAULT_TARGET_BRANCH: "master-dev-c3-new"
PR_LABEL: "dev-c3"
DEFAULT_SOURCE_BRANCH: "master"
DEFAULT_TARGET_BRANCH: "master-dev"
LFS_URL: 'https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs'
LFS_PUSH_URL: 'ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git'
@@ -11,23 +10,21 @@ on:
push:
branches:
- master
- master-new
pull_request_target:
types: [ labeled ]
branches:
- 'master'
- 'master-new'
types: [ labeled ]
branches:
- 'master'
workflow_dispatch:
inputs:
source_branch:
description: 'Source branch to reset from'
required: true
default: 'master-new'
default: 'master'
type: string
target_branch:
description: 'Target branch to reset and squash into'
required: true
default: 'master-dev-c3-new'
default: 'master-dev'
type: string
cancel_in_progress:
description: 'Cancel any in-progress runs of this workflow'
@@ -43,24 +40,25 @@ jobs:
reset-and-squash:
runs-on: ubuntu-latest
if: (
(github.event_name == 'workflow_dispatch')
|| (github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == 'dev-c3' || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, 'dev-c3'))))
)
(github.event_name == 'workflow_dispatch')
|| (github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == vars.PREBUILT_PR_LABEL || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, vars.PREBUILT_PR_LABEL))))
)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Wait for Tests
uses: ./.github/workflows/wait-for-action # Path to where you place the action
if: (
(github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == 'dev-c3' || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, 'dev-c3'))))
)
(github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == vars.PREBUILT_PR_LABEL || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, vars.PREBUILT_PR_LABEL))))
)
with:
workflow: selfdrive_tests.yaml # The workflow file to monitor
workflow: tests.yaml # The workflow file to monitor
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
@@ -120,8 +118,8 @@ jobs:
run: |
# Use GitHub API to get PRs with specific label, ordered by creation date
PR_LIST=$(gh api graphql -f query='
query($label:String!) {
search(query: $label, type:ISSUE, first:100) {
query($search_query:String!) {
search(query: $search_query, type:ISSUE, first:40) {
nodes {
... on PullRequest {
number
@@ -151,8 +149,9 @@ jobs:
}
}
}
}' -F label="is:pr is:open label:${PR_LABEL} draft:false sort:created-asc")
}' -F search_query="repo:${{ github.repository }} is:pr is:open label:${{ vars.PREBUILT_PR_LABEL }},${{ vars.PREBUILT_PR_LABEL }}-c3 draft:false sort:created-asc")
PR_LIST=${PR_LIST//\'/}
echo "PR_LIST=${PR_LIST}" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -175,10 +174,37 @@ jobs:
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
echo ' locksverify = false' >> .lfsconfig
- name: Push changes if there are diffs
id: push-changes # Add an id so we can reference this step
- name: Restore workflows from source
run: |
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
SOURCE_BRANCH="${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
# Ensure we are on the target branch
git checkout $TARGET_BRANCH
echo "Restoring .github/workflows from $SOURCE_BRANCH"
git checkout origin/$SOURCE_BRANCH -- .github/workflows
if ! git diff --cached --quiet; then
echo "Workflows differ. Committing restoration."
git commit -m "chore: restore .github/workflows from $SOURCE_BRANCH"
else
echo "Workflows match $SOURCE_BRANCH."
fi
- uses: actions/create-github-app-token@v2
id: ci-token
with:
app-id: ${{ secrets.CI_GITHUB_ACTIONS_TOKEN_APP_ID }}
private-key: ${{ secrets.CI_GITHUB_ACTIONS_TOKEN_APP_PRIVATE_KEY }}
- name: Push changes if there are diffs
id: push-changes
run: |
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
# Use the App Token to set the remote URL with authentication
git remote set-url origin "https://x-access-token:${{ steps.ci-token.outputs.token }}@github.com/${{ github.repository }}.git"
# Fetch the latest from remote
git fetch origin $TARGET_BRANCH
@@ -190,7 +216,7 @@ jobs:
exit 0
fi
# If we get here, there are diffs, so push
# Push with the authenticated origin
if ! git push origin $TARGET_BRANCH --force; then
echo "Failed to push changes to $TARGET_BRANCH"
exit 1
@@ -203,22 +229,15 @@ jobs:
if: steps.push-changes.outputs.has_changes == 'true'
run: |
echo "Triggering selfdrive tests..."
gh workflow run selfdrive_tests.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
gh workflow run tests.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
echo "Sleeping for 120s to give plenty of time for the action to start and then we wait"
sleep 120
echo "Getting latest run ID..."
RUN_ID=$(gh run list --workflow=selfdrive_tests.yaml --branch="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}" --limit=1 --json databaseId --jq '.[0].databaseId')
RUN_ID=$(gh run list --workflow=tests.yaml --branch="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}" --limit=1 --json databaseId --jq '.[0].databaseId')
echo "Watching run ID: $RUN_ID"
gh run watch "$RUN_ID"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger prebuilt workflow
if: success() && steps.push-changes.outputs.has_changes == 'true'
run: |
gh workflow run sunnypilot-build-prebuilt.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,78 @@
name: Debug Discourse Posting
on:
push:
jobs:
test-discourse-post:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Post test message to Discourse
uses: ./.github/workflows/post-to-discourse
with:
discourse-url: ${{ vars.DISCOURSE_URL }}
api-key: ${{ secrets.DISCOURSE_API_KEY }}
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
message: |
## 🧪 Test Post from GitHub Actions
**This is a test post to verify Discourse integration**
- **Workflow**: ${{ github.workflow }}
- **Run Number**: #${{ github.run_number }}
- **Branch**: `${{ github.ref_name }}`
- **Commit**: ${{ github.sha }}
- **Actor**: @${{ github.actor }}
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
---
### Fake Build Info (for testing)
- **Version**: 0.9.8-test
- **Build**: #42
- **Branch**: release-test
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
*This is an automated test message. Drive safe! 🚗💨*
- name: Create topic on Discourse
uses: ./.github/workflows/post-to-discourse
with:
discourse-url: ${{ vars.DISCOURSE_URL }}
api-key: ${{ secrets.DISCOURSE_API_KEY }}
api-username: ${{ secrets.DISCOURSE_API_USERNAME }}
#topic-id: ${{ vars.DISCOURSE_UPDATES_TOPIC_ID }}
category-id: 4
title: "This is a test of a new topic instead of a reply"
message: |
## 🧪 Test Post from GitHub Actions
**This is a test post to verify Discourse integration**
- **Workflow**: ${{ github.workflow }}
- **Run Number**: #${{ github.run_number }}
- **Branch**: `${{ github.ref_name }}`
- **Commit**: ${{ github.sha }}
- **Actor**: @${{ github.actor }}
- **Timestamp**: ${{ github.event.head_commit.timestamp }}
---
### Fake Build Info (for testing)
- **Version**: 0.9.8-test
- **Build**: #42
- **Branch**: release-test
[View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
*This is an automated test message. Drive safe! 🚗💨*
- name: Display results
if: always()
run: |
echo "::notice::Discourse post test completed"
echo "Check your Discourse topic to verify the post appeared correctly"

238
.github/workflows/tests.yaml vendored Normal file
View File

@@ -0,0 +1,238 @@
name: tests
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
workflow_call:
inputs:
run_number:
default: '1'
required: true
type: string
concurrency:
group: tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
CI: 1
PYTHONPATH: ${{ github.workspace }}
PYTEST: pytest --continue-on-collection-errors --durations=0 -n logical
jobs:
build_release:
name: build release
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
env:
STRIPPED_DIR: /tmp/releasepilot
PYTHONPATH: /tmp/releasepilot
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Getting LFS files
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e
with:
timeout_minutes: 2
max_attempts: 3
command: git lfs pull
- name: Build devel
timeout-minutes: 1
run: TARGET_DIR=$STRIPPED_DIR release/build_stripped.sh
- run: ./tools/op.sh setup
- name: Build openpilot and run checks
timeout-minutes: 30
working-directory: ${{ env.STRIPPED_DIR }}
run: python3 system/manager/build.py
- name: Run tests
timeout-minutes: 1
working-directory: ${{ env.STRIPPED_DIR }}
run: release/check-dirty.sh
- name: Check submodules
if: github.repository == 'sunnypilot/sunnypilot'
timeout-minutes: 3
run: |
if [ "${{ github.ref }}" != "refs/heads/master" ]; then
git fetch origin master:refs/remotes/origin/master
SUBMODULE_PATHS=$(git diff origin/master HEAD --name-only | grep -E '^[^/]+$' | while read path; do
if git ls-files --stage "$path" | grep -q "^160000"; then
echo "$path"
fi
done | tr '\n' ' ')
if [ -n "$SUBMODULE_PATHS" ]; then
echo "Changed submodule paths: $SUBMODULE_PATHS"
export SUBMODULE_PATHS="$SUBMODULE_PATHS"
export CHECK_PR_REFS=true
fi
fi
release/check-submodules.sh
build_mac:
name: build macOS
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Remove Homebrew from environment
run: |
FILTERED=$(echo "$PATH" | tr ':' '\n' | grep -v '/opt/homebrew' | tr '\n' ':')
echo "PATH=${FILTERED}/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_ENV
- run: ./tools/op.sh setup
- name: Building openpilot
run: scons
static_analysis:
name: static analysis
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Static analysis
timeout-minutes: 1
run: scripts/lint/lint.sh
unit_tests:
name: unit tests
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Build openpilot
run: scons -j$(nproc)
- name: Run unit tests
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 999 }}
run: |
source selfdrive/test/setup_xvfb.sh
# Pre-compile Python bytecode so each pytest worker doesn't need to
$PYTEST --collect-only -m 'not slow' -qq
MAX_EXAMPLES=1 $PYTEST -m 'not slow'
process_replay:
name: process replay
if: false # disable process_replay for forks
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Build openpilot
run: scons -j$(nproc)
- name: Run replay
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 20 }}
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
run: selfdrive/test/process_replay/test_processes.py -j$(nproc)
- name: Print diff
id: print-diff
if: always()
run: cat selfdrive/test/process_replay/diff.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: Checkout ci-artifacts
if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master'
uses: actions/checkout@v4
with:
repository: commaai/ci-artifacts
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/ci-artifacts
- name: Push refs
if: github.repository == 'commaai/openpilot' && github.ref == 'refs/heads/master'
working-directory: ${{ github.workspace }}/ci-artifacts
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git fetch origin process-replay || true
git checkout process-replay 2>/dev/null || git checkout --orphan process-replay
cp ${{ github.workspace }}/selfdrive/test/process_replay/fakedata/*.zst .
echo "${{ github.sha }}" > ref_commit
git add .
git commit -m "process-replay refs for ${{ github.repository }}@${{ github.sha }}" || echo "No changes to commit"
git push origin process-replay
- name: Run regen
if: false
timeout-minutes: 4
env:
ONNXCPU: 1
run: $PYTEST selfdrive/test/process_replay/test_regen.py
simulator_driving:
name: simulator driving
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
if: false # FIXME: Started to timeout recently
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Build openpilot
run: scons -j$(nproc)
- name: Driving test
timeout-minutes: 2
run: |
source selfdrive/test/setup_xvfb.sh
pytest -s tools/sim/tests/test_metadrive_bridge.py
create_ui_report:
name: Create UI Report
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Build openpilot
run: scons -j$(nproc)
- name: Create UI Report
run: |
source selfdrive/test/setup_xvfb.sh
python3 selfdrive/ui/tests/diff/replay.py
python3 selfdrive/ui/tests/diff/replay.py --big
- name: Upload UI Report
uses: actions/upload-artifact@v6
with:
name: ui-report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
path: selfdrive/ui/tests/diff/report

View File

@@ -3,21 +3,25 @@ on:
push:
branches:
- master
- master-new
pull_request_target:
types: [assigned, opened, synchronize, reopened, edited]
branches:
- 'master'
- 'master-new'
paths:
- 'selfdrive/assets/**'
- 'selfdrive/ui/**'
- 'system/ui/**'
workflow_dispatch:
env:
UI_JOB_NAME: "Create UI Report"
REPORT_NAME: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && 'master' || github.event.number }}
SHA: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.sha || github.event.pull_request.head.sha }}
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}"
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-ui-preview"
REPORT_FILES_BRANCH_NAME: "mici-raylib-ui-reports"
# variant:video_prefix:master_branch
VARIANTS: "mici:mici_ui_replay:openpilot_master_ui_mici_raylib big:tizi_ui_replay:openpilot_master_ui_big_raylib"
jobs:
preview:
@@ -30,8 +34,9 @@ jobs:
pull-requests: write
actions: read
steps:
- name: Waiting for ui generation to start
run: sleep 30
- uses: actions/checkout@v6
with:
submodules: true
- name: Waiting for ui generation to end
uses: lewagon/wait-on-check-action@v1.3.4
@@ -48,110 +53,93 @@ jobs:
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ env.SHA }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
- name: Getting proposed ui
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ steps.get_run_id.outputs.run_id }}
search_artifacts: true
name: report-1-${{ env.REPORT_NAME }}
name: ui-report-1-${{ env.REPORT_NAME }}
path: ${{ github.workspace }}/pr_ui
- name: Getting master ui
uses: actions/checkout@v4
- name: Getting mici master ui
uses: actions/checkout@v6
with:
repository: sunnypilot/ci-artifacts
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/master_ui
ref: openpilot_master_ui
path: ${{ github.workspace }}/master_mici
ref: openpilot_master_ui_mici_raylib
- name: Getting big master ui
uses: actions/checkout@v6
with:
repository: sunnypilot/ci-artifacts
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/master_big
ref: openpilot_master_ui_big_raylib
- name: Saving new master ui
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/master-new') && github.event_name == 'push'
working-directory: ${{ github.workspace }}/master_ui
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
git checkout --orphan=new_master_ui
git rm -rf *
git branch -D openpilot_master_ui
git branch -m openpilot_master_ui
git config user.name "GitHub Actions Bot"
git config user.email "<>"
mv ${{ github.workspace }}/pr_ui/*.png .
git add .
git commit -m "screenshots for commit ${{ env.SHA }}"
git push origin openpilot_master_ui --force
for variant in $VARIANTS; do
IFS=':' read -r name video branch <<< "$variant"
master_dir="${{ github.workspace }}/master_${name}"
cd "$master_dir"
git checkout --orphan=new_branch
git rm -rf *
git branch -D "$branch"
git branch -m "$branch"
git config user.name "GitHub Actions Bot"
git config user.email "<>"
cp "${{ github.workspace }}/pr_ui/${video}.mp4" .
git add .
git commit -m "${name} video for commit ${{ env.SHA }}"
git push origin "$branch" --force
done
- name: Finding diff
- name: Setup FFmpeg
uses: AnimMouse/setup-ffmpeg@ae28d57dabbb148eff63170b6bf7f2b60062cbae
- name: Finding diffs
if: github.event_name == 'pull_request_target'
id: find_diff
run: >-
sudo apt-get update && sudo apt-get install -y imagemagick
run: |
export PYTHONPATH=${{ github.workspace }}
baseurl="https://github.com/sunnypilot/ci-artifacts/raw/refs/heads/${{ env.BRANCH_NAME }}"
scenes=$(find ${{ github.workspace }}/pr_ui/*.png -type f -printf "%f\n" | cut -d '.' -f 1 | grep -v 'pair_device')
A=($scenes)
COMMENT=""
for variant in $VARIANTS; do
IFS=':' read -r name video _ <<< "$variant"
diff_name="${name}_diff"
DIFF=""
TABLE="<details><summary>All Screenshots</summary>"
TABLE="${TABLE}<table>"
mv "${{ github.workspace }}/pr_ui/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_proposed.mp4"
cp "${{ github.workspace }}/master_${name}/${video}.mp4" "${{ github.workspace }}/pr_ui/${video}_master.mp4"
for ((i=0; i<${#A[*]}; i=i+1));
do
# Check if the master file exists
if [ ! -f "${{ github.workspace }}/master_ui/${A[$i]}.png" ]; then
# This is a new file in PR UI that doesn't exist in master
DIFF="${DIFF}<details open>"
DIFF="${DIFF}<summary>${A[$i]} : \$\${\\color{cyan}\\text{NEW}}\$\$</summary>"
DIFF="${DIFF}<table>"
diff_exit_code=0
python3 ${{ github.workspace }}/selfdrive/ui/tests/diff/diff.py \
"${{ github.workspace }}/pr_ui/${video}_master.mp4" \
"${{ github.workspace }}/pr_ui/${video}_proposed.mp4" \
"${diff_name}.html" --basedir "$baseurl" --no-open || diff_exit_code=$?
DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${{ github.workspace }}/pr_ui/"
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.mp4" "${{ github.workspace }}/pr_ui/"
DIFF="${DIFF}</table>"
DIFF="${DIFF}</details>"
elif ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then
convert ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png -transparent black mask.png
composite mask.png ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png
convert -delay 100 ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png -loop 0 ${{ github.workspace }}/pr_ui/${A[$i]}_diff.gif
mv ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_master_ref.png
DIFF="${DIFF}<details open>"
DIFF="${DIFF}<summary>${A[$i]} : \$\${\\color{red}\\text{DIFFERENT}}\$\$</summary>"
DIFF="${DIFF}<table>"
DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> master <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"
DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.gif\"> </td>"
DIFF="${DIFF}</tr>"
DIFF="${DIFF}</table>"
DIFF="${DIFF}</details>"
REPORT_URL="https://sunnypilot.github.io/ci-artifacts/${diff_name}_pr_${{ github.event.number }}.html"
if [ $diff_exit_code -eq 0 ]; then
COMMENT+="**${name}**: Videos are identical! [View Diff Report]($REPORT_URL)"$'\n'
else
rm -f ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png
fi
INDEX=$(($i % 2))
if [[ $INDEX -eq 0 ]]; then
TABLE="${TABLE}<tr>"
fi
TABLE="${TABLE} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
if [[ $INDEX -eq 1 || $(($i + 1)) -eq ${#A[*]} ]]; then
TABLE="${TABLE}</tr>"
COMMENT+="**${name}**: ⚠️ <strong>Videos differ!</strong> [View Diff Report]($REPORT_URL)"$'\n'
fi
done
TABLE="${TABLE}</table></details>"
echo "DIFF=$DIFF$TABLE" >> "$GITHUB_OUTPUT"
{
echo "COMMENT<<EOF"
echo "$COMMENT"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Saving proposed ui
if: github.event_name == 'pull_request_target'
working-directory: ${{ github.workspace }}/master_ui
working-directory: ${{ github.workspace }}/master_mici
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
@@ -159,17 +147,29 @@ jobs:
git rm -rf *
mv ${{ github.workspace }}/pr_ui/* .
git add .
git commit -m "screenshots for PR #${{ github.event.number }}"
git commit -m "ui videos for PR #${{ github.event.number }}"
git push origin ${{ env.BRANCH_NAME }} --force
- name: Comment Screenshots on PR
# Append diff reports to report files branch
git fetch origin ${{ env.REPORT_FILES_BRANCH_NAME }}
git checkout ${{ env.REPORT_FILES_BRANCH_NAME }}
for variant in $VARIANTS; do
IFS=':' read -r name _ _ <<< "$variant"
diff_name="${name}_diff"
cp "${{ github.workspace }}/selfdrive/ui/tests/diff/report/${diff_name}.html" "${diff_name}_pr_${{ github.event.number }}.html"
git add "${diff_name}_pr_${{ github.event.number }}.html"
done
git commit -m "ui diff reports for PR #${{ github.event.number }}" || echo "No changes to commit"
git push origin ${{ env.REPORT_FILES_BRANCH_NAME }}
- name: Comment on PR
if: github.event_name == 'pull_request_target'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
<!-- _(run_id_screenshots **${{ github.run_id }}**)_ -->
<!-- _(run_id_ui_preview **${{ github.run_id }}**)_ -->
## UI Preview
${{ steps.find_diff.outputs.DIFF }}
comment_tag: run_id_screenshots
${{ steps.find_diff.outputs.COMMENT }}
comment_tag: run_id_ui_preview
pr_number: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -4,7 +4,7 @@ inputs:
workflow:
description: 'The workflow file name to monitor'
required: true
default: 'selfdrive_tests.yaml'
default: 'tests.yaml'
branch:
description: 'The branch to monitor (defaults to current branch)'
required: false

26
.gitignore vendored
View File

@@ -10,12 +10,13 @@ venv/
.overlay_init
.overlay_consistent
.sconsign.dblite
model2.png
a.out
.hypothesis
.cache/
/docs_site/
*.mp4
*.dylib
*.DSYM
*.d
@@ -35,30 +36,23 @@ a.out
*.class
*.pyxbldc
*.vcd
*.qm
*.mo
*_pyx.cpp
*.stats
config.json
clcache
compile_commands.json
compare_runtime*.html
persist
selfdrive/pandad/pandad
cereal/services.h
cereal/gen
cereal/messaging/bridge
selfdrive/mapd/default_speeds_by_region.json
system/proclogd/proclogd
selfdrive/ui/translations/tmp
selfdrive/test/longitudinal_maneuvers/out
selfdrive/car/tests/cars_dump
system/camerad/camerad
system/camerad/test/ae_gray_test
notebooks
hyperthneed
provisioning
.coverage*
coverage.xml
htmlcov
@@ -70,13 +64,10 @@ flycheck_*
cppcheck_report.txt
comma*.sh
selfdrive/modeld/thneed/compile
selfdrive/modeld/models/*.thneed
selfdrive/modeld/models/*.pkl
sunnypilot/modeld*/thneed/compile
sunnypilot/modeld*/models/*.thneed
selfdrive/modeld/models/*.pkl*
sunnypilot/modeld*/models/*.pkl
# openpilot log files
*.bz2
*.zst
@@ -106,6 +97,11 @@ Pipfile
.history
.ionide
.claude/
.context/
PLAN.md
TASK.md
### JetBrains ###
!.idea/customTargets.xml
!.idea/tools/*

4
.gitmodules vendored
View File

@@ -6,7 +6,7 @@
url = https://github.com/sunnypilot/opendbc.git
[submodule "msgq"]
path = msgq_repo
url = https://github.com/sunnypilot/msgq.git
url = https://github.com/commaai/msgq.git
[submodule "rednose_repo"]
path = rednose_repo
url = https://github.com/commaai/rednose.git
@@ -15,7 +15,7 @@
url = https://github.com/commaai/teleoprtc
[submodule "tinygrad"]
path = tinygrad_repo
url = https://github.com/tinygrad/tinygrad.git
url = https://github.com/sunnypilot/tinygrad.git
[submodule "sunnypilot/neural_network_data"]
path = sunnypilot/neural_network_data
url = https://github.com/sunnypilot/neural-network-data.git

View File

@@ -2,7 +2,7 @@
<tool name="uv Scons Build Debug" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="bash" />
<option name="PARAMETERS" value="-c &quot;source .venv/bin/activate &amp;&amp; scons -u -j$(nproc) --compile_db --ccflags=\&quot;-fno-inline\&quot;&quot;" />
<option name="PARAMETERS" value="-c &quot;source .venv/bin/activate &amp;&amp; scons -u -j$(nproc) --ccflags=\&quot;-fno-inline\&quot;&quot;" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
@@ -16,7 +16,7 @@
<tool name="uv Scons Build Release" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="bash" />
<option name="PARAMETERS" value="-c &quot;source .venv/bin/activate &amp;&amp; scons -u -j$(nproc) --compile_db&quot; " />
<option name="PARAMETERS" value="-c &quot;source .venv/bin/activate &amp;&amp; scons -u -j$(nproc)&quot; " />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>

26
.run/Build_BIG_UI.run.xml Normal file
View File

@@ -0,0 +1,26 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build_BIG_UI" type="PythonConfigurationType" factoryName="Python">
<module name="sunnypilot" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="BIG" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$ProjectFileDir$/selfdrive/ui/ui.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2">
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_uv Scons Build Debug" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build_SMALL_UI" type="PythonConfigurationType" factoryName="Python">
<module name="sunnypilot" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$ProjectFileDir$/selfdrive/ui/ui.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2">
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_uv Scons Build Debug" />
</method>
</configuration>
</component>

41
.vscode/launch.json vendored
View File

@@ -23,6 +23,11 @@
"id": "args",
"description": "Arguments to pass to the process",
"type": "promptString"
},
{
"id": "replayArg",
"type": "promptString",
"description": "Enter route or segment to replay."
}
],
"configurations": [
@@ -40,7 +45,41 @@
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${input:cpp_process}",
"cwd": "${workspaceFolder}",
"cwd": "${workspaceFolder}"
},
{
"name": "Attach LLDB to Replay drive",
"type": "lldb",
"request": "attach",
"pid": "${command:pickMyProcess}",
"initCommands": [
"script import time; time.sleep(3)"
]
},
{
"name": "Replay drive",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/opendbc/safety/tests/safety_replay/replay_drive.py",
"args": [
"${input:replayArg}"
],
"console": "integratedTerminal",
"justMyCode": false,
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"subProcess": true,
"stopOnEntry": false
}
],
"compounds": [
{
"name": "Replay drive + Safety LLDB",
"configurations": [
"Replay drive",
"Attach LLDB to Replay drive"
]
}
]
}

1203
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,38 @@
FROM ghcr.io/commaai/openpilot-base:latest
FROM ubuntu:24.04
ENV PYTHONUNBUFFERED=1
ENV OPENPILOT_PATH=/home/batman/openpilot
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo tzdata locales && \
rm -rf /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
ARG USER=batman
ARG USER_UID=1001
RUN useradd -m -s /bin/bash -u $USER_UID $USER
RUN usermod -aG sudo $USER
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER
ENV OPENPILOT_PATH=/home/$USER/openpilot
RUN mkdir -p ${OPENPILOT_PATH}
WORKDIR ${OPENPILOT_PATH}
COPY . ${OPENPILOT_PATH}/
COPY --chown=$USER . ${OPENPILOT_PATH}/
RUN scons --cache-readonly -j$(nproc)
ENV UV_BIN="/home/$USER/.local/bin/"
ENV VIRTUAL_ENV=${OPENPILOT_PATH}/.venv
ENV PATH="$UV_BIN:$VIRTUAL_ENV/bin:$PATH"
RUN tools/setup_dependencies.sh && \
sudo rm -rf /var/lib/apt/lists/*
USER root
RUN git config --global --add safe.directory '*'

View File

@@ -1,82 +0,0 @@
FROM ubuntu:24.04
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo tzdata locales ssh pulseaudio xvfb x11-xserver-utils gnome-screenshot python3-tk python3-dev && \
rm -rf /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
COPY tools/install_ubuntu_dependencies.sh /tmp/tools/
RUN /tmp/tools/install_ubuntu_dependencies.sh && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
cd /usr/lib/gcc/arm-none-eabi/* && \
rm -rf arm/ thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp
# Add OpenCL
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
alien \
unzip \
tar \
curl \
xz-utils \
dbus \
gcc-arm-none-eabi \
tmux \
vim \
libx11-6 \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/opencl-driver-intel && \
cd /tmp/opencl-driver-intel && \
wget https://github.com/intel/llvm/releases/download/2024-WW14/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-lin.tgz && \
mkdir -p /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
cd /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
tar -zxvf /tmp/opencl-driver-intel/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
mkdir -p /etc/OpenCL/vendors && \
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd && \
cd /opt/intel && \
tar -zxvf /tmp/opencl-driver-intel/oneapi-tbb-2021.12.0-lin.tgz && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so.12 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so.2 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
mkdir -p /etc/ld.so.conf.d && \
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf && \
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf && \
cd / && \
rm -rf /tmp/opencl-driver-intel
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
ENV QTWEBENGINE_DISABLE_SANDBOX=1
RUN dbus-uuidgen > /etc/machine-id
RUN apt-get update && apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
ARG USER=batman
ARG USER_UID=1001
RUN useradd -m -s /bin/bash -u $USER_UID $USER
RUN usermod -aG sudo $USER
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER
COPY --chown=$USER pyproject.toml uv.lock /home/$USER
COPY --chown=$USER tools/install_python_dependencies.sh /home/$USER/tools/
ENV VIRTUAL_ENV=/home/$USER/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN cd /home/$USER && \
tools/install_python_dependencies.sh && \
rm -rf tools/ pyproject.toml uv.lock .cache
USER root
RUN sudo git config --global --add safe.directory /tmp/openpilot

View File

@@ -1,66 +0,0 @@
FROM sunnypilot-base
ARG RUNNER_DEBUG=0
ENV PYTHONUNBUFFERED=1
ENV OPENPILOT_SRC_PATH=/tmp/openpilot
ENV BUILD_DIR=/data/openpilot
ENV OUTPUT_DIR=/output
RUN sudo apt update && sudo apt install -y rsync
RUN mkdir -p ${OPENPILOT_SRC_PATH}
RUN mkdir -p ${BUILD_DIR}
COPY . ${OPENPILOT_SRC_PATH}
ENV PYTHONPATH=${BUILD_DIR}
WORKDIR ${OPENPILOT_SRC_PATH}
RUN ./tools/ubuntu_setup.sh
RUN ./release/release_files.py | sort | uniq | rsync -rRl${RUNNER_DEBUG:+v} --files-from=- . $BUILD_DIR/
WORKDIR ${BUILD_DIR}
RUN sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py
RUN scons --cache-readonly -j$(nproc) --minimal
RUN touch ${BUILD_DIR}/prebuilt
RUN sudo rm -rf ${OUTPUT_DIR}
RUN mkdir -p ${OUTPUT_DIR}
ENTRYPOINT [\
"rsync", \
"-am", \
"--include=**/panda/board/", \
"--include=**/panda/board/obj", \
"--include=**/panda/board/obj/panda.bin.signed", \
"--include=**/panda/board/obj/panda_h7.bin.signed", \
"--include=**/panda/board/obj/bootstub.panda.bin", \
"--include=**/panda/board/obj/bootstub.panda_h7.bin", \
"--exclude=.sconsign.dblite", \
"--exclude=*.a", \
"--exclude=*.o", \
"--exclude=*.os", \
"--exclude=*.pyc", \
"--exclude=moc_*", \
"--exclude=*.cc", \
"--exclude=Jenkinsfile", \
"--exclude=supercombo.onnx", \
"--exclude=**/panda/board/*", \
"--exclude=**/panda/board/obj/**", \
"--exclude=**/panda/certs/", \
"--exclude=**/panda/crypto/", \
"--exclude=**/release/", \
"--exclude=**/.github/", \
"--exclude=**/selfdrive/ui/replay/", \
"--exclude=**/__pycache__/", \
"--exclude=**/selfdrive/ui/*.h", \
"--exclude=**/selfdrive/ui/**/*.h", \
"--exclude=**/selfdrive/ui/qt/offroad/sunnypilot/", \
#"--exclude=${SCONS_CACHE_DIR:-}", \
"--exclude=**/.git/", \
"--exclude=**/SConstruct", \
"--exclude=**/SConscript", \
"--exclude=**/.venv/", \
"--delete-excluded", \
"--chown=1000:1000", \
"/data/openpilot/", \
"/output/" \
]

55
Jenkinsfile vendored
View File

@@ -22,7 +22,7 @@ shopt -s huponexit # kill all child processes when the shell exits
export CI=1
export PYTHONWARNINGS=error
export LOGPRINT=debug
#export LOGPRINT=debug # this has gotten too spammy...
export TEST_DIR=${env.TEST_DIR}
export SOURCE_DIR=${env.SOURCE_DIR}
export GIT_BRANCH=${env.GIT_BRANCH}
@@ -167,7 +167,7 @@ node {
env.GIT_COMMIT = checkout(scm).GIT_COMMIT
def excludeBranches = ['__nightly', 'devel', 'devel-staging', 'release3', 'release3-staging',
'testing-closet*', 'hotfix-*']
'release-tici', 'release-tizi', 'release-tizi-staging', 'testing-closet*', 'hotfix-*']
def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*')
if (env.BRANCH_NAME != 'master' && !env.BRANCH_NAME.contains('__jenkins_loop_')) {
@@ -178,20 +178,20 @@ node {
try {
if (env.BRANCH_NAME == 'devel-staging') {
deviceStage("build release3-staging", "tici-needs-can", [], [
step("build release3-staging", "RELEASE_BRANCH=release3-staging $SOURCE_DIR/release/build_release.sh"),
deviceStage("build release-tizi-staging", "tizi-needs-can", [], [
step("build release-tizi-staging", "RELEASE_BRANCH=release-tizi-staging $SOURCE_DIR/release/build_release.sh"),
])
}
if (env.BRANCH_NAME == '__nightly') {
parallel (
'nightly': {
deviceStage("build nightly", "tici-needs-can", [], [
deviceStage("build nightly", "tizi-needs-can", [], [
step("build nightly", "RELEASE_BRANCH=nightly $SOURCE_DIR/release/build_release.sh"),
])
},
'nightly-dev': {
deviceStage("build nightly-dev", "tici-needs-can", [], [
deviceStage("build nightly-dev", "tizi-needs-can", [], [
step("build nightly-dev", "PANDA_DEBUG_BUILD=1 RELEASE_BRANCH=nightly-dev $SOURCE_DIR/release/build_release.sh"),
])
},
@@ -200,63 +200,43 @@ node {
if (!env.BRANCH_NAME.matches(excludeRegex)) {
parallel (
// tici tests
'onroad tests': {
deviceStage("onroad", "tici-needs-can", ["UNSAFE=1"], [
deviceStage("onroad", "tizi-needs-can", ["UNSAFE=1"], [
step("build openpilot", "cd system/manager && ./build.py"),
step("check dirty", "release/check-dirty.sh"),
step("onroad tests", "pytest selfdrive/test/test_onroad.py -s", [timeout: 60]),
])
},
'HW + Unit Tests': {
deviceStage("tici-hardware", "tici-common", ["UNSAFE=1"], [
deviceStage("tizi-hardware", "tizi-common", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
step("test power draw", "pytest -s system/hardware/tici/tests/test_power_draw.py"),
step("test encoder", "LD_LIBRARY_PATH=/usr/local/lib pytest system/loggerd/tests/test_encoder.py", [diffPaths: ["system/loggerd/"]]),
step("test pigeond", "pytest system/ubloxd/tests/test_pigeond.py", [diffPaths: ["system/ubloxd/"]]),
step("test manager", "pytest system/manager/test/test_manager.py"),
])
},
'loopback': {
deviceStage("loopback", "tici-loopback", ["UNSAFE=1"], [
step("build openpilot", "cd system/manager && ./build.py"),
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
])
},
'camerad AR0231': {
deviceStage("AR0231", "tici-ar0231", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 60]),
step("test exposure", "pytest system/camerad/test/test_exposure.py"),
])
},
'camerad OX03C10': {
deviceStage("OX03C10", "tici-ox03c10", ["UNSAFE=1"], [
deviceStage("OX03C10", "tizi-ox03c10", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 60]),
step("test exposure", "pytest system/camerad/test/test_exposure.py"),
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
])
},
'camerad OS04C10': {
deviceStage("OS04C10", "tici-os04c10", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 60]),
step("test exposure", "pytest system/camerad/test/test_exposure.py"),
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
step("test camerad", "pytest system/camerad/test/test_camerad.py", [timeout: 90]),
])
},
'sensord': {
deviceStage("LSM + MMC", "tici-lsmc", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test sensord", "pytest system/sensord/tests/test_sensord.py"),
])
deviceStage("BMX + LSM", "tici-bmx-lsm", ["UNSAFE=1"], [
deviceStage("LSM + MMC", "tizi-lsmc", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py"),
step("test sensord", "pytest system/sensord/tests/test_sensord.py"),
])
},
'replay': {
deviceStage("model-replay", "tici-replay", ["UNSAFE=1"], [
deviceStage("model-replay", "tizi-replay", ["UNSAFE=1"], [
step("build", "cd system/manager && ./build.py", [diffPaths: ["selfdrive/modeld/", "tinygrad_repo", "selfdrive/test/process_replay/model_replay.py"]]),
step("model replay", "selfdrive/test/process_replay/model_replay.py", [diffPaths: ["selfdrive/modeld/", "tinygrad_repo", "selfdrive/test/process_replay/model_replay.py"]]),
])
@@ -264,12 +244,9 @@ node {
'tizi': {
deviceStage("tizi", "tizi", ["UNSAFE=1"], [
step("build openpilot", "cd system/manager && ./build.py"),
step("test pandad loopback", "SINGLE_PANDA=1 pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
step("test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"),
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
step("test amp", "pytest system/hardware/tici/tests/test_amplifier.py"),
// TODO: enable once new AGNOS is available
// step("test esim", "pytest system/hardware/tici/tests/test_esim.py"),
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
])
},

View File

@@ -3,68 +3,23 @@
## 🌞 What is sunnypilot?
[sunnypilot](https://github.com/sunnyhaibin/sunnypilot) is a fork of comma.ai's openpilot, an open source driver assistance system. sunnypilot offers the user a unique driving experience for over 300+ supported car makes and models with modified behaviors of driving assist engagements. sunnypilot complies with comma.ai's safety rules as accurately as possible.
## 💭 Join our Discord
Join the official sunnypilot Discord server to stay up to date with all the latest features and be a part of shaping the future of sunnypilot!
* https://discord.gg/sunnypilot
![](https://dcbadge.vercel.app/api/server/wRW3meAgtx?style=flat) ![Discord Shield](https://discordapp.com/api/guilds/880416502577266699/widget.png?style=shield)
## 💭 Join our Community Forum
Join the official sunnypilot community forum to stay up to date with all the latest features and be a part of shaping the future of sunnypilot!
* https://community.sunnypilot.ai/
## Documentation
https://docs.sunnypilot.ai/ is your one stop shop for everything from features to installation to FAQ about the sunnypilot
## 🚘 Running on a dedicated device in a car
* A supported device to run this software
* a [comma three](https://comma.ai/shop/products/three) or a [C3X](https://comma.ai/shop/comma-3x)
* This software
* One of [the 300+ supported cars](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, Ford and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run sunnypilot.
* A [car harness](https://comma.ai/shop/products/car-harness) to connect to your car
Detailed instructions for [how to mount the device in a car](https://comma.ai/setup).
First, check out this list of items you'll need to [get started](https://community.sunnypilot.ai/t/getting-started-using-sunnypilot-in-your-supported-car/251).
## Installation
Please refer to [Recommended Branches](#-recommended-branches) to find your preferred/supported branch. This guide will assume you want to install the latest `release-c3` branch.
* sunnypilot not installed or you installed a version before 0.8.17?
1. [Factory reset/uninstall](https://github.com/commaai/openpilot/wiki/FAQ#how-can-i-reset-the-device) the previous software if you have another software/fork installed.
2. After factory reset/uninstall and upon reboot, select `Custom Software` when given the option.
3. Input the installation URL per [Recommended Branches](#-recommended-branches). Example: ```release-c3.sunnypilot.ai```.
4. Complete the rest of the installation following the onscreen instructions.
* sunnypilot already installed and you installed a version after 0.8.17?
1. On the comma three, go to `Settings` ▶️ `Software`.
2. At the `Download` option, press `CHECK`. This will fetch the list of latest branches from sunnypilot.
3. At the `Target Branch` option, press `SELECT` to open the Target Branch selector.
4. Scroll to select the desired branch per Recommended Branches (see below). Example: `release-c3`
| Branch | Installation URL |
|:------------:|:--------------------------------:|
| `release-c3` | https://release-c3.sunnypilot.ai |
| `staging-c3` | https://staging-c3.sunnypilot.ai |
| `dev-c3` | https://dev-c3.sunnypilot.ai |
### If you want to use our newest branches (our rewrite)
> [!TIP]
>You can see the rewrite state on our [rewrite project board](https://github.com/orgs/sunnypilot/projects/2), and to install the new branches, you can use the following links
> [!IMPORTANT]
> It is recommended to [re-flash AGNOS](https://flash.comma.ai/) if you intend to downgrade from the new branches.
> You can still restore the latest sunnylink backup made on the old branches.
| Branch | Installation URL |
|:----------------:|:---------------------------------------------:|
| `staging-c3-new` | `https://staging-c3-new.sunnypilot.ai` |
| `dev-c3-new` | `https://dev-c3-new.sunnypilot.ai` |
| `custom-branch` | `https://install.sunnypilot.ai/{branch_name}` |
| `release-c3-new` | **Not yet available**. |
> [!TIP]
> Do you require further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
Next, refer to the sunnypilot community forum for [installation instructions](https://community.sunnypilot.ai/t/read-before-installing-sunnypilot/254), as well as a complete list of [Recommended Branch Installations](https://community.sunnypilot.ai/t/recommended-branch-installations/235).
## 🎆 Pull Requests
We welcome both pull requests and issues on GitHub. Bug fixes are encouraged.
Pull requests should be against the most current `master-new` branch.
Pull requests should be against the most current `master` branch.
## 📊 User Data
@@ -73,7 +28,7 @@ By default, sunnypilot uploads the driving data to comma servers. You can also a
sunnypilot is open source software. The user is free to disable data collection if they wish to do so.
sunnypilot logs the road-facing camera, CAN, GPS, IMU, magnetometer, thermal sensors, crashes, and operating system logs.
The driver-facing camera is only logged if you explicitly opt-in in settings. The microphone is not recorded.
The driver-facing camera and microphone are only logged if you explicitly opt-in in settings.
By using this software, you understand that use of this software or its related services will generate certain types of user data, which may be logged and stored at the sole discretion of comma. By accepting this agreement, you grant an irrevocable, perpetual, worldwide right to comma for the use of this data.

View File

@@ -1,5 +1,51 @@
Version 0.9.10 (2025-06-30)
Version 0.10.4 (2026-02-17)
========================
* Kia K7 2017 support thanks to royjr!
* Lexus LS 2018 support thanks to Hacheoy!
* Reduce comma four standby power usage by 77% to 52 mW
Version 0.10.3 (2025-12-17)
========================
* New driving model #36249
* New temporal policy architecture
* New on-policy training physics noise model
* New driver monitoring model #36409
* Trained on a new dataset, including comma four data
* Improved inter-process communication memory efficiency
Version 0.10.2 (2025-11-19)
========================
* comma four support
Version 0.10.1 (2025-09-08)
========================
* New driving model #36276
* World Model: removed global localization inputs
* World Model: 2x the number of parameters
* World Model: trained on 4x the number of segments
* VAE Compression Model: new architecture and training objective
* Driving Vision Model: trained on 4x the number of segments
* New Driver Monitoring model #36198
* Acura TLX 2021 support thanks to MVL!
* Honda City 2023 support thanks to vanillagorillaa and drFritz!
* Honda N-Box 2018 support thanks to miettal!
* Honda Odyssey 2021-25 support thanks to csouers and MVL!
* Honda Passport 2026 support thanks to vanillagorillaa and MVL!
Version 0.10.0 (2025-08-05)
========================
* New driving model
* New training architecture
* Described in our CVPR paper: "Learning to Drive from a World Model"
* Longitudinal MPC replaced by E2E planning from World Model in Experimental Mode
* Action from lateral MPC as training objective replaced by E2E planning from World Model
* Low-speed lead car ground-truth fixes
* Enable live-learned steering actuation delay
* Opt-in audio recording for dashcam video
* Acura MDX 2025 support thanks to vanillagorillaa and MVL!
* Honda Accord 2023-25 support thanks to vanillagorillaa and MVL!
* Honda CR-V 2023-25 support thanks to vanillagorillaa and MVL!
* Honda Pilot 2023-25 support thanks to vanillagorillaa and MVL!
Version 0.9.9 (2025-05-23)
========================

View File

@@ -3,225 +3,105 @@ import subprocess
import sys
import sysconfig
import platform
import shlex
import numpy as np
import SCons.Errors
SCons.Warnings.warningAsException(True)
# pending upstream fix - https://github.com/SCons/scons/issues/4461
#SetOption('warn', 'all')
TICI = os.path.isfile('/TICI')
AGNOS = TICI
Decider('MD5-timestamp')
SetOption('num_jobs', int(os.cpu_count()/2))
AddOption('--kaitai',
action='store_true',
help='Regenerate kaitai struct parsers')
AddOption('--asan',
action='store_true',
help='turn on ASAN')
AddOption('--ubsan',
action='store_true',
help='turn on UBSan')
AddOption('--coverage',
action='store_true',
help='build with test coverage options')
AddOption('--clazy',
action='store_true',
help='build with clazy')
AddOption('--compile_db',
action='store_true',
help='build clang compilation database')
AddOption('--ccflags',
action='store',
type='string',
default='',
help='pass arbitrary flags over the command line')
AddOption('--external-sconscript',
action='store',
metavar='FILE',
dest='external_sconscript',
help='add an external SConscript to the build')
AddOption('--mutation',
action='store_true',
help='generate mutation-ready code')
SetOption('num_jobs', max(1, int(os.cpu_count()/2)))
AddOption('--asan', action='store_true', help='turn on ASAN')
AddOption('--ubsan', action='store_true', help='turn on UBSan')
AddOption('--mutation', action='store_true', help='generate mutation-ready code')
AddOption('--ccflags', action='store', type='string', default='', help='pass arbitrary flags over the command line')
AddOption('--verbose', action='store_true', default=False, help='show full build commands')
AddOption('--minimal',
action='store_false',
dest='extras',
default=os.path.exists(File('#.lfsconfig').abspath), # minimal by default on release branch (where there's no LFS)
default=os.path.exists(File('#.gitattributes').abspath), # minimal by default on release branch (where there's no LFS)
help='the minimum build to run openpilot. no tests, tools, etc.')
AddOption('--stock-ui',
action='store_true',
dest='stock_ui',
default=False,
help='Build stock openpilot UI instead of sunnypilot UI')
## Architecture name breakdown (arch)
## - larch64: linux tici aarch64
## - aarch64: linux pc aarch64
## - x86_64: linux pc x64
## - Darwin: mac x64 or arm64
real_arch = arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
# Detect platform
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin":
arch = "Darwin"
brew_prefix = subprocess.check_output(['brew', '--prefix'], encoding='utf8').strip()
elif arch == "aarch64" and AGNOS:
elif arch == "aarch64" and os.path.isfile('/TICI'):
arch = "larch64"
assert arch in ["larch64", "aarch64", "x86_64", "Darwin"]
assert arch in [
"larch64", # linux tici arm64
"aarch64", # linux pc arm64
"x86_64", # linux pc x64
"Darwin", # macOS arm64 (x86 not supported)
]
lenv = {
"PATH": os.environ['PATH'],
"LD_LIBRARY_PATH": [Dir(f"#third_party/acados/{arch}/lib").abspath],
"PYTHONPATH": Dir("#").abspath + ':' + Dir(f"#third_party/acados").abspath,
"ACADOS_SOURCE_DIR": Dir("#third_party/acados").abspath,
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#third_party/acados/acados_template").abspath,
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
}
rpath = lenv["LD_LIBRARY_PATH"].copy()
if arch == "larch64":
cpppath = [
"#third_party/opencl/include",
]
libpath = [
"/usr/local/lib",
"/system/vendor/lib64",
f"#third_party/acados/{arch}/lib",
]
libpath += [
"#third_party/snpe/larch64",
"#third_party/libyuv/larch64/lib",
"/usr/lib/aarch64-linux-gnu"
]
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
rpath += ["/usr/local/lib"]
if arch != "larch64":
import bzip2
import capnproto
import eigen
import ffmpeg as ffmpeg_pkg
import libjpeg
import libyuv
import ncurses
import openssl3
import python3_dev
import zeromq
import zstd
pkgs = [bzip2, capnproto, eigen, ffmpeg_pkg, libjpeg, libyuv, ncurses, openssl3, zeromq, zstd]
py_include = python3_dev.INCLUDE_DIR
else:
cflags = []
cxxflags = []
cpppath = []
rpath += []
# MacOS
if arch == "Darwin":
libpath = [
f"#third_party/libyuv/{arch}/lib",
f"#third_party/acados/{arch}/lib",
f"{brew_prefix}/lib",
f"{brew_prefix}/opt/openssl@3.0/lib",
"/System/Library/Frameworks/OpenGL.framework/Libraries",
]
cflags += ["-DGL_SILENCE_DEPRECATION"]
cxxflags += ["-DGL_SILENCE_DEPRECATION"]
cpppath += [
f"{brew_prefix}/include",
f"{brew_prefix}/opt/openssl@3.0/include",
]
lenv["DYLD_LIBRARY_PATH"] = lenv["LD_LIBRARY_PATH"]
# Linux
else:
libpath = [
f"#third_party/acados/{arch}/lib",
f"#third_party/libyuv/{arch}/lib",
"/usr/lib",
"/usr/local/lib",
]
if arch == "x86_64":
libpath += [
f"#third_party/snpe/{arch}"
]
rpath += [
Dir(f"#third_party/snpe/{arch}").abspath,
]
if GetOption('asan'):
ccflags = ["-fsanitize=address", "-fno-omit-frame-pointer"]
ldflags = ["-fsanitize=address"]
elif GetOption('ubsan'):
ccflags = ["-fsanitize=undefined"]
ldflags = ["-fsanitize=undefined"]
else:
ccflags = []
ldflags = []
# no --as-needed on mac linker
if arch != "Darwin":
ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"]
if not GetOption('stock_ui'):
cflags += ["-DSUNNYPILOT"]
cxxflags += ["-DSUNNYPILOT"]
ccflags_option = GetOption('ccflags')
if ccflags_option:
ccflags += ccflags_option.split(' ')
# TODO: remove when AGNOS has our new vendor pkgs
pkgs = []
py_include = sysconfig.get_paths()['include']
env = Environment(
ENV=lenv,
ENV={
"PATH": os.environ['PATH'],
"PYTHONPATH": Dir("#").abspath + ':' + Dir(f"#third_party/acados").abspath,
"ACADOS_SOURCE_DIR": Dir("#third_party/acados").abspath,
"ACADOS_PYTHON_INTERFACE_PATH": Dir("#third_party/acados/acados_template").abspath,
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
},
CCFLAGS=[
"-g",
"-fPIC",
"-O2",
"-Wunused",
"-Werror",
"-Wshadow",
"-Wshadow" if arch in ("Darwin", "larch64") else "-Wshadow=local",
"-Wno-unknown-warning-option",
"-Wno-inconsistent-missing-override",
"-Wno-c99-designator",
"-Wno-reorder-init-list",
"-Wno-vla-cxx-extension",
] + cflags + ccflags,
CPPPATH=cpppath + [
],
CFLAGS=["-std=gnu11"],
CXXFLAGS=["-std=c++1z"],
CPPPATH=[
"#",
"#msgq",
"#third_party",
"#third_party/json11",
"#third_party/linux/include",
"#third_party/acados/include",
"#third_party/acados/include/blasfeo/include",
"#third_party/acados/include/hpipm/include",
"#third_party/catch2/include",
"#third_party/libyuv/include",
"#third_party/json11",
"#third_party/linux/include",
"#third_party/snpe/include",
"#third_party",
"#msgq",
[x.INCLUDE_DIR for x in pkgs],
],
CC='clang',
CXX='clang++',
LINKFLAGS=ldflags,
RPATH=rpath,
CFLAGS=["-std=gnu11"] + cflags,
CXXFLAGS=["-std=c++1z"] + cxxflags,
LIBPATH=libpath + [
LIBPATH=[
"#common",
"#msgq_repo",
"#third_party",
"#selfdrive/pandad",
"#common",
"#rednose/helpers",
f"#third_party/acados/{arch}/lib",
[x.LIB_DIR for x in pkgs],
],
RPATH=[],
CYTHONCFILESUFFIX=".cpp",
COMPILATIONDB_USE_ABSPATH=True,
REDNOSE_ROOT="#",
@@ -229,117 +109,102 @@ env = Environment(
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
)
if arch == "Darwin":
# RPATH is not supported on macOS, instead use the linker flags
darwin_rpath_link_flags = [f"-Wl,-rpath,{path}" for path in env["RPATH"]]
env["LINKFLAGS"] += darwin_rpath_link_flags
# Arch-specific flags and paths
if arch == "larch64":
env["CC"] = "clang"
env["CXX"] = "clang++"
env.Append(LIBPATH=[
"/usr/local/lib",
"/system/vendor/lib64",
"/usr/lib/aarch64-linux-gnu",
])
arch_flags = ["-D__TICI__", "-mcpu=cortex-a57", "-DQCOM2"]
env.Append(CCFLAGS=arch_flags)
env.Append(CXXFLAGS=arch_flags)
elif arch == "Darwin":
env.Append(LIBPATH=[
"/System/Library/Frameworks/OpenGL.framework/Libraries",
])
env.Append(CCFLAGS=["-DGL_SILENCE_DEPRECATION"])
env.Append(CXXFLAGS=["-DGL_SILENCE_DEPRECATION"])
else:
env.Append(LIBPATH=[
"/usr/lib",
"/usr/local/lib",
])
if GetOption('compile_db'):
env.CompilationDatabase('compile_commands.json')
# Sanitizers and extra CCFLAGS from CLI
if GetOption('asan'):
env.Append(CCFLAGS=["-fsanitize=address", "-fno-omit-frame-pointer"])
env.Append(LINKFLAGS=["-fsanitize=address"])
elif GetOption('ubsan'):
env.Append(CCFLAGS=["-fsanitize=undefined"])
env.Append(LINKFLAGS=["-fsanitize=undefined"])
# Setup cache dir
default_cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
cache_dir = ARGUMENTS.get('cache_dir', default_cache_dir)
CacheDir(cache_dir)
Clean(["."], cache_dir)
_extra_cc = shlex.split(GetOption('ccflags') or '')
if _extra_cc:
env.Append(CCFLAGS=_extra_cc)
# no --as-needed on mac linker
if arch != "Darwin":
env.Append(LINKFLAGS=["-Wl,--as-needed", "-Wl,--no-undefined"])
# Shorter build output: show brief descriptions instead of full commands.
# Full command lines are still printed on failure by scons.
if not GetOption('verbose'):
for action, short in (
("CC", "CC"),
("CXX", "CXX"),
("LINK", "LINK"),
("SHCC", "CC"),
("SHCXX", "CXX"),
("SHLINK", "LINK"),
("AR", "AR"),
("RANLIB", "RANLIB"),
("AS", "AS"),
):
env[f"{action}COMSTR"] = f" [{short}] $TARGET"
# progress output
node_interval = 5
node_count = 0
def progress_function(node):
global node_count
node_count += node_interval
sys.stderr.write("progress: %d\n" % node_count)
if os.environ.get('SCONS_PROGRESS'):
Progress(progress_function, interval=node_interval)
# Cython build environment
py_include = sysconfig.get_paths()['include']
# ********** Cython build environment **********
envCython = env.Clone()
envCython["CPPPATH"] += [py_include, np.get_include()]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
envCython["CCFLAGS"].remove("-Werror")
envCython["LIBS"] = []
if arch == "Darwin":
envCython["LINKFLAGS"] = ["-bundle", "-undefined", "dynamic_lookup"] + darwin_rpath_link_flags
envCython["LINKFLAGS"] = env["LINKFLAGS"] + ["-bundle", "-undefined", "dynamic_lookup"]
else:
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
np_version = SCons.Script.Value(np.__version__)
Export('envCython', 'np_version')
# Qt build environment
qt_env = env.Clone()
qt_modules = ["Widgets", "Gui", "Core", "Network", "Concurrent", "DBus", "Xml"]
Export('env', 'arch')
qt_libs = []
if arch == "Darwin":
qt_env['QTDIR'] = f"{brew_prefix}/opt/qt@5"
qt_dirs = [
os.path.join(qt_env['QTDIR'], "include"),
]
qt_dirs += [f"{qt_env['QTDIR']}/include/Qt{m}" for m in qt_modules]
qt_env["LINKFLAGS"] += ["-F" + os.path.join(qt_env['QTDIR'], "lib")]
qt_env["FRAMEWORKS"] += [f"Qt{m}" for m in qt_modules] + ["OpenGL"]
qt_env.AppendENVPath('PATH', os.path.join(qt_env['QTDIR'], "bin"))
else:
qt_install_prefix = subprocess.check_output(['qmake', '-query', 'QT_INSTALL_PREFIX'], encoding='utf8').strip()
qt_install_headers = subprocess.check_output(['qmake', '-query', 'QT_INSTALL_HEADERS'], encoding='utf8').strip()
# Setup cache dir
default_cache_dir = '/data/scons_cache' if arch == "larch64" else '/tmp/scons_cache'
cache_dir = ARGUMENTS.get('cache_dir', default_cache_dir)
CacheDir(cache_dir)
Clean(["."], cache_dir)
qt_env['QTDIR'] = qt_install_prefix
qt_dirs = [
f"{qt_install_headers}",
]
qt_gui_path = os.path.join(qt_install_headers, "QtGui")
qt_gui_dirs = [d for d in os.listdir(qt_gui_path) if os.path.isdir(os.path.join(qt_gui_path, d))]
qt_dirs += [f"{qt_install_headers}/QtGui/{qt_gui_dirs[0]}/QtGui", ] if qt_gui_dirs else []
qt_dirs += [f"{qt_install_headers}/Qt{m}" for m in qt_modules]
qt_libs = [f"Qt5{m}" for m in qt_modules]
if arch == "larch64":
qt_libs += ["GLESv2", "wayland-client"]
qt_env.PrependENVPath('PATH', Dir("#third_party/qt5/larch64/bin/").abspath)
elif arch != "Darwin":
qt_libs += ["GL"]
qt_env['QT3DIR'] = qt_env['QTDIR']
qt_env.Tool('qt3')
qt_env['CPPPATH'] += qt_dirs + ["#third_party/qrcode"]
qt_flags = [
"-D_REENTRANT",
"-DQT_NO_DEBUG",
"-DQT_WIDGETS_LIB",
"-DQT_GUI_LIB",
"-DQT_CORE_LIB",
"-DQT_MESSAGELOGCONTEXT",
]
qt_env['CXXFLAGS'] += qt_flags
qt_env['LIBPATH'] += ['#selfdrive/ui', ]
qt_env['LIBS'] = qt_libs
if GetOption("clazy"):
checks = [
"level0",
"level1",
"no-range-loop",
"no-non-pod-global-static",
]
qt_env['CXX'] = 'clazy'
qt_env['ENV']['CLAZY_IGNORE_DIRS'] = qt_dirs[0]
qt_env['ENV']['CLAZY_CHECKS'] = ','.join(checks)
Export('env', 'qt_env', 'arch', 'real_arch')
# ********** start building stuff **********
# Build common module
SConscript(['common/SConscript'])
Import('_common', '_gpucommon')
Import('_common')
common = [_common, 'json11', 'zmq']
gpucommon = [_gpucommon]
Export('common', 'gpucommon')
Export('common')
# Build messaging (cereal + msgq + socketmaster + their dependencies)
# Enable swaglog include in submodules
@@ -363,14 +228,8 @@ SConscript(['rednose/SConscript'])
# Build system services
SConscript([
'system/ubloxd/SConscript',
'system/loggerd/SConscript',
])
if arch != "Darwin":
SConscript([
'system/logcatd/SConscript',
'system/proclogd/SConscript',
])
if arch == "larch64":
SConscript(['system/camerad/SConscript'])
@@ -382,11 +241,8 @@ SConscript(['selfdrive/SConscript'])
SConscript(['sunnypilot/SConscript'])
if Dir('#tools/cabana/').exists() and GetOption('extras'):
SConscript(['tools/replay/SConscript'])
if arch != "larch64":
SConscript(['tools/cabana/SConscript'])
if Dir('#tools/cabana/').exists() and arch != "larch64":
SConscript(['tools/cabana/SConscript'])
external_sconscript = GetOption('external_sconscript')
if external_sconscript:
SConscript([external_sconscript])
env.CompilationDatabase('compile_commands.json')

View File

@@ -13,7 +13,7 @@ cereal = env.Library('cereal', [f'gen/cpp/{s}.c++' for s in schema_files])
# Build messaging
services_h = env.Command(['services.h'], ['services.py'], 'python3 ' + cereal_dir.path + '/services.py > $TARGET')
env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc'], LIBS=[msgq, common, 'pthread'])
env.Program('messaging/bridge', ['messaging/bridge.cc', 'messaging/msgq_to_zmq.cc', 'messaging/bridge_zmq.cc'], LIBS=[msgq, common, 'pthread'])
socketmaster = env.Library('socketmaster', ['messaging/socketmaster.cc'])

View File

@@ -25,8 +25,92 @@ struct ModularAssistiveDrivingSystem {
}
}
struct IntelligentCruiseButtonManagement {
state @0 :IntelligentCruiseButtonManagementState;
sendButton @1 :SendButtonState;
vTarget @2 :Float32;
enum IntelligentCruiseButtonManagementState {
inactive @0; # No button press or default state
preActive @1; # Pre-active state before transitioning to increasing or decreasing
increasing @2; # Increasing speed
decreasing @3; # Decreasing speed
holding @4; # Holding steady speed
}
enum SendButtonState {
none @0;
increase @1;
decrease @2;
}
}
# Same struct as Log.RadarState.LeadData
struct LeadData {
dRel @0 :Float32;
yRel @1 :Float32;
vRel @2 :Float32;
aRel @3 :Float32;
vLead @4 :Float32;
dPath @6 :Float32;
vLat @7 :Float32;
vLeadK @8 :Float32;
aLeadK @9 :Float32;
fcw @10 :Bool;
status @11 :Bool;
aLeadTau @12 :Float32;
modelProb @13 :Float32;
radar @14 :Bool;
radarTrackId @15 :Int32 = -1;
aLeadDEPRECATED @5 :Float32;
}
struct SelfdriveStateSP @0x81c2f05a394cf4af {
mads @0 :ModularAssistiveDrivingSystem;
intelligentCruiseButtonManagement @1 :IntelligentCruiseButtonManagement;
enum AudibleAlert {
none @0;
engage @1;
disengage @2;
refuse @3;
warningSoft @4;
warningImmediate @5;
prompt @6;
promptRepeat @7;
promptDistracted @8;
# unused, these are reserved for upstream events so we don't collide
reserved9 @9;
reserved10 @10;
reserved11 @11;
reserved12 @12;
reserved13 @13;
reserved14 @14;
reserved15 @15;
reserved16 @16;
reserved17 @17;
reserved18 @18;
reserved19 @19;
reserved20 @20;
reserved21 @21;
reserved22 @22;
reserved23 @23;
reserved24 @24;
reserved25 @25;
reserved26 @26;
reserved27 @27;
reserved28 @28;
reserved29 @29;
reserved30 @30;
promptSingleLow @31;
promptSingleHigh @32;
}
}
struct ModelManagerSP @0xaedffd8f31e7b55d {
@@ -69,6 +153,7 @@ struct ModelManagerSP @0xaedffd8f31e7b55d {
navigation @1;
vision @2;
policy @3;
offPolicy @4;
}
}
@@ -101,6 +186,13 @@ struct ModelManagerSP @0xaedffd8f31e7b55d {
struct LongitudinalPlanSP @0xf35cc4560bbf6ec2 {
dec @0 :DynamicExperimentalControl;
longitudinalPlanSource @1 :LongitudinalPlanSource;
smartCruiseControl @2 :SmartCruiseControl;
speedLimit @3 :SpeedLimit;
vTarget @4 :Float32;
aTarget @5 :Float32;
events @6 :List(OnroadEventSP.Event);
e2eAlerts @7 :E2eAlerts;
struct DynamicExperimentalControl {
state @0 :DynamicExperimentalControlState;
@@ -112,6 +204,97 @@ struct LongitudinalPlanSP @0xf35cc4560bbf6ec2 {
blended @1;
}
}
struct SmartCruiseControl {
vision @0 :Vision;
map @1 :Map;
struct Vision {
state @0 :VisionState;
vTarget @1 :Float32;
aTarget @2 :Float32;
currentLateralAccel @3 :Float32;
maxPredictedLateralAccel @4 :Float32;
enabled @5 :Bool;
active @6 :Bool;
}
struct Map {
state @0 :MapState;
vTarget @1 :Float32;
aTarget @2 :Float32;
enabled @3 :Bool;
active @4 :Bool;
}
enum VisionState {
disabled @0; # System disabled or inactive.
enabled @1; # No predicted substantial turn on vision range.
entering @2; # A substantial turn is predicted ahead, adapting speed to turn comfort levels.
turning @3; # Actively turning. Managing acceleration to provide a roll on turn feeling.
leaving @4; # Road ahead straightens. Start to allow positive acceleration.
overriding @5; # System overriding with manual control.
}
enum MapState {
disabled @0; # System disabled or inactive.
enabled @1; # No predicted substantial turn on map range.
turning @2; # Actively turning. Managing acceleration to provide a roll on turn feeling.
overriding @3; # System overriding with manual control.
}
}
struct SpeedLimit {
resolver @0 :Resolver;
assist @1 :Assist;
struct Resolver {
speedLimit @0 :Float32;
distToSpeedLimit @1 :Float32;
source @2 :Source;
speedLimitOffset @3 :Float32;
speedLimitLast @4 :Float32;
speedLimitFinal @5 :Float32;
speedLimitFinalLast @6 :Float32;
speedLimitValid @7 :Bool;
speedLimitLastValid @8 :Bool;
}
struct Assist {
state @0 :AssistState;
enabled @1 :Bool;
active @2 :Bool;
vTarget @3 :Float32;
aTarget @4 :Float32;
}
enum Source {
none @0;
car @1;
map @2;
}
enum AssistState {
disabled @0;
inactive @1; # No speed limit set or not enabled by parameter.
preActive @2;
pending @3; # Awaiting new speed limit.
adapting @4; # Reducing speed to match new speed limit.
active @5; # Cruising at speed limit.
}
}
enum LongitudinalPlanSource {
cruise @0;
sccVision @1;
sccMap @2;
speedLimitAssist @3;
}
struct E2eAlerts {
greenLightAlert @0 :Bool;
leadDepartAlert @1 :Bool;
}
}
struct OnroadEventSP @0xda96579883444c35 {
@@ -151,12 +334,22 @@ struct OnroadEventSP @0xda96579883444c35 {
experimentalModeSwitched @14;
wrongCarModeAlertOnly @15;
pedalPressedAlertOnly @16;
laneTurnLeft @17;
laneTurnRight @18;
speedLimitPreActive @19;
speedLimitActive @20;
speedLimitChanged @21;
speedLimitPending @22;
e2eChime @23;
}
}
struct CarParamsSP @0x80ae746ee2596b11 {
flags @0 :UInt32; # flags for car specific quirks in sunnypilot
safetyParam @1 : Int16; # flags for sunnypilot's custom safety flags
pcmCruiseSpeed @3 :Bool;
intelligentCruiseButtonManagementAvailable @4 :Bool;
enableGasInterceptor @5 :Bool;
neuralNetworkLateralControl @2 :NeuralNetworkLateralControl;
@@ -174,10 +367,26 @@ struct CarParamsSP @0x80ae746ee2596b11 {
struct CarControlSP @0xa5cd762cd951a455 {
mads @0 :ModularAssistiveDrivingSystem;
params @1 :List(Param);
leadOne @2 :LeadData;
leadTwo @3 :LeadData;
intelligentCruiseButtonManagement @4 :IntelligentCruiseButtonManagement;
struct Param {
key @0 :Text;
value @1 :Text;
type @2 :ParamType;
value @3 :Data;
valueDEPRECATED @1 :Text; # The data type change may cause issues with backwards compatibility.
}
enum ParamType {
string @0;
bool @1;
int @2;
float @3;
time @4;
json @5;
bytes @6;
}
}
@@ -224,6 +433,7 @@ struct BackupManagerSP @0xf98d843bfd7004a3 {
}
struct CarStateSP @0xb86e6369214c01c8 {
speedLimit @0 :Float32;
}
struct LiveMapDataSP @0xf416ec09499d9d19 {
@@ -235,7 +445,14 @@ struct LiveMapDataSP @0xf416ec09499d9d19 {
roadName @5 :Text;
}
struct CustomReserved9 @0xa1680744031fdb2d {
struct ModelDataV2SP @0xa1680744031fdb2d {
laneTurnDirection @0 :TurnDirection;
enum TurnDirection {
none @0;
turnLeft @1;
turnRight @2;
}
}
struct CustomReserved10 @0xcb9fd56c7057593a {

View File

@@ -87,6 +87,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
laneChange @50;
lowMemory @51;
stockAeb @52;
stockLkas @98;
ldw @53;
carUnrecognized @54;
invalidLkasSetting @55;
@@ -127,7 +128,9 @@ struct OnroadEvent @0xc4fa6047f024e718 {
espActive @90;
personalityChanged @91;
aeb @92;
userFlag @95;
userBookmark @95;
excessiveActuation @96;
audioFeedback @97;
soundsUnavailableDEPRECATED @47;
}
@@ -492,12 +495,12 @@ struct DeviceState @0xa4d8b5af2aa492eb {
gpuTempC @27 :List(Float32);
dspTempC @49 :Float32;
memoryTempC @28 :Float32;
nvmeTempC @35 :List(Float32);
modemTempC @36 :List(Float32);
pmicTempC @39 :List(Float32);
intakeTempC @46 :Float32;
exhaustTempC @47 :Float32;
caseTempC @48 :Float32;
gnssTempC @48 :Float32;
bottomSocTempC @50 :Float32;
maxTempC @44 :Float32; # max of other temps, used to control fan
thermalZones @38 :List(ThermalZone);
thermalStatus @14 :ThermalStatus;
@@ -568,6 +571,7 @@ struct DeviceState @0xa4d8b5af2aa492eb {
chargingDisabledDEPRECATED @18 :Bool;
usbOnlineDEPRECATED @12 :Bool;
ambientTempCDEPRECATED @30 :Float32;
nvmeTempCDEPRECATED @35 :List(Float32);
}
struct PandaState @0xa7649e2575e4591e {
@@ -583,13 +587,13 @@ struct PandaState @0xa7649e2575e4591e {
heartbeatLost @22 :Bool;
interruptLoad @25 :Float32;
fanPower @28 :UInt8;
fanStallCount @34 :UInt8;
spiChecksumErrorCount @33 :UInt16;
spiErrorCount @33 :UInt16;
harnessStatus @21 :HarnessStatus;
sbu1Voltage @35 :Float32;
sbu2Voltage @36 :Float32;
soundOutputLevel @37 :UInt16;
# can health
canState0 @29 :PandaCanState;
@@ -712,6 +716,7 @@ struct PandaState @0xa7649e2575e4591e {
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerModeDEPRECATED;
safetyParamDEPRECATED @20 :Int16;
safetyParam2DEPRECATED @26 :UInt32;
fanStallCountDEPRECATED @34 :UInt8;
}
struct PeripheralState {
@@ -916,6 +921,8 @@ struct ControlsState @0x97ff69c53601abf1 {
saturated @7 :Bool;
actualLateralAccel @9 :Float32;
desiredLateralAccel @10 :Float32;
desiredLateralJerk @11 :Float32;
version @12 :Int32;
}
struct LateralLQRState {
@@ -1083,7 +1090,7 @@ struct ModelDataV2 {
confidence @23: ConfidenceClass;
# Model perceived motion
temporalPose @21 :Pose;
temporalPoseDEPRECATED @21 :Pose;
# e2e lateral planner
action @26: Action;
@@ -1473,6 +1480,11 @@ struct ProcLog {
cmdline @15 :List(Text);
exe @16 :Text;
# from /proc/<pid>/smaps_rollup (proportional/private memory)
memPss @17 :UInt64; # Pss — shared pages split by mapper count
memPssAnon @18 :UInt64; # Pss_Anon — private anonymous (heap, stack)
memPssShmem @19 :UInt64; # Pss_Shmem — proportional MSGQ/tmpfs share
}
struct CPUTimes {
@@ -2144,13 +2156,10 @@ struct Joystick {
struct DriverStateV2 {
frameId @0 :UInt32;
modelExecutionTime @1 :Float32;
dspExecutionTimeDEPRECATED @2 :Float32;
gpuExecutionTime @8 :Float32;
rawPredictions @3 :Data;
poorVisionProb @4 :Float32;
wheelOnRightProb @5 :Float32;
leftDriverData @6 :DriverData;
rightDriverData @7 :DriverData;
@@ -2165,10 +2174,14 @@ struct DriverStateV2 {
leftBlinkProb @7 :Float32;
rightBlinkProb @8 :Float32;
sunglassesProb @9 :Float32;
occludedProb @10 :Float32;
readyProb @11 :List(Float32);
notReadyProb @12 :List(Float32);
phoneProb @13 :Float32;
notReadyProbDEPRECATED @12 :List(Float32);
occludedProbDEPRECATED @10 :Float32;
readyProbDEPRECATED @11 :List(Float32);
}
dspExecutionTimeDEPRECATED @2 :Float32;
poorVisionProbDEPRECATED @4 :Float32;
}
struct DriverStateDEPRECATED @0xb83c6cc593ed0a00 {
@@ -2220,7 +2233,10 @@ struct DriverMonitoringState @0xb83cda094a1da284 {
hiStdCount @14 :UInt32;
isActiveMode @16 :Bool;
isRHD @4 :Bool;
uncertainCount @19 :UInt32;
phoneProbOffsetDEPRECATED @20 :Float32;
phoneProbValidCountDEPRECATED @21 :UInt32;
isPreviewDEPRECATED @15 :Bool;
rhdCheckedDEPRECATED @5 :Bool;
eventsDEPRECATED @0 :List(Car.OnroadEventDEPRECATED);
@@ -2467,16 +2483,27 @@ struct DebugAlert {
alertText2 @1 :Text;
}
struct UserFlag {
struct UserBookmark @0xfe346a9de48d9b50 {
}
struct Microphone {
struct SoundPressure @0xdc24138990726023 {
soundPressure @0 :Float32;
# uncalibrated, A-weighted
soundPressureWeighted @3 :Float32;
soundPressureWeightedDb @1 :Float32;
filteredSoundPressureWeightedDb @2 :Float32;
filteredSoundPressureWeightedDbDEPRECATED @2 :Float32;
}
struct AudioData {
data @0 :Data;
sampleRate @1 :UInt32;
}
struct AudioFeedback {
audio @0 :AudioData;
blockNum @1 :UInt16;
}
struct Touch {
@@ -2505,13 +2532,10 @@ struct Event {
controlsState @7 :ControlsState;
selfdriveState @130 :SelfdriveState;
gyroscope @99 :SensorEventData;
gyroscope2 @100 :SensorEventData;
accelerometer @98 :SensorEventData;
accelerometer2 @101 :SensorEventData;
magnetometer @95 :SensorEventData;
lightSensor @96 :SensorEventData;
temperatureSensor @97 :SensorEventData;
temperatureSensor2 @123 :SensorEventData;
pandaStates @81 :List(PandaState);
peripheralState @80 :PeripheralState;
radarState @13 :RadarState;
@@ -2556,7 +2580,8 @@ struct Event {
livestreamDriverEncodeIdx @119 :EncodeIndex;
# microphone data
microphone @103 :Microphone;
soundPressure @103 :SoundPressure;
rawAudioData @147 :AudioData;
# systems stuff
androidLog @20 :AndroidLogEntry;
@@ -2578,9 +2603,13 @@ struct Event {
mapRenderState @105: MapRenderState;
# UI services
userFlag @93 :UserFlag;
uiDebug @102 :UIDebug;
# driving feedback
userBookmark @93 :UserBookmark;
bookmarkButton @148 :UserBookmark;
audioFeedback @149 :AudioFeedback;
# *********** debug ***********
testJoystick @52 :Joystick;
roadEncodeData @86 :EncodeData;
@@ -2613,7 +2642,7 @@ struct Event {
backupManagerSP @113 :Custom.BackupManagerSP;
carStateSP @114 :Custom.CarStateSP;
liveMapDataSP @115 :Custom.LiveMapDataSP;
customReserved9 @116 :Custom.CustomReserved9;
modelDataV2SP @116 :Custom.ModelDataV2SP;
customReserved10 @136 :Custom.CustomReserved10;
customReserved11 @137 :Custom.CustomReserved11;
customReserved12 @138 :Custom.CustomReserved12;
@@ -2666,8 +2695,11 @@ struct Event {
lateralPlanDEPRECATED @64 :LateralPlan;
navModelDEPRECATED @104 :NavModelData;
uiPlanDEPRECATED @106 :UiPlan;
liveLocationKalmanDEPRECATED @72 :LiveLocationKalman;
liveLocationKalman @72 :LiveLocationKalman;
liveTracksDEPRECATED @16 :List(LiveTracksDEPRECATED);
onroadEventsDEPRECATED @68: List(Car.OnroadEventDEPRECATED);
gyroscope2DEPRECATED @100 :SensorEventData;
accelerometer2DEPRECATED @101 :SensorEventData;
temperatureSensor2DEPRECATED @123 :SensorEventData;
}
}

View File

@@ -1,10 +1,8 @@
# must be built with scons
from msgq.ipc_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
from msgq.ipc_pyx import MultiplePublishersError, IpcError
from msgq import fake_event_handle, pub_sock, sub_sock, drain_sock_raw
from msgq import fake_event_handle, drain_sock_raw, MultiplePublishersError, IpcError, \
Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
import msgq
import os
import capnp
import time
@@ -13,11 +11,25 @@ from typing import Optional, List, Union, Dict
from cereal import log
from cereal.services import SERVICE_LIST
from openpilot.common.util import MovingAverage
from openpilot.common.utils import MovingAverage
NO_TRAVERSAL_LIMIT = 2**64-1
def pub_sock(endpoint: str) -> PubSocket:
service = SERVICE_LIST.get(endpoint)
segment_size = service.queue_size if service else 0
return msgq.pub_sock(endpoint, segment_size)
def sub_sock(endpoint: str, poller: Optional[Poller] = None, addr: str = "127.0.0.1",
conflate: bool = False, timeout: Optional[int] = None) -> SubSocket:
service = SERVICE_LIST.get(endpoint)
segment_size = service.queue_size if service else 0
return msgq.sub_sock(endpoint, poller=poller, addr=addr, conflate=conflate,
timeout=timeout, segment_size=segment_size)
def reset_context():
msgq.context = Context()

View File

@@ -25,15 +25,16 @@ void msgq_to_zmq(const std::vector<std::string> &endpoints, const std::string &i
}
void zmq_to_msgq(const std::vector<std::string> &endpoints, const std::string &ip) {
auto poller = std::make_unique<ZMQPoller>();
auto pub_context = std::make_unique<MSGQContext>();
auto sub_context = std::make_unique<ZMQContext>();
std::map<SubSocket *, PubSocket *> sub2pub;
auto poller = std::make_unique<BridgeZmqPoller>();
auto pub_context = std::make_unique<Context>();
auto sub_context = std::make_unique<BridgeZmqContext>();
std::map<BridgeZmqSubSocket *, PubSocket *> sub2pub;
for (auto endpoint : endpoints) {
auto pub_sock = new MSGQPubSocket();
auto sub_sock = new ZMQSubSocket();
pub_sock->connect(pub_context.get(), endpoint);
auto pub_sock = new PubSocket();
auto sub_sock = new BridgeZmqSubSocket();
size_t queue_size = services.at(endpoint).queue_size;
pub_sock->connect(pub_context.get(), endpoint, true, queue_size);
sub_sock->connect(sub_context.get(), endpoint, ip, false);
poller->registerSocket(sub_sock);

View File

@@ -0,0 +1,170 @@
#include "cereal/messaging/bridge_zmq.h"
#include <cassert>
#include <cstring>
#include <unistd.h>
static size_t fnv1a_hash(const std::string &str) {
const size_t fnv_prime = 0x100000001b3;
size_t hash_value = 0xcbf29ce484222325;
for (char c : str) {
hash_value ^= (unsigned char)c;
hash_value *= fnv_prime;
}
return hash_value;
}
// FIXME: This is a hack to get the port number from the socket name, might have collisions.
static int get_port(std::string endpoint) {
size_t hash_value = fnv1a_hash(endpoint);
int start_port = 8023;
int max_port = 65535;
return start_port + (hash_value % (max_port - start_port));
}
BridgeZmqContext::BridgeZmqContext() {
context = zmq_ctx_new();
}
BridgeZmqContext::~BridgeZmqContext() {
if (context != nullptr) {
zmq_ctx_term(context);
}
}
void BridgeZmqMessage::init(size_t sz) {
size = sz;
data = new char[size];
}
void BridgeZmqMessage::init(char *d, size_t sz) {
size = sz;
data = new char[size];
memcpy(data, d, size);
}
void BridgeZmqMessage::close() {
if (size > 0) {
delete[] data;
}
data = nullptr;
size = 0;
}
BridgeZmqMessage::~BridgeZmqMessage() {
close();
}
int BridgeZmqSubSocket::connect(BridgeZmqContext *context, std::string endpoint, std::string address, bool conflate, bool check_endpoint) {
sock = zmq_socket(context->getRawContext(), ZMQ_SUB);
if (sock == nullptr) {
return -1;
}
zmq_setsockopt(sock, ZMQ_SUBSCRIBE, "", 0);
if (conflate) {
int arg = 1;
zmq_setsockopt(sock, ZMQ_CONFLATE, &arg, sizeof(int));
}
int reconnect_ivl = 500;
zmq_setsockopt(sock, ZMQ_RECONNECT_IVL_MAX, &reconnect_ivl, sizeof(reconnect_ivl));
full_endpoint = "tcp://" + address + ":";
if (check_endpoint) {
full_endpoint += std::to_string(get_port(endpoint));
} else {
full_endpoint += endpoint;
}
return zmq_connect(sock, full_endpoint.c_str());
}
void BridgeZmqSubSocket::setTimeout(int timeout) {
zmq_setsockopt(sock, ZMQ_RCVTIMEO, &timeout, sizeof(int));
}
Message *BridgeZmqSubSocket::receive(bool non_blocking) {
zmq_msg_t msg;
assert(zmq_msg_init(&msg) == 0);
int flags = non_blocking ? ZMQ_DONTWAIT : 0;
int rc = zmq_msg_recv(&msg, sock, flags);
Message *ret = nullptr;
if (rc >= 0) {
ret = new BridgeZmqMessage;
ret->init((char *)zmq_msg_data(&msg), zmq_msg_size(&msg));
}
zmq_msg_close(&msg);
return ret;
}
BridgeZmqSubSocket::~BridgeZmqSubSocket() {
if (sock != nullptr) {
zmq_close(sock);
}
}
int BridgeZmqPubSocket::connect(BridgeZmqContext *context, std::string endpoint, bool check_endpoint) {
sock = zmq_socket(context->getRawContext(), ZMQ_PUB);
if (sock == nullptr) {
return -1;
}
full_endpoint = "tcp://*:";
if (check_endpoint) {
full_endpoint += std::to_string(get_port(endpoint));
} else {
full_endpoint += endpoint;
}
// ZMQ pub sockets cannot be shared between processes, so we need to ensure pid stays the same.
pid = getpid();
return zmq_bind(sock, full_endpoint.c_str());
}
int BridgeZmqPubSocket::sendMessage(Message *message) {
assert(pid == getpid());
return zmq_send(sock, message->getData(), message->getSize(), ZMQ_DONTWAIT);
}
int BridgeZmqPubSocket::send(char *data, size_t size) {
assert(pid == getpid());
return zmq_send(sock, data, size, ZMQ_DONTWAIT);
}
BridgeZmqPubSocket::~BridgeZmqPubSocket() {
if (sock != nullptr) {
zmq_close(sock);
}
}
void BridgeZmqPoller::registerSocket(BridgeZmqSubSocket *socket) {
assert(num_polls + 1 < (sizeof(polls) / sizeof(polls[0])));
polls[num_polls].socket = socket->getRawSocket();
polls[num_polls].events = ZMQ_POLLIN;
sockets.push_back(socket);
num_polls++;
}
std::vector<BridgeZmqSubSocket *> BridgeZmqPoller::poll(int timeout) {
std::vector<BridgeZmqSubSocket *> ret;
int rc = zmq_poll(polls, num_polls, timeout);
if (rc < 0) {
return ret;
}
for (size_t i = 0; i < num_polls; i++) {
if (polls[i].revents) {
ret.push_back(sockets[i]);
}
}
return ret;
}

View File

@@ -0,0 +1,72 @@
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include <zmq.h>
#include "msgq/ipc.h"
class BridgeZmqContext {
public:
BridgeZmqContext();
void *getRawContext() { return context; }
~BridgeZmqContext();
private:
void *context = nullptr;
};
class BridgeZmqMessage : public Message {
public:
void init(size_t size);
void init(char *data, size_t size);
void close();
size_t getSize() { return size; }
char *getData() { return data; }
~BridgeZmqMessage();
private:
char *data = nullptr;
size_t size = 0;
};
class BridgeZmqSubSocket {
public:
int connect(BridgeZmqContext *context, std::string endpoint, std::string address, bool conflate = false, bool check_endpoint = true);
void setTimeout(int timeout);
Message *receive(bool non_blocking = false);
void *getRawSocket() { return sock; }
~BridgeZmqSubSocket();
private:
void *sock = nullptr;
std::string full_endpoint;
};
class BridgeZmqPubSocket {
public:
int connect(BridgeZmqContext *context, std::string endpoint, bool check_endpoint = true);
int sendMessage(Message *message);
int send(char *data, size_t size);
void *getRawSocket() { return sock; }
~BridgeZmqPubSocket();
private:
void *sock = nullptr;
std::string full_endpoint;
int pid = -1;
};
class BridgeZmqPoller {
public:
void registerSocket(BridgeZmqSubSocket *socket);
std::vector<BridgeZmqSubSocket *> poll(int timeout);
private:
static constexpr size_t MAX_BRIDGE_ZMQ_POLLERS = 128;
std::vector<BridgeZmqSubSocket *> sockets;
zmq_pollitem_t polls[MAX_BRIDGE_ZMQ_POLLERS] = {};
size_t num_polls = 0;
};

View File

@@ -2,6 +2,7 @@
#include <cassert>
#include "cereal/services.h"
#include "common/util.h"
extern ExitHandler do_exit;
@@ -21,14 +22,14 @@ static std::string recv_zmq_msg(void *sock) {
}
void MsgqToZmq::run(const std::vector<std::string> &endpoints, const std::string &ip) {
zmq_context = std::make_unique<ZMQContext>();
msgq_context = std::make_unique<MSGQContext>();
zmq_context = std::make_unique<BridgeZmqContext>();
msgq_context = std::make_unique<Context>();
// Create ZMQPubSockets for each endpoint
for (const auto &endpoint : endpoints) {
auto &socket_pair = socket_pairs.emplace_back();
socket_pair.endpoint = endpoint;
socket_pair.pub_sock = std::make_unique<ZMQPubSocket>();
socket_pair.pub_sock = std::make_unique<BridgeZmqPubSocket>();
int ret = socket_pair.pub_sock->connect(zmq_context.get(), endpoint);
if (ret != 0) {
printf("Failed to create ZMQ publisher for [%s]: %s\n", endpoint.c_str(), zmq_strerror(zmq_errno()));
@@ -48,7 +49,7 @@ void MsgqToZmq::run(const std::vector<std::string> &endpoints, const std::string
for (auto sub_sock : msgq_poller->poll(100)) {
// Process messages for each socket
ZMQPubSocket *pub_sock = sub2pub.at(sub_sock);
BridgeZmqPubSocket *pub_sock = sub2pub.at(sub_sock);
for (int i = 0; i < MAX_MESSAGES_PER_SOCKET; ++i) {
auto msg = std::unique_ptr<Message>(sub_sock->receive(true));
if (!msg) break;
@@ -71,7 +72,7 @@ void MsgqToZmq::zmqMonitorThread() {
// Set up ZMQ monitor for each pub socket
for (int i = 0; i < socket_pairs.size(); ++i) {
std::string addr = "inproc://op-bridge-monitor-" + std::to_string(i);
zmq_socket_monitor(socket_pairs[i].pub_sock->sock, addr.c_str(), ZMQ_EVENT_ACCEPTED | ZMQ_EVENT_DISCONNECTED);
zmq_socket_monitor(socket_pairs[i].pub_sock->getRawSocket(), addr.c_str(), ZMQ_EVENT_ACCEPTED | ZMQ_EVENT_DISCONNECTED);
void *monitor_socket = zmq_socket(zmq_context->getRawContext(), ZMQ_PAIR);
zmq_connect(monitor_socket, addr.c_str());
@@ -108,7 +109,8 @@ void MsgqToZmq::zmqMonitorThread() {
if (++pair.connected_clients == 1) {
// Create new MSGQ subscriber socket and map to ZMQ publisher
pair.sub_sock = std::make_unique<MSGQSubSocket>();
pair.sub_sock->connect(msgq_context.get(), pair.endpoint, "127.0.0.1");
size_t queue_size = services.at(pair.endpoint).queue_size;
pair.sub_sock->connect(msgq_context.get(), pair.endpoint, "127.0.0.1", false, true, queue_size);
sub2pub[pair.sub_sock.get()] = pair.pub_sock.get();
registerSockets();
}
@@ -128,7 +130,7 @@ void MsgqToZmq::zmqMonitorThread() {
// Clean up monitor sockets
for (int i = 0; i < pollitems.size(); ++i) {
zmq_socket_monitor(socket_pairs[i].pub_sock->sock, nullptr, 0);
zmq_socket_monitor(socket_pairs[i].pub_sock->getRawSocket(), nullptr, 0);
zmq_close(pollitems[i].socket);
}
cv.notify_one();

View File

@@ -7,9 +7,8 @@
#include <string>
#include <vector>
#define private public
#include "msgq/impl_msgq.h"
#include "msgq/impl_zmq.h"
#include "cereal/messaging/bridge_zmq.h"
class MsgqToZmq {
public:
@@ -22,16 +21,16 @@ protected:
struct SocketPair {
std::string endpoint;
std::unique_ptr<ZMQPubSocket> pub_sock;
std::unique_ptr<BridgeZmqPubSocket> pub_sock;
std::unique_ptr<MSGQSubSocket> sub_sock;
int connected_clients = 0;
};
std::unique_ptr<MSGQContext> msgq_context;
std::unique_ptr<ZMQContext> zmq_context;
std::unique_ptr<Context> msgq_context;
std::unique_ptr<BridgeZmqContext> zmq_context;
std::mutex mutex;
std::condition_variable cv;
std::unique_ptr<MSGQPoller> msgq_poller;
std::map<SubSocket *, ZMQPubSocket *> sub2pub;
std::map<SubSocket *, BridgeZmqPubSocket *> sub2pub;
std::vector<SocketPair> socket_pairs;
};

View File

@@ -33,7 +33,7 @@ MessageContext message_context;
struct SubMaster::SubMessage {
std::string name;
SubSocket *socket = nullptr;
int freq = 0;
float freq = 0.0f;
bool updated = false, alive = false, valid = false, ignore_alive;
uint64_t rcv_time = 0, rcv_frame = 0;
void *allocated_msg_reader = nullptr;
@@ -50,7 +50,7 @@ SubMaster::SubMaster(const std::vector<const char *> &service_list, const std::v
assert(services.count(std::string(name)) > 0);
service serv = services.at(std::string(name));
SubSocket *socket = SubSocket::create(message_context.context(), name, address ? address : "127.0.0.1", true);
SubSocket *socket = SubSocket::create(message_context.context(), name, address ? address : "127.0.0.1", true, true, serv.queue_size);
assert(socket != 0);
bool is_polled = inList(poll, name) || poll.empty();
if (is_polled) poller_->registerSocket(socket);
@@ -187,7 +187,8 @@ SubMaster::~SubMaster() {
PubMaster::PubMaster(const std::vector<const char *> &service_list) {
for (auto name : service_list) {
assert(services.count(name) > 0);
PubSocket *socket = PubSocket::create(message_context.context(), name);
service serv = services.at(std::string(name));
PubSocket *socket = PubSocket::create(message_context.context(), name, true, serv.queue_size);
assert(socket);
sockets_[name] = socket;
}

View File

@@ -5,7 +5,7 @@ import numbers
import random
import threading
import time
from parameterized import parameterized
from openpilot.common.parameterized import parameterized
import pytest
from cereal import log, car
@@ -30,7 +30,7 @@ def zmq_sleep(t=1):
# TODO: this should take any capnp struct and returrn a msg with random populated data
def random_carstate():
fields = ["vEgo", "aEgo", "gas", "steeringAngleDeg"]
fields = ["vEgo", "aEgo", "brake", "steeringAngleDeg"]
msg = messaging.new_message("carState")
cs = msg.carState
for f in fields:
@@ -177,8 +177,8 @@ class TestMessaging:
# wait 5 socket timeouts before sending
msg = random_carstate()
delayed_send(sock_timeout*5, pub_sock, msg.to_bytes())
start_time = time.monotonic()
delayed_send(sock_timeout*5, pub_sock, msg.to_bytes())
recvd = messaging.recv_one_retry(sub_sock)
assert (time.monotonic() - start_time) >= sock_timeout*5
assert isinstance(recvd, capnp._DynamicStructReader)

View File

@@ -86,7 +86,7 @@ class TestSubMaster:
"cameraOdometry": (20, 10),
"liveCalibration": (4, 4),
"carParams": (None, None),
"userFlag": (None, None),
"userBookmark": (None, None),
}
for service, (max_freq, min_freq) in checks.items():

View File

@@ -1,7 +1,7 @@
import os
import tempfile
from typing import Dict
from parameterized import parameterized
from openpilot.common.parameterized import parameterized
import cereal.services as services
from cereal.services import SERVICE_LIST

View File

@@ -1,37 +1,44 @@
#!/usr/bin/env python3
from enum import IntEnum
from typing import Optional
# TODO: this should be automatically determined using the capnp schema
class QueueSize(IntEnum):
BIG = 10 * 1024 * 1024 # 10MB - video frames, large AI outputs
MEDIUM = 2 * 1024 * 1024 # 2MB - high freq (CAN), livestream
SMALL = 250 * 1024 # 250KB - most services
class Service:
def __init__(self, should_log: bool, frequency: float, decimation: Optional[int] = None):
def __init__(self, should_log: bool, frequency: float, decimation: Optional[int] = None,
queue_size: QueueSize = QueueSize.SMALL):
self.should_log = should_log
self.frequency = frequency
self.decimation = decimation
self.queue_size = queue_size
_services: dict[str, tuple] = {
# service: (should_log, frequency, qlog decimation (optional))
# note: the "EncodeIdx" packets will still be in the log
"gyroscope": (True, 104., 104),
"gyroscope2": (True, 100., 100),
"accelerometer": (True, 104., 104),
"accelerometer2": (True, 100., 100),
"magnetometer": (True, 25.),
"lightSensor": (True, 100., 100),
"temperatureSensor": (True, 2., 200),
"temperatureSensor2": (True, 2., 200),
"gpsNMEA": (True, 9.),
"deviceState": (True, 2., 1),
"touch": (True, 20., 1),
"can": (True, 100., 2053), # decimation gives ~3 msgs in a full segment
"controlsState": (True, 100., 10),
"can": (True, 100., 2053, QueueSize.BIG), # decimation gives ~3 msgs in a full segment
"controlsState": (True, 100., 10, QueueSize.MEDIUM),
"selfdriveState": (True, 100., 10),
"pandaStates": (True, 10., 1),
"peripheralState": (True, 2., 1),
"radarState": (True, 20., 5),
"roadEncodeIdx": (False, 20., 1),
"liveTracks": (True, 20.),
"sendcan": (True, 100., 139),
"sendcan": (True, 100., 139, QueueSize.MEDIUM),
"logMessage": (True, 0.),
"errorLogMessage": (True, 0., 1),
"liveCalibration": (True, 4., 4),
@@ -43,7 +50,7 @@ _services: dict[str, tuple] = {
"carOutput": (True, 100., 10),
"longitudinalPlan": (True, 20., 10),
"driverAssistance": (True, 20., 20),
"procLog": (True, 0.5, 15),
"procLog": (True, 0.5, 15, QueueSize.BIG),
"gpsLocationExternal": (True, 10., 10),
"gpsLocation": (True, 1., 1),
"ubloxGnss": (True, 10.),
@@ -65,19 +72,26 @@ _services: dict[str, tuple] = {
"wideRoadEncodeIdx": (False, 20., 1),
"wideRoadCameraState": (True, 20., 20),
"drivingModelData": (True, 20., 10),
"modelV2": (True, 20.),
"modelV2": (True, 20., None, QueueSize.BIG),
"managerState": (True, 2., 1),
"uploaderState": (True, 0., 1),
"navInstruction": (True, 1., 10),
"navRoute": (True, 0.),
"navThumbnail": (True, 0.),
"qRoadEncodeIdx": (False, 20.),
"userFlag": (True, 0., 1),
"microphone": (True, 10., 10),
"userBookmark": (True, 0., 1),
"soundPressure": (True, 10., 10),
"rawAudioData": (False, 20.),
"bookmarkButton": (True, 0., 1),
"audioFeedback": (True, 0., 1),
"roadEncodeData": (False, 20., None, QueueSize.BIG),
"driverEncodeData": (False, 20., None, QueueSize.BIG),
"wideRoadEncodeData": (False, 20., None, QueueSize.BIG),
"qRoadEncodeData": (False, 20., None, QueueSize.BIG),
# sunnypilot
"modelManagerSP": (False, 1., 1),
"backupManagerSP": (False, 1., 1),
"modelManagerSP": (False, 1., 1, QueueSize.BIG),
"backupManagerSP": (False, 1., 1, QueueSize.BIG),
"selfdriveStateSP": (True, 100., 10),
"longitudinalPlanSP": (True, 20., 10),
"onroadEventsSP": (True, 1., 1),
@@ -85,21 +99,19 @@ _services: dict[str, tuple] = {
"carControlSP": (True, 100., 10),
"carStateSP": (True, 100., 10),
"liveMapDataSP": (True, 1., 1),
"modelDataV2SP": (True, 20., None, QueueSize.BIG),
"liveLocationKalman": (True, 20.),
# debug
"uiDebug": (True, 0., 1),
"testJoystick": (True, 0.),
"alertDebug": (True, 20., 5),
"roadEncodeData": (False, 20.),
"driverEncodeData": (False, 20.),
"wideRoadEncodeData": (False, 20.),
"qRoadEncodeData": (False, 20.),
"livestreamWideRoadEncodeIdx": (False, 20.),
"livestreamRoadEncodeIdx": (False, 20.),
"livestreamDriverEncodeIdx": (False, 20.),
"livestreamWideRoadEncodeData": (False, 20.),
"livestreamRoadEncodeData": (False, 20.),
"livestreamDriverEncodeData": (False, 20.),
"livestreamWideRoadEncodeData": (False, 20., None, QueueSize.MEDIUM),
"livestreamRoadEncodeData": (False, 20., None, QueueSize.MEDIUM),
"livestreamDriverEncodeData": (False, 20., None, QueueSize.MEDIUM),
"customReservedRawData0": (True, 0.),
"customReservedRawData1": (True, 0.),
"customReservedRawData2": (True, 0.),
@@ -117,13 +129,13 @@ def build_header():
h += "#include <map>\n"
h += "#include <string>\n"
h += "struct service { std::string name; bool should_log; int frequency; int decimation; };\n"
h += "struct service { std::string name; bool should_log; float frequency; int decimation; size_t queue_size; };\n"
h += "static std::map<std::string, service> services = {\n"
for k, v in SERVICE_LIST.items():
should_log = "true" if v.should_log else "false"
decimation = -1 if v.decimation is None else v.decimation
h += ' { "%s", {"%s", %s, %d, %d}},\n' % \
(k, k, should_log, v.frequency, decimation)
h += ' { "%s", {"%s", %s, %f, %d, %d}},\n' % \
(k, k, should_log, v.frequency, decimation, v.queue_size)
h += "};\n"
h += "#endif\n"

View File

@@ -1,13 +0,0 @@
comment: false
coverage:
status:
project:
default:
informational: true
patch: off
ignore:
- "**/test_*.py"
- "selfdrive/test/**"
- "system/version.py" # codecov changes depending on if we are in a branch or not
- "tools"

View File

@@ -4,18 +4,11 @@ common_libs = [
'params.cc',
'swaglog.cc',
'util.cc',
'watchdog.cc',
'ratekeeper.cc'
'ratekeeper.cc',
]
_common = env.Library('common', common_libs, LIBS="json11")
files = [
'clutil.cc',
]
_gpucommon = env.Library('gpucommon', files)
Export('_common', '_gpucommon')
Export('_common')
if GetOption('extras'):
env.Program('tests/test_common',
@@ -25,11 +18,6 @@ if GetOption('extras'):
# Cython bindings
params_python = envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11'])
SConscript([
'transformations/SConscript',
])
Import('transformations_python')
common_python = [params_python, transformations_python]
common_python = [params_python]
Export('common_python')

View File

@@ -14,9 +14,13 @@ class Api:
def post(self, *args, **kwargs):
return self.service.post(*args, **kwargs)
def get_token(self, expiry_hours=1):
return self.service.get_token(expiry_hours)
def get_token(self, payload_extra=None, expiry_hours=1):
return self.service.get_token(payload_extra, expiry_hours)
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
return CommaConnectApi(None).api_get(endpoint, method, timeout, access_token, **params)
def api_get(endpoint, method='GET', timeout=None, access_token=None, session=None, **params):
return CommaConnectApi(None).api_get(endpoint, method, timeout, access_token, session, **params)
def get_key_pair() -> tuple[str, str, str] | tuple[None, None, None]:
return CommaConnectApi(None).get_key_pair()

View File

@@ -1,18 +1,22 @@
import jwt
import os
import requests
import unicodedata
from datetime import datetime, timedelta, UTC
from openpilot.system.hardware.hw import Paths
from openpilot.system.version import get_version
# name: jwt signature algorithm
KEYS = {"id_rsa": "RS256",
"id_ecdsa": "ES256"}
class BaseApi:
def __init__(self, dongle_id, api_host, user_agent="openpilot-"):
self.dongle_id = dongle_id
self.api_host = api_host
self.user_agent = user_agent
with open(f'{Paths.persist_root()}/comma/id_rsa') as f:
self.private_key = f.read()
self.jwt_algorithm, self.private_key, _ = self.get_key_pair()
def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)
@@ -23,7 +27,7 @@ class BaseApi:
def request(self, method, endpoint, timeout=None, access_token=None, **params):
return self.api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)
def _get_token(self, expiry_hours=1, **extra_payload):
def _get_token(self, payload_extra=None, expiry_hours=1, **extra_payload):
now = datetime.now(UTC).replace(tzinfo=None)
payload = {
'identity': self.dongle_id,
@@ -32,20 +36,22 @@ class BaseApi:
'exp': now + timedelta(hours=expiry_hours),
**extra_payload
}
token = jwt.encode(payload, self.private_key, algorithm='RS256')
if payload_extra is not None:
payload.update(payload_extra)
token = jwt.encode(payload, self.private_key, algorithm=self.jwt_algorithm)
if isinstance(token, bytes):
token = token.decode('utf8')
return token
def get_token(self, expiry_hours=1):
return self._get_token(expiry_hours)
def get_token(self, payload_extra=None, expiry_hours=1):
return self._get_token(payload_extra, expiry_hours)
def remove_non_ascii_chars(self, text):
normalized_text = unicodedata.normalize('NFD', text)
ascii_encoded_text = normalized_text.encode('ascii', 'ignore')
return ascii_encoded_text.decode()
def api_get(self, endpoint, method='GET', timeout=None, access_token=None, json=None, **params):
def api_get(self, endpoint, method='GET', timeout=None, access_token=None, session=None, json=None, **params):
headers = {}
if access_token is not None:
headers['Authorization'] = "JWT " + access_token
@@ -53,4 +59,14 @@ class BaseApi:
version = self.remove_non_ascii_chars(get_version())
headers['User-Agent'] = self.user_agent + version
return requests.request(method, f"{self.api_host}/{endpoint}", timeout=timeout, headers=headers, json=json, params=params)
# TODO: add session to Api
req = requests if session is None else session
return req.request(method, f"{self.api_host}/{endpoint}", timeout=timeout, headers=headers, json=json, params=params)
@staticmethod
def get_key_pair() -> tuple[str, str, str] | tuple[None, None, None]:
for key in KEYS:
if os.path.isfile(Paths.persist_root() + f'/comma/{key}') and os.path.isfile(Paths.persist_root() + f'/comma/{key}.pub'):
with open(Paths.persist_root() + f'/comma/{key}') as private, open(Paths.persist_root() + f'/comma/{key}.pub') as public:
return KEYS[key], private.read(), public.read()
return None, None, None

View File

@@ -1,98 +0,0 @@
#include "common/clutil.h"
#include <cassert>
#include <iostream>
#include <memory>
#include "common/util.h"
#include "common/swaglog.h"
namespace { // helper functions
template <typename Func, typename Id, typename Name>
std::string get_info(Func get_info_func, Id id, Name param_name) {
size_t size = 0;
CL_CHECK(get_info_func(id, param_name, 0, NULL, &size));
std::string info(size, '\0');
CL_CHECK(get_info_func(id, param_name, size, info.data(), NULL));
return info;
}
inline std::string get_platform_info(cl_platform_id id, cl_platform_info name) { return get_info(&clGetPlatformInfo, id, name); }
inline std::string get_device_info(cl_device_id id, cl_device_info name) { return get_info(&clGetDeviceInfo, id, name); }
void cl_print_info(cl_platform_id platform, cl_device_id device) {
size_t work_group_size = 0;
cl_device_type device_type = 0;
clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof(work_group_size), &work_group_size, NULL);
clGetDeviceInfo(device, CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL);
const char *type_str = "Other...";
switch (device_type) {
case CL_DEVICE_TYPE_CPU: type_str ="CL_DEVICE_TYPE_CPU"; break;
case CL_DEVICE_TYPE_GPU: type_str = "CL_DEVICE_TYPE_GPU"; break;
case CL_DEVICE_TYPE_ACCELERATOR: type_str = "CL_DEVICE_TYPE_ACCELERATOR"; break;
}
LOGD("vendor: %s", get_platform_info(platform, CL_PLATFORM_VENDOR).c_str());
LOGD("platform version: %s", get_platform_info(platform, CL_PLATFORM_VERSION).c_str());
LOGD("profile: %s", get_platform_info(platform, CL_PLATFORM_PROFILE).c_str());
LOGD("extensions: %s", get_platform_info(platform, CL_PLATFORM_EXTENSIONS).c_str());
LOGD("name: %s", get_device_info(device, CL_DEVICE_NAME).c_str());
LOGD("device version: %s", get_device_info(device, CL_DEVICE_VERSION).c_str());
LOGD("max work group size: %zu", work_group_size);
LOGD("type = %d, %s", (int)device_type, type_str);
}
void cl_print_build_errors(cl_program program, cl_device_id device) {
cl_build_status status;
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_STATUS, sizeof(status), &status, NULL);
size_t log_size;
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
std::string log(log_size, '\0');
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG, log_size, &log[0], NULL);
LOGE("build failed; status=%d, log: %s", status, log.c_str());
}
} // namespace
cl_device_id cl_get_device_id(cl_device_type device_type) {
cl_uint num_platforms = 0;
CL_CHECK(clGetPlatformIDs(0, NULL, &num_platforms));
std::unique_ptr<cl_platform_id[]> platform_ids = std::make_unique<cl_platform_id[]>(num_platforms);
CL_CHECK(clGetPlatformIDs(num_platforms, &platform_ids[0], NULL));
for (size_t i = 0; i < num_platforms; ++i) {
LOGD("platform[%zu] CL_PLATFORM_NAME: %s", i, get_platform_info(platform_ids[i], CL_PLATFORM_NAME).c_str());
// Get first device
if (cl_device_id device_id = NULL; clGetDeviceIDs(platform_ids[i], device_type, 1, &device_id, NULL) == 0 && device_id) {
cl_print_info(platform_ids[i], device_id);
return device_id;
}
}
LOGE("No valid openCL platform found");
assert(0);
return nullptr;
}
cl_context cl_create_context(cl_device_id device_id) {
return CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, NULL, NULL, &err));
}
void cl_release_context(cl_context context) {
clReleaseContext(context);
}
cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const char* path, const char* args) {
return cl_program_from_source(ctx, device_id, util::read_file(path), args);
}
cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const std::string& src, const char* args) {
const char *csrc = src.c_str();
cl_program prg = CL_CHECK_ERR(clCreateProgramWithSource(ctx, 1, &csrc, NULL, &err));
if (int err = clBuildProgram(prg, 1, &device_id, args, NULL, NULL); err != 0) {
cl_print_build_errors(prg, device_id);
assert(0);
}
return prg;
}

View File

@@ -1,28 +0,0 @@
#pragma once
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include <string>
#define CL_CHECK(_expr) \
do { \
assert(CL_SUCCESS == (_expr)); \
} while (0)
#define CL_CHECK_ERR(_expr) \
({ \
cl_int err = CL_INVALID_VALUE; \
__typeof__(_expr) _ret = _expr; \
assert(_ret&& err == CL_SUCCESS); \
_ret; \
})
cl_device_id cl_get_device_id(cl_device_type device_type);
cl_context cl_create_context(cl_device_id device_id);
void cl_release_context(cl_context context);
cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const std::string& src, const char* args = nullptr);
cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const char* path, const char* args);

View File

@@ -1,6 +1,7 @@
import numpy as np
class Conversions:
# conversions
class CV:
# Speed
MPH_TO_KPH = 1.609344
KPH_TO_MPH = 1. / MPH_TO_KPH
@@ -17,3 +18,6 @@ class Conversions:
# Mass
LB_TO_KG = 0.453592
ACCELERATION_DUE_TO_GRAVITY = 9.81 # m/s^2

View File

@@ -1,9 +0,0 @@
# remove all keys that end in DEPRECATED
def strip_deprecated_keys(d):
for k in list(d.keys()):
if isinstance(k, str):
if k.endswith('DEPRECATED'):
d.pop(k)
elif isinstance(d[k], dict):
strip_deprecated_keys(d[k])
return d

37
common/file_chunker.py Normal file
View File

@@ -0,0 +1,37 @@
import math
import os
from pathlib import Path
CHUNK_SIZE = 45 * 1024 * 1024 # 45MB, under GitHub's 50MB limit
def get_chunk_name(name, idx, num_chunks):
return f"{name}.chunk{idx+1:02d}of{num_chunks:02d}"
def get_manifest_path(name):
return f"{name}.chunkmanifest"
def get_chunk_paths(path, file_size):
num_chunks = math.ceil(file_size / CHUNK_SIZE)
return [get_manifest_path(path)] + [get_chunk_name(path, i, num_chunks) for i in range(num_chunks)]
def chunk_file(path, targets):
manifest_path, *chunk_paths = targets
with open(path, 'rb') as f:
data = f.read()
actual_num_chunks = max(1, math.ceil(len(data) / CHUNK_SIZE))
assert len(chunk_paths) >= actual_num_chunks, f"Allowed {len(chunk_paths)} chunks but needs at least {actual_num_chunks}, for path {path}"
for i, chunk_path in enumerate(chunk_paths):
with open(chunk_path, 'wb') as f:
f.write(data[i * CHUNK_SIZE:(i + 1) * CHUNK_SIZE])
Path(manifest_path).write_text(str(len(chunk_paths)))
os.remove(path)
def read_file_chunked(path):
manifest_path = get_manifest_path(path)
if os.path.isfile(manifest_path):
num_chunks = int(Path(manifest_path).read_text().strip())
return b''.join(Path(get_chunk_name(path, i, num_chunks)).read_bytes() for i in range(num_chunks))
if os.path.isfile(path):
return Path(path).read_bytes()
raise FileNotFoundError(path)

View File

@@ -1,58 +0,0 @@
import io
import os
import tempfile
import contextlib
import zstandard as zstd
LOG_COMPRESSION_LEVEL = 10 # little benefit up to level 15. level ~17 is a small step change
class CallbackReader:
"""Wraps a file, but overrides the read method to also
call a callback function with the number of bytes read so far."""
def __init__(self, f, callback, *args):
self.f = f
self.callback = callback
self.cb_args = args
self.total_read = 0
def __getattr__(self, attr):
return getattr(self.f, attr)
def read(self, *args, **kwargs):
chunk = self.f.read(*args, **kwargs)
self.total_read += len(chunk)
self.callback(*self.cb_args, self.total_read)
return chunk
@contextlib.contextmanager
def atomic_write_in_dir(path: str, mode: str = 'w', buffering: int = -1, encoding: str = None, newline: str = None,
overwrite: bool = False):
"""Write to a file atomically using a temporary file in the same directory as the destination file."""
dir_name = os.path.dirname(path)
if not overwrite and os.path.exists(path):
raise FileExistsError(f"File '{path}' already exists. To overwrite it, set 'overwrite' to True.")
with tempfile.NamedTemporaryFile(mode=mode, buffering=buffering, encoding=encoding, newline=newline, dir=dir_name, delete=False) as tmp_file:
yield tmp_file
tmp_file_name = tmp_file.name
os.replace(tmp_file_name, path)
def get_upload_stream(filepath: str, should_compress: bool) -> tuple[io.BufferedIOBase, int]:
if not should_compress:
file_size = os.path.getsize(filepath)
file_stream = open(filepath, "rb")
return file_stream, file_size
# Compress the file on the fly
compressed_stream = io.BytesIO()
compressor = zstd.ZstdCompressor(level=LOG_COMPRESSION_LEVEL)
with open(filepath, "rb") as f:
compressor.copy_stream(f, compressed_stream)
compressed_size = compressed_stream.tell()
compressed_stream.seek(0)
return compressed_stream, compressed_size

View File

@@ -15,3 +15,20 @@ class FirstOrderFilter:
self.initialized = True
self.x = x
return self.x
class BounceFilter(FirstOrderFilter):
def __init__(self, x0, rc, dt, initialized=True, bounce=2):
self.velocity = FirstOrderFilter(0.0, 0.15, dt)
self.bounce = bounce
super().__init__(x0, rc, dt, initialized)
def update(self, x):
super().update(x)
scale = self.dt / (1.0 / 60.0) # tuned at 60 fps
self.velocity.x += (x - self.x) * self.bounce * scale * self.dt
self.velocity.update(0.0)
if abs(self.velocity.x) < 1e-5:
self.velocity.x = 0.0
self.x += self.velocity.x
return self.x

View File

@@ -1,30 +1,30 @@
from functools import cache
import subprocess
from openpilot.common.run import run_cmd, run_cmd_default
from openpilot.common.utils import run_cmd, run_cmd_default
@cache
def get_commit(cwd: str = None, branch: str = "HEAD") -> str:
def get_commit(cwd: str | None = None, branch: str = "HEAD") -> str:
return run_cmd_default(["git", "rev-parse", branch], cwd=cwd)
@cache
def get_commit_date(cwd: str = None, commit: str = "HEAD") -> str:
def get_commit_date(cwd: str | None = None, commit: str = "HEAD") -> str:
return run_cmd_default(["git", "show", "--no-patch", "--format='%ct %ci'", commit], cwd=cwd)
@cache
def get_short_branch(cwd: str = None) -> str:
def get_short_branch(cwd: str | None = None) -> str:
return run_cmd_default(["git", "rev-parse", "--abbrev-ref", "HEAD"], cwd=cwd)
@cache
def get_branch(cwd: str = None) -> str:
def get_branch(cwd: str | None = None) -> str:
return run_cmd_default(["git", "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"], cwd=cwd)
@cache
def get_origin(cwd: str = None) -> str:
def get_origin(cwd: str | None = None) -> str:
try:
local_branch = run_cmd(["git", "name-rev", "--name-only", "HEAD"], cwd=cwd)
tracking_remote = run_cmd(["git", "config", "branch." + local_branch + ".remote"], cwd=cwd)
@@ -34,7 +34,7 @@ def get_origin(cwd: str = None) -> str:
@cache
def get_normalized_origin(cwd: str = None) -> str:
def get_normalized_origin(cwd: str | None = None) -> str:
return get_origin(cwd) \
.replace("git@", "", 1) \
.replace(".git", "", 1) \

81
common/i2c.py Normal file
View File

@@ -0,0 +1,81 @@
import os
import fcntl
import ctypes
# I2C constants from /usr/include/linux/i2c-dev.h
I2C_SLAVE = 0x0703
I2C_SLAVE_FORCE = 0x0706
I2C_SMBUS = 0x0720
# SMBus transfer types
I2C_SMBUS_READ = 1
I2C_SMBUS_WRITE = 0
I2C_SMBUS_BYTE_DATA = 2
I2C_SMBUS_I2C_BLOCK_DATA = 8
I2C_SMBUS_BLOCK_MAX = 32
class _I2cSmbusData(ctypes.Union):
_fields_ = [
("byte", ctypes.c_uint8),
("word", ctypes.c_uint16),
("block", ctypes.c_uint8 * (I2C_SMBUS_BLOCK_MAX + 2)),
]
class _I2cSmbusIoctlData(ctypes.Structure):
_fields_ = [
("read_write", ctypes.c_uint8),
("command", ctypes.c_uint8),
("size", ctypes.c_uint32),
("data", ctypes.POINTER(_I2cSmbusData)),
]
class SMBus:
def __init__(self, bus: int):
self._fd = os.open(f'/dev/i2c-{bus}', os.O_RDWR)
def __enter__(self) -> 'SMBus':
return self
def __exit__(self, *args) -> None:
self.close()
def close(self) -> None:
if hasattr(self, '_fd') and self._fd >= 0:
os.close(self._fd)
self._fd = -1
def _set_address(self, addr: int, force: bool = False) -> None:
ioctl_arg = I2C_SLAVE_FORCE if force else I2C_SLAVE
fcntl.ioctl(self._fd, ioctl_arg, addr)
def _smbus_access(self, read_write: int, command: int, size: int, data: _I2cSmbusData) -> None:
ioctl_data = _I2cSmbusIoctlData(read_write, command, size, ctypes.pointer(data))
fcntl.ioctl(self._fd, I2C_SMBUS, ioctl_data)
def read_byte_data(self, addr: int, register: int, force: bool = False) -> int:
self._set_address(addr, force)
data = _I2cSmbusData()
self._smbus_access(I2C_SMBUS_READ, register, I2C_SMBUS_BYTE_DATA, data)
return int(data.byte)
def write_byte_data(self, addr: int, register: int, value: int, force: bool = False) -> None:
self._set_address(addr, force)
data = _I2cSmbusData()
data.byte = value & 0xFF
self._smbus_access(I2C_SMBUS_WRITE, register, I2C_SMBUS_BYTE_DATA, data)
def read_i2c_block_data(self, addr: int, register: int, length: int, force: bool = False) -> list[int]:
self._set_address(addr, force)
if not (0 <= length <= I2C_SMBUS_BLOCK_MAX):
raise ValueError(f"length must be 0..{I2C_SMBUS_BLOCK_MAX}")
data = _I2cSmbusData()
data.block[0] = length
self._smbus_access(I2C_SMBUS_READ, register, I2C_SMBUS_I2C_BLOCK_DATA, data)
read_len = int(data.block[0]) or length
read_len = min(read_len, length)
return [int(b) for b in data.block[1 : read_len + 1]]

View File

@@ -1,85 +0,0 @@
#pragma once
typedef struct vec3 {
float v[3];
} vec3;
typedef struct vec4 {
float v[4];
} vec4;
typedef struct mat3 {
float v[3*3];
} mat3;
typedef struct mat4 {
float v[4*4];
} mat4;
static inline mat3 matmul3(const mat3 &a, const mat3 &b) {
mat3 ret = {{0.0}};
for (int r=0; r<3; r++) {
for (int c=0; c<3; c++) {
float v = 0.0;
for (int k=0; k<3; k++) {
v += a.v[r*3+k] * b.v[k*3+c];
}
ret.v[r*3+c] = v;
}
}
return ret;
}
static inline vec3 matvecmul3(const mat3 &a, const vec3 &b) {
vec3 ret = {{0.0}};
for (int r=0; r<3; r++) {
for (int c=0; c<3; c++) {
ret.v[r] += a.v[r*3+c] * b.v[c];
}
}
return ret;
}
static inline mat4 matmul(const mat4 &a, const mat4 &b) {
mat4 ret = {{0.0}};
for (int r=0; r<4; r++) {
for (int c=0; c<4; c++) {
float v = 0.0;
for (int k=0; k<4; k++) {
v += a.v[r*4+k] * b.v[k*4+c];
}
ret.v[r*4+c] = v;
}
}
return ret;
}
static inline vec4 matvecmul(const mat4 &a, const vec4 &b) {
vec4 ret = {{0.0}};
for (int r=0; r<4; r++) {
for (int c=0; c<4; c++) {
ret.v[r] += a.v[r*4+c] * b.v[c];
}
}
return ret;
}
// scales the input and output space of a transformation matrix
// that assumes pixel-center origin.
static inline mat3 transform_scale_buffer(const mat3 &in, float s) {
// in_pt = ( transform(out_pt/s + 0.5) - 0.5) * s
mat3 transform_out = {{
1.0f/s, 0.0f, 0.5f,
0.0f, 1.0f/s, 0.5f,
0.0f, 0.0f, 1.0f,
}};
mat3 transform_in = {{
s, 0.0f, -0.5f*s,
0.0f, s, -0.5f*s,
0.0f, 0.0f, 1.0f,
}};
return matmul3(transform_in, matmul3(in, transform_out));
}

View File

@@ -1 +1 @@
#define DEFAULT_MODEL "Vegetarian Filet o Fish (Default)"
#define DEFAULT_MODEL "CD210 (Default)"

47
common/parameterized.py Normal file
View File

@@ -0,0 +1,47 @@
import sys
import pytest
import inspect
class parameterized:
@staticmethod
def expand(cases):
cases = list(cases)
if not cases:
return lambda func: pytest.mark.skip("no parameterized cases")(func)
def decorator(func):
params = [p for p in inspect.signature(func).parameters if p != 'self']
normalized = [c if isinstance(c, tuple) else (c,) for c in cases]
# Infer arg count from first case so extra params (e.g. from @given) are left untouched
expand_params = params[: len(normalized[0])]
if len(expand_params) == 1:
return pytest.mark.parametrize(expand_params[0], [c[0] for c in normalized])(func)
return pytest.mark.parametrize(', '.join(expand_params), normalized)(func)
return decorator
def parameterized_class(attrs, input_list=None):
if isinstance(attrs, list) and (not attrs or isinstance(attrs[0], dict)):
params_list = attrs
else:
assert input_list is not None
attr_names = (attrs,) if isinstance(attrs, str) else tuple(attrs)
params_list = [dict(zip(attr_names, v if isinstance(v, (tuple, list)) else (v,), strict=False)) for v in input_list]
def decorator(cls):
globs = sys._getframe(1).f_globals
for i, params in enumerate(params_list):
name = f"{cls.__name__}_{i}"
new_cls = type(name, (cls,), dict(params))
new_cls.__module__ = cls.__module__
new_cls.__test__ = True # override inherited False so pytest collects this subclass
globs[name] = new_cls
# Don't collect the un-parametrised base, but return it so outer decorators
# (e.g. @pytest.mark.skip) land on it and propagate to subclasses via MRO.
cls.__test__ = False
return cls
return decorator

View File

@@ -103,10 +103,10 @@ Params::~Params() {
assert(queue.empty());
}
std::vector<std::string> Params::allKeys(ParamKeyType type) const {
std::vector<std::string> Params::allKeys(ParamKeyFlag flag) const {
std::vector<std::string> ret;
for (auto &p : keys) {
if (type == ALL || (p.second & type)) {
if (flag == ALL || (p.second.flags & flag)) {
ret.push_back(p.first);
}
}
@@ -117,8 +117,16 @@ bool Params::checkKey(const std::string &key) {
return keys.find(key) != keys.end();
}
ParamKeyFlag Params::getKeyFlag(const std::string &key) {
return static_cast<ParamKeyFlag>(keys[key].flags);
}
ParamKeyType Params::getKeyType(const std::string &key) {
return static_cast<ParamKeyType>(keys[key]);
return keys[key].type;
}
std::optional<std::string> Params::getKeyDefaultValue(const std::string &key) {
return keys[key].default_value;
}
int Params::put(const char* key, const char* value, size_t value_size) {
@@ -197,17 +205,17 @@ std::map<std::string, std::string> Params::readAll() {
return util::read_files_in_dir(getParamPath());
}
void Params::clearAll(ParamKeyType key_type) {
void Params::clearAll(ParamKeyFlag key_flag) {
FileLock file_lock(params_path + "/.lock");
// 1) delete params of key_type
// 1) delete params of key_flag
// 2) delete files that are not defined in the keys.
if (DIR *d = opendir(getParamPath().c_str())) {
struct dirent *de = NULL;
while ((de = readdir(d))) {
if (de->d_type != DT_DIR) {
auto it = keys.find(de->d_name);
if (it == keys.end() || (it->second & key_type)) {
if (it == keys.end() || (it->second.flags & key_flag)) {
unlink(getParamPath(de->d_name).c_str());
}
}

View File

@@ -2,6 +2,7 @@
#include <future>
#include <map>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
@@ -9,17 +10,34 @@
#include "common/queue.h"
enum ParamKeyType {
enum ParamKeyFlag {
PERSISTENT = 0x02,
CLEAR_ON_MANAGER_START = 0x04,
CLEAR_ON_ONROAD_TRANSITION = 0x08,
CLEAR_ON_OFFROAD_TRANSITION = 0x10,
DONT_LOG = 0x20,
DEVELOPMENT_ONLY = 0x40,
BACKUP = 0x80,
CLEAR_ON_IGNITION_ON = 0x80,
BACKUP = 0x100,
ALL = 0xFFFFFFFF
};
enum ParamKeyType {
STRING = 0, // must be utf-8 decodable
BOOL = 1,
INT = 2,
FLOAT = 3,
TIME = 4, // ISO 8601
JSON = 5,
BYTES = 6
};
struct ParamKeyAttributes {
uint32_t flags;
ParamKeyType type;
std::optional<std::string> default_value = std::nullopt;
};
class Params {
public:
explicit Params(const std::string &path = {});
@@ -28,16 +46,18 @@ public:
Params(const Params&) = delete;
Params& operator=(const Params&) = delete;
std::vector<std::string> allKeys(ParamKeyType type = ALL) const;
std::vector<std::string> allKeys(ParamKeyFlag flag = ALL) const;
bool checkKey(const std::string &key);
ParamKeyFlag getKeyFlag(const std::string &key);
ParamKeyType getKeyType(const std::string &key);
std::optional<std::string> getKeyDefaultValue(const std::string &key);
inline std::string getParamPath(const std::string &key = {}) {
return params_path + params_prefix + (key.empty() ? "" : "/" + key);
}
// Delete a value
int remove(const std::string &key);
void clearAll(ParamKeyType type);
void clearAll(ParamKeyFlag flag);
// helpers for reading values
std::string get(const std::string &key, bool block = false);

View File

@@ -1,5 +1,6 @@
from openpilot.common.params_pyx import Params, ParamKeyType, UnknownKeyName
from openpilot.common.params_pyx import Params, ParamKeyFlag, ParamKeyType, UnknownKeyName
assert Params
assert ParamKeyFlag
assert ParamKeyType
assert UnknownKeyName

View File

@@ -3,199 +3,275 @@
#include <string>
#include <unordered_map>
inline static std::unordered_map<std::string, uint32_t> keys = {
{"AccessToken", CLEAR_ON_MANAGER_START | DONT_LOG},
{"AdbEnabled", PERSISTENT},
{"AlwaysOnDM", PERSISTENT},
{"ApiCache_Device", PERSISTENT},
{"ApiCache_FirehoseStats", PERSISTENT},
{"AssistNowToken", PERSISTENT},
{"AthenadPid", PERSISTENT},
{"AthenadUploadQueue", PERSISTENT},
{"AthenadRecentlyViewedRoutes", PERSISTENT},
{"BootCount", PERSISTENT},
{"CalibrationParams", PERSISTENT},
{"CameraDebugExpGain", CLEAR_ON_MANAGER_START},
{"CameraDebugExpTime", CLEAR_ON_MANAGER_START},
{"CarBatteryCapacity", PERSISTENT},
{"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CarParamsCache", CLEAR_ON_MANAGER_START},
{"CarParamsPersistent", PERSISTENT},
{"CarParamsPrevRoute", PERSISTENT},
{"CompletedTrainingVersion", PERSISTENT},
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CurrentBootlog", PERSISTENT},
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisablePowerDown", PERSISTENT | BACKUP},
{"DisableUpdates", PERSISTENT | BACKUP},
{"DisengageOnAccelerator", PERSISTENT | BACKUP},
{"DongleId", PERSISTENT},
{"DoReboot", CLEAR_ON_MANAGER_START},
{"DoShutdown", CLEAR_ON_MANAGER_START},
{"DoUninstall", CLEAR_ON_MANAGER_START},
{"AlphaLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY | BACKUP},
{"ExperimentalMode", PERSISTENT | BACKUP},
{"ExperimentalModeConfirmed", PERSISTENT | BACKUP},
{"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ForcePowerDown", PERSISTENT},
{"GitBranch", PERSISTENT},
{"GitCommit", PERSISTENT},
{"GitCommitDate", PERSISTENT},
{"GitDiff", PERSISTENT},
{"GithubSshKeys", PERSISTENT | BACKUP},
{"GithubUsername", PERSISTENT | BACKUP},
{"GitRemote", PERSISTENT},
{"GsmApn", PERSISTENT | BACKUP},
{"GsmMetered", PERSISTENT | BACKUP},
{"GsmRoaming", PERSISTENT | BACKUP},
{"HardwareSerial", PERSISTENT},
{"HasAcceptedTerms", PERSISTENT},
{"InstallDate", PERSISTENT},
{"IsDriverViewEnabled", CLEAR_ON_MANAGER_START},
{"IsEngaged", PERSISTENT},
{"IsLdwEnabled", PERSISTENT | BACKUP},
{"IsMetric", PERSISTENT | BACKUP},
{"IsOffroad", CLEAR_ON_MANAGER_START},
{"IsOnroad", PERSISTENT},
{"IsRhdDetected", PERSISTENT},
{"IsReleaseBranch", CLEAR_ON_MANAGER_START},
{"IsTakingSnapshot", CLEAR_ON_MANAGER_START},
{"IsTestedBranch", CLEAR_ON_MANAGER_START},
{"JoystickDebugMode", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LanguageSetting", PERSISTENT | BACKUP},
{"LastAthenaPingTime", CLEAR_ON_MANAGER_START},
{"LastGPSPosition", PERSISTENT},
{"LastManagerExitReason", CLEAR_ON_MANAGER_START},
{"LastOffroadStatusPacket", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LastPowerDropDetected", CLEAR_ON_MANAGER_START},
{"LastUpdateException", CLEAR_ON_MANAGER_START},
{"LastUpdateTime", PERSISTENT},
{"LiveDelay", PERSISTENT | BACKUP},
{"LiveParameters", PERSISTENT},
{"LiveParametersV2", PERSISTENT},
{"LiveTorqueParameters", PERSISTENT | DONT_LOG},
{"LocationFilterInitialState", PERSISTENT},
{"LongitudinalManeuverMode", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LongitudinalPersonality", PERSISTENT | BACKUP},
{"NetworkMetered", PERSISTENT},
{"ObdMultiplexingChanged", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ObdMultiplexingEnabled", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_BadNvme", CLEAR_ON_MANAGER_START},
{"Offroad_CarUnrecognized", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_ConnectivityNeeded", CLEAR_ON_MANAGER_START},
{"Offroad_ConnectivityNeededPrompt", CLEAR_ON_MANAGER_START},
{"Offroad_IsTakingSnapshot", CLEAR_ON_MANAGER_START},
{"Offroad_NeosUpdate", CLEAR_ON_MANAGER_START},
{"Offroad_NoFirmware", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_Recalibration", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_StorageMissing", CLEAR_ON_MANAGER_START},
{"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START},
{"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START},
{"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START},
{"OnroadCycleRequested", CLEAR_ON_MANAGER_START},
{"OpenpilotEnabledToggle", PERSISTENT | BACKUP},
{"PandaHeartbeatLost", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSomResetTriggered", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSignatures", CLEAR_ON_MANAGER_START},
{"PrimeType", PERSISTENT},
{"RecordFront", PERSISTENT | BACKUP},
{"RecordFrontLock", PERSISTENT}, // for the internal fleet
{"SecOCKey", PERSISTENT | DONT_LOG}, // Candidate for | BACKUP
{"RouteCount", PERSISTENT},
{"SnoozeUpdate", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"SshEnabled", PERSISTENT | BACKUP},
{"TermsVersion", PERSISTENT},
{"TrainingVersion", PERSISTENT},
{"UbloxAvailable", PERSISTENT},
{"UpdateAvailable", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"UpdateFailedCount", CLEAR_ON_MANAGER_START},
{"UpdaterAvailableBranches", PERSISTENT},
{"UpdaterCurrentDescription", CLEAR_ON_MANAGER_START},
{"UpdaterCurrentReleaseNotes", CLEAR_ON_MANAGER_START},
{"UpdaterFetchAvailable", CLEAR_ON_MANAGER_START},
{"UpdaterNewDescription", CLEAR_ON_MANAGER_START},
{"UpdaterNewReleaseNotes", CLEAR_ON_MANAGER_START},
{"UpdaterState", CLEAR_ON_MANAGER_START},
{"UpdaterTargetBranch", CLEAR_ON_MANAGER_START},
{"UpdaterLastFetchTime", PERSISTENT},
{"Version", PERSISTENT},
#include "cereal/gen/cpp/log.capnp.h"
inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"AccessToken", {CLEAR_ON_MANAGER_START | DONT_LOG, STRING}},
{"AdbEnabled", {PERSISTENT | BACKUP, BOOL}},
{"AlwaysOnDM", {PERSISTENT | BACKUP, BOOL}},
{"ApiCache_Device", {PERSISTENT, STRING}},
{"ApiCache_FirehoseStats", {PERSISTENT, JSON}},
{"AssistNowToken", {PERSISTENT, STRING}},
{"AthenadPid", {PERSISTENT, INT}},
{"AthenadUploadQueue", {PERSISTENT, JSON}},
{"AthenadRecentlyViewedRoutes", {PERSISTENT, STRING}},
{"BootCount", {PERSISTENT, INT}},
{"CalibrationParams", {PERSISTENT, BYTES}},
{"CameraDebugExpGain", {CLEAR_ON_MANAGER_START, STRING}},
{"CameraDebugExpTime", {CLEAR_ON_MANAGER_START, STRING}},
{"CarBatteryCapacity", {PERSISTENT, INT}},
{"CarParams", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BYTES}},
{"CarParamsCache", {CLEAR_ON_MANAGER_START, BYTES}},
{"CarParamsPersistent", {PERSISTENT, BYTES}},
{"CarParamsPrevRoute", {PERSISTENT, BYTES}},
{"CompletedTrainingVersion", {PERSISTENT, STRING, "0"}},
{"ControlsReady", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"CurrentBootlog", {PERSISTENT, STRING}},
{"CurrentRoute", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"DisableLogging", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"DisablePowerDown", {PERSISTENT | BACKUP, BOOL}},
{"DisableUpdates", {PERSISTENT | BACKUP, BOOL, "0"}},
{"DisengageOnAccelerator", {PERSISTENT | BACKUP, BOOL, "0"}},
{"DongleId", {PERSISTENT, STRING}},
{"DoReboot", {CLEAR_ON_MANAGER_START, BOOL}},
{"DoShutdown", {CLEAR_ON_MANAGER_START, BOOL}},
{"DoUninstall", {CLEAR_ON_MANAGER_START, BOOL}},
{"DriverTooDistracted", {CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON, BOOL}},
{"AlphaLongitudinalEnabled", {PERSISTENT | DEVELOPMENT_ONLY | BACKUP, BOOL}},
{"ExperimentalMode", {PERSISTENT | BACKUP, BOOL}},
{"ExperimentalModeConfirmed", {PERSISTENT | BACKUP, BOOL}},
{"FirmwareQueryDone", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"ForcePowerDown", {PERSISTENT, BOOL}},
{"GitBranch", {PERSISTENT, STRING}},
{"GitCommit", {PERSISTENT, STRING}},
{"GitCommitDate", {PERSISTENT, STRING}},
{"GitDiff", {PERSISTENT, STRING}},
{"GithubSshKeys", {PERSISTENT | BACKUP, STRING}},
{"GithubUsername", {PERSISTENT | BACKUP, STRING}},
{"GitRemote", {PERSISTENT, STRING}},
{"GsmApn", {PERSISTENT | BACKUP, STRING}},
{"GsmMetered", {PERSISTENT | BACKUP, BOOL, "1"}},
{"GsmRoaming", {PERSISTENT | BACKUP, BOOL}},
{"HardwareSerial", {PERSISTENT, STRING}},
{"HasAcceptedTerms", {PERSISTENT, STRING, "0"}},
{"InstallDate", {PERSISTENT, TIME}},
{"IsDriverViewEnabled", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsEngaged", {PERSISTENT, BOOL}},
{"IsLdwEnabled", {PERSISTENT | BACKUP, BOOL}},
{"IsMetric", {PERSISTENT | BACKUP, BOOL}},
{"IsOffroad", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsOnroad", {PERSISTENT, BOOL}},
{"IsRhdDetected", {PERSISTENT, BOOL}},
{"IsReleaseBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsTakingSnapshot", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsTestedBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"JoystickDebugMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"LanguageSetting", {PERSISTENT | BACKUP, STRING, "en"}},
{"LastAthenaPingTime", {CLEAR_ON_MANAGER_START, INT}},
{"LastGPSPosition", {PERSISTENT, STRING}},
{"LastManagerExitReason", {CLEAR_ON_MANAGER_START, STRING}},
{"LastOffroadStatusPacket", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, JSON}},
{"LastAgnosPowerMonitorShutdown", {CLEAR_ON_MANAGER_START, STRING}},
{"LastPowerDropDetected", {CLEAR_ON_MANAGER_START, STRING}},
{"LastUpdateException", {CLEAR_ON_MANAGER_START, STRING}},
{"LastUpdateRouteCount", {PERSISTENT, INT, "0"}},
{"LastUpdateTime", {PERSISTENT, TIME}},
{"LastUpdateUptimeOnroad", {PERSISTENT, FLOAT, "0.0"}},
{"LiveDelay", {PERSISTENT | BACKUP, BYTES}},
{"LiveParameters", {PERSISTENT, JSON}},
{"LiveParametersV2", {PERSISTENT, BYTES}},
{"LiveTorqueParameters", {PERSISTENT | DONT_LOG, BYTES}},
{"LocationFilterInitialState", {PERSISTENT, BYTES}},
{"LongitudinalManeuverMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"LongitudinalPersonality", {PERSISTENT | BACKUP, INT, std::to_string(static_cast<int>(cereal::LongitudinalPersonality::STANDARD))}},
{"NetworkMetered", {PERSISTENT | BACKUP, BOOL}},
{"ObdMultiplexingChanged", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"ObdMultiplexingEnabled", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"Offroad_CarUnrecognized", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_ConnectivityNeeded", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_ConnectivityNeededPrompt", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_ExcessiveActuation", {PERSISTENT, JSON}},
{"Offroad_IsTakingSnapshot", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_NeosUpdate", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_NoFirmware", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_Recalibration", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_TemperatureTooHigh", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_UnregisteredHardware", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_UpdateFailed", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_DriverMonitoringUncertain", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"OnroadCycleRequested", {CLEAR_ON_MANAGER_START, BOOL}},
{"OpenpilotEnabledToggle", {PERSISTENT | BACKUP, BOOL, "1"}},
{"PandaHeartbeatLost", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"PandaSomResetTriggered", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"PandaSignatures", {CLEAR_ON_MANAGER_START, BYTES}},
{"PrimeType", {PERSISTENT, INT}},
{"RecordAudio", {PERSISTENT | BACKUP, BOOL}},
{"RecordAudioFeedback", {PERSISTENT | BACKUP, BOOL, "0"}},
{"RecordFront", {PERSISTENT | BACKUP, BOOL}},
{"RecordFrontLock", {PERSISTENT, BOOL}}, // for the internal fleet
{"SecOCKey", {PERSISTENT | DONT_LOG | BACKUP, STRING}},
{"ShowDebugInfo", {PERSISTENT, BOOL}},
{"RouteCount", {PERSISTENT, INT, "0"}},
{"SnoozeUpdate", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"SshEnabled", {PERSISTENT | BACKUP, BOOL}},
{"TermsVersion", {PERSISTENT, STRING}},
{"TorqueBar", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TrainingVersion", {PERSISTENT, STRING}},
{"UbloxAvailable", {PERSISTENT, BOOL}},
{"UpdateAvailable", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"UpdateFailedCount", {CLEAR_ON_MANAGER_START, INT}},
{"UpdaterAvailableBranches", {PERSISTENT, STRING}},
{"UpdaterCurrentDescription", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterCurrentReleaseNotes", {CLEAR_ON_MANAGER_START, BYTES}},
{"UpdaterFetchAvailable", {CLEAR_ON_MANAGER_START, BOOL}},
{"UpdaterNewDescription", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterNewReleaseNotes", {CLEAR_ON_MANAGER_START, BYTES}},
{"UpdaterState", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterTargetBranch", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterLastFetchTime", {PERSISTENT, TIME}},
{"UptimeOffroad", {PERSISTENT, FLOAT, "0.0"}},
{"UptimeOnroad", {PERSISTENT, FLOAT, "0.0"}},
{"Version", {PERSISTENT, STRING}},
// --- sunnypilot params --- //
{"ApiCache_DriveStats", PERSISTENT},
{"AutoLaneChangeBsmDelay", PERSISTENT},
{"AutoLaneChangeTimer", PERSISTENT},
{"BlinkerMinLateralControlSpeed", PERSISTENT | BACKUP},
{"BlinkerPauseLateralControl", PERSISTENT | BACKUP},
{"CarParamsSP", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CarParamsSPCache", CLEAR_ON_MANAGER_START},
{"CarParamsSPPersistent", PERSISTENT},
{"CarPlatformBundle", PERSISTENT},
{"CustomAccIncrementsEnabled", PERSISTENT | BACKUP},
{"CustomAccLongPressIncrement", PERSISTENT | BACKUP},
{"CustomAccShortPressIncrement", PERSISTENT | BACKUP},
{"DeviceBootMode", PERSISTENT | BACKUP},
{"EnableGithubRunner", PERSISTENT | BACKUP},
{"MaxTimeOffroad", PERSISTENT | BACKUP},
{"Brightness", PERSISTENT | BACKUP},
{"ModelRunnerTypeCache", CLEAR_ON_ONROAD_TRANSITION},
{"OffroadMode", CLEAR_ON_MANAGER_START},
{"QuietMode", PERSISTENT | BACKUP},
{"ApiCache_DriveStats", {PERSISTENT, JSON}},
{"AutoLaneChangeBsmDelay", {PERSISTENT | BACKUP, BOOL, "0"}},
{"AutoLaneChangeTimer", {PERSISTENT | BACKUP, INT, "0"}},
{"BlinkerLateralReengageDelay", {PERSISTENT | BACKUP, INT, "0"}}, // seconds
{"BlinkerMinLateralControlSpeed", {PERSISTENT | BACKUP, INT, "20"}}, // MPH or km/h
{"BlinkerPauseLateralControl", {PERSISTENT | BACKUP, INT, "0"}},
{"Brightness", {PERSISTENT | BACKUP, INT, "0"}},
{"CarList", {PERSISTENT, JSON}},
{"CarParamsSP", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BYTES}},
{"CarParamsSPCache", {CLEAR_ON_MANAGER_START, BYTES}},
{"CarParamsSPPersistent", {PERSISTENT, BYTES}},
{"CarPlatformBundle", {PERSISTENT | BACKUP, JSON}},
{"ChevronInfo", {PERSISTENT | BACKUP, INT, "4"}},
{"CompletedSunnylinkConsentVersion", {PERSISTENT, STRING, "0"}},
{"CustomAccIncrementsEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"CustomAccLongPressIncrement", {PERSISTENT | BACKUP, INT, "5"}},
{"CustomAccShortPressIncrement", {PERSISTENT | BACKUP, INT, "1"}},
{"DeviceBootMode", {PERSISTENT | BACKUP, INT, "0"}},
{"DevUIInfo", {PERSISTENT | BACKUP, INT, "0"}},
{"EnableCopyparty", {PERSISTENT | BACKUP, BOOL}},
{"EnableGithubRunner", {PERSISTENT | BACKUP, BOOL}},
{"GreenLightAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
{"GithubRunnerSufficientVoltage", {CLEAR_ON_MANAGER_START , BOOL}},
{"HasAcceptedTermsSP", {PERSISTENT, STRING, "0"}},
{"HideVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}},
{"IntelligentCruiseButtonManagement", {PERSISTENT | BACKUP , BOOL}},
{"InteractivityTimeout", {PERSISTENT | BACKUP, INT, "0"}},
{"IsDevelopmentBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsReleaseSpBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"LastGPSPositionLLK", {PERSISTENT, STRING}},
{"LeadDepartAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
{"MaxTimeOffroad", {PERSISTENT | BACKUP, INT, "1800"}},
{"ModelRunnerTypeCache", {CLEAR_ON_ONROAD_TRANSITION, INT}},
{"OffroadMode", {CLEAR_ON_MANAGER_START, BOOL}},
{"Offroad_TiciSupport", {CLEAR_ON_MANAGER_START, JSON}},
{"OnroadScreenOffBrightness", {PERSISTENT | BACKUP, INT, "0"}},
{"OnroadScreenOffBrightnessMigrated", {PERSISTENT | BACKUP, STRING, "0.0"}},
{"OnroadScreenOffTimer", {PERSISTENT | BACKUP, INT, "15"}},
{"OnroadUploads", {PERSISTENT | BACKUP, BOOL, "1"}},
{"QuickBootToggle", {PERSISTENT | BACKUP, BOOL, "0"}},
{"QuietMode", {PERSISTENT | BACKUP, BOOL, "0"}},
{"RainbowMode", {PERSISTENT | BACKUP, BOOL, "0"}},
{"RocketFuel", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ShowAdvancedControls", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ShowTurnSignals", {PERSISTENT | BACKUP, BOOL, "0"}},
{"StandstillTimer", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TrueVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}},
// MADS params
{"Mads", PERSISTENT | BACKUP},
{"MadsMainCruiseAllowed", PERSISTENT | BACKUP},
{"MadsSteeringMode", PERSISTENT | BACKUP},
{"MadsUnifiedEngagementMode", PERSISTENT | BACKUP},
{"Mads", {PERSISTENT | BACKUP, BOOL, "1"}},
{"MadsMainCruiseAllowed", {PERSISTENT | BACKUP, BOOL, "1"}},
{"MadsSteeringMode", {PERSISTENT | BACKUP, INT, "0"}},
{"MadsUnifiedEngagementMode", {PERSISTENT | BACKUP, BOOL, "1"}},
// Model Manager params
{"ModelManager_ActiveBundle", PERSISTENT},
{"ModelManager_DownloadIndex", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ModelManager_LastSyncTime", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"ModelManager_ModelsCache", PERSISTENT | BACKUP},
{"ModelManager_ActiveBundle", {PERSISTENT, JSON}},
{"ModelManager_ClearCache", {CLEAR_ON_MANAGER_START, BOOL}},
{"ModelManager_DownloadIndex", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, INT}},
{"ModelManager_Favs", {PERSISTENT | BACKUP, STRING}},
{"ModelManager_LastSyncTime", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, INT, "0"}},
{"ModelManager_ModelsCache", {PERSISTENT | BACKUP, JSON}},
// Neural Network Lateral Control
{"NeuralNetworkLateralControl", PERSISTENT | BACKUP},
{"NeuralNetworkLateralControl", {PERSISTENT | BACKUP, BOOL, "0"}},
// sunnylink params
{"EnableSunnylinkUploader", PERSISTENT | BACKUP},
{"LastSunnylinkPingTime", CLEAR_ON_MANAGER_START},
{"SunnylinkCache_Roles", PERSISTENT},
{"SunnylinkCache_Users", PERSISTENT},
{"SunnylinkDongleId", PERSISTENT},
{"SunnylinkdPid", PERSISTENT},
{"SunnylinkEnabled", PERSISTENT},
{"EnableSunnylinkUploader", {PERSISTENT | BACKUP, BOOL}},
{"LastSunnylinkPingTime", {CLEAR_ON_MANAGER_START, INT}},
{"SunnylinkCache_Roles", {PERSISTENT, STRING}},
{"SunnylinkCache_Users", {PERSISTENT, STRING}},
{"SunnylinkDongleId", {PERSISTENT, STRING}},
{"SunnylinkdPid", {PERSISTENT, INT}},
{"SunnylinkEnabled", {PERSISTENT, BOOL, "1"}},
{"SunnylinkTempFault", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL, "0"}},
// Backup Manager params
{"BackupManager_CreateBackup", PERSISTENT},
{"BackupManager_RestoreVersion", PERSISTENT},
{"BackupManager_CreateBackup", {PERSISTENT, BOOL}},
{"BackupManager_RestoreVersion", {PERSISTENT, STRING}},
// sunnypilot car specific params
{"HyundaiLongitudinalTuning", PERSISTENT},
{"HyundaiLongitudinalTuning", {PERSISTENT | BACKUP, INT, "0"}},
{"SubaruStopAndGo", {PERSISTENT | BACKUP, BOOL, "0"}},
{"SubaruStopAndGoManualParkingBrake", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TeslaCoopSteering", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ToyotaEnforceStockLongitudinal", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ToyotaStopAndGoHack", {PERSISTENT | BACKUP, BOOL, "0"}},
{"DynamicExperimentalControl", PERSISTENT},
{"BlindSpot", PERSISTENT | BACKUP},
{"DynamicExperimentalControl", {PERSISTENT | BACKUP, BOOL, "0"}},
{"BlindSpot", {PERSISTENT | BACKUP, BOOL, "0"}},
// model panel params
{"LagdToggle", PERSISTENT | BACKUP},
// sunnypilot model params
{"CameraOffset", {PERSISTENT | BACKUP, FLOAT, "0.0"}},
{"LagdToggle", {PERSISTENT | BACKUP, BOOL, "1"}},
{"LagdToggleDelay", {PERSISTENT | BACKUP, FLOAT, "0.2"}},
{"LagdValueCache", {PERSISTENT, FLOAT, "0.2"}},
{"LaneTurnDesire", {PERSISTENT | BACKUP, BOOL, "0"}},
{"LaneTurnValue", {PERSISTENT | BACKUP, FLOAT, "19.0"}},
{"PlanplusControl", {PERSISTENT | BACKUP, FLOAT, "1.0"}},
// mapd
{"MapAdvisorySpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
{"MapdVersion", PERSISTENT},
{"MapSpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
{"NextMapSpeedLimit", CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_OSMUpdateRequired", CLEAR_ON_MANAGER_START},
{"OsmDbUpdatesCheck", CLEAR_ON_MANAGER_START}, // mapd database update happens with device ON, reset on boot
{"OSMDownloadBounds", PERSISTENT},
{"OsmDownloadedDate", PERSISTENT},
{"OSMDownloadLocations", PERSISTENT},
{"OSMDownloadProgress", CLEAR_ON_MANAGER_START},
{"OsmLocal", PERSISTENT},
{"OsmLocationName", PERSISTENT},
{"OsmLocationTitle", PERSISTENT},
{"OsmLocationUrl", PERSISTENT},
{"OsmStateName", PERSISTENT},
{"OsmStateTitle", PERSISTENT},
{"OsmWayTest", PERSISTENT},
{"RoadName", CLEAR_ON_ONROAD_TRANSITION},
{"MapAdvisorySpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, FLOAT}},
{"MapdVersion", {PERSISTENT, STRING}},
{"MapSpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, FLOAT, "0.0"}},
{"NextMapSpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_OSMUpdateRequired", {CLEAR_ON_MANAGER_START, JSON}},
{"OsmDbUpdatesCheck", {CLEAR_ON_MANAGER_START, BOOL}}, // mapd database update happens with device ON, reset on boot
{"OSMDownloadBounds", {PERSISTENT, STRING}},
{"OsmDownloadedDate", {PERSISTENT, STRING, "0.0"}},
{"OSMDownloadLocations", {PERSISTENT, JSON}},
{"OSMDownloadProgress", {CLEAR_ON_MANAGER_START, JSON}},
{"OsmLocal", {PERSISTENT, BOOL}},
{"OsmLocationName", {PERSISTENT, STRING}},
{"OsmLocationTitle", {PERSISTENT, STRING}},
{"OsmLocationUrl", {PERSISTENT, STRING}},
{"OsmStateName", {PERSISTENT, STRING, "All"}},
{"OsmStateTitle", {PERSISTENT, STRING}},
{"OsmWayTest", {PERSISTENT, STRING}},
{"RoadName", {CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"RoadNameToggle", {PERSISTENT | BACKUP, BOOL, "0"}},
// Speed Limit
{"SpeedLimitMode", {PERSISTENT | BACKUP, INT, "1"}},
{"SpeedLimitOffsetType", {PERSISTENT | BACKUP, INT, "0"}},
{"SpeedLimitPolicy", {PERSISTENT | BACKUP, INT, "3"}},
{"SpeedLimitValueOffset", {PERSISTENT | BACKUP, INT, "0"}},
// Smart Cruise Control
{"MapTargetVelocities", {CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"SmartCruiseControlMap", {PERSISTENT | BACKUP, BOOL, "0"}},
{"SmartCruiseControlVision", {PERSISTENT | BACKUP, BOOL, "0"}},
// Torque lateral control custom params
{"CustomTorqueParams", {PERSISTENT | BACKUP , BOOL}},
{"EnforceTorqueControl", {PERSISTENT | BACKUP, BOOL}},
{"LiveTorqueParamsToggle", {PERSISTENT | BACKUP , BOOL}},
{"LiveTorqueParamsRelaxedToggle", {PERSISTENT | BACKUP , BOOL}},
{"TorqueControlTune", {PERSISTENT | BACKUP, FLOAT}},
{"TorqueParamsOverrideEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TorqueParamsOverrideFriction", {PERSISTENT | BACKUP, FLOAT, "0.1"}},
{"TorqueParamsOverrideLatAccelFactor", {PERSISTENT | BACKUP, FLOAT, "2.5"}},
};

View File

@@ -1,19 +1,35 @@
# distutils: language = c++
# cython: language_level = 3
import builtins
import datetime
import json
from libcpp cimport bool
from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp.optional cimport optional
from openpilot.common.swaglog import cloudlog
cdef extern from "common/params.h":
cpdef enum ParamKeyType:
cpdef enum ParamKeyFlag:
PERSISTENT
CLEAR_ON_MANAGER_START
CLEAR_ON_ONROAD_TRANSITION
CLEAR_ON_OFFROAD_TRANSITION
DEVELOPMENT_ONLY
CLEAR_ON_IGNITION_ON
BACKUP
ALL
cpdef enum ParamKeyType:
STRING
BOOL
INT
FLOAT
TIME
JSON
BYTES
cdef cppclass c_Params "Params":
c_Params(string) except + nogil
string get(string, bool) nogil
@@ -24,10 +40,31 @@ cdef extern from "common/params.h":
void putBoolNonBlocking(string, bool) nogil
int putBool(string, bool) nogil
bool checkKey(string) nogil
ParamKeyType getKeyType(string) nogil
optional[string] getKeyDefaultValue(string) nogil
string getParamPath(string) nogil
void clearAll(ParamKeyType)
vector[string] allKeys(ParamKeyType)
void clearAll(ParamKeyFlag)
vector[string] allKeys(ParamKeyFlag)
PYTHON_2_CPP = {
(str, STRING): lambda v: v,
(builtins.bool, BOOL): lambda v: "1" if v else "0",
(int, INT): str,
(float, FLOAT): str,
(datetime.datetime, TIME): lambda v: v.isoformat(),
(dict, JSON): json.dumps,
(list, JSON): json.dumps,
(bytes, BYTES): lambda v: v,
}
CPP_2_PYTHON = {
STRING: lambda v: v.decode("utf-8"),
BOOL: lambda v: v == b"1",
INT: int,
FLOAT: float,
TIME: lambda v: datetime.datetime.fromisoformat(v.decode("utf-8")),
JSON: json.loads,
BYTES: lambda v: v,
}
def ensure_bytes(v):
return v.encode() if isinstance(v, str) else v
@@ -51,8 +88,8 @@ cdef class Params:
def __dealloc__(self):
del self.p
def clear_all(self, tx_type=ParamKeyType.ALL):
self.p.clearAll(tx_type)
def clear_all(self, tx_flag=ParamKeyFlag.ALL):
self.p.clearAll(tx_flag)
def check_key(self, key):
key = ensure_bytes(key)
@@ -60,21 +97,38 @@ cdef class Params:
raise UnknownKeyName(key)
return key
def get(self, key, bool block=False, encoding=None):
def python2cpp(self, proposed_type, expected_type, value, key):
cast = PYTHON_2_CPP.get((proposed_type, expected_type))
if cast:
return cast(value)
raise TypeError(f"Type mismatch while writing param {key}: {proposed_type=} {expected_type=} {value=}")
def _cpp2python(self, t, value, default, key):
if value is None:
return None
try:
return CPP_2_PYTHON[t](value)
except (KeyError, TypeError, ValueError):
cloudlog.warning(f"Failed to cast param {key} with {value=} from type {t=}")
return self._cpp2python(t, default, None, key)
def get(self, key, bool block=False, bool return_default=False):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
cdef optional[string] default = self.p.getKeyDefaultValue(k)
cdef string val
with nogil:
val = self.p.get(k, block)
default_val = (default.value() if default.has_value() else None) if return_default else None
if val == b"":
if block:
# If we got no value while running in blocked mode
# it means we got an interrupt while waiting
raise KeyboardInterrupt
else:
return None
return val if encoding is None else val.decode(encoding)
return self._cpp2python(t, default_val, None, key)
return self._cpp2python(t, val, default_val, key)
def get_bool(self, key, bool block=False):
cdef string k = self.check_key(key)
@@ -83,6 +137,11 @@ cdef class Params:
r = self.p.getBool(k, block)
return r
def _put_cast(self, key, dat):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
return ensure_bytes(self.python2cpp(type(dat), t, dat, key))
def put(self, key, dat):
"""
Warning: This function blocks until the param is written to disk!
@@ -91,7 +150,7 @@ cdef class Params:
in general try to avoid writing params as much as possible.
"""
cdef string k = self.check_key(key)
cdef string dat_bytes = ensure_bytes(dat)
cdef string dat_bytes = self._put_cast(key, dat)
with nogil:
self.p.put(k, dat_bytes)
@@ -102,7 +161,7 @@ cdef class Params:
def put_nonblocking(self, key, dat):
cdef string k = self.check_key(key)
cdef string dat_bytes = ensure_bytes(dat)
cdef string dat_bytes = self._put_cast(key, dat)
with nogil:
self.p.putNonBlocking(k, dat_bytes)
@@ -120,5 +179,19 @@ cdef class Params:
cdef string key_bytes = ensure_bytes(key)
return self.p.getParamPath(key_bytes).decode("utf-8")
def all_keys(self, type=ParamKeyType.ALL):
return self.p.allKeys(type)
def get_type(self, key):
return self.p.getKeyType(self.check_key(key))
def all_keys(self, flag=ParamKeyFlag.ALL):
return self.p.allKeys(flag)
def get_default_value(self, key):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
cdef optional[string] default = self.p.getKeyDefaultValue(k)
return self._cpp2python(t, default.value(), None, key) if default.has_value() else None
def cpp2python(self, key, value):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
return self._cpp2python(t, value, None, key)

View File

@@ -2,23 +2,14 @@ import numpy as np
from numbers import Number
class PIDController:
def __init__(self, k_p, k_i, k_f=0., k_d=0., pos_limit=1e308, neg_limit=-1e308, rate=100):
self._k_p = k_p
self._k_i = k_i
self._k_d = k_d
self.k_f = k_f # feedforward gain
if isinstance(self._k_p, Number):
self._k_p = [[0], [self._k_p]]
if isinstance(self._k_i, Number):
self._k_i = [[0], [self._k_i]]
if isinstance(self._k_d, Number):
self._k_d = [[0], [self._k_d]]
def __init__(self, k_p, k_i, k_d=0., pos_limit=1e308, neg_limit=-1e308, rate=100):
self._k_p: list[list[float]] = [[0], [k_p]] if isinstance(k_p, Number) else k_p
self._k_i: list[list[float]] = [[0], [k_i]] if isinstance(k_i, Number) else k_i
self._k_d: list[list[float]] = [[0], [k_d]] if isinstance(k_d, Number) else k_d
self.pos_limit = pos_limit
self.neg_limit = neg_limit
self.set_limits(pos_limit, neg_limit)
self.i_unwind_rate = 0.3 / rate
self.i_rate = 1.0 / rate
self.i_dt = 1.0 / rate
self.speed = 0.0
self.reset()
@@ -35,10 +26,6 @@ class PIDController:
def k_d(self):
return np.interp(self.speed, self._k_d[0], self._k_d[1])
@property
def error_integral(self):
return self.i/self.k_i
def reset(self):
self.p = 0.0
self.i = 0.0
@@ -46,25 +33,25 @@ class PIDController:
self.f = 0.0
self.control = 0
def update(self, error, error_rate=0.0, speed=0.0, override=False, feedforward=0., freeze_integrator=False):
def set_limits(self, pos_limit, neg_limit):
self.pos_limit = pos_limit
self.neg_limit = neg_limit
def update(self, error, error_rate=0.0, speed=0.0, feedforward=0., freeze_integrator=False):
self.speed = speed
self.p = self.k_p * float(error)
self.d = self.k_d * error_rate
self.f = feedforward
self.p = float(error) * self.k_p
self.f = feedforward * self.k_f
self.d = error_rate * self.k_d
if not freeze_integrator:
i = self.i + self.k_i * self.i_dt * error
if override:
self.i -= self.i_unwind_rate * float(np.sign(self.i))
else:
if not freeze_integrator:
self.i = self.i + error * self.k_i * self.i_rate
# Clip i to prevent exceeding control limits
control_no_i = self.p + self.d + self.f
control_no_i = np.clip(control_no_i, self.neg_limit, self.pos_limit)
self.i = np.clip(self.i, self.neg_limit - control_no_i, self.pos_limit - control_no_i)
# Don't allow windup if already clipping
test_control = self.p + i + self.d + self.f
i_upperbound = self.i if test_control > self.pos_limit else self.pos_limit
i_lowerbound = self.i if test_control < self.neg_limit else self.neg_limit
self.i = np.clip(i, i_lowerbound, i_upperbound)
control = self.p + self.i + self.d + self.f
self.control = np.clip(control, self.neg_limit, self.pos_limit)
return self.control

View File

@@ -13,7 +13,11 @@ public:
if (prefix.empty()) {
prefix = util::random_string(15);
}
msgq_path = Path::shm_path() + "/" + prefix;
#ifdef __APPLE__
msgq_path = "/tmp/msgq_" + prefix;
#else
msgq_path = "/dev/shm/msgq_" + prefix;
#endif
bool ret = util::create_directories(msgq_path, 0777);
assert(ret);
setenv("OPENPILOT_PREFIX", prefix.c_str(), 1);
@@ -23,14 +27,14 @@ public:
auto param_path = Params().getParamPath();
if (util::file_exists(param_path)) {
std::string real_path = util::readlink(param_path);
system(util::string_format("rm %s -rf", real_path.c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", real_path.c_str()));
unlink(param_path.c_str());
}
if (getenv("COMMA_CACHE") == nullptr) {
system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", Path::download_cache_root().c_str()));
}
system(util::string_format("rm %s -rf", Path::comma_home().c_str()).c_str());
system(util::string_format("rm %s -rf", msgq_path.c_str()).c_str());
util::check_system(util::string_format("rm %s -rf", Path::comma_home().c_str()));
util::check_system(util::string_format("rm %s -rf", msgq_path.c_str()));
unsetenv("OPENPILOT_PREFIX");
}

View File

@@ -1,4 +1,5 @@
import os
import platform
import shutil
import uuid
@@ -9,20 +10,20 @@ from openpilot.system.hardware.hw import Paths
from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT
class OpenpilotPrefix:
def __init__(self, prefix: str = None, clean_dirs_on_exit: bool = True, shared_download_cache: bool = False):
def __init__(self, prefix: str | None = None, create_dirs_on_enter: bool = True, clean_dirs_on_exit: bool = True, shared_download_cache: bool = False):
self.prefix = prefix if prefix else str(uuid.uuid4().hex[0:15])
self.msgq_path = os.path.join(Paths.shm_path(), self.prefix)
shm_path = "/tmp" if platform.system() == "Darwin" else "/dev/shm"
self.msgq_path = os.path.join(shm_path, "msgq_" + self.prefix)
self.create_dirs_on_enter = create_dirs_on_enter
self.clean_dirs_on_exit = clean_dirs_on_exit
self.shared_download_cache = shared_download_cache
def __enter__(self):
self.original_prefix = os.environ.get('OPENPILOT_PREFIX', None)
os.environ['OPENPILOT_PREFIX'] = self.prefix
try:
os.mkdir(self.msgq_path)
except FileExistsError:
pass
os.makedirs(Paths.log_root(), exist_ok=True)
if self.create_dirs_on_enter:
self.create_dirs()
if self.shared_download_cache:
os.environ["COMMA_CACHE"] = DEFAULT_DOWNLOAD_CACHE_ROOT
@@ -40,6 +41,13 @@ class OpenpilotPrefix:
pass
return False
def create_dirs(self):
try:
os.mkdir(self.msgq_path)
except FileExistsError:
pass
os.makedirs(Paths.log_root(), exist_ok=True)
def clean_dirs(self):
symlink_path = Params().get_param_path()
if os.path.exists(symlink_path):

View File

@@ -6,9 +6,9 @@
#include "common/timing.h"
#include "common/util.h"
RateKeeper::RateKeeper(const std::string &name, float rate, float print_delay_threshold)
: name(name),
print_delay_threshold(std::max(0.f, print_delay_threshold)) {
RateKeeper::RateKeeper(const std::string &name_, float rate, float print_delay_threshold_)
: name(name_),
print_delay_threshold(std::max(0.f, print_delay_threshold_)) {
interval = 1 / rate;
last_monitor_time = seconds_since_boot();
next_frame_time = last_monitor_time + interval;

View File

@@ -6,7 +6,7 @@ import time
from setproctitle import getproctitle
from openpilot.common.util import MovingAverage
from openpilot.common.utils import MovingAverage
from openpilot.system.hardware import PC

View File

@@ -1,30 +0,0 @@
import time
import functools
from openpilot.common.swaglog import cloudlog
def retry(attempts=3, delay=1.0, ignore_failure=False):
def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
for _ in range(attempts):
try:
return func(*args, **kwargs)
except Exception:
cloudlog.exception(f"{func.__name__} failed, trying again")
time.sleep(delay)
if ignore_failure:
cloudlog.error(f"{func.__name__} failed after retry")
else:
raise Exception(f"{func.__name__} failed after retry")
return wrapper
return decorator
if __name__ == "__main__":
@retry(attempts=10)
def abc():
raise ValueError("abc failed :(")
abc()

View File

@@ -1,13 +0,0 @@
import subprocess
def run_cmd(cmd: list[str], cwd=None, env=None) -> str:
return subprocess.check_output(cmd, encoding='utf8', cwd=cwd, env=env).strip()
def run_cmd_default(cmd: list[str], default: str = "", cwd=None, env=None) -> str:
try:
return run_cmd(cmd, cwd=cwd, env=env)
except subprocess.CalledProcessError:
return default

View File

@@ -15,6 +15,8 @@
#include "common/version.h"
#include "system/hardware/hw.h"
#include "sunnypilot/common/version.h"
class SwaglogState {
public:
SwaglogState() {
@@ -56,7 +58,7 @@ public:
if (char* daemon_name = getenv("MANAGER_DAEMON")) {
ctx_j["daemon"] = daemon_name;
}
ctx_j["version"] = COMMA_VERSION;
ctx_j["version"] = SUNNYPILOT_VERSION;
ctx_j["dirty"] = !getenv("CLEAN");
ctx_j["device"] = Hardware::get_name();
}

View File

@@ -1,7 +1,7 @@
import os
from uuid import uuid4
from openpilot.common.file_helpers import atomic_write_in_dir
from openpilot.common.utils import atomic_write
class TestFileHelpers:
@@ -15,5 +15,5 @@ class TestFileHelpers:
assert f.read() == "test"
os.remove(path)
def test_atomic_write_in_dir(self):
self.run_atomic_write_func(atomic_write_in_dir)
def test_atomic_write(self):
self.run_atomic_write_func(atomic_write)

View File

@@ -6,7 +6,7 @@ from openpilot.common.markdown import parse_markdown
class TestMarkdown:
def test_all_release_notes(self):
with open(os.path.join(BASEDIR, "RELEASES.md")) as f:
with open(os.path.join(BASEDIR, "CHANGELOG.md")) as f:
release_notes = f.read().split("\n\n")
assert len(release_notes) > 10

View File

@@ -1,10 +1,11 @@
import pytest
import datetime
import os
import threading
import time
import uuid
from openpilot.common.params import Params, ParamKeyType, UnknownKeyName
from openpilot.common.params import Params, ParamKeyFlag, UnknownKeyName
class TestParams:
def setup_method(self):
@@ -12,7 +13,7 @@ class TestParams:
def test_params_put_and_get(self):
self.params.put("DongleId", "cb38263377b873ee")
assert self.params.get("DongleId") == b"cb38263377b873ee"
assert self.params.get("DongleId") == "cb38263377b873ee"
def test_params_non_ascii(self):
st = b"\xe1\x90\xff"
@@ -20,7 +21,7 @@ class TestParams:
assert self.params.get("CarParams") == st
def test_params_get_cleared_manager_start(self):
self.params.put("CarParams", "test")
self.params.put("CarParams", b"test")
self.params.put("DongleId", "cb38263377b873ee")
assert self.params.get("CarParams") == b"test"
@@ -29,24 +30,24 @@ class TestParams:
f.write("test")
assert os.path.isfile(undefined_param)
self.params.clear_all(ParamKeyType.CLEAR_ON_MANAGER_START)
self.params.clear_all(ParamKeyFlag.CLEAR_ON_MANAGER_START)
assert self.params.get("CarParams") is None
assert self.params.get("DongleId") is not None
assert not os.path.isfile(undefined_param)
def test_params_two_things(self):
self.params.put("DongleId", "bob")
self.params.put("AthenadPid", "123")
assert self.params.get("DongleId") == b"bob"
assert self.params.get("AthenadPid") == b"123"
self.params.put("AthenadPid", 123)
assert self.params.get("DongleId") == "bob"
assert self.params.get("AthenadPid") == 123
def test_params_get_block(self):
def _delayed_writer():
time.sleep(0.1)
self.params.put("CarParams", "test")
self.params.put("CarParams", b"test")
threading.Thread(target=_delayed_writer).start()
assert self.params.get("CarParams") is None
assert self.params.get("CarParams", True) == b"test"
assert self.params.get("CarParams", block=True) == b"test"
def test_params_unknown_key_fails(self):
with pytest.raises(UnknownKeyName):
@@ -76,17 +77,17 @@ class TestParams:
self.params.put_bool("IsMetric", False)
assert not self.params.get_bool("IsMetric")
self.params.put("IsMetric", "1")
self.params.put("IsMetric", True)
assert self.params.get_bool("IsMetric")
self.params.put("IsMetric", "0")
self.params.put("IsMetric", False)
assert not self.params.get_bool("IsMetric")
def test_put_non_blocking_with_get_block(self):
q = Params()
def _delayed_writer():
time.sleep(0.1)
Params().put_nonblocking("CarParams", "test")
Params().put_nonblocking("CarParams", b"test")
threading.Thread(target=_delayed_writer).start()
assert q.get("CarParams") is None
assert q.get("CarParams", True) == b"test"
@@ -107,3 +108,34 @@ class TestParams:
assert len(keys) > 20
assert len(keys) == len(set(keys))
assert b"CarParams" in keys
def test_params_default_value(self):
self.params.remove("LanguageSetting")
self.params.remove("LongitudinalPersonality")
self.params.remove("LiveParameters")
assert self.params.get("LanguageSetting") is None
assert self.params.get("LanguageSetting", return_default=False) is None
assert isinstance(self.params.get("LanguageSetting", return_default=True), str)
assert isinstance(self.params.get("LongitudinalPersonality", return_default=True), int)
assert self.params.get("LiveParameters") is None
assert self.params.get("LiveParameters", return_default=True) is None
def test_params_get_type(self):
# json
self.params.put("ApiCache_FirehoseStats", {"a": 0})
assert self.params.get("ApiCache_FirehoseStats") == {"a": 0}
# int
self.params.put("BootCount", 1441)
assert self.params.get("BootCount") == 1441
# bool
self.params.put("AdbEnabled", True)
assert self.params.get("AdbEnabled")
assert isinstance(self.params.get("AdbEnabled"), bool)
# time
now = datetime.datetime.now(datetime.UTC)
self.params.put("InstallDate", now)
assert self.params.get("InstallDate") == now

View File

@@ -9,6 +9,8 @@
#include "system/hardware/hw.h"
#include "third_party/json11/json11.hpp"
#include "sunnypilot/common/version.h"
std::string daemon_name = "testy";
std::string dongle_id = "test_dongle_id";
int LINE_NO = 0;
@@ -53,7 +55,7 @@ void recv_log(int thread_cnt, int thread_msg_cnt) {
REQUIRE(ctx["dongle_id"].string_value() == dongle_id);
REQUIRE(ctx["dirty"].bool_value() == true);
REQUIRE(ctx["version"].string_value() == COMMA_VERSION);
REQUIRE(ctx["version"].string_value() == SUNNYPILOT_VERSION);
std::string device = Hardware::get_name();
REQUIRE(ctx["device"].string_value() == device);

View File

@@ -36,7 +36,7 @@ TEST_CASE("util::read_file") {
REQUIRE(util::read_file(filename).empty());
std::string content = random_bytes(64 * 1024);
write(fd, content.c_str(), content.size());
REQUIRE(write(fd, content.c_str(), content.size()) == (ssize_t)content.size());
std::string ret = util::read_file(filename);
bool equal = (ret == content);
REQUIRE(equal);
@@ -114,12 +114,12 @@ TEST_CASE("util::safe_fwrite") {
}
TEST_CASE("util::create_directories") {
system("rm /tmp/test_create_directories -rf");
REQUIRE(system("rm /tmp/test_create_directories -rf") == 0);
std::string dir = "/tmp/test_create_directories/a/b/c/d/e/f";
auto check_dir_permissions = [](const std::string &dir, mode_t mode) -> bool {
auto check_dir_permissions = [](const std::string &path, mode_t mode) -> bool {
struct stat st = {};
return stat(dir.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
return stat(path.c_str(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR && (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) == mode;
};
SECTION("create_directories") {
@@ -132,7 +132,7 @@ TEST_CASE("util::create_directories") {
}
SECTION("a file exists with the same name") {
REQUIRE(util::create_directories(dir, 0755));
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT);
int f = open((dir + "/file").c_str(), O_RDWR | O_CREAT, 0644);
REQUIRE(f != -1);
close(f);
REQUIRE(util::create_directories(dir + "/file", 0755) == false);

View File

@@ -1,5 +0,0 @@
Import('env', 'envCython')
transformations = env.Library('transformations', ['orientation.cc', 'coordinates.cc'])
transformations_python = envCython.Program('transformations.so', 'transformations.pyx')
Export('transformations', 'transformations_python')

View File

@@ -102,3 +102,36 @@ class TestNED:
np.testing.assert_allclose(converter.ned2ecef(ned_offsets_batch),
ecef_positions_offset_batch,
rtol=1e-9, atol=1e-7)
def test_errors(self):
# Test wrong shape/type for geodetic2ecef
# numpy_wrap raises IndexError for scalar input
with np.testing.assert_raises(IndexError):
coord.geodetic2ecef(1.0)
with np.testing.assert_raises_regex(ValueError, "Geodetic must be size 3"):
coord.geodetic2ecef([0, 0])
with np.testing.assert_raises_regex(ValueError, "Geodetic must be size 3"):
coord.geodetic2ecef([0, 0, 0, 0])
with np.testing.assert_raises(TypeError):
coord.geodetic2ecef(['a', 'b', 'c'])
# Test LocalCoord constructor errors
with np.testing.assert_raises(ValueError):
coord.LocalCoord.from_geodetic([0, 0])
with np.testing.assert_raises(ValueError):
coord.LocalCoord.from_geodetic(1)
with np.testing.assert_raises(TypeError):
coord.LocalCoord.from_geodetic(['a', 'b', 'c'])
# Test wrong shape/type for ecef2geodetic
with np.testing.assert_raises(ValueError):
coord.ecef2geodetic([1, 2])
with np.testing.assert_raises(ValueError):
coord.ecef2geodetic([1, 2, 3, 4])
with np.testing.assert_raises(IndexError):
coord.ecef2geodetic(1.0)

View File

@@ -1,4 +1,5 @@
import numpy as np
import pytest
from openpilot.common.transformations.orientation import euler2quat, quat2euler, euler2rot, rot2euler, \
rot2quat, quat2rot, \
@@ -59,3 +60,32 @@ class TestOrientation:
np.testing.assert_allclose(ned_eulers[i], ned_euler_from_ecef(ecef_positions[i], eulers[i]), rtol=1e-7)
#np.testing.assert_allclose(eulers[i], ecef_euler_from_ned(ecef_positions[i], ned_eulers[i]), rtol=1e-7)
# np.testing.assert_allclose(ned_eulers, ned_euler_from_ecef(ecef_positions, eulers), rtol=1e-7)
def test_inputs(self):
with pytest.raises(ValueError):
euler2quat([1, 2])
with pytest.raises(ValueError):
quat2rot([1, 2, 3])
with pytest.raises(IndexError):
rot2quat(np.zeros((2, 2)))
def test_euler_rot_consistency(self):
rpy = [0.1, 0.2, 0.3]
R = euler2rot(rpy)
# R -> q -> R
q = rot2quat(R)
R_new = quat2rot(q)
np.testing.assert_allclose(R, R_new, atol=1e-15)
# q -> R -> Euler (quat2euler) -> R
rpy_new = quat2euler(q)
R_new2 = euler2rot(rpy_new)
np.testing.assert_allclose(R, R_new2, atol=1e-15)
# R -> Euler (rot2euler) -> R
rpy_from_rot = rot2euler(R)
R_new3 = euler2rot(rpy_from_rot)
np.testing.assert_allclose(R, R_new3, atol=1e-15)

View File

@@ -1,72 +0,0 @@
# cython: language_level=3
from libcpp cimport bool
cdef extern from "orientation.cc":
pass
cdef extern from "orientation.hpp":
cdef cppclass Quaternion "Eigen::Quaterniond":
Quaternion()
Quaternion(double, double, double, double)
double w()
double x()
double y()
double z()
cdef cppclass Vector3 "Eigen::Vector3d":
Vector3()
Vector3(double, double, double)
double operator()(int)
cdef cppclass Matrix3 "Eigen::Matrix3d":
Matrix3()
Matrix3(double*)
double operator()(int, int)
Quaternion euler2quat(const Vector3 &)
Vector3 quat2euler(const Quaternion &)
Matrix3 quat2rot(const Quaternion &)
Quaternion rot2quat(const Matrix3 &)
Vector3 rot2euler(const Matrix3 &)
Matrix3 euler2rot(const Vector3 &)
Matrix3 rot_matrix(double, double, double)
Vector3 ecef_euler_from_ned(const ECEF &, const Vector3 &)
Vector3 ned_euler_from_ecef(const ECEF &, const Vector3 &)
cdef extern from "coordinates.cc":
cdef struct ECEF:
double x
double y
double z
cdef struct NED:
double n
double e
double d
cdef struct Geodetic:
double lat
double lon
double alt
bool radians
ECEF geodetic2ecef(const Geodetic &)
Geodetic ecef2geodetic(const ECEF &)
cdef cppclass LocalCoord_c "LocalCoord":
Matrix3 ned2ecef_matrix
Matrix3 ecef2ned_matrix
LocalCoord_c(const Geodetic &, const ECEF &)
LocalCoord_c(const Geodetic &)
LocalCoord_c(const ECEF &)
NED ecef2ned(const ECEF &)
ECEF ned2ecef(const NED &)
NED geodetic2ned(const Geodetic &)
Geodetic ned2geodetic(const NED &)
cdef extern from "coordinates.hpp":
pass

Some files were not shown because too many files have changed in this diff Show More