Compare commits

...

2809 Commits

Author SHA1 Message Date
royjr
71e4f251d2 Merge branch 'master' into developer-panel-external-storage 2026-03-02 02:42:38 -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
royjr
dbefa8afbd Merge branch 'master' into developer-panel-external-storage 2026-02-20 22:29:35 -05: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
royjr
fb54689300 Merge branch 'master' into developer-panel-external-storage 2025-12-29 09:57:43 -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
royjr
db8e56687f Update developer.py 2025-12-21 17:00:44 -05:00
royjr
88e5e3d23d Update developer.py 2025-12-21 16:55:16 -05:00
royjr
0b00470999 Merge branch 'master' into developer-panel-external-storage 2025-12-21 16:51:48 -05: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
royjr
65dcbf698e lint 2025-11-27 22:12:18 -05:00
royjr
ac99ce017c cleanup 2025-11-27 22:07:03 -05:00
royjr
508abb227c sudo 2025-11-27 22:04:41 -05:00
royjr
b609622398 init 2025-11-27 21:38:18 -05:00
discountchubbs
c9f2756264 double translate 2025-11-27 12:05:07 -08:00
discountchubbs
3580656d78 comment out 2025-11-27 11:57:03 -08:00
discountchubbs
f973b7fdcb ui: developer panel 2025-11-27 11:53:30 -08: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
DevTekVE
cdf990c1b1 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#1020) 2025-06-28 22:06:31 +02:00
DevTekVE
ea8eaed1aa Merge remote-tracking branch 'comma/master' into sync-20250627
# Conflicts:
#	README.md
#	opendbc_repo
#	panda
#	selfdrive/ui/qt/offroad/settings.cc
#	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/manager/build.py
#	system/ui/spinner.py
#	tinygrad_repo
#	tools/lib/framereader.py
Merge branch 'comma-202506127-bedcb896644528aed6af448e63eeadb3dd8b2c77' into sync-20250627

# Conflicts:
#	opendbc/safety/tests/libsafety/SConscript
Merge branch 'comma-202506127-bedcb896644528aed6af448e63eeadb3dd8b2c77' into sync-20250627

# Conflicts:
#	opendbc/safety/tests/libsafety/SConscript
Merge remote-tracking branch 'comma/master' into sync-20250627

# Conflicts:
#	opendbc/safety/tests/libsafety/SConscript
Merge branch 'comma-20250627-1020d355584265391eb3acb556e4353b581fa9c0' into sync-20250627
Merge branch 'comma-20250627-1020d355584265391eb3acb556e4353b581fa9c0' into sync-20250627
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master-new`

Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master-new`
Sync: `commaai/panda:master` into `sunnypilot/panda:master-new`

Sync: `commaai/panda:master` into `sunnypilot/panda:master-new`
2025-06-28 21:43:38 +02: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
Shane Smiskol
4e094bc740 raylib UI: fix scrolling click behavior (#35609)
see look how nice using base classes are
2025-06-27 02:52:11 -07:00
Nayan
17432e1b0d ui: model panel - added download progress bars (#998)
* progress bars!!

* too many changes

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-27 10:44:14 +02:00
Kacper Rączy
0218ae82ed Fix openpilot-prebuilt image build (#35607)
Fix tinygrad shell exec
2025-06-27 02:51:20 +00:00
Shane Smiskol
7b35f64049 raylib UI: implement easier to use Scroller (#35606)
* new scroller and widget

start

heck yeah

fix that

clean up

* fuck yeah

* line sep

* fix that

* fix clicking on action

* no custom width

* move all over

* clean up

* more clean up

* rm custom visible too

* more clean up

* lint

* dont use enabled generically yet

* ??
2025-06-26 17:58:34 -07:00
Andrei Radulescu
0a254fbc4e ui: avoid some raylib ui no dongleid errors (#35562)
avoid some ui.py errors on pc
2025-06-26 15:16:20 -07:00
Dean Lee
903f426bb9 ui: fix shader polygon artifacts on device (#35568)
fix shader polygon artifacts on device
2025-06-26 15:13:52 -07:00
Dean Lee
53d757a84f ui: fix raylib log message formatting by handing va_list arguments (#35561)
* fix raylib log message formatting by handing va_list arguments

* dd

* improve&simplify

* chadder says this works

* consis

* clean up

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-26 15:12:16 -07:00
Jimmy
fa5fce465a ui: scroll to toggle on button press (#35604)
scroll so toggle in view when setCurrentPanel is called with param
2025-06-26 09:22:58 -07:00
Harald Schäfer
d1893ee3eb OS camera calibration (#35603)
* wider narrow

* typo

* whiteapace
2025-06-25 22:08:56 -07:00
Shane Smiskol
56fca1353f raylib: scroll panel cleanup (#35599)
* no d

* we don't even use it

* use a deque

* hmm

* Revert "hmm"

This reverts commit 0203bf7214fa0145d101875006bbae2e8157d6d6.
2025-06-25 15:17:54 -07:00
Shane Smiskol
a22eecd773 raylib: don't use time.time() (#35597)
Update inputbox.py
2025-06-25 14:58:06 -07:00
YassineYousfi
01b3f70c01 Vegetarian Filet o Fish model 🐟 (#35379)
* 7fcb3c70-391e-4bd6-b17d-a011b2845d06/700

* 0fc8b4da-7a24-4469-9428-ae7dcffc3c67/700

* fix

* c16e9412-c448-4589-9ff6-5362be0e9bc3/700

* b2714021-a7bc-41d6-8e1c-bfd20e59cc75/700
2025-06-25 11:18:28 -07:00
Andrei Radulescu
8b8f33f488 webcam: back to opencv (#35522)
* 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.

* update uv.lock

* keep av bgr2nv12

* rename
2025-06-25 10:58:14 -07:00
Dean Lee
d5b5383f1a ui: enable VSYNC by default (#35564)
enable VSYNC by default to fix visual artifacts on device
2025-06-25 01:02:17 -07:00
Tim Wilson
0cfdd6757b NNLC: Learned Lateral Lag for Torque Extension (#946)
* TorqueExtBase: use learned lag

lower non-zero limit for lag

restore original lag mod

* NNLC: use learned lat lag

* add test

* non-zero lag in test

* lower lag mod to 0.1s

* Update constant to reflect Twilsonco's recommendations.
2025-06-24 09:28:49 -07:00
Shane Smiskol
91792aa767 build raylib: take commit (#35594)
* Update build.sh

* test

* rev
2025-06-23 16:59:41 -07:00
YassineYousfi
c1e0b87059 liquid crystal model 💧❄️ (#35591)
986745e3-b382-41a7-b15a-2cdcb664d072/700
2025-06-23 13:06:15 -07:00
commaci-public
7f6f346c38 [bot] Update Python packages (#35593)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-23 10:17:23 -07:00
Shane Smiskol
5e3fc13751 Update TOTAL_SCONS_NODES 2025-06-20 13:46:10 -07:00
Adeeb Shihadeh
885f3f73e0 gps doesn't need to be an onroad alert anymore (#35585) 2025-06-20 11:13:34 -07:00
Maxime Desroches
2c78cfe200 update to latest userdata partition (#35582)
update userdata
2025-06-19 13:13:37 -07:00
Adeeb Shihadeh
4a4f3fce94 rm PYTHONPATH (#35579)
* rm PYTHONPATH

* still need that one for now
2025-06-19 12:36:38 -07:00
Maxime Desroches
5772683432 ci: faster process replay (#35578)
* waste

* update

* again

* we love tesla

* again again
2025-06-19 11:00:41 -07:00
Maxime Desroches
6a37d8a89e fix framereader indent 2025-06-19 10:38:26 -07:00
Harald Schäfer
87a6e369aa Framereader: minor cleanup (#35577)
* No wrapping

* unused test

* another list

* mypy

* cleaner

* Revert "cleaner"

This reverts commit ccc1446b9d649d64b20175e22a66e135c44b21e5.

* mypy
2025-06-19 09:49:51 -07:00
James Vecellio-Grant
d62c3cdef9 Model: Sync modeld with upstream arbitrary vision inputs (#1004)
* Prepare sunnypilot modeld refactor:

* This is needed to work with latest vision models from comma master.

* Add this for dev-c3-new
2025-06-19 07:24:20 -07:00
Harald Schäfer
5f3d876aaa model replay: framereader cache (#35576)
* Simpler cache version

* cachetools

* different LRU

* lint

* smaller

* just write LRU

* mypy

* same length
2025-06-18 16:29:22 -07:00
Adeeb Shihadeh
5f559cfcc7 make it easy to copy/paste 2025-06-18 15:50:31 -07:00
Adeeb Shihadeh
42fc89a0e5 update release checklist 2025-06-18 15:48:10 -07:00
YassineYousfi
ccd55d3663 kerrygold model 🧈 (#35499)
* b92dd772-6ae6-4329-880d-7e1cc60dd9da/700

* 6a8a3da8-c264-4f91-b0a6-d04722cccfce/700

* 967279c1-7d3c-4463-9d35-58e0311a5f57/700

* flake
2025-06-18 09:21:05 -07:00
Shane Smiskol
25f5ec46d9 raylib ui: global Device class (#35573)
* device

* works

* clean up

* and

* more

* clean

* fixy

* cu

* slightly smaller
2025-06-17 19:49:02 -07:00
github-actions[bot]
c460f5150f [bot] Update translations (#35565)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-16 13:30:00 -07:00
commaci-public
b18037c38a [bot] Update Python packages (#35566)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-16 10:47:04 -07:00
Warren Togami
6b9c63acbe NNLC: RAV4_PRIME tuning Gen 2 (#925)
TOYOTA_RAV4_PRIME NNLC tuning gen 2 (May 15th)
2025-06-14 16:46:29 -07:00
programanichiro
b5d5fa755f Multilang: update ja translation. (#35560)
* japanese translation

* スペース要らない。
2025-06-14 11:20:18 -07:00
Maxime Desroches
f9792fe717 AGNOS 12.4 (#35558)
agnos12.4
2025-06-13 22:55:40 -07:00
Adeeb Shihadeh
03f3d6ccf1 update setup instructions 2025-06-13 16:52:08 -07:00
Adeeb Shihadeh
4eb64561f2 remove old workflow doc 2025-06-13 16:46:46 -07:00
Maxime Desroches
762f11c620 setup: warning for custom software (#35556)
* custom warn

* Update SConscript

* bump
2025-06-13 14:43:16 -07:00
Dean Lee
2a9e35609b ui: increase settings nav btn height (#35553)
increase nav btn height
2025-06-13 14:12:20 -07:00
Dean Lee
6352589902 ui: open device panel on settings click and send userFlag on flag click (#35554)
* open device panel when settings button clicked

* send userFlag on flag clicked

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-13 14:11:33 -07:00
commaci-public
7293a19472 [bot] Update Python packages (#35552)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-13 13:57:35 -07:00
github-actions[bot]
f4df569064 [bot] Update translations (#35551)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-13 13:57:02 -07:00
Shane Smiskol
2706179f84 Revert "raylib ui: reduce DM drawing (#35547)" (#35557)
* Revert "raylib ui: reduce DM drawing (#35547)"

This reverts commit 7b8d6b6eb7.

* actually fix check
2025-06-13 13:56:13 -07:00
Shane Smiskol
25e123a23a raylib ui: common state update function (#35546)
* add _update_state

* nonlya

* visible already does this for us!

* do hud renderer and exp button

* temp

* this really needs some type of timer like QT

* this really needs some type of timer like QT

* todo

* use in model renderer

* Revert "use in model renderer"

This reverts commit d35f774155c9875209d06b8cd0b4849b1d8a60c4.

* no passing rect

* cl

* unused now
2025-06-12 21:22:13 -07:00
Shane Smiskol
f275d6d892 raylib: log prime status failure to fetch 2025-06-12 21:05:36 -07:00
Shane Smiskol
62b301ae76 raylib ui: fix Firehose param caching (#35549)
* oof

* fixx
2025-06-12 21:04:42 -07:00
Shane Smiskol
2a1939f37a raylib: fix Firehose parsing v2 2025-06-12 20:21:01 -07:00
Shane Smiskol
7b8d6b6eb7 raylib ui: reduce DM drawing (#35547)
* reduce?

* clean up
2025-06-12 20:02:27 -07:00
Shane Smiskol
e9fe40755c raylib ui: fix Firehose param loading (#35548)
fix
2025-06-12 17:44:20 -07:00
Shane Smiskol
cd657f35f0 ui: update layout rects on change (#35545)
* update_layout_rects

* check prev

* about it

* need this since touch can change :(

* looks nicer

* Revert "looks nicer"

This reverts commit 8f36c92675db66695f22f93a01682426db9c05e8.
2025-06-12 16:53:09 -07:00
Shane Smiskol
98c34c4b7d Raylib: generic Widget visibility (#35543)
* generic visibility

* clean up

* fix op lint

* ? why do we care if it's None

* no need to make it too generic

* do driver state

* noise

* clean up

* draft on listview

* waiting for deanlees listview refactor - Revert "draft on listview"

This reverts commit 8ea4fa2a68361079bc79ac99e67c5cb58068daa4.

* rm demo
2025-06-12 15:23:02 -07:00
Shane Smiskol
3a10bdb1e7 Revert "ui: refactor ListView for generic widget support and simplified item architecture" (#35542)
Revert "ui: refactor ListView for generic widget support and simplified item …"

This reverts commit 32ae9efb3d.
2025-06-12 14:17:04 -07:00
Shane Smiskol
5138217673 raylib ui: store rects (#35538)
* simple version

* use it

* use it in one place
2025-06-12 14:11:11 -07:00
Dean Lee
32ae9efb3d ui: refactor ListView for generic widget support and simplified item architecture (#35536)
refactor list view

apply reviews
2025-06-12 08:55:13 -07:00
Dean Lee
723a52626d ui: simple HTML parser for regulatory Views (#35525)
* simple HTML parser for regulatory Views

* format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-11 21:52:34 -07:00
Dean Lee
f3d0a9ea13 ui: fix QR code refresh tracking in pairing dialog (#35529)
fix QR code refresh tracking

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-11 21:36:24 -07:00
Dean Lee
9d8e4acec9 ui: setup widget->firehose settings navigation (#35531)
* setup widget->firehose settings navigation

* cleanup

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-11 21:21:59 -07:00
Dean Lee
79319d2447 ui: add driving personality selector to settings (#35524)
* Add driving personality selector to settings

* icon

* format

* type

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-11 21:18:07 -07:00
commaci-public
58763f4551 [bot] Update Python packages (#35535)
* Update Python packages

* fix xdist issue

* cmt

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-11 20:28:48 -07:00
Shane Smiskol
fcebb5eb9f fix repo maintenance (#35534)
* ?

* . can't be used since then it will be modeld folder
2025-06-11 17:31:36 -07:00
Shane Smiskol
f7ce5fb94c Remove extra newlines in translations 2025-06-11 17:27:41 -07:00
Shane Smiskol
1562b88f63 Move format_fingerprints.py to opendbc (#35532)
* mv

* format fingerprints

* fixx

* no cereal

* bump
2025-06-11 15:30:45 -07:00
Dean Lee
3d987cb9b5 ui: fix wrong dash character (#35530)
Fix wrong dash character
2025-06-11 11:26:14 -07:00
Nayan
0cb0bf8028 Longitudinal: Custom ACC setpoint increments support (#889)
* Add Reverse ACC Change parameter and update cruise control logic

* lint lint lint (and lint has been summoned!)

* Add test for speed adjustment on reverse ACC button presses

* Fix formatting in cruise speed test for reverse ACC button presses

* Fix assertion in cruise speed test for reverse ACC button presses

* Enhance speed adjustment test for reverse ACC functionality

* Refactor speed adjustment test for clarity and consistency in reverse ACC behavior

* Fix metric conversion in cruise speed update for reverse ACC functionality

* custom-acc-speed-increments

* simplify

* remove unused params

* move params & add test

* lets see if this works

* minor cosmetic stuff

* clean up class names & old code

* remove unused import

* moved params to card

* stupid strings

* Add settings for developer reverse acceleration configuration

* Refactor cruise control parameters to use a dictionary for custom acceleration increments

* adjust for the default behavior

* Remove unused param

* Fuck pytest consistently failing on macos. Need to force a fail on the pipeline or I won't have confidence on the tests.

* Revert "Fuck pytest consistently failing on macos. Need to force a fail on the pipeline or I won't have confidence on the tests."

This reverts commit 05bac46a0c.

* Refactor custom acceleration increment handling to improve clarity and initialization

* Refactor AccIncrementOptionControl to accept range and per_value_change parameters for improved flexibility

* Refactor custom acceleration increment handling to improve clarity and functionality

* Adjusting tests

* Static

* no need for space changes

* no need for space changes

* no need for space changes

* Refactor constructor formatting in AccIncrementOptionControl

* Rename

* Meaningless change to test CI

* allow 1/5/10 increments for long press
move developer panel src to /offroad/settings

* update boundary condition for long press

* clamp increments of 5/10 regardless of short or long press

* update tests

* update test for long_press non-standard values

* move to cruise panel

* init

* use cereal

* update tests

* merge

* bump

* clean up

* more clean up

* no more layout warnings

* trying to resolve dev ci merge conflicts

* damn ui preview

* stack layout
enable only with oplong

* bump opendbc

* fix width

* bump tinygrad

* switch to params

* remove cereal changes

* sort params

* cleanup

* more cleanup

* lint

* rename

* split vcruise_helper

* move params to card thread
hide widget for pcm cruise

* simplify tests

* further simplify tests

* tests!!

* Revert "tests!!"

This reverts commit 85310a155e.

* move tuple from init to update_v_cruise

* lint

* temp remove tests to check

* Revert "temp remove tests to check"

This reverts commit da1c96a5db.

* handle exception

* formatting

* handle none condition

* remove from tests

* flip inheritance

* read directly

* set default

* not needed

* refactor inheritence

* rename

* already checks before invoking

* unused

* slight cleanup

* lint

* rename

* diff

* circular

* just 1 parent for now

* fix

* fix increment check with remainder

* red diff

* type hint

* update tests

* clip them

* formatting

* always check toggle visibility

* spaces are free

* hide widgets when disabled

* less

* handle more states

* private instead

* red diff says wuuuut

* fix panel click

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-06-10 22:48:46 -04:00
Shane Smiskol
e345f25ce4 lagd calib: hide on release (#35523)
* hide on release

* pull out
2025-06-10 16:16:05 -07:00
Dean Lee
03d2e7b2b0 ui: extract Widget base class to separate lib/widget.py (#35520)
* extract Widget base class to separate lib/widget.py

* format

* format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-10 14:32:20 -07:00
Dean Lee
5ebbb46fdf ui: increase drag threshold to 12 pixels (#35521)
increase drag threshold to 12 pixels
2025-06-10 10:12:06 -07:00
Dean Lee
2017bf970f ui: implement ssh key control (#35518)
implement ssh key control
2025-06-10 01:49:47 -07:00
Shane Smiskol
c1794e6f83 ui: expose lateral control learning state (#35519)
* add lagd

* add live torque params

* clean up

* too many openpilot is's

* add back

* fix weird pattern causing segfault

* cu

* 10 more lines for "all complete"

* Revert "10 more lines for "all complete""

This reverts commit de1ad0b7386f4c5d9967ea733edbe5bf1df5039c.

* one line
2025-06-10 01:48:46 -07:00
Shane Smiskol
a9e8649137 ui: update calibration description when resetting 2025-06-10 01:41:53 -07:00
Shane Smiskol
bfa3f3cccb Add calPerc progress tracking for torque calibration (#35512)
* Add calPerc field and torque progress

* Fix torqued test style and CarParams usage

* test: remove unused numpy import

* move here

* trying all combinations to see what's most linear

* clean up with best method

* no no

* epic

* clean up

* last min not needed

* doesn't hurt

* list comp
2025-06-10 00:22:13 -07:00
Harald Schäfer
d9b6c16037 Cleanup framereader (#35513)
* squash

* misc cleanup

* no LLM garbage

* misc fixes

* typo

* fix CI

* fix hints

* LLM soo wordy

* improve
2025-06-09 22:39:35 -07:00
Shane Smiskol
75b6ec68c6 Add lagd calibration percentage (#35511)
* lagd: publish calibration percentage

* Refine lagd calibration progress

* stash

* cleanup (match calibrationd calculation logic)

* no no no

* nor

* two lines
2025-06-09 22:10:47 -07:00
Dean Lee
1c11e28448 ui: fix path self-intersections on hills (#35514)
fix path self-intersections on hills
2025-06-09 21:29:25 -07:00
eFini
14166c980e Multilang: update zh translation (#35516) 2025-06-09 20:32:57 -07:00
Dean Lee
61b8f6f478 ui: Implement core device settings functionality with enhanced dynamic controls (#35507)
* implement device settings functionality with power controls

* format

* Update selfdrive/ui/layouts/settings/device.py

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

* Update selfdrive/ui/layouts/settings/device.py

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

* add comment back

* add comments back

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-09 14:45:29 -07:00
programanichiro
d3b300a148 Multilang: update ja translation. (#35506)
* ja translation

* 文言調整。
2025-06-09 14:43:50 -07:00
Dean Lee
ffb677b53d ui: [fix] only show driver state icon when no alert is display (#35508)
only show driver state icon when no alert is display
2025-06-09 11:36:45 -07:00
Dean Lee
fc27423ac2 ui: fix Immediate ALERT_STARTUP_PENDING after going onroad (#35509)
fix timeout alerts could appear immediately after going onroad
2025-06-09 11:35:19 -07:00
Dean Lee
08aeeabc9b ui: add FirehoseLayout to settings (#35505)
add FirehoseLayout
2025-06-09 09:56:56 -07:00
Dean Lee
e015e319b7 ui: [fix] remove unused gui_label import in HomeLayout (#35510)
fix lint issue
2025-06-09 09:53:13 -07:00
Dean Lee
41db89afdc ui: add setup widget to handing device pairing and firehose mode prompt (#35503)
* add setup widget to handing device pairing and firehose mode prompt

* format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-08 22:19:36 -07:00
Shane Smiskol
f70592b7e9 raylib: format from today's prs 2025-06-08 22:16:45 -07:00
Shane Smiskol
9153f97900 PrimeWidget: redeclaring __init__ unneeded
for https://github.com/commaai/openpilot/pull/35496
2025-06-08 22:07:46 -07:00
Dean Lee
7b4e2e2430 ui: add ExperimentalModeButton to the home layout for toggling between driving modes (#35504)
add ExpermentalModeButton
2025-06-08 21:55:30 -07:00
Dean Lee
9a1e58102d ui: display subscription status based on prime state (#35502)
display subscription status based on PrimeState
2025-06-08 20:55:38 -07:00
Dean Lee
5df875390f ui: add pairing device dialog (#35501)
* add pairing device dialog

* refreshing QR code every 5 minutes

* fix lint issues

* int
2025-06-08 20:15:17 -07:00
Dean Lee
0e2f69883b ui: implement uninstall software in settings (#35494)
* implement uninstall software in SoftwareLayout

* use enum
2025-06-08 20:08:11 -07:00
Dean Lee
f824e6c0ec ui: implement reset calibration feature in device settings (#35479)
* implement reset calibration feature in device settings

* check confirm dialog result

* fix null check

* use enum

* use enum
2025-06-08 20:08:01 -07:00
Dean Lee
191d0d429e ui: enhanced ListView with improved actions, dynamic content, and better UX (#35485)
improve list view
2025-06-08 19:31:55 -07:00
Dean Lee
af48d23a68 ui: add PrimeState class (#35497)
* add PrimeState

* move to lib
2025-06-08 19:22:32 -07:00
Dean Lee
0c6856cf03 ui: implement driver camera preview in settings (#35480)
* implement driver camera preview in settings

rebase master

* rename to dialog
2025-06-08 19:22:23 -07:00
Dean Lee
e93a7234bc pyui: add DialogResult enum (#35500)
add DialogResult enum
2025-06-08 19:12:56 -07:00
Jason Wen
f12d181d3b mapd: add to ignored processes list (#993)
* mapd: add to ignored processes list

* executable
2025-06-08 18:13:24 -04:00
Dean Lee
ce93a7215d add qrcode python package (#35498)
* add qrcode python package

* lock

* relock

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-06-08 13:15:15 -07:00
Dean Lee
f0f249ecf8 ui: implement change language in settings (#35481)
implement change language in settings
2025-06-08 13:13:01 -07:00
Dean Lee
a3daca8fd5 ui: implement PrimeAdWidget (#35496)
implement PrimeAdWidget
2025-06-08 13:05:30 -07:00
Adeeb Shihadeh
6d09b2405e raylib: fix shaders on macOS (#35411)
* fix shaders

* runs now
2025-06-07 20:37:43 -07:00
Jason Wen
49cad4c22e Update Python packages (#991)
* Update Python packages

* bump
2025-06-07 17:38:09 -04:00
Nayan
8da0514955 UI: Add Exit Offfroad button on the home screen (#872)
* exit offroad btn on offroad-home

* Remove alert for Always-Offroad.
Replaced with header "Always Offroad Active"

* refresh state when device wakes up

* cleanup

* cleaning

* Add pulsing glow effect to ExitOffroadButton

Introduced a QTimer-based mechanism to create a pulsing glow effect around the ExitOffroadButton. This enhances visual feedback by animating the outline with varying alpha transparency, improving UI responsiveness and aesthetics.

* move custom asset to sunnypilot

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-07 15:03:13 +02:00
Nayan
fa4c3a80b6 device: customizable wake-up behavior (start offroad) (#861)
* allow always offroad at boot

* update description

* move buttons down again

* device boot mode

* update description

* offroad on sleep

* update name & description

* cleanup

* update signal name

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
2025-06-07 14:41:39 +02:00
DevTekVE
4e3e069a65 Revert "ui: model fuzzy search" (#990)
Revert "ui: model fuzzy search (#958)"

This reverts commit 489d9164f8.
2025-06-07 10:48:30 +02:00
Jason Wen
ab6d192714 mapd (#989)
* 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

* 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

* lint

* more cleanup

* even less

* license
2025-06-07 03:47:09 -04:00
Shane Smiskol
8220599dd8 raylib: onroad callback setter (#35493)
* onroad callback setter

* fix name
2025-06-06 23:18:06 -07:00
Shane Smiskol
7c5155590f raylib: simpler callbacks (#35488)
* simpler no current callback

* clean up

* back

* fixx

* clean up
2025-06-06 23:10:34 -07:00
Shane Smiskol
e0a2a7af64 raylib: use consistent mouse button constant 2025-06-06 23:08:24 -07:00
Shane Smiskol
9a2ec552f1 raylib toggles: on mouse release 2025-06-06 23:05:51 -07:00
Shane Smiskol
2c59b5f8c6 raylib: common mouse press hook (#35489)
* something like this

* need these

* rest

* another pr

* what is this merge conflict

f

* fix mouse down

* rm that!

* fix that

* rearrange

* fix bug where mouse held down on widget, dragged off, then let go

* temp

* fix that

* missing init
2025-06-06 23:00:55 -07:00
Shane Smiskol
db5e413049 Experimental button should be raylib widget (#35491)
should be widget
2025-06-06 22:53:44 -07:00
Dean Lee
2031a33188 ui: add experimental mode toggle button with visual indicator (#35446)
* add experimental mode toggle button with visual indicator

* merge master

* implement a temporary state hold after mouse click"

* move to seperate class

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-06 22:14:18 -07:00
Shane Smiskol
7875cc4713 raylib: consistent use of rect in render function (#35490)
* updater: use rect

* spinner

* and text

* better name

* simple

* also simple
2025-06-06 22:11:41 -07:00
Dean Lee
c3aa7cffed ui: add auto camera switching based on speed in experimental mode (#35437)
* add auto camera switching based on speed in experimental mode

* fix conflit
2025-06-06 21:10:51 -07:00
Shane Smiskol
c145de96f9 raylib: match QT UI panel order (#35487)
match QT UI panel order
2025-06-06 20:21:11 -07:00
Shane Smiskol
4bbbf51236 Fix raylib issue (#35486)
* ugh fix that

* our linting is trash
2025-06-06 20:20:58 -07:00
Shane Smiskol
3ce87d0ac9 raylib: base widget class (#35484)
* use some widgets

* consistent name draw -> render

* more

* rest
2025-06-06 19:32:03 -07:00
Shane Smiskol
a1ee5f5ba8 raylib spinner: temp fix crash 2025-06-06 17:18:50 -07:00
Shane Smiskol
29830440b4 format raylib (#35483)
* format raylib

* not really sure what this is
2025-06-06 15:43:47 -07:00
Nayan
5be2cd9b61 bug: fix default model selection ui (#977)
fix default model selection ui

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 23:06:13 +02:00
Nayan
489d9164f8 ui: model fuzzy search (#958)
* models panel

* models panel

* fix ui report

* stupid scroll

* move model selector to models panel

* cleanup whitespaces

* cleanup bad merge

* model search

* support searching with short name

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 22:50:10 +02:00
Kumar
1979b00cc0 UI: Visual indicator for blind spot (#834)
* Refactor and extend ModelRenderer for custom Sunnypilot logic

Refactored `ModelRenderer` to `ModelRendererSP` with enhanced features such as lane line updates, path drawing, and lead management for Sunnypilot. Introduced new methods for model updates, lead drawing, and improved path rendering with experimental mode support. Ensured compatibility by integrating with Sunnypilot-specific HUD and camera components.

* Update selfdrive/ui/sunnypilot/qt/onroad/model.cc

* Refactor `ModelRenderer` for modularity

Moved constants and `get_path_length_idx` function to the header file for reuse and clarity. Updated `drawPath` and related methods to better handle surface dimensions, improving rendering flexibility. Made key functions virtual to allow further customization in derived classes.

* Cleaning logic on ModelRenderSP

Given that we've refactored slightly the original ModelRender, we no longer need to duplicate the logic on our own implementation

* Enable blind spot detection and visualization.

Added support for blind spot warnings, including gradient-colored visualizations for left and right blind spots on the on-road UI. Introduced a new "BlindSpot" parameter with related logic for detection and rendering, as well as a settings option for user toggling.

* Cleanup format

Clean

Cleanup and fixes

* Let's backup the BlindSpot setting

* add false for restart-needed

* Add blind spot warning toggle to VisualsPanel

Moved blind spot warning toggle from settings.cc to VisualsPanel and implemented support for dynamic parameter updates. This change introduces a dedicated layout for managing visual settings and improves modularity in the settings interface.

* Update Blind Spot Warnings setting description

Clarified the description to specify that warnings are displayed only if the car supports Blind Spot Monitoring (BSM). This ensures better user understanding of the feature's requirements.

* Avoid diff on settings.cc

* More cleanup

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
2025-06-06 22:39:26 +02:00
Dean Lee
541bd4d4d9 ui: switch spinner and text window back to standalone process (#35470)
switch spinner and text window back to standalone process
2025-06-06 13:20:05 -07:00
Dean Lee
6767bfce44 ui: add ModalOverlay system for unified modal dialog management (#35478)
add ModalOverlay
2025-06-06 13:18:07 -07:00
Adeeb Shihadeh
75434b10b9 add that back 2025-06-06 13:13:30 -07:00
Adeeb Shihadeh
63e7a0ca15 Revert "feat: remove esim.nmconnection, use AGNOS lte conn (#35389)"
This reverts commit 255b606fe4.
2025-06-06 13:09:09 -07:00
ZwX1616
ba2d2677c1 modeld: no hardcoded frame names (#35476)
* from model

* juggle
2025-06-06 13:05:54 -07:00
royjr
debba0c9f9 ui: add brightness controls (#974)
* brightness

* better brightness

* cleanup

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 21:51:05 +02:00
royjr
539b5aab75 ui: display different border color for long control without lat (#981)
Update ui.cc

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 21:38:16 +02:00
DevTekVE
ab68ce99ba chore: Update CODEOWNERS with new ownership rules (#982)
Update CODEOWNERS with new ownership rules

Expand ownership to additional paths for better code coverage and clarity. Newly added owners include @Discountchubbs and @devtekve for specified directories and files. This ensures proper oversight and maintenance of critical areas.
2025-06-06 20:53:58 +02:00
James Vecellio-Grant
65c512acc0 ui/models panel: liveDelay Toggle (#971)
* Model panel

* Get this outta here and use sunnylink instead

* Remove space

* 'not' because we want gas gating to use e2e/mpc blend

* Add toggles to models_panel.cc

* "keep enabled for stock behavior"

* Add this here

* Cloudlog result

* change cloudlog to debug, and add latsmooth to steer actuator delay.

Need to edit json. Will do locally so when this is merged its a simple ready to go push.

* Cleanup

* Update longitudinal_planner.py

* Remove gasgating for now.. may need to be placed in model

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 20:43:10 +02:00
Nayan
8849f44e41 ui: sp spinner (#984)
* sp spinner

* fine!!

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-06-06 20:33:33 +02:00
Dean Lee
e389b19ed7 system/ui: fix setup error: 'WifiManagerWrapper' object has no attribute 'request_scan' (#35477)
remove request_scan()
2025-06-06 11:24:41 -07:00
Jason Wen
835d6a656e Bump submodules 2025-06-06 00:05:20 -04:00
Jason Wen
445eda9d5d Bump submodules 2025-06-05 23:41:04 -04:00
Jason Wen
0b55cc5fa9 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#988) 2025-06-05 22:34:19 -04:00
Jason Wen
4d12f880bd Merge branch 'upstream/openpilot/master' into sync-20250605
# Conflicts:
#	opendbc_repo
#	panda
2025-06-05 22:27:18 -04:00
Adeeb Shihadeh
ce9d1683a5 bump to 0.9.10 2025-06-05 16:58:44 -07:00
Shane Smiskol
2000f9aff3 raylib: ban non-cached measure_text_ex (#35462)
* add

* use it

* Update pyproject.toml

* many more

* comment
2025-06-05 14:37:12 -07:00
Dean Lee
3a622cbe25 ui: add WiFi manager to settings (#35454)
add WiFi manager to settings
2025-06-05 13:16:38 -07:00
Dean Lee
6b59f67ab5 ui: implement home layout with fully functional offroad alerts (#35468)
implement home layout with offroad alerts
2025-06-05 13:16:07 -07:00
Dean Lee
cb22be6079 ui: add support for enabling/disabling the toggle (#35471)
add support for enabling/disabling the toggle
2025-06-05 13:15:12 -07:00
Dean Lee
23ea85dca6 ui: kick watchdog (#35460)
* kick watchdog

* use global

* use monotonic
2025-06-05 13:14:57 -07:00
Adeeb Shihadeh
8aadf02b2f selfdrived: more robust NVMe check 2025-06-05 12:51:21 -07:00
Adeeb Shihadeh
1668a46b6a bump submodules 2025-06-05 11:42:05 -07:00
Dean Lee
459179ff6c ui: fix settings close button shape and press state (#35469)
fix button rounding and pressed state display in settings
2025-06-05 11:01:49 -07:00
Andrei Radulescu
ef6719f24e webcam: make driver camera optional (#35455)
* webcam: driverCamera optional

* webcam: update README
2025-06-05 10:23:51 -07:00
Andrei Radulescu
3ad74b440c macos: no logcatd and proclogd (#35457)
* don't build proclogd on mac

* don't run logcatd and proclogd on mac
2025-06-05 10:23:27 -07:00
Dean Lee
05fa135be6 ui: make the toggle color match QT (#35466)
make the toggle color match QT
2025-06-05 10:13:44 -07:00
Harald Schäfer
a8639d3feb rgb is default (#35467)
* rgb is default

* change dummy default
2025-06-04 23:40:41 -07:00
Jason Wen
0c506c868d Controls: Pause lateral control based on blinker state and vehicle speed (#983)
* Controls: Pause lateral control based on blinker state and vehicle speed

* in its own module

* tests

* cleanup tests

* ui

* always refresh on show panel

* remove default

* change to 20 default

* need to update params live

* shorter

* off by default

* lol lint

* use ExpandableToggleRow

* not needed

* shorter

* ci ui preview delay for all offroad

* more

* Revert "more"

This reverts commit 809cfd99da.

* Revert "ci ui preview delay for all offroad"

This reverts commit ab38292fa8.

---------

Co-authored-by: nayan8teen <nayan8teen@gmail.com>
2025-06-05 00:21:58 -04:00
James Vecellio-Grant
57dc9152bb Networking: Fix Prime Level Five For Users in Roaming Only Networks (#986)
Fix prime level five for users in roaming only networks.
2025-06-05 00:10:26 -04:00
Jason Wen
2c8e72dbef Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#985) 2025-06-04 22:17:29 -04:00
DevTekVE
9e3f33dd16 Merge remote-tracking branch 'comma/master' into sync-20250604
# Conflicts:
#	opendbc_repo
#	panda
#	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
2025-06-04 21:55:32 -04:00
Shane Smiskol
0d7b157965 bump opendbc (#35465)
bump
2025-06-04 15:10:52 -07:00
Dean Lee
462301d2e0 ui: implement smooth camera stream switching with seamless transitions (#35449)
implement smooth camera stream switching with seamless transitions

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-04 14:20:52 -07:00
Dean Lee
8b516abb31 ui: replace rl.measure_text with measure_text_cached in sidebar (#35450)
Replace rl.measure_text with measure_text_cached
2025-06-04 14:14:40 -07:00
Dean Lee
0360926962 ui: fill the bg with disengaged color if no frame (#35451)
fill the bg with disengaged color if no frame

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-04 14:08:29 -07:00
Dean Lee
96cfd5aaf7 ui: add ListView component and settings layouts with declarative UI (#35453)
* add flexible ListView component

* fix crash

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-04 14:06:50 -07:00
Dean Lee
88466fb62f ui: improve onroad layout transitions (#35458)
improve onroad layout transitions
2025-06-04 13:55:03 -07:00
Dean Lee
912160c429 ui: improve calibration height initialization (#35459)
improve calibration height initialization
2025-06-04 13:54:45 -07:00
Dean Lee
2e41d959ac ui: add main UI entry point (#35422)
* add new main UI entry point

* cleanup

* mv to selfdrive/ui

* fix imports

* handle_mouse_click

* use ui_state

* remove ui_state from gui_app

* setup callbacks

* handle clicks

* put layouts in a dict

* update state in render

* rebase master

* implement settings sidebar

* rename files
2025-06-03 23:12:36 -07:00
Dean Lee
7ee50e7b87 system/ui: add text measurement caching (#35436) 2025-06-03 23:07:29 -07:00
Dean Lee
fc0bb72147 selfdrive/ui: enable conflate mode in VisionIpcClient to prevent stale frame rendering (#35445)
use conflate mode in VisionIpcClient to prevent stale frame rendering
2025-06-03 23:06:46 -07:00
Shane Smiskol
4c8f15221e Tesla: move safety out of debug (#35447)
bump
2025-06-03 22:07:52 -07:00
Shane Smiskol
2dcab07be7 Revert "selfdrive/ui: add experimental mode toggle button with visual indicator" (#35442)
Revert "selfdrive/ui: add experimental mode toggle button with visual indicat…"

This reverts commit ae8076e729.
2025-06-03 14:59:07 -07:00
Shane Smiskol
fb6243688d raylib: rename DEBUG_FPS 2025-06-03 14:53:26 -07:00
Dean Lee
68b043606c ui: fix alert timeout detection using wrong FPS constant (#35438)
fix alert timeiout detection using wrong FPS constant
2025-06-03 14:52:43 -07:00
Dean Lee
ae8076e729 selfdrive/ui: add experimental mode toggle button with visual indicator (#35439)
add experimental mode toggle button with visual indicator
2025-06-03 14:51:56 -07:00
Shane Smiskol
928dc6259b Revert "ui: fill the bg with disengaged color if not started" (#35441)
Revert "ui: fill the bg with disengaged color if not started (#35434)"

This reverts commit 10dc40db04.
2025-06-03 14:51:15 -07:00
Dean Lee
da58feb869 system/ui: fix wifi network icon resize artifacts (#35440)
fix wifi network icon resize artifacts
2025-06-03 13:08:10 -07:00
Nayan
e6f55a7eea ui: visuals panel (#919) 2025-06-03 16:05:02 -04:00
Dean Lee
10dc40db04 ui: fill the bg with disengaged color if not started (#35434)
fill the bg with disengaged color if not started
2025-06-03 11:07:42 -07:00
Kumar
c7767bddfe UI: prep for custom model rendering (#920)
* Refactor and extend ModelRenderer for custom Sunnypilot logic

Refactored `ModelRenderer` to `ModelRendererSP` with enhanced features such as lane line updates, path drawing, and lead management for Sunnypilot. Introduced new methods for model updates, lead drawing, and improved path rendering with experimental mode support. Ensured compatibility by integrating with Sunnypilot-specific HUD and camera components.

* Update selfdrive/ui/sunnypilot/qt/onroad/model.cc

* Refactor `ModelRenderer` for modularity

Moved constants and `get_path_length_idx` function to the header file for reuse and clarity. Updated `drawPath` and related methods to better handle surface dimensions, improving rendering flexibility. Made key functions virtual to allow further customization in derived classes.

* Cleaning logic on ModelRenderSP

Given that we've refactored slightly the original ModelRender, we no longer need to duplicate the logic on our own implementation

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-06-03 07:12:08 -04:00
Harald Schäfer
5505338ffb model replay: less frames and less complexity (#35427)
* Revert "ci: faster model_replay (#34036)"

This reverts commit 847a5ce1f3.

* fix conflict

* trigger on test change

* zst

* give start and end frame

* unused flags

* no print

* whitespace

* fix plotting

* slice correct

* no print

* Just start from beginning
2025-06-02 21:54:37 -07:00
Dean Lee
f78ba72a85 ui: add timeout check for unresponsive system detection (#35433)
add time out to check if messages have stopped arriving
2025-06-02 21:32:13 -07:00
Shane Smiskol
6f6adc10a8 lagd: disable in release (#35426)
* disable in release

* pass

* one liner

* Update selfdrive/locationd/lagd.py

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

* test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-02 21:29:05 -07:00
Jason Wen
9c28583171 ui: include MADS enabled state to engaged check (#976)
* ui: include MADS enabled state to `engaged` check

* let's bump it up
2025-06-03 00:28:55 -04:00
Alexandre Nobuharu Sato
108790870e Multilang: Update pt-BR translations. (#35428) 2025-06-02 21:18:34 -07:00
Lee Jong Mun
9568f64c57 Multilang: kor translation update (#35429)
kor translation update
2025-06-02 21:15:08 -07:00
Shane Smiskol
8695134b08 Faster lagd test (#35430)
* disable in release

* pass

* one liner

* saves 1s so far

* clean up

* fix

* Revert "one liner"

This reverts commit 5f419b5692565fc7ddc2abe9a40112fdc47ffe9e.

Revert "pass"

This reverts commit 47d260e76a9cb1310b95ea1ff83ab7f8808be96d.

Revert "disable in release"

This reverts commit 1782718b61891d87cbb9daa1c4c65314f505cee4.

* clean up

* there's more

* no mocker!
2025-06-02 21:14:53 -07:00
Dean Lee
28bf362f69 ui: add safety check to prevent ui overlay access to invalid data (#35432)
check ui_state.started
2025-06-02 21:13:21 -07:00
Shane Smiskol
1a84b05bde lagd: make method static 2025-06-02 20:53:11 -07:00
Jason Wen
1ee7b4ad0e ci: higher delay between UI Preview screenshots (#978) 2025-06-02 23:49:29 -04:00
Dean Lee
29afd667cc move onroad/driving stuff from system/ui to selfdrive/ui (#35425)
* mv system/ui/onroad->selfdrive/ui/onroad

* mv ui_state

* fix import path

* fix imports

* mv cameraview

* remove from application
2025-06-02 13:27:17 -07:00
github-actions[bot]
bb36b6687c [bot] Update translations (#35424)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-06-02 11:44:00 -07:00
Dean Lee
d46066225d system/ui: add centralized UIState singleton for global state management (#35397)
* add centralized UIState singleton for global state management

* safely import ui_state

* merge master

* merge master
2025-06-02 10:18:44 -07:00
Dean Lee
b59841329b system/ui: refactor AlertRenderer for improved maintainability and consistency (#35421)
refactor alert
2025-06-02 09:07:19 -07:00
Dean Lee
0707114264 system/ui: optimize point allocation, cllipping, and HSLA Color Conversion in model renderer (#35423)
* faster hsla_to_color

* pre-allc points

* use np.clip

* re-alloc points
2025-06-02 08:56:47 -07:00
Dean Lee
d488529a94 system/ui: add font_weight parameter to gui_text_box (#35420)
add font_weight parameter to gui_text_box
2025-06-02 08:48:35 -07:00
Shane Smiskol
69076c50d8 bump opendbc (#35419)
bump
2025-06-01 23:15:23 -07:00
Jason Wen
a31a39624c Car: CarStateSP (#972)
* Car: `CarStateSP`

* fix tests

* just skeleton for now

* bump
2025-06-01 22:46:04 -04:00
Adeeb Shihadeh
ad58fea2f0 no more pylint (#35418)
* no more pylint

* bump opendbc
2025-06-01 16:34:22 -07:00
Dean Lee
1e702de434 system/ui: add face detection box and driver state icon to DriverCameraView (#35410)
add face detection box and driver state icon to DriverCameraView
2025-06-01 12:39:41 -07:00
Dean Lee
6ece69610b systme/ui: add global ARC_POINT_COUNT and ARC_ANGLES to DriverState (#35415)
optimize arc rRendering with Pre-computed values
2025-06-01 12:39:22 -07:00
Dean Lee
79f3f30c63 system/ui: fix cruise disabled state displaying "?" instead of "–" (#35416)
fix curise disabled state showed '?'
2025-06-01 12:39:09 -07:00
Dean Lee
74541e677c system/ui: fix timeout logc and add pre-defined alerts (#35417)
fix timeout logc and add pre-defined alerts
2025-06-01 12:37:57 -07:00
Dean Lee
1935871267 system/ui: add stream switching capability to CameraView (#35414)
add stream switching capability to CameraView
2025-06-01 12:37:36 -07:00
Adeeb Shihadeh
5605c398a2 Revert "cereal: fixup build deps"
This reverts commit e9f917836b.
2025-06-01 12:37:12 -07:00
Jason Wen
e50f7513a6 Update Python packages (#970) 2025-06-01 10:00:26 -04:00
Jason Wen
c2bd95c2af Tinygrad: revert bump (#969) 2025-05-31 14:49:40 -04:00
Jason Wen
2e5211f1ae Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#968) 2025-05-31 14:41:42 -04:00
DevTekVE
82487ba136 Merge remote-tracking branch 'comma/master' into sync-20250531
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	common/params_keys.h
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/car/card.py
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/car/tests/test_models.py
#	selfdrive/test/process_replay/process_replay.py
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/translations/main_ar.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
2025-05-31 14:12:30 -04:00
Dean Lee
e734413a21 system/ui: fix path clip issues (#35409)
fix path clip issues
2025-05-31 10:50:41 -07:00
Adeeb Shihadeh
e9f917836b cereal: fixup build deps 2025-05-31 10:49:46 -07:00
Alexandre Nobuharu Sato
d2f417ee63 Multilang: update pt-BR translation. (#35394)
Multilang: update pt-BR translations
2025-05-31 10:17:55 -07:00
Dean Lee
d992d138bf system/ui: enhance polygon fill with AABB clipping and fixed fill color issues (#35408)
enhance polygon fill with AABB clipping and fixed fill color issues
2025-05-31 10:17:15 -07:00
Dean Lee
04115b6417 system/ui: Increase font size to reduce edge aliasing (#35401)
improve text's antialiasing
2025-05-30 23:44:13 -07:00
Maxime Desroches
62a7a19d27 Revert "system/ui/: add face detection box and driver state icon to DriverCameraView" (#35403)
Revert "system/ui/: add face detection box and driver state icon to DriverCam…"

This reverts commit 5e4a4ecec8.
2025-05-30 23:43:28 -07:00
Dean Lee
5e4a4ecec8 system/ui/: add face detection box and driver state icon to DriverCameraView (#35402)
add face detection box and driver state icons
2025-05-30 23:42:35 -07:00
programanichiro
7cd6db6f19 Multilang: update ja translation. (#35399)
ja translation
2025-05-30 21:03:07 -07:00
James Vecellio-Grant
ba9a478213 Update Python packages (#953)
* Change values to allow better 2mph to 0mph stopping

* Update python package
2025-05-30 23:13:55 -04:00
Adeeb Shihadeh
b4c9964217 gpu box test script 2025-05-30 15:44:17 -07:00
Adeeb Shihadeh
2f80854644 sensord: rewrite in Python (#35353)
* py sensord

* fix up mmc

* temp

* port over accel

* lil more

* kinda works

* rm that

* gpiochip

* mostly there

* lil more

* lil more

* irq timestamps

* fix ts

* fix double deg2rad

* test passes

* fix up mypy

* rm one more

* exception

* lint:

* read in all events

* bump that

* get under budget:

* accel self test

* gyro self-test

* keep these readable

* give it more cores

* debug

* valid

* rewrite that

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-05-30 13:31:07 -07:00
Dean Lee
45f90b1a55 system/ui: add animation to toggle (#35392)
add animation to toogle
2025-05-30 12:57:37 -07:00
Dean Lee
ea9ff45ccb system/ui: fix indentation (#35391)
fix indentation
2025-05-30 11:31:03 -07:00
Trey Moen
c4f2cf5299 feat(esim): enable eSIM profile hotswapping (#35324)
* reboot

* no sleep

* test

* back

* wait for sim

* simpler

* retry

* Revert "retry"

This reverts commit f1297160f3c085f43fc0356abb51fb52fa93ea2c.
2025-05-30 11:29:17 -07:00
Dean Lee
1221821761 system/ui: migrate c++ alert renderer to python (#35386)
* rebase

* cache metrics

* measure text

* type hint

* improve

* fix roundness

* rebase
2025-05-30 11:03:38 -07:00
Trey Moen
255b606fe4 feat: remove esim.nmconnection, use AGNOS lte conn (#35389)
* feat: remove esim.nmconnection, use AGNOS lte conn

* unused

* remove old
2025-05-30 10:54:07 -07:00
Dean Lee
e51243f2cd system/ui: remove todo and add comment (#35390)
remove todo and add document
2025-05-30 10:53:39 -07:00
Dean Lee
a3fab434a4 system/ui: migrate c++ HudRenderer to python (#35359)
* port c++ HudRenderer to python

* cache font metrics

* cache fonts

* improve

* fix bg

* refactor

* rebase

* fix
2025-05-30 09:53:11 -07:00
Dean Lee
e6eef5d9d0 system/ui: implement driver monitoring UI (#35358)
* pyui_driver_state_reander

* ddd

* draw_spline_linear

* pre-calculate the face keypoints transform

* remove int convert

* improve

* use draw_spline_linear

* pre-calc points

* state updated

* render to texture

* Revert "render to texture"

This reverts commit 27be710f4c7aca3bb05e94ad69635d292e799ff4.

* cleanup

* dd

* new dataclass

* cleanup

* use content_rect
2025-05-30 09:35:10 -07:00
Dean Lee
29010cae23 system/ui: optimize ModelRenderer (#35369)
* optimize ModelRenderer with vectorized operations

* pre-calculate the exp mode colors

* cleanup

* improve batch map line to polygon

* pre-calc leads
2025-05-30 09:34:56 -07:00
Dean Lee
b8f3e7bcf0 system/ui: improve road view with driving state border and clipping (#35385)
improve road view with driving state border and clipping
2025-05-30 07:37:07 -07:00
Dean Lee
e42044b833 system/ui: fix lint error (#35387)
fix lint error
2025-05-30 07:36:05 -07:00
DevTekVE
ff5b587fd1 ui: Bumping the total scons nodes for progress bar (#965)
Bumping the total scons nodes
2025-05-30 13:14:30 +02:00
Nayan
be406d8f83 ui: move model selector to models panel (#957)
* models panel

* models panel

* fix ui report

* stupid scroll

* move model selector to models panel

* cleanup whitespaces

* cleanup bad merge

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-05-30 13:06:09 +02:00
Nayan
d9d32ebea2 UI: Add Search Capability to Branch Selector (#814)
* Create sync-dev.yml

* Update selfdrive_tests.yaml

* Update sync-dev.yml

* Update sync-dev.yml

* Update sync-dev.yml

* add search capability in branch selector

* maybe i should remove test code

* include

* reduce needed includes

* add newline for eof

* no changes needed in upstream file

* not sure why this was here

* try to resolve merge conflicts for dev squash

* try to resolve merge conflict

* No need for this for the time being

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-05-30 12:06:50 +02:00
Nayan
31e22b0a1d ui: add models panel (#956)
* models panel

* models panel

* fix ui report

* stupid scroll

* cleanup whitespaces

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/models_panel.cc

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-05-30 09:06:15 +02:00
Brett Sanderson
6e9e43d03b Fix CI for external repositories (#35382) 2025-05-29 23:18:44 -07:00
Dean Lee
0d527c2409 system/ui: fix the issue of missing path segments (#35383)
match c++ version
2025-05-29 20:51:15 -07:00
Shane Smiskol
a385ed59cf Invalid LKAS setting alert: custom text per brand (#35377)
* draft

* use it

* friendly

* clean up

* CC

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/selfdrived/events.py

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-05-29 14:24:39 -07:00
Maxime Desroches
ae5e87e915 bump panda 2025-05-29 13:43:38 -07:00
Dean Lee
2d6662ae9f system/ui: match experimental path rendering with C++ version (#35380)
match draw_path  with c++ implementation
2025-05-29 13:07:43 -07:00
Dean Lee
ad0e556236 system/ui: fix gradient rendering to match Qt linear gradients (#35378)
Fix shader_polygon gradient rendering to match Qt linear gradients
2025-05-29 11:32:08 -07:00
YassineYousfi
618645f1d7 Revert "Vegan Filet o Fish model " (#35376)
Revert "Vegan Filet o Fish model  (#35240)"

This reverts commit b4d6b52edd.
2025-05-28 20:45:53 -07:00
Shane Smiskol
51c437c61e split 2025-05-28 19:18:03 -07:00
Shane Smiskol
deebbd3e77 add missing Fords to release notes 2025-05-28 19:16:15 -07:00
Adeeb Shihadeh
fe713b867f CI: fix nightly build (#35374)
* CI: fix nightly build

* schedule

* simplify

* cleanup
2025-05-28 19:02:00 -07:00
Shane Smiskol
1db3644a2b car interfaces: pass in if release build (#35373)
* dashcam for release

* get car

* fixes

* more fixes

* bump

* bump
2025-05-28 17:41:38 -07:00
Shane Smiskol
5bf81048bb bump opendbc (#35372)
bump
2025-05-28 14:58:48 -07:00
Dean Lee
26c61d8674 system/ui: fix incorrect THROTTLE_COLOR (#35370)
fix throttle colors
2025-05-28 13:07:19 -07:00
Dean Lee
db8ecf183f system/ui: fix rapid path color transition by correcting hardcoded increment (#35368)
refactor color blending with configurable transition duration
2025-05-28 11:35:04 -07:00
Dean Lee
3682fac7b6 system/ui: optimizes the draw_polygon() and improving code maintainability (#35366)
improve draw_polygon
2025-05-28 09:29:33 -07:00
Dean Lee
9460ff8f30 system/ui: fix gradient colors and path stops in path rendering (#35367)
Correct gradient colors and direction in path rendering
2025-05-28 09:26:38 -07:00
Jason Wen
21b86c4f2b Update Python packages (#949) 2025-05-28 01:26:21 -04:00
Dean Lee
6c28575573 system/ui: GPU-accelerated polygon rendering with anti-aliasing and gradients (#35357)
* Add GPU-accelerated polygon rendering with anti-aliased edges and gradient support

* use np array

* update ModelRenderer

* ndarray

* cleanup

* improve shader

* Revert "improve shader"

This reverts commit 992247617a9947bceb365f7b056fed6ebed3793d.

* improve shader for smoother edges
2025-05-27 21:47:55 -07:00
Maxime Desroches
feaef58188 AGNOS 12.3 (#35362)
12.3
2025-05-27 21:20:30 -07:00
Shane Smiskol
3d53df644e Live calibration reset button (#35364)
* allow reset button too

* better lang

* copy

* fix

* meh we don't do this anywhere else
2025-05-27 20:27:54 -07:00
Shane Smiskol
b119006f6a Cycle onroad when changing offroad-only toggles (#35361)
* bad

* Revert "bad"

This reverts commit 6b5475dd90c3a29c00d946c94d726563cbec6179.

* notify param

* doesn't need to live in low level paramcontrol, rename param

* should work

* fix

* disable while engaged

* note

* fix

* just in case

* param is cleared by manager -- this was all to ensure manager got our `started` transition

* clean up

* and that

* rm

* negative better than generic thing

* timer is needed as it's not clean to fix case where you toggle while no ignition -- you can't go onroad + this allows some nice tolerance time for user to switch 2 toggles

* these aren't required or useful

* add to description

* no longer unlive

* allow reset button too

* another pr -- Revert "allow reset button too"

This reverts commit 5d03edddc80d8625ceba5d5178b2781e9d10d9c9.

* rm space from i18n string

* car is powered on
2025-05-27 20:20:38 -07:00
Shane Smiskol
83ba27d7c0 Update lane departure warning toggle live (#35363)
update LDWS live
2025-05-27 19:42:02 -07:00
Jason Wen
e6f9f1eadc Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#935) 2025-05-27 19:06:21 -04:00
Dean Lee
3a7f0b66aa system/ui: fix remaining issues in WiFi Manager (#35301)
* WIP

* fix callback

* fix connecting network displayed as Connected

* thread safe states

* fix state sync issues

* fix callback
2025-05-27 15:01:53 -07:00
discountchubbs
cf94bb130b Merge branch commaai/openpilot:master into branch sunnypilot/sunnypilot:master-new 2025-05-27 16:28:45 -04:00
Dean Lee
28da563386 system/ui: render model output with new ModelRenderer class (#35356)
render model output with new ModelRenderer class
2025-05-27 12:48:33 -07:00
Dean Lee
7511983ccb system/ui: cache shader location (#35360)
cache shader location
2025-05-27 12:47:58 -07:00
github-actions[bot]
6a38dd1315 [bot] Update translations (#35354)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-26 19:44:21 -07:00
Adeeb Shihadeh
c48f161b04 bump tinygrad (#35355) 2025-05-26 18:54:34 -07:00
Adeeb Shihadeh
50aaa69137 sensord: cleanup, prep for rewrite (#35352)
* rm bmx

* thanks claude

* fix

* fix mypy
2025-05-26 17:49:44 -07:00
Cameron Clough
742e30495a Reapply "ui: rewrite installer using raylib, remove qt (#33756)" (#35308)
This reverts commit 472feefcfd.
2025-05-26 17:25:56 -07:00
Alexandre Nobuharu Sato
1fb5744685 Multilang: update pt-BR translations (#35351) 2025-05-26 13:08:54 -07:00
Trey Moen
44d233337d esim: faster switching (#35344)
* esim: lpac doesnt need disable here

* more red diff
2025-05-26 13:08:28 -07:00
Alexandre Nobuharu Sato
427a61ab12 fix Wi-FI typo on networking.cc (#35350) 2025-05-26 13:07:56 -07:00
Dean Lee
927ce0bc06 system/ui: fix typos (#35349)
fix typos
2025-05-26 11:10:32 -07:00
github-actions[bot]
8ffcddce30 [bot] Update translations (#35348)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-26 11:02:14 -07:00
Dean Lee
3d3e9599d8 system/ui: add specialized camera views with custom transformations (#35346)
* add specialized camera views with custom transformations for driver and road

* improve

* return np array

* cached matrix
2025-05-26 10:42:50 -07:00
Dean Lee
193df11a1c system/ui: avoid redundant texture updates (#35347)
avoid redundant texture updates
2025-05-26 09:29:29 -07:00
Dean Lee
22715464b9 system/ui: throttle camera connection attempts (#35343)
throttle connection attempts
2025-05-25 09:47:41 -07:00
Trey Moen
eabee8c73f bump msgq (#35345) 2025-05-25 09:33:37 -07:00
Trey Moen
993b1b4d88 refactor: LPA interface, CLI location (#35328)
* refactor: LPABase, simpler switch() interface

* leave this since LPABase hides

* hw-agnostic esim.py

* newline

* use latest
2025-05-25 08:54:07 -07:00
Dean Lee
840ced5005 system/ui: add EGL support to CameraView (#35338)
* add EGL support to CameraView

* view 3 cameras

* use a more direct approach

* add new line

* cleanup

* cleanup close()

* extract EGL to a seperate file

* cleanup

* add try/except to close()

* rename egl_textures

* improve implementation
2025-05-25 08:41:03 -07:00
DevTekVE
9b7502bd85 model: Refactor modeld with modular runners and split model support (#877)
* Refactor model runner methods for improved abstraction.

Moved slicing logic to a private `_slice_outputs` method and decoupled `_run_model` for clearer subclass implementation. Removed redundant `output` attribute in `ModelState` to streamline data handling.

* Add output parsing to model_runner and remove duplicate logic

Integrates an output parser directly into `model_runner` for streamlined inference and parsing. Removes redundant parser initialization from `modeld` to avoid duplication and enhance maintainability.

* Reordering

* linter

* linter

* Refactor model handling with `ModelData` abstraction

Introduce a `ModelData` class to encapsulate model and metadata logic, improving code clarity and modularity. Refactor `ModelRunner` to manage multiple models and add conditional handling for fallback scenarios. Adjust `TinygradRunner` to validate and use the new `ModelData` structure.

* Refactor model handling to use dictionary-based structure

Replaces the model list with a dictionary keyed by model type to improve clarity and maintainability. Updates related logic and ensures consistent handling of model metadata and inputs. Adds `slice_outputs` implementation to the `TinygradRunner` for proper output parsing.

* Refactor model runners to support policy and vision separation

Introduced `TinygradPolicyRunner`, `TinygradVisionRunner`, and `TinygradSplitRunner` to enable separate handling of policy and vision models. Updated `TinygradRunner` initialization and input preparation to accommodate modular processing. Adjusted `modeld` to utilize the new runners, ensuring compatibility with separated model workflows.

* Refactor model runner initialization and simplify logic

Introduce `get_model_runner` to centralize model runner selection logic, replacing multiple conditional instantiations. Simplify the handling of model metadata by removing fallback logic and restructuring output slicing to enforce proper loading of model data. These changes improve code maintainability and clarity.

* Refactor model data access for TinygradRunner initialization

Update references to access nested artifact properties and align with structural changes to the model data schema. This simplifies input shapes handling and ensures compatibility with updated model attributes.

* Refactor imports and clean up redundant code.

Removed unused imports and improved formatting for clarity and maintainability. These changes simplify the codebase by eliminating unnecessary dependencies and ensuring consistency.

* Refactor model output parsing with specialized parsers.

Introduce abstract `_parse_outputs` method to standardize parsing logic. Add `SplitParser` for specialized parsing in `TinygradVisionRunner` and `TinygradPolicyRunner`. This improves modularity and paves the way for easier parser customization.

* Add parser for model output processing in modeld_v2

Introduce a new `Parser` class to handle parsing and processing of model outputs, including MDN, binary cross-entropy, and categorical cross-entropy outputs. This modularizes the logic, improves clarity, and prepares for handling various types of model data.

* Add `input_shapes` property to model runners

Introduce a new `input_shapes` property in the abstract base class and its implementation in derived classes. This provides a standardized way to access the input shapes of models, improving clarity and consistency in the model runners.

* Refactor model runner to use private `_model_data` attribute

Replaced public `model_data` with private `_model_data` for improved encapsulation. Updated all references and property accessors accordingly. Simplified model type handling by using raw types where applicable.

* Remove debug print statement from model_runner.py

The unnecessary `print(model_type)` statement was removed as it served no functional purpose in the code. This improves code cleanliness and avoids unintended console output during execution.

* Refactor `_parse_outputs` call in `run_model`.

Replaced the use of `self.parser.parse_outputs` with `self._parse_outputs` for clarity and consistency. Updated method signature to align with the revised usage.

* Refactor model output parsing for clarity and scope separation

Moved specific parsing logic (e.g., lane_lines, lead) from `parse_model_outputs` to `parse_policy_outputs` to better align with functional responsibilities. This improves modularity and readability while maintaining existing functionality.

* Refactor model_runner to simplify result handling

Renamed variable `result` to `parsed_result` for clarity and removed unnecessary slicing during model output parsing. These changes improve code readability and maintain consistency within the `run_model` method.

* Adjust _parse_outputs method signature in model_runner

    Updated the method signature of _parse_outputs to accept a single np.ndarray instead of a dictionary. This aligns with the intended data structure and ensures consistency across subclasses implementing this abstract method.

* Refactor ModelRunner to enforce abstract base class compliance

Updated `ModelRunner` and its subclasses to properly inherit from `ABC` while refactoring methods to ensure compliance with Python's abstract base class standards. Streamlined the handling of `_parse_outputs` and added a new `input_shapes` property for improved functionality.

* Fix buffer length issue in 20Hz model initialization

Adjusted `FULL_HISTORY_BUFFER_LEN` by adding +1 for `full_features_20Hz` to address compatibility issues with the current FoF model. Added a comment noting potential failure for other models with this adjustment.

* Refactor TinygradRunner to remove abstract methods.

Simplified the TinygradRunner class by removing unnecessary @abstractmethod decorators and redundant method definitions. This streamlines the code and aligns it more effectively with its current usage and implementation.

* Refactor model runner classes and enhance type annotations

Simplified model runner implementations, added type annotations, and improved code readability and maintainability. Introduced new type definitions, updated metadata handling, and standardized input/output parsing across all runner classes. Minor comment update in `modeld.py` for clarity.

* Refactor model runner classes with detailed docstrings.

Enhanced class and function docstrings across model_runner.py for better clarity and maintainability. Descriptions now include detailed explanations of attributes, purposes, and workflows to aid understanding and future development.

* Refactor model runner classes and add TICI hardware optimization

Simplified and clarified class definitions, comments, and functionality for ModelRunner subclasses. Introduced the use of QCOM environment variable on TICI for potential hardware acceleration. Enhanced input/output handling and error reporting across Tinygrad and ONNX implementations.

* Update parser import and usage to use CombinedParser

Replaced the Parser class with CombinedParser in model_runner.py. This change ensures consistency with the updated parsing logic, aligning with the latest requirements for combined model output handling.

* Refactor TinygradRunner hierarchy for modular parsers

Reorganized the TinygradRunner and its specialized runners (Vision, Policy, and Supercombo) into a cleaner, modular structure using composable classes. This consolidates parser logic, removes redundancy, and simplifies initialization by leveraging a shared base class with a dictionary-based parser method.

* Refactor model runners to use ModularRunner as abstract base.

Introduce a new `ModularRunner` class to enforce a consistent interface across model runners. Updated existing runners, including `ModelRunner`, `SupercomboTinygrad`, `PolicyTinygrad`, and `VisionTinygrad`, to extend `ModularRunner`. Added abstract methods and properties to enhance modularity and code maintainability.

* Refactor model runners into modular components.

This commit separates the logic for Tinygrad, ONNX, and split runners into clearly defined modules and components. It introduces `PolicyTinygrad`, `VisionTinygrad`, `SupercomboTinygrad`, and centralized helpers for cleaner architecture. The changes improve modularity and maintainability of the model running and parsing workflows.

* Simplify imports and clean up unused code in ONNXRunner.

Removed unused imports and redundant environmental variables to streamline the codebase. Consolidated necessary imports and organized type definitions for improved readability and maintenance.

* Standardize imports and add model data validation.

Updated import paths to ensure consistency across modules by using `openpilot` as the base. Introduced validation in `_parse_outputs` methods to handle cases where `_model_data` is not initialized, preventing potential runtime errors.

* Remove unused import and fix whitespace in runners

The unused import `ModelData` was removed from `tinygrad_runner.py` to clean up the code. Additionally, extraneous whitespace was corrected in `onnx_runner.py` for improved readability and consistency.

* Remove unnecessary blank line in import statements

Cleaned up import section by removing an extra blank line. This helps maintain consistency and adheres to code style conventions.

* BROKEN!! Staging code but its not gonna work. Also I realized we need to run the split models in 2 stages because the output of one is immediately needed for the input of the other. We might handle it inside of the model_runner instead

* update smooth

* Revert "update smooth"

This reverts commit c335712e6e1ee189459ce34dfc9d4028feb9470f.

* match case made this very hard to read.

* shouldnt be there

* Refactor to allow TR (soon TM)

* TR 7 is .1

* metadata

* .2=3

* Remove redundant comments and clean up conditional blocks in modeld.py.

* Undoing wrong buffer

* Refactor model initialization and adjust ONNX runner import

Reorganized numpy input buffer initialization and updated `temporal_idxs` logic for better clarity and efficiency. Conditional import for ONNXRunner added for non-TICI platforms to optimize imports. These changes improve maintainability and compatibility across platforms.

* Update CURRENT_SELECTOR_VERSION to 4

Bump the CURRENT_SELECTOR_VERSION constant from 3 to 4 to reflect changes in the selector logic or requirements. This ensures compatibility with the updated selector version while maintaining the minimum required version as 2.

* Add output_slices property to model runners

Introduce output_slices property to provide access to the output slices for individual and combined models. This ensures consistent handling of output slices across vision and policy models, improving modularity and usability.

* Refactor imports to use SplitModelConstants consistently

Updated import references to use the renamed `SplitModelConstants` class for consistency across files. This change ensures clarity and better alignment with the updated class naming convention.

* Refactor buffer initialization and desired curvature handling

Refactored model input buffer initialization for improved clarity and consistency, leveraging dynamic shape calculations. Extracted `process_desired_curvature` method to encapsulate logic for handling 3D and non-3D cases. Simplified temporal index generation and related calculations for better maintainability.

* Refactor desire reshape dims logic in modeld.py

Adjust logic for setting desire reshape dimensions to handle `is_20hz_3d` separately. This improves clarity and ensures proper handling of different model runner configurations.

* Fix off-by-one error in full_desire buffer initialization

The full_desire buffer length was mistakenly set to full_history_buffer_len + 1. This change corrects it to match the intended full_history_buffer_len, ensuring proper alignment with other buffers.

* Simplify desire reshape logic by removing unused condition.

Removed the `is_20hz_3d` condition and associated reshape logic since it is no longer needed. This streamlines the code and avoids unnecessary checks for unused configurations.

* Refactor buffer initialization for 20Hz model variants

Reorganized buffer initialization logic to prioritize the 20Hz_3D condition. This improves clarity and ensures specific handling of different 20Hz configurations. Adjusted the order of conditions to streamline execution flow.

* Refactor: Move `get_action_from_model` and constants to `Model` class to improve encapsulation and readability.

* 12 line reshaping red diff

* .2 to match old models delay

* mypy fixes

* Revert "12 line reshaping red diff"

This reverts commit 8c7280f629.

* mypy

* remove this

* Fix desired curvature for models which do not output desired_curvature

* fix FoF

* flip policy and vision outs to allow FoF and tomb raider to live in harmony using conditional `if 'this' in outs:'`

* noqa

* single

* sunnypilot modeld.py

* action

* overrides methodology

* combine split outputs to its own method

* comments

* Fix static checker line length

* static will fail on line length
lines:

286,
206,
70 - 77,
159,
168

* Address E501 line length violations

* This will make TR better while not effecting FoF/VFF at all

* Reduce this to one conditional and just call normally in vision/policy

* Align with upstream in our own way.

* check for desired curvature in outputs first

* outputs

* Use a cleaner import method

* Fix output

* Clean up some values

* Only call on init

* slight cleanup

* names!!!!!!!!!

* Refactor overrides structure to support key-value pairs.

The overrides structure now uses a list of key-value pairs instead of fixed lat/long fields. This change improves flexibility, allowing dynamic addition of override parameters. Code adjustments ensure backward compatibility and consistent behavior throughout the application.

* Refactor: Use local variable for SplitModelConstants

Introduce a local `constants` variable to replace repeated access to `SplitModelConstants`. This simplifies code readability and adheres to linter recommendations for line length.

* Refactor model constant handling to improve modularity

Replaced direct usage of model constants with dynamic access through model runners for better scalability and maintainability. This change centralizes constant definitions, reduces redundancy, and ensures clearer integration with different model types.

---------

Co-authored-by: discountchubbs <alexgrant990@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-25 17:10:16 +02:00
DevTekVE
3c36374bed ci: build upstream (tinnygrad) models from our pipeline (#498)
* Add job to fetch and upload model artifacts

Introduced a new `get_model` job to retrieve and upload model artifacts as part of the workflow. Updated the `build_model` job to download and clean up model files before building, ensuring an isolated and streamlined process. These changes improve modularity and artifact handling in the CI pipeline.

* Refine model file handling in build workflow

Restrict deletion and download commands to ".onnx" files to prevent unintended removal or overwriting of non-ONNX files. This ensures a more targeted and safer workflow for handling model artifacts.

* Update model artifact handling in build workflow

Changed artifact upload path to include only .onnx files and commented out the deletion of existing models. Also added a dependency for the build stage to ensure proper execution sequence.

* Update build workflow to refine model artifact handling

Removed unused code for deleting models and fixed the artifact path. Added a reference file logging custom name and upstream branch for better traceability. These changes streamline the workflow and improve clarity.

* Set dynamic run-name for sunnypilot build workflow

Added a customizable `run-name` field in the sunnypilot build model workflow. This allows more informative and dynamic naming based on input parameters such as `custom_name` or `upstream_branch`. Improves clarity and traceability in workflow runs.

* Add customization options and metadata generation to build

Introduce new inputs for file name prefix and 20Hz model specification in the workflow. Enable renaming of model files, generation of file hashes, and creation of a `metadata.json` file containing build details. This improves flexibility and enhances artifact information management.

* remove EOF

* No need for this hack anymore

* Add support for compiling ONNX models to Tinygrad format

* Add model directory environment variable and metadata generation script

* Fix quoting in model generator script command

* Refactor conditional flag for 20Hz input in build model script

* meh

* Add powersave management to build model workflow

* Add environment variable setup to build model workflow

* make it path call it a day

* kill me

* kill me x2

* mmm

* mmm

* Generate metadata.pkl

* Generate metadata.pkl

* ignore failure on getting model metadata

* Cleanup the existing onnxs

* Fix rm command syntax in build model script

* Cleaning a little

* Add optional file name parameter to generate_metadata function

* update

* stg

* linter

* more formatting

* Update sunnypilot model build workflow: improve custom naming, handle 20Hz default, and add commit date as output.

* Update commit date format in workflow script

Changed the commit date format in sunnypilot-build-model.yaml to a more human-readable format ('Month DD, YYYY'). This improves readability and consistency in the workflow outputs.

* Fix output naming in sunnypilot-build-model workflow

Corrected the output name from 'model_date' to 'commit_date' to match its usage. This ensures consistency and prevents potential errors in the workflow.

Add debug echo for model date in GitHub workflow

This change adds a debug echo statement to display the model date in the sunnypilot-build-model workflow. It helps verify the correct commit date is being set during the workflow process.

* Update BUILD_DIR path in sunnypilot workflow

Replaced hardcoded BUILD_DIR with a dynamic path using `github.workspace`. This enhances flexibility and ensures compatibility with different environments or runners.

* Revert "Update BUILD_DIR path in sunnypilot workflow"

This reverts commit 376971b616.

* Refactor model metadata generation to use short names

Replaced `file_name` with generated `short_name` for metadata and file naming. Introduced `create_short_name` function to simplify short name creation from custom names. Updated scripts and workflow to reflect the new parameter and improve metadata handling.

* `Use timezone-aware UTC timestamp for build_time`

Updated the code to use `datetime.now(timezone.utc)` instead of `datetime.utcnow()`. This ensures that the generated timestamps are timezone-aware, improving consistency and correctness in the output.

* Refactor short name generation logic in model metadata

Enhanced the `create_short_name` function to better handle name conversion by incorporating new rules for handling parentheses, alphanumeric words, and version pairs. Updated related variable names in metadata functions for improved clarity and consistency.

* Fix syntax error in assigning 'models' key in metadata

Corrected a typo where 'models' was missing quotes, causing it to be interpreted as a variable instead of a string key. This ensures proper metadata dictionary structure.

Update model metadata structure and JSON generation

Revised metadata to include detailed download URIs and a type field for artifacts. Enhanced the JSON generator with new fields like environment, runner, and overrides for better configurability. These changes aim to improve metadata clarity and compatibility with downstream processes.

* Refactor variable name from "escaped_name" to "short_name"

Renamed "escaped_name" to "short_name" across function parameters and internal logic for clarity and consistency. This improves readability and better aligns with its use case in the metadata generation process. No functional changes were introduced.

* Refactor variable names and improve type annotations.

Updated parameter names to align with Python naming conventions, enhancing readability and consistency. Added type annotations for function parameters to improve code clarity and maintainability.

* Refactor type annotations and clarify comments.

Updated type annotations to use "Str" for consistency with custom typing conventions. Improved clarity of a comment describing the normal case logic in the shortening function.

* Fix dict formatting in model_generator.py

Moved the "overrides" key for better alignment and consistency in the dictionary format. This improves readability without changing functionality.

Refactor model short name generation logic

Simplify and clarify the `create_short_name` function by improving readability and condensing comments. Adjust casing and truncation logic for single-word cases and handle versioned names more intuitively.

* Ensure custom file names are converted to lowercase.

When renaming files using a custom short name, enforce lowercase conversion to maintain consistency and prevent potential issues with case-sensitive file systems. This change applies to both the tinygrad and metadata file names.

* Use UTC alias for timezone in datetime imports

Replaced `timezone.utc` with `UTC` from the `datetime` module for clarity and consistency. This simplifies the representation of time zones and aligns with Python's updated best practices.

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-25 10:50:09 +02:00
Jason Wen
b939efc773 Hyundai CAN: re-enable auto-enable radar tracks (#945)
* Hyundai CAN: re-enable auto-enable radar tracks

* check if radar tracks config bit is already enabled

* only show success message if already enabled

* test if it would actually skip

* 5 bytes only

* tested skipping, revert

* lint

* move to opendbc right after fping

* more

* lint

* bump
2025-05-25 00:51:58 -04:00
Jason Wen
b51043770b CarControlSP: live params (#943)
* car: initialize sunnypilot interface immediately

* init

* Revert "car: initialize sunnypilot interface immediately"

This reverts commit 2e0fc4d87eb312a3a74a61bb8cbc780e33efbfc7.

* show int

* show int

* work properly with cereal

* unused

* in its own module

* bump

* not yet

* not yet

* list comp and use structs directly

* allow default key if needed

* lint

* send it with None

* bump
2025-05-24 16:20:57 -04:00
Shane Smiskol
c24f349807 GM: low steer speed alert in CarState (#35332)
* simple

* rm

* bump to master

* update refs

* update refs
2025-05-23 19:43:17 -07:00
Kacper Rączy
97ad175243 Reapply "Enable online lag learning (#34968)" (#35327)
* Revert "Revert "Enable online lag learning (#34968)" (#35322)"

This reverts commit 9c40c48729.

* Update ref commit

* Update ref

* Update ref commit
2025-05-24 02:31:17 +00:00
Adeeb Shihadeh
ce8ea16303 update release notes 2025-05-23 18:50:20 -07:00
Shane Smiskol
70644e2317 VW: low steer speed alert in CarState (#35331)
* move to opendbc

* func

* clean up

* bump

* move cmt

* bump
2025-05-23 16:54:50 -07:00
Shane Smiskol
9622427044 car interfaces: improve steering pressed signal (#35333)
* bump

* update refs
2025-05-23 16:32:19 -07:00
Kacper Rączy
312658756d lagd: handle ambiguous cases (#35257)
* Mechanism to handle ambiguous estimates

* Use it

* Fix static

* Fix

* Comment

* Comment v2

* Use quantile instead

* Fix

* Make it better

* Make it confidence

* Make it a constant

* min_confidence as arg

* Make the test signal more like the real one

* Relax sample requirements

* Use constant

* Reduce confidence
2025-05-23 01:33:55 +00:00
Jason Wen
f37fc62ed2 Update Python packages (#942) 2025-05-22 20:54:43 -04:00
Shane Smiskol
9b642ed016 bump opendbc (#35323)
* bump

* update refs
2025-05-22 17:49:27 -07:00
Dean Lee
fdfba3f9f7 system/ui: update camera view shader to support rendering on device (#35326)
update shader to support rendering on device
2025-05-22 11:23:50 -07:00
Shane Smiskol
f38a98fc09 Metered Wi-Fi toggle (#35293)
* draft

* here too

* fixes

* fix

* ugh more fix, wifiManager is craze

* more

* be optimistic and let refresh happen naturally, the immediate refresh causes some paths/active connect to temporarily be unavailable

selfdrive/ui/qt/network/wifi_manager.cc: DBus call error: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the re
ply timeout expired, or the network connection was broken."
selfdrive/ui/qt/network/wifi_manager.cc: DBus call error: "Object path cannot be empty"

* nm is slow -- it takes 2s to commit to disk, and dbus errors are raised if you try again while previous is running (this is an ubuntu 24.04 bug)

* nice experience

* rm

* minor

* clean up

* self-explanatory

* rename

* rm this too

* revert

* draft

* Revert "draft"

This reverts commit 15283d977880fc60b8f9732772256e8337d6ac8e.

* Reapply "draft"

This reverts commit 8629921b0086ca71b88746d77ec7b8d3af3cd289.

* rm colors

* trinary, bit more code

* choose default when disabled

* only if enabling, wait for disable as normal

* remove original binary toggle

* clean up

* collapse

* clean up wifimanager

* update comment

* lite is a word
2025-05-21 20:45:47 -07:00
Dean Lee
c9f3cd5ad2 system/ui: enhance scroll panel with iPhone-like physics and behavior (#35312)
* improve scroll panel for iphone-like experience

* add comments

* increase demo run time for easier testing
2025-05-21 20:31:50 -07:00
Maxime Desroches
3f53133da5 AGNOS 12.2 (#35317)
* agnos 12.2

* non-staging
2025-05-21 19:58:18 -07:00
Kacper Rączy
9c40c48729 Revert "Enable online lag learning (#34968)" (#35322)
* Revert "Enable online lag learning (#34968)"

* Update ref commit
2025-05-22 01:55:19 +00:00
Shane Smiskol
163332f368 pandad: fix premature USB panda recovery (#35287)
Update pandad.py
2025-05-21 12:50:08 -07:00
Trey Moen
786b46c0b4 feat: op esim and esim.py 2 (#35314)
* init: lpa interface

* handle multiple messages

* handle timeouts

* delete old LPA, add enable/disable/validation

* check if valid

* keep old file the same for easier diff

* keep

* nickname, bug fixes

* space

* simple

* need to test this on slow conn

* initial HITL test for eSIM provisioning

* cleanup

* lint

* test flakes if lpac called concurrently

* no

* cleanup

* org

* comment

* vibe coded uts

* Revert "vibe coded uts"

This reverts commit 8b4d8f8ade50dbeaf3fa44f1df1aa2d809deca18.

* much simpler test

* no value

* remove no value add comments

* only one test flow now

* simpler

* reorganize

* replace impl

* brevity

* moar

* why didnt u rename

* moar

* check lpac installed

* Profile dataclass

* shorten

* print out profiles

* better

* plurals

* argparse

* download/nickname

* move to end to show change

* just end early if already enabled

* --reboot

* reconfigure conn

* mutations require reboot today

* not needed

* lint

* guard delete

* better

* print help

* spaceg

* rename

* support at device

* choose backend

* desc

* more

* brackets

* op esim

* Revert "brackets"

This reverts commit 124dbc0cbcc07d93f556ca80a6dc47aa118fda5c.

* Update Jenkinsfile
2025-05-21 12:45:05 -07:00
Dean Lee
4423b47b6c system/ui: add password mask delay to InputBox (#35316)
add password mask delay to InputBox
2025-05-21 12:44:15 -07:00
YassineYousfi
b4d6b52edd Vegan Filet o Fish model (#35240)
e30305e9-5fb8-48bd-a278-f714e880aef1/700
2025-05-21 11:48:49 -07:00
Trey Moen
19ad50a185 feat(route.py): add metadata, events retrieval (#35261)
* feat(route.py): add metadata, events retrieval

* whitespace

* raise for status
2025-05-21 11:33:47 -07:00
Dean Lee
68fa8c56ab system/ui: use • for password masking in InputBox (#35313)
use • for password masking
2025-05-21 11:17:03 -07:00
Dean Lee
4c9655b5e4 system/ui: add text scrolling support to InputBox for long text (#35310)
* add text scrolling support to InputBox for long text

* add 2 pixels buffer to the scissor region
2025-05-21 17:44:49 +01:00
Dean Lee
7ea8277e39 system/ui: improve button press behavior (#35309)
improve button press behavior
2025-05-21 12:28:04 +01:00
Nayan
623ef9f592 ui: add expandable row widget (#916)
* expandable_row widget

* make MinMaxValue protected to allow inheritence

* add function to set width

* no more layout warnings

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-21 01:14:08 -04:00
Adeeb Shihadeh
350a235303 modeld: more USB GPU fixes (#35306)
* fixups

* builds
2025-05-20 19:41:58 -07:00
Cameron Clough
472feefcfd Revert "ui: rewrite installer using raylib, remove qt (#33756)"
This reverts commit 9cd939d354.
2025-05-21 01:52:14 +01:00
Shane Smiskol
6d0cac5305 MultiButtonControl (#35307)
* copy

* remove params from it

* split out
2025-05-20 17:32:27 -07:00
Dean Lee
9cd939d354 ui: rewrite installer using raylib, remove qt (#33756)
* update SConscript

Co-authored-by: Dean Lee <deanlee3@gmail.com>

* can't build on mac

* raylib installer

Co-authored-by: Dean Lee <deanlee3@gmail.com>

* rm

* debug pls

* cleanup

* quotes

* libs?

* bump

* hmm

* progress bar color

* more

* not rounded

* hardcode a font path..?

* embed (a subset of) inter into the installer

* different in CI

* closer font sizes

* closer

* add that back

* unnecessary

* closer to previous impl

* prefix is at start of string, substr between prefix and %

* Revert "prefix is at start of string, substr between prefix and %"

This reverts commit bc53fe8e356ca642680e90682285bd5e8d98ecb5.

* bigger on device?

* rm

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-21 00:59:48 +01:00
Maxime Desroches
10fd0f9a57 bump panda 2025-05-20 16:45:33 -07:00
Ocheretovich
ac9222bff4 docs: added a link to the selfdrive badge (#35300)
Update README.md
2025-05-20 14:57:26 -07:00
commaci-public
f5cf062a38 [bot] Update Python packages (#35303)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-20 14:57:13 -07:00
Adeeb Shihadeh
e47d105b97 revert extra GPU power draw to prep for release 2025-05-20 14:28:30 -07:00
Dean Lee
4f512a5c6d system/ui: fix navigation key repeat in input box (#35302)
fix navigation key repeat in input fields
2025-05-20 20:27:08 +01:00
Dean Lee
beb7f6c2bb system/ui: fix indentation (#35299)
fix indentation
2025-05-20 19:23:05 +01:00
Cameron Clough
2722e12e62 fix(system/ui): typo 2025-05-20 15:48:44 +01:00
Cameron Clough
5667583198 system/ui: define character set for loading fonts (#35298)
* system/ui: define font character set

* remove debug print statement

* shorter
2025-05-20 15:47:10 +01:00
Cameron Clough
69799fceb4 Revert "system/ui: remove special currency and symbol characters from keyboard (#35291)"
This reverts commit f646b4a17b.
2025-05-20 14:54:06 +01:00
Dean Lee
cf7a295a2c system/ui: add key repeat functionality for backspace (#35288)
add key repeat functionality for backspace

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-20 11:01:31 +01:00
Dean Lee
f646b4a17b system/ui: remove special currency and symbol characters from keyboard (#35291)
* remove special currency and symbol characters from keyboard

* bring back

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-20 10:46:56 +01:00
Dean Lee
f00bead198 system/ui: improve button click logic for proper press-release interaction (#35289)
improve button click logic for proper press,release interaction
2025-05-20 10:22:34 +01:00
Jason Wen
9d60846b70 MADS: Tesla support (#682)
* MADS: Tesla and Rivian support

* request lateral if acc is engaged

* try this out

* fix

* make sure we keep the toggle off for tesla

* namedtuple

* disallow steering past 90 degrees for rivian

* whoops

* Revert "Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)"

This reverts commit 8dec4ea5

* both rivian and tesla

* enforce disengage on brake steering mode for Rivian and Tesla

* wrong one

* MADS: Steering Mode on Brake Pedal Press

* bump

* bump

* descriptions

* bump

* bump

* no tesla or rivian yet

* codecov v5

* Revert "codecov v5"

This reverts commit a347e3fb27.

* cleanup

* refactor description

* sync name

* fix

* make sure we don't allow if brake was already being pressed

* no longer needed

* proper ui!

* allow LKAS tx at all times with MADS

* extra

* this ain't right

* try this

* test only

* bring them back

* some dynamic checks

* dynamic description for mads toggle

* one place for limited platforms

* update tests

* angle when long, lkas when mads

* bump
2025-05-19 22:17:38 -04:00
commaci-public
8752071049 [bot] Update Python packages (#35282)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-19 16:16:30 -07:00
Jason Wen
8201f3edf4 MADS: Rivian support (#936)
* MADS: Tesla and Rivian support

* request lateral if acc is engaged

* try this out

* fix

* make sure we keep the toggle off for tesla

* namedtuple

* disallow steering past 90 degrees for rivian

* whoops

* Revert "Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)"

This reverts commit 8dec4ea5

* both rivian and tesla

* enforce disengage on brake steering mode for Rivian and Tesla

* wrong one

* MADS: Steering Mode on Brake Pedal Press

* bump

* bump

* descriptions

* bump

* bump

* no tesla or rivian yet

* codecov v5

* Revert "codecov v5"

This reverts commit a347e3fb27.

* cleanup

* refactor description

* sync name

* fix

* make sure we don't allow if brake was already being pressed

* no longer needed

* proper ui!

* allow LKAS tx at all times with MADS

* extra

* this ain't right

* try this

* test only

* bring them back

* some dynamic checks

* dynamic description for mads toggle

* one place for limited platforms

* just rivian

* not here

* Revert "not here"

This reverts commit 53271b9428.

* get them out

* get them out

* no longer needed

* Revert "get them out"

This reverts commit 532b671bfb.

* bump

* bump

* less

* Revert "bump"

This reverts commit 05ee4be04f.
2025-05-19 16:55:43 -04:00
Jason Wen
ddfb7420ca MADS: prerequisite for partial platform support (#938)
* MADS: prerequisite for partial platform support

* ui: support specific button enabled selections for `ButtonParamControlSP`

Replaced setDisabledSelectedButton with setEnableSelectedButtons for improved flexibility. The new implementation allows enabling multiple buttons based on a given list and maintains clarity in handling button states. This enhances functionality and aligns with better code practices.

* don't think we need to

* update
2025-05-19 14:25:26 -04:00
Cameron Clough
d6e9df98e3 system/ui: WPA3 is unsupported (#35286) 2025-05-19 19:18:48 +01:00
Dean Lee
41db0557e9 system/ui: fix Wi-Fi conneciton flow for open networks (#35285)
fix Wi-Fi conneciton flow for open networks
2025-05-19 18:56:25 +01:00
Jason Wen
a6eba52791 ui: Add utility function to check if a brand is in a list (#939)
* ui: Add utility function to check if a brand is in a list

Introduces `isBrandInList` to simplify checking if a given brand exists within a list of strings. This improves code clarity and avoids repetitive implementations for the same logic.

* Revert "ui: Add utility function to check if a brand is in a list"

This reverts commit 26cde3a73e.

* ui: Add utility function to check if a brand is in a list
2025-05-19 13:08:53 -04:00
Cameron Clough
6eecb4f986 system/ui: network widget improvements (#35284)
* larger font size for confirmation dialog

* try this

* forget btn color

* text color

* font size

* caps

* Revert "caps"

This reverts commit a3e6cfbf053e46158036728cbcd9d8bd9f99d5e5.

* too much

* fixme

* do that?

* keyboard: reset state on clear
2025-05-19 17:31:42 +01:00
Jason Wen
c4d202c6bb ui: support selected button enabled for ButtonParamControlSP (#937)
ui: support specific button enabled selections for `ButtonParamControlSP`

Replaced setDisabledSelectedButton with setEnableSelectedButtons for improved flexibility. The new implementation allows enabling multiple buttons based on a given list and maintains clarity in handling button states. This enhances functionality and aligns with better code practices.
2025-05-19 11:49:44 -04:00
Dean Lee
38c1bd096b system/ui: Improve UI rendering smoothness for scaled display (#35280)
improve smoothness
2025-05-19 14:56:45 +01:00
Cameron Clough
9bbbff14d5 system/ui: don't reset on PC 2025-05-19 11:41:09 +01:00
Cameron Clough
0c013f6186 system/ui: add caps lock to keyboard (#35277)
* add new icons shift-fill and capslock-fill, rm capslock

* SHIFT_KEY_ON, SHIFT_KEY_OFF

* capslock

* rm arrow-down

* a lot simpler

* only one

* just use time

* layout name

* rename shift

* CONSTANT
2025-05-19 11:28:04 +01:00
Jason Wen
ebe56410d3 MADS: Steering Mode on Brake Pedal Press (#924)
* MADS: Steering Mode on Brake Pedal Press

* bump

* bump

* descriptions

* bump

* bump

* no tesla or rivian yet

* codecov v5

* Revert "codecov v5"

This reverts commit a347e3fb27.

* cleanup

* refactor description

* sync name

* fix

* make sure we don't allow if brake was already being pressed

* fix

* diff

* fix description

* in another PR
2025-05-19 01:25:11 -04:00
Cameron Clough
6640986622 system/ui: increase keyboard key font/icon size (#35276) 2025-05-19 01:31:38 +01:00
Adeeb Shihadeh
f1ba6c389b quick repo garbage collection (#35274)
* start gc

* lil more

* debug

* no sound

* add back
2025-05-18 16:59:53 -07:00
Cameron Clough
d7bf309eca system/ui: update keyboard enter key (#35275)
* system/ui: update keyboard enter key

- use arrow-right icon
- use primary color

* format
2025-05-19 00:58:33 +01:00
Adeeb Shihadeh
645bd391b7 readme: add sgo to branch guide 2025-05-18 16:57:56 -07:00
Cameron Clough
15c7d556f6 Reapply "system/ui: add SCALE env var (#35272)" (#35273)
* Reapply "system/ui: add SCALE env var (#35272)"

This reverts commit e2569a8b32.

* set mouse scale factor
2025-05-19 00:33:52 +01:00
Cameron Clough
e2569a8b32 Revert "system/ui: add SCALE env var (#35272)"
This reverts commit ed0f812995.
2025-05-19 00:27:35 +01:00
Adeeb Shihadeh
ed0f812995 system/ui: add SCALE env var (#35272)
* ui: add SCALE env var

* linting

* cleaner

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-19 00:21:20 +01:00
Jason Wen
a93e788401 Reapply "MADS: wrongCarMode alert only with selfdrive enable (#931)" (#933)
* Revert "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"

This reverts commit 6d516a7704.

* Reapply "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"

This reverts commit c9487597e4.

* Reapply "MADS: `wrongCarMode` alert only with selfdrive enable (#931)"

This reverts commit c9487597e4.
2025-05-18 10:14:03 -04:00
Jason Wen
3aa9ddd3c7 Revert "MADS: wrongCarMode alert only with selfdrive enable (#931)" (#932)
This reverts commit 6d516a7704.
2025-05-18 10:02:50 -04:00
Andrei Radulescu
f630cac06f modeld: replace CLANG=1 with CPU=1 (#35270)
Replace CLANG=1 with CPU=1



---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/andiradulescu/openpilot?shareId=XXXX-XXXX-XXXX-XXXX).
2025-05-18 05:57:45 -07:00
Shane Smiskol
e8fd8e6018 bump opendbc 2025-05-18 01:20:28 -07:00
Shane Smiskol
8e57f774d0 Hyundai: move low speed steering alert to car state (#35269)
* hkg can: move low speed alert to carstate

* bump
2025-05-18 01:05:15 -07:00
Shane Smiskol
a6a09276e9 Hyundai: fix recent enable button press regression (#35265)
* move back to port

* much better

* use the CS field now

* bump

* fix

* need to switch so it works on ports that don't use it, and makes more sense

* bump

* bump

* update refs

* make sense

* master
2025-05-18 00:52:02 -07:00
Shane Smiskol
33721cf5fa Lower Tesla steer limit timer (#35268)
* bump

* update refs
2025-05-18 00:38:57 -07:00
Shane Smiskol
66c0971a0f migration: remove disengage on gas alternative experience (#35267)
* fix

* done

* test

* update refs
2025-05-17 23:56:21 -07:00
Shane Smiskol
8427bf76cf typo 2025-05-17 22:54:01 -07:00
Jason Wen
6d516a7704 MADS: wrongCarMode alert only with selfdrive enable (#931)
* MADS: Refactor Unified Engagement Mode

* init

* bring back pedal pressed event while trying to engage long

* MADS: prep for refactor

* no longer

* this is cleaner?

* in another pr

* Revert "in another pr"

This reverts commit 31aec8a7aa.

* less

* rename

* type hint
2025-05-18 00:18:41 -04:00
Jason Wen
4dbabf4e24 MADS: retain pedalPressed alert only (#928)
* MADS: Refactor Unified Engagement Mode

* init

* bring back pedal pressed event while trying to engage long

* MADS: prep for refactor

* no longer

* this is cleaner?

* in another pr
2025-05-17 23:34:55 -04:00
Jason Wen
80679b74e6 MADS: prep for refactor (#930)
* MADS: prep for refactor

* no longer
2025-05-17 23:07:05 -04:00
commaci-public
065e0e6369 [bot] Update Python packages (#35264)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-17 19:44:52 -07:00
Shane Smiskol
77102a8532 Ford: support low gear (#35238)
support low gear for ford
2025-05-17 17:31:27 -07:00
Trey Moen
1c68a073a0 feat(clip): enable ecam (#35259) 2025-05-17 12:00:24 -07:00
Adeeb Shihadeh
5a67aa3618 test_translations: don't fail on rate limit (#35262)
skip translation test on 429
2025-05-17 12:00:09 -07:00
Discountchubbs
b92d717f2f Hyundai: add more FW versions to enable radar tracks debug script (#804)
* fw version for my car, and added scc radar module firmware to enable radar points

* bump points

* bump

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-17 12:33:18 -04:00
Jason Wen
7565dd2545 MADS: Refactor Unified Engagement Mode (#927) 2025-05-17 10:34:38 -04:00
Jason Wen
52dc4141c5 MADS: evaluate brakePressed and regenBraking for Pause Lateral mode (#926)
* simplify

* MADS: evaluate brakePressed and regenBraking for Pause Lateral mode

* nah
2025-05-17 10:09:50 -04:00
Shane Smiskol
49c422e872 Tesla: fix angle control saturation (#35256)
* we shouldn't need this

* or this?

* stash junk

* hmm

* comment

* cc

* sadly we have to maintain behavior

* bump
2025-05-16 21:29:16 -07:00
Cameron Clough
da670108e7 system/ui: all font weights (#35255) 2025-05-17 00:23:55 +01:00
Cameron Clough
8097a92515 zipapp pack (#35253)
Used to ship python UI in agnos without an openpilot clone

* add a main method to target

* pack script

* validate inputs

* refactors

* copy into temp, dont keep this

* cleanup

* help messages

* rename to pack.py

* pack.py

* updates for device

* moar

* don't use cereal

* just log normally

* use importlib.resources

* revert

* Revert "don't use cereal"

This reverts commit 7208524d422d88a1b07e209359aeb25e8b3bf4e7.

* fix cereal?

* cleanup

* Revert "cleanup"

This reverts commit 921edfe5020f244dbdf4f26767af7c98ca837d1c.

* cython hotfix

* Reapply "cleanup"

This reverts commit 9b54552f784dea1b1eb4ffc03937571e4fc851ba.

* more cleanup

* any script?

* slightly clearer

* rm print

* nothing python should use SVGs

---------

Co-authored-by: Trey Moen <trey@moen.ai>
2025-05-16 22:24:03 +01:00
Dean Lee
09fde3c3ad system/ui: Use OPENPILOT_URL instead of google.com for network connectivity check (#35254)
check OPENPILOT_URL
2025-05-16 21:56:41 +01:00
Dean Lee
71e3fd7183 system/ui: use icon for special characters (#35248)
* use icon for special characters

* add icon for SHIFT_DOWN_KEY
2025-05-16 19:43:03 +01:00
Dean Lee
5babe18184 system/ui/setup: fix WiFi manager UI element overlap issues (#35251)
fix ui overlap issue
2025-05-16 19:24:04 +01:00
Cameron Clough
e9680a40bf selfdrive/assets: generate keyboard icons from bootstrap-icons (#35250)
* Revert "selfdrive/assets: add keyboard icons (#35247)"

This reverts commit a6456503b0.

* selfdrive/assets: use bootstrap icons, generate keyboard icons

* cleanup

* switch shift-fill for capslock
2025-05-16 19:17:24 +01:00
Dean Lee
6adc7e6bdb system/ui: disable continue button when no network connecton in setup.py (#35249)
disable continue button when no network connecton
2025-05-16 19:10:58 +01:00
Dean Lee
b740d23dd0 system/ui: display icons in wifi manager (#35244)
display icons in wifi manager
2025-05-16 13:51:08 +01:00
Dean Lee
dcfbb99b13 system/ui: add password visibility toggle with eye icon to keyboard (#35246)
* add password visibility toggle with eye icon to keyboard

* added show_password_toggle
2025-05-16 13:50:27 +01:00
Cameron Clough
a6456503b0 selfdrive/assets: add keyboard icons (#35247) 2025-05-16 13:38:51 +01:00
Cameron Clough
512d83cc36 ui(raylib): setup.py (#35140)
* setup.py

* better font

* use gui_button

* btn

* fix button and triangle

* low voltage text color

* fix network page

* HARDWARE.get_os_version()

* typing

* white title

* update default text color

* use default font color

* fix software screen

* fix software screen

* radio font size

* line length

* fix regex

* draw svgs

* comment is out of date

* add cairosvg

* use cairosvg

* remove unused import

* support other image types

* revert origin

* fix setup warning icon

* fix

* remove cairosvg

* use pngs

* wrap

* fix disabled style

* TODO

* revert uv.lock

* use new file paths (not rasterized yet)

* oops

* fixes

* params not used

* network check thread

* oops

* fix custom URL and download failed screens

* clear keyboard

* rm

* fixes

* show full error message

* check network type
2025-05-16 12:41:20 +01:00
Discountchubbs
1e74000f79 Controls: Extension (#858)
* Add enhanced HyundaiCAN extension

Introduced HyundaiCanEXT for improved object parsing and control integration, leveraging new fields like lead distance and relative speed in CarControlSP.

Refactored controlsd to utilize a modular design with ControlsdExt for additional sunnypilot specific functionality.

* self.cc_sp

* Refactor CarControlSP handling for improved state updates

* refactor

* bool

* Refactor controlsd SP communication logic

Update `publish_sp` method to include `CC_SP` parameter and refine SP SubMaster to exclude `radarState`. Remove custom lead vehicle state processing as it is no longer needed.

* remove in this pr

* bump

* start cleanup

* inherit instead

* even more!

* lint

* type hint

* use the same objects for submaster and pubmaster

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-15 23:13:40 -04:00
Cameron Clough
83679bd856 selfdrive/assets: rasterize SVGs (#35243)
* selfdrive/assets: rasterize SVGs

* do entire assets dir

* fixed size - 4096px is a lot

* optimise them too

* use inkscape

* regenerate

* abandon runtime svg
2025-05-16 01:33:16 +01:00
Cameron Clough
62f5a59f77 selfdrive/assets: optimize SVGs (#35242) 2025-05-16 00:52:49 +01:00
Cameron Clough
ec208f2d3d cleanup selfdrive/assets (#35241)
* remove unused assets

* these are icons

* these are images

* fix

* fix

* Revert "remove unused assets"

This reverts commit 95d1a800de7e830df15d88e8e329aeadd4548b2f.

* move these too
2025-05-16 00:26:13 +01:00
Trey Moen
60113632b4 feat(clip): delete get_metadata call (#35229)
* feat: delete get_metadata call

* no one else is using this now
2025-05-15 10:02:46 -07:00
Adeeb Shihadeh
735c227f3c svg -> png script 2025-05-15 09:53:48 -07:00
Cameron Clough
6c03e9472d system/ui: disabled button styles (#35236) 2025-05-15 16:42:32 +01:00
Trey Moen
0fec3656a1 feat(clip): faster qlog (#35227)
* feat(clip): faster qlog

* simpler

* imports
2025-05-15 14:18:58 +01:00
Shane Smiskol
5d8c8ae911 Tesla: raised lateral limits (#35231)
* bump

* bump

* update refs
2025-05-14 19:51:12 -07:00
Shane Smiskol
2af3cc6093 joystick: use ISO acceleration (#35230)
ISO max
2025-05-14 19:31:55 -07:00
Trey Moen
33c164629f fix(clip): ignore unknown Params keys (#35226)
* fix: ignore params configured by forks

* comment

* dont bother logging count or in normal flow

* better log
2025-05-14 15:44:57 -07:00
Jason Wen
3a6491e23a MADS: allow transition from Paused to Enabled at all times (#910)
* MADS: silentBrakeHold should not exit control

* no longer

* allow transition from paused to enabled when long is allowed
2025-05-14 17:46:55 -04:00
Trey Moen
e8394a27d7 fix(clip): properly set exit code (#35225)
fix: properly set exit code
2025-05-14 14:25:27 -07:00
Dean Lee
2ad501cc94 common/params.cc: Handle EINTR for fsync in Params::put to Improve Robustness (#35142)
Handle EINTR for fsync in Params::put to Improve Robustness
2025-05-14 11:21:36 -07:00
Dean Lee
02a251f50d cabana: add RouteInfo dialog to view and navigate route segment details (#35134)
add RouteInfo dialog to view and navigate route segment details
2025-05-14 11:21:28 -07:00
Dean Lee
84e9b75983 system/ui: fix WiFi manager shutdown task errors (#35204)
fix WiFi manager shutdown task errors
2025-05-14 11:20:39 -07:00
Dean Lee
f1c0109c89 system/ui: Fix crash when exiting the application with CTRL+C (KeyboardInterrupt). (#35221)
handle KeyboardInterrupt
2025-05-14 11:18:08 -07:00
omahs
64b0ede9ae fix: typos (#35224)
* fix: typos

* Update what-is-a-car-port.md

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-05-14 11:17:50 -07:00
Trey Moen
665d2c3bec feat(clip): hydrate route's CarParams before starting UI (#35218)
* feat: hydrate CarParams before starting UI

* only get first segment, faster
2025-05-14 08:14:44 -07:00
Dean Lee
b1bdab0c90 system/ui: improve texture caching (#35222)
improve texture caching
2025-05-14 16:11:38 +01:00
Dean Lee
c57f576436 system/ui: fix FPS drop issues (#35220)
set VSYNC flag only when the env is set
2025-05-14 14:49:47 +01:00
Cameron Clough
92e27f0ba2 fix .editorconfig 2025-05-14 14:34:11 +01:00
Maxime Desroches
997a99926c ci: overwrite previous comment for model_replay (#35209)
* less

* test

* fix

* cleanup
2025-05-13 21:06:30 -07:00
Maxime Desroches
3fd05d2ace more robust modem 2025-05-13 21:05:17 -07:00
Kacper Rączy
f242b1e88a lagd: remove saved param if mismatch (#35217)
Remove LiveDelay on mismatch
2025-05-14 03:18:14 +00:00
Kacper Rączy
cbec1886e7 paramsd: remove saved param if mismatch (#35215)
remove LiveParametersV2
2025-05-14 02:26:28 +00:00
Trey Moen
bdffd34088 feat(clip): support metric units if requested (#35213) 2025-05-13 19:23:36 -07:00
Kacper Rączy
1a3e342303 ui: reset live parameters and delay when reset calibration pressed (#35211)
* Reset params and lag too

* Old param too
2025-05-14 02:22:44 +00:00
Trey Moen
98c4a4582b chore: reformat clip params for extension (#35212) 2025-05-13 18:56:13 -07:00
commaci-public
77c35f8e5d [bot] Update Python packages (#35214)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-13 18:55:58 -07:00
Adeeb Shihadeh
9d7fce8dd1 CI: bump tinygrad in cronjob 2025-05-13 18:48:21 -07:00
Adeeb Shihadeh
d0bf2be6f0 External GPU support for big models (#35172)
* usb gpu

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-05-13 17:12:32 -07:00
Shane Smiskol
478015e788 typo 2025-05-13 17:04:16 -07:00
Adeeb Shihadeh
67486ff92d bump tinygrad (#35208)
* bump tinygrad

* fix

* why is mac different?

* fix sim

* relax that
2025-05-13 16:59:35 -07:00
Adeeb Shihadeh
313ede3d1e Update NDOG live (#35205)
* no alt exp

* live

* fix

* update res
2025-05-13 14:48:40 -07:00
Maxime Desroches
3d696c0f90 jenkins: remove logs during setup 2025-05-13 13:34:54 -07:00
Eric Brown
480cc57da3 Pass args to op auth (#35202) 2025-05-13 09:32:33 -07:00
Dean Lee
73ff9dc944 system/ui: add require_full_screen to WifiManagerUI (#35191)
add require_full_screen to WifiManagerUI
2025-05-13 14:34:17 +01:00
Dean Lee
896dabb190 system/ui: add right-side text eliding to gui_label (#35201)
add optional right-side text eliding to gui_label
2025-05-13 14:31:50 +01:00
Robbe Derks
15a567ffee bump panda 2025-05-13 13:03:31 +02:00
Shane Smiskol
8473774b65 process replay: add Tesla route (#35199)
* add tesla

* update refs

* run tesla on more procs

* update refs
2025-05-12 21:18:51 -07:00
Shane Smiskol
3f724400c5 Tesla: check checksums in safety (#35198)
bump
2025-05-12 21:15:43 -07:00
Trey Moen
6b4436b980 feat(clip): font from selfdrive/assets (#35194)
* feat(clip): find font dynamically

* check font path as part of validating environment

* from testing

* use font from assets

* no mas
2025-05-12 19:49:37 -07:00
Trey Moen
51ab7ec8f5 feat(clip): ffmpeg improvements to reduce frame skips (#35196)
* test

* no benefit with two pass

* rm

* typo, testing

* re-add
2025-05-12 18:56:13 -07:00
Shane Smiskol
2e5014d793 Tesla: check counters and checksums in car interface (#35195)
bump
2025-05-12 17:23:58 -07:00
Dean Lee
b5545a6736 system/ui: confirm dialog always opens in fullscreen mode (#35192)
confirm dialog always opens in fullscreen mode
2025-05-12 22:00:18 +01:00
commaci-public
b2d414cc8b [bot] Update Python packages (#35187)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-12 13:01:29 -07:00
Dean Lee
ce4fda1f92 system/ui: add minimum WIFI password length validation (#35190)
* add minimum WIFI password length validation

* add min text size to keyboard

* disable enter if text size<min size

* add MAX_PASSWORD_LENGTH

* disable enter key

* set min_text_size for demo
2025-05-12 19:01:25 +01:00
Dean Lee
8c995ab26d system/ui: implement CameraView widget (#35185)
* initial commit

* run at 60hz, nonblock

* graceful cleanup

* re-position

* rename

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-12 17:32:20 +01:00
Trey Moen
98dba943b2 feat(clip): add timestamp onto clip (#35182)
* feat(clip): add timestamp onto clip

* same font size as title

* revert

* just declare it here, and add comments
2025-05-12 09:30:01 -07:00
Dean Lee
02125f6862 system/ui: fix cursor position in inputBox mouse click handler (#35189)
fix cursor position in inputBox mouse click handler
2025-05-12 16:59:00 +01:00
Cameron Clough
43054a56c2 system/ui: fix tethering ssid (#35188)
system/ui: fix tethering ssid when no params
2025-05-12 15:39:48 +01:00
Cameron Clough
59fbeb6070 system/ui: keyboard demo script 2025-05-12 15:28:36 +01:00
Dean Lee
2b32325be1 system/ui: Full-Featured InputBox Component (#35178)
custom input box component
2025-05-12 15:21:12 +01:00
Adeeb Shihadeh
35dbdf9124 raylib: fwd everything to cloudlog 2025-05-11 11:08:50 -07:00
Dean Lee
e62b6a38e9 system/ui: set keyboard to use full window area (#35181)
set keyboard to use full window area
2025-05-11 11:06:04 -07:00
Dean Lee
bfadab078e system/ui: set log level to WARNING to reduce noise (#35180)
* set log level to WARNING to reduce noise

* custom callback handling for raylib logs
2025-05-11 11:05:59 -07:00
Harald Schäfer
e9cea3ae5c Revert TR again (#35179)
Revert "Tomb Raider 7 (#35114)"

This reverts commit 0fb4aafa35.
2025-05-11 08:24:46 -07:00
Dean Lee
01867f1b2b system/ui: integrate WifiManagerUI into Updater (#35177)
integrate WifiManagerUI into Updater
2025-05-11 14:40:06 +01:00
Dean Lee
bbeb37d726 system/ui: add MultiOptionDialog for selection from scrollable lists (#35176)
* add MultiOptionDialog for selection from scrollable lists

* mv

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-11 08:43:23 +01:00
Dean Lee
f1760e63d3 system/ui: performance optimizations for WiFi Manager with cached network data (#35170)
Performance optimizations for WiFi Manager with cached network data
2025-05-11 08:26:25 +01:00
Nayan
5c9ce2a042 ui: display actual fingerprint name with auto-fingerprint (#908)
* use platform directly

* Revert "use platform directly"

This reverts commit b71c315d30.

* update brand from platform package
2025-05-10 23:35:02 -04:00
Jason Wen
3a4c74b67d Revert "ui: display actual fingerprint name with auto-fingerprint" (#907)
Revert "ui: display actual fingerprint name with auto-fingerprint (#906)"

This reverts commit 921b51f56f.
2025-05-10 21:47:24 -04:00
Nayan
4ceb1ecd19 ui: fix description margins on AbstractControlSP_SELECTOR (#902)
fix margins for description on AbstractControlSP_SELECTOR

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-10 19:10:15 -04:00
Nayan
921b51f56f ui: display actual fingerprint name with auto-fingerprint (#906)
use platform directly

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-10 19:01:37 -04:00
Jason Wen
6c1edca806 MADS: use low velocity threshold for silent wrong gear checks (#901)
* MADS: use low velocity threshold for silent wrong gear checks

* higher
2025-05-10 18:51:37 -04:00
Dean Lee
eaa595958c system/ui: prevent duplicate WiFi connections when retrying with new password (#35174)
Prevent duplicate WiFi connections when retrying with new password
2025-05-10 14:22:06 -07:00
Dean Lee
7147c26954 system/ui: fix WIFI authentication callback and connection tracking (#35169)
fix authentication callback and state handling
2025-05-10 10:00:28 -07:00
Dean Lee
3b94e6f92f system/ui: add tethering support to WifiManager (#35167)
add tethering support to WifiManager
2025-05-10 09:59:42 -07:00
Jason Wen
bf6123c4ad Reapply "Hyundai: custom longitudinal tuning" (#894)
* Reapply "Hyundai: custom longitudinal tuning" (#892)

This reverts commit 68c593db5f.

* fix panel behavior

* dynamic description

* try to merge and use the same scrollview

* fix for all to update

* dynamic update and fix description

* minimize changes for all brands

* init

* minimize changes for all brands

* more

* even less diff

* more

* even less diff

* more less

* wow srsly

* more less

* wow srsly
2025-05-10 12:58:08 -04:00
Jason Wen
8d06444bdd ui: consolidate panel updates at a single location (#904)
* init

* minimize changes for all brands

* more

* even less diff

* more less

* wow srsly
2025-05-10 12:46:02 -04:00
Jason Wen
08efc252ec ui: fix supported brand settings list (#905) 2025-05-10 12:34:58 -04:00
DevTekVE
6142a52de7 models: aligning naming on modeld_v2 with upstream naming (#903)
Refactor variable names for clarity in 20Hz model logic.

Renamed `full_features_20Hz` to `full_features_buffer` and `desire_20Hz` to `full_desire` for better readability and consistency. This improves code maintainability and aligns variable names with their intended purpose.
2025-05-10 09:46:54 +02:00
Jason Wen
fb934247a2 ui: brand settings for Vehicle panel (#898)
* init

* brand factory

* more

* mazda

* nissan

* rivian

* subaru

* tesla

* toyota

* volkswagen

* do this

* stretch here
2025-05-09 23:09:27 -04:00
Trey Moen
13965bdf0b docs: clarify process to connect to 3/3X over ADB (#35090)
* three

* codespell being smart with me

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-05-09 19:59:44 -07:00
Nayan
897a2bcedc ui: update Quiet Mode button behavior (#880)
* fix style handling

* vector them

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-09 22:50:52 -04:00
Jason Wen
f4c7b04682 ui: encapsulate always enabled buttons into a list in Device panel (#900)
* fix style handling

* vector them

* another pr

---------

Co-authored-by: nayan8teen <nayan8teen@gmail.com>
2025-05-09 22:40:23 -04:00
Nayan
e5ac7d5b57 UI: Support inline layout for ButtonParamControlSP (#888)
* support inline layout for ButtonParamControlSP

* final

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-09 22:19:14 -04:00
Jason Wen
e89d65b516 ui: fix screens for UI Preview (#899)
* ui: fix screens for UI Preview

* try a delay
2025-05-09 22:08:32 -04:00
Jason Wen
ca23bb90cd ui: Platform Selector updates (#897)
* init

* more

* description

* init them to true

* back to false

* fix

* add description
update colors
fix stretch

* yellow & orange are too similar - use blue

* slight updates

* dynamic description

* split it out

* more

---------

Co-authored-by: nayan8teen <nayan8teen@gmail.com>
2025-05-09 18:29:33 -04:00
Shane Smiskol
db855d56d3 Log Hexagon DSP temperature (#35166)
* add hexagon dsp temp

* log

* whoops
2025-05-09 15:18:52 -07:00
Jason Wen
80f21949a3 ui: Adjust stretch factor for ListWidgetSP (#896) 2025-05-09 17:42:31 -04:00
David
32167e02c0 ui: show alert when user flag (bookmark) pressed (#34920)
* feat: Show alert on user flag event

* feat: Temporarily update border status on user flag to match connect timeline

* Revert "feat: Temporarily update border status on user flag to match connect timeline"

This reverts commit f1da6a4f5f555d4db50b47fb68ce74ae7737b8af.

* feat: Increase alert duration to 1.5 seconds

* remove audible alert for bookmark event

* refactor: Use NormalPermamentAlert for user flag alert

* fix: Update userFlag enum value in OnroadEvent struct

* fix: Handle userFlag event even in dashcam mode

* don't need to ignore that anymore

* remove 'userFlag' from ignore list

---------

Co-authored-by: Jason Young <jyoung8607@gmail.com>
2025-05-09 15:57:00 -04:00
Jason Young
1f312e16d4 messaging: cleanup zero-frequency service initialization (#35145)
* messaging: fix bug with relaxed checks under simulation

* refactor

* cleanup

* fix bug

* Revert "fix bug"

This reverts commit ea31f3ee83676c5b8ffe57500881557f7586998c.

* that did need to be different

* fix bug, add test coverage

* retry CI
2025-05-09 15:13:52 -04:00
Jason Wen
68c593db5f Revert "Hyundai: custom longitudinal tuning" (#892)
* Revert "Hyundai: custom longitudinal tuning (#658)"

This reverts commit 72f09ec9f5.

* bump

* Revert "bump"

This reverts commit a437f3538d.

* bump
2025-05-09 14:53:56 -04:00
Jason Wen
179da5d007 Update Python packages (#893) 2025-05-09 12:57:58 -04:00
Dean Lee
908ea36126 ui(raylib): add thread-safe property access to WifiManagerWrapper (#35162)
* Add thread-safe property access to WifiManagerWrapper

* cleanup

* type-safe manager, always specify default

* import

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-09 16:23:37 +01:00
Nayan
6de9526d4d bug: fix braking issue while experimental and using old model (#881)
* Fixes an issue on the long planner since Tomb Raider models, where the models are now meant to output the acceleration target and the "should stop" instead of it being calculated. However, older models (particularly those running on modeld_v2 from SP) do not output this. Leading to a "coasting" situation instead of braking when only e2e is used which is totally wrong.
2025-05-09 11:37:59 +02:00
Nayan
f09a3b32d1 UI: Fix Padding on OptionControlSP (#886)
fix padding

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-09 01:35:10 -04:00
Discountchubbs
4a094ef56f Models: Enable support for liveDelay in modeld_v2 (#879)
Enable support for liveDelay in modeld_v2
2025-05-09 01:19:35 -04:00
Discountchubbs
72f09ec9f5 Hyundai: custom longitudinal tuning (#658)
* Maybe I was asleep but somehow it worked.

* Maybe I was asleep but somehow it worked.

* 70/30 split

* 60/35 split

* 67:33 split

* use Sqrt for tiny values to increase factor. Oh, also add a test file.

* use Sqrt for tiny values to increase factor. Oh, also add a test file.

* use Sqrt for tiny values to increase factor. Oh, also add a test file.

* Raise these to restart tests

* Raise these to restart tests

* Update jerk calculation mimicking j_ego math.

* README.md

* Update timestep

* Fix test

* Readability

* Lower time

* Add higher limits for CANFD

* Send these as a floating object. update comments to add TODO msg.

* Conditional flags

* yes its a little weird but heres why:

` "aReqValue": long_state.accel_value if enabled else a_val`

its only to not have merge conflicts with syncs from this file, because if not enabled a_val is already at 0 anyways.

* Make it easier to read

* Chronological order

* Trigger rebuild

* This is an internal test on my end. Disregard, for now

* fw version for my car...

* remove fw version as that was a test

* bump submodules

* refactor that while passing internal tests

* bump safety mutation test

* all should match 50 Hz

* bump safety mutation test

* match stock behavior for accel

* do our own clipping

* apply upper/lower dynamically

* bump test

* bump test

* Higher lower limit

* move desired accel force zero in tuning controller

* bump

* bump

* abs it here

* fix logic

* make sure it resets to 0, enforced in safety

* Test a few things

* Higher jerk for VOACC

* Elantra specific

* raise `off` to stock

* bump opendbc test

* allow jerk calculations at all times

* bump

* bump

* match aReqVale

* we dont need such high accel jerk when above 20m/s. This is cruise control, not a racecar.

* 0.45 default long actuator delay

* align type hint

* add lower jerk multiplier for HYUNDAI_IONIQ

* Change min jerk

* should be float

* Change min jerk

* Change min jerk upper

* Change max jerk upper

* Change max jerk upper

* Change max jerk upper

* step + threshold + first order filter to smooth

* constants

* nah

* multiplier to 1.5

* step updates for parabolic accel/braking

* step updates for parabolic accel/braking

* even less

* test multiplier

* Merge remote-tracking branch 'sunnypilot/opendbc/master-new' into HKG-long-tune

* back to default delay for now

* update test

* update config

* update test

* update config.py

* update test

* Remove stoppingDecelRate **No need for this anymore**

* multiplier to 1.0

* Variable lower dependency

* Variable lower dependency

* Variable lower jerk minimum

* Variable lower jerk minimum
planned_accel -> desired_acel

* Revert some scaling

* .01 here

* .01 here

* try even smoother stopping

* missed a `tuning` here that instead calls itself to inf.

* what is math

* Red Diff

* Red Diff

* bring some back

* bring some back

* stronger when needed

* something simple

* simplify more

* simplify more

* dont use future

* whoops

* why

* reset

* Refactor longitudinal controller for better jerk handling

Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.

* Refactor longitudinal controller for better jerk handling

Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.

* Refactor longitudinal controller for better jerk handling

Revised `calculate_a_value` and jerk processing logic to improve acceleration and jerk handling, particularly under dynamic conditions. Adjusted test cases to cover the new logic.

* Adjust lower_jerk interpolation for improved accuracy

* Lowered the acceleration error threshold from -0.01 to -0.001

* Adjust jerk interpolation thresholds for Hyundai tuning.

Updated the interpolation range  for smaller acceleration errors.

* Move it up

* -.03 not -.05

* radarUnavailable = higher limit patch

* Commit the real change

* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.

* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.

* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.

* Updated the interpolation values and logic for lower_jerk to refine acceleration behavior.

* THIS. THIS WILL STOP FOR LEADS

* Higher for VOACC

* Higher for VOACC

* Rename `make_jerk` to `calculate_jerk` in test cases.

* Adjust jerk tuning for Hyundai longitudinal control

Updated the interpolation table for lower jerk values to improve deceleration handling. This adjustment refines control behavior during higher deceleration requests.

* Updated the interpolation breakpoint from -0.03 to -0.025

* Adjust longitudinal control jerk tuning for smoother response

Updated interpolation values in the jerk tuning logic to improve acceleration smoothing in Hyundai longitudinal control. These changes aim to provide a more consistent and predictable driving experience, particularly during deceleration scenarios.

* Handle radar unavailability in longitudinal tuning check

* Introduce `toggleDisableMsg` to streamline determining toggle states and descriptions.

* `sunnypilot`

* `Refactor longitudinal control acceleration and jerk handling`

Removed unused `FirstOrderFilter` and simplified acceleration and jerk calculations for improved clarity and maintainability. Adjusted logic to replace redundant return statements, streamline jerk computation, and reduce unnecessary dependencies.

* `Refactor longitudinal control acceleration and jerk handling`

Removed unused `FirstOrderFilter` and simplified acceleration and jerk calculations for improved clarity and maintainability. Adjusted logic to replace redundant return statements, streamline jerk computation, and reduce unnecessary dependencies.

* Simplify test to be straight to the point.

* Adjust upper_speed_factor and integrate ramp_update logic

* Adjust upper_speed_factor and integrate ramp_update logic

* Adjust upper_speed_factor and integrate ramp_update logic

* Refine acceleration and jerk tuning logic.

* greater than 0

* bump

* bring back ramp update for jerk upper

* Update opendbc_repo

* Revert "Update opendbc_repo"

This reverts commit b790387c90.

* bump

* bump

* bump

* using count seems to work better

* Refine jerk tuning logic and expand test coverage

* bump vals

* fix logic

* Adjust jerk tuning parameters for Hyundai longitudinal control

* retry lfs check

* bump submodule

* Fix acceleration blending and enhance test coverage

* Update lower_jerk breakpoints

* bump

* Adjust lower jerk parameters and include accel_cmd condition

* Adjust vars

* "Adjust Hyundai longitudinal jerk limits and tuning logic"

* Adjust jerk limits and tuning logic for better control

* Update Hyundai longitudinal tuning and add dynamic jerk logic

Refactored longitudinal configuration to include "lookahead" parameters and revised "jerk_limits" for improved tuning flexibility. Implemented dynamic jerk adaptation logic (Gen1) for smoother braking and acceleration transitions.

* Adjust Hyundai longitudinal control parameters for tuning

* bump to original branch

* QSize Policy to stretch toggle to screen size

* bump

* completely blocked xD

* Sunnypilot -> openpilot

* Whitespace

* Clean up toggle name

* Still allow ramp while in standstill for EV

* Adjust Kia Niro EV tuning parameters for smoother control

* self.cp.flags

* bump submodule

* bump

* Remove ramp for lower desired jerk

* update README.md

* update README.md

* Adjust lookahead_jerk_lower_v values in Hyundai longitudinal config.

* update tuning

* Update tune one last time to vals from device which are much smoother.

* Accel error

* bump

* fix

* rename flag and slight cleanup

* start ui stuff

* long_state -> tuning

* Prep for clean up

* small changes

* less in main

* no longer

* format

* bump

* init panel

* expose signal for other panels to interact with

* split into its own

* unused

* move around

* actually modify CP_SP

* fix offroad transition

* rename

* back

* don't update unless we're looking at it

* move around

* use min length

* do this

* whoops

* move

* bump

* bump

* this is fine

* bump

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: royjr <royjr96@gmail.com>
2025-05-09 01:06:45 -04:00
Jason Wen
ff63d17723 ui: emit panel refresh signal from Platform Selector (#891) 2025-05-09 00:46:18 -04:00
Jason Wen
977179f661 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#890) 2025-05-09 00:01:25 -04:00
discountchubbs
21715cdc6d Merge branch 'upstream/openpilot/master' into 0508-sync 2025-05-08 23:43:54 -04:00
Dean Lee
dde9c703f3 cabana: optimize get_raw_value() function for CAN signal extraction (#35137)
optimize get_raw_value() for CAN signal extraction
2025-05-08 14:31:00 -07:00
Cameron Clough
4bbbe3d2d1 ui(raylib): revert fps to 60 (#35163)
bump default fps
2025-05-08 22:22:53 +01:00
Jason Wen
037695af4a Car interface: pass into setup interfaces on init (#887)
* Car interface: pass into setup interfaces on init

* more

* should be after
2025-05-08 16:04:59 -04:00
Dean Lee
33849245d8 uploader.py: fix empty string handing in AthenadRecentlyViewedRoutes parameter (#35139)
Fix empty strings in AthenadRecentlyViewedRoutes parameter
2025-05-08 16:31:06 +01:00
Cameron Clough
73ee0c022f Reapply "ui(raylib): create BaseWindow (#35074)" (#35077)
* Reapply "ui(raylib): create BaseWindow (#35074)"

This reverts commit 83b84a5bec.

* correct title

* error msg

* cloudlog
2025-05-08 16:18:01 +01:00
Dean Lee
e7f7675458 micd: fix thread safety by adding locking for shared state (#35148)
* fix thread safety by adding locking for shared state

* Update system/micd.py

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-08 16:09:44 +01:00
Dean Lee
f123e7ed75 CI: add system/ui to UI labeler (#35157)
add system/ui to UI labeler
2025-05-08 15:19:28 +01:00
Maxime Desroches
52669b6ad2 AGNOS 12.1 (#35154)
12.1
2025-05-07 20:34:08 -07:00
Maxime Desroches
47ed90c6cf Reapply "Mypy: Got passing on macos (#34591)" (#35126) (#35153)
* Mypy: Got passing on macos (#34591)

* Mypy: Got mypy passing on macos

* common/realtime.py refactor

* Mypy: mypy passing on darwin

* Refactor: Removed else: pass statement

* Refactor: Removed unnecessary check

* added xattr to pyproject

* loggerd: switched to xatter module

* loggerd: removed unused module in xattr_cache.py

* UV: update uv.lock

* Update system/athena/athenad.py



* athenad: fixed blank lines

* loggerd: refactor of xattr_cache

* cleanup

---------



* fix getxattr no attribute on macOS

* try fixing missing ENOATTR on Linux

---------

Co-authored-by: Andrei Radulescu <andi.radulescu@gmail.com>
Co-authored-by: BrainLess <116778989+BrainLessPea@users.noreply.github.com>
2025-05-07 19:11:37 -07:00
Maxime Desroches
2451d70408 AGNOS 12 (#35151)
agnos 12
2025-05-07 18:21:53 -07:00
Trey Moen
380f383e2e ci: enable cache by default (#35121)
* enable cache for Mac brew and scons

* bump

* save cache by default, explicitly opt-out

* Delete bump-ci

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-05-07 18:13:53 -07:00
Harald Schäfer
0fb4aafa35 Tomb Raider 7 (#35114)
* Revert "Revert TR (#35110)"

This reverts commit df4f2955dc.

* eb5f884a-10ad-49fd-ae5c-e2818c26e568/400

* 1cc828ab-95e5-4620-aa07-b98918b4268d/400

* 5790a2c1-b487-4bef-a3c3-db1fcd5a756d/400

* raw plan
2025-05-07 18:06:41 -07:00
Maxime Desroches
36ff474bc8 remove numpy.core usage (#35152)
fix
2025-05-07 16:44:20 -07:00
Shane Smiskol
2e0fa3f827 Tesla: allow enabling in tight curves (#35147)
* bump

* revert steer limit timer

* alert for stock lkas

* add enum

* same as ldw

* bump

* draft

* bump

* bump

* rm

* why here?1

* bump to master
2025-05-07 16:26:20 -07:00
Shane Smiskol
dcca094ad8 Tesla: forward stock LKAS while disengaged (#35150)
* bump

* update docs

* bump
2025-05-07 15:29:41 -07:00
Robbe Derks
433e7268f5 Log register errors as errors (#35141)
log register errors as errors
2025-05-07 18:12:01 +02:00
Dean Lee
7c16e65347 loggerd: remove redundant Params Construction (#35138)
remove redundant Params Construction
2025-05-07 16:39:05 +01:00
Maxime Desroches
aa1b790708 revert agnos 12 2025-05-06 21:38:50 -07:00
Andrei Radulescu
bbf37ae5c7 Reapply "Mypy: Got passing on macos (#34591)" (#35126)
* Mypy: Got passing on macos (#34591)

* Mypy: Got mypy passing on macos

* common/realtime.py refactor

* Mypy: mypy passing on darwin

* Refactor: Removed else: pass statement

* Refactor: Removed unnecessary check

* added xattr to pyproject

* loggerd: switched to xatter module

* loggerd: removed unused module in xattr_cache.py

* UV: update uv.lock

* Update system/athena/athenad.py

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>

* athenad: fixed blank lines

* loggerd: refactor of xattr_cache

* cleanup

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>

* fix getxattr no attribute on macOS

* try fixing missing ENOATTR on Linux

---------

Co-authored-by: BrainLess <116778989+BrainLessPea@users.noreply.github.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-05-06 21:09:59 -07:00
Maxime Desroches
b400312042 agnos 12 (#35133)
* new

* all

* prod

* both

* 12

* version

* update
2025-05-06 20:37:09 -07:00
Adeeb Shihadeh
e64be675e3 don't need to assert, CI updates this 2025-05-06 14:58:40 -07:00
Maxime Desroches
2393e0d27d update CARS doc 2025-05-06 14:54:24 -07:00
Adeeb Shihadeh
97bad78553 bump opendbc 2025-05-06 14:29:16 -07:00
Adeeb Shihadeh
58bc8e3b43 op: more robust openpilot finding (#35136) 2025-05-06 10:51:15 -07:00
Nayan
662877c6f3 models: Consolidate model helpers & get_model_path filename fix (#884)
consolidate run_helpers.py & helpers.py
bugfix for get_model_path
2025-05-06 19:38:06 +02:00
Dean Lee
9622b6f8bd ui(raylib): add a simple toggle component (#35128)
* simple toggle

* Update system/ui/lib/toggle.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-05-06 10:25:51 -07:00
Adeeb Shihadeh
ddb19cc074 op: better adb SSH (#35135)
* op: better adb SSH

* fix
2025-05-06 10:21:23 -07:00
Joey
5c1f28591f remove dead link in SAFETY.md (#35122)
* Update SAFETY.md

remove broken link

* Update SAFETY.md

* Update docs/SAFETY.md

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-05-05 17:07:27 -07:00
Maxime Desroches
3c58da5c84 mimic agnos pyproject order 2025-05-05 16:54:14 -07:00
Dean Lee
b920e2a998 tools: add --auto flag to replay and cabana for loading routes from auto source (#34863)
* add flag to auto load a route from the most suitable source

* split to functions

* early return

* add --auto to replay

* README

* cleanup

* remove prefix

* parse datetime

* cleanup

* improve help

* do not modify logreader.py

* fix seg_num

* cleanup
2025-05-05 16:48:15 -07:00
Maxime Desroches
5a94d818bb add xattr python package (#35131)
* add xattr

* comment
2025-05-05 15:21:06 -07:00
Dean Lee
71b37cfb94 tools/clip: fix SyntaxError in f-string due to unmatched brackets (#35129)
fix lint issue
2025-05-05 14:33:45 -07:00
commaci-public
a8b9350103 [bot] Update Python packages (#35125)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-05 12:51:04 -07:00
Dean Lee
c33e5b3209 python ui: wifi manager (#34814)
* python wifi manager

* fix ui

* need auth callback

* move to widgets

* confirm forgot

* add drag detection

* improve keyboard & list

* remove duplicate

* typos

* use gui_app render

* refactor

* cleanup

* cleanup

* shutdown

* fix types

* revert

* scroll panel cleanup

* reset is_dragging on mouse release

* Revert "reset is_dragging on mouse release"

This reverts commit ff5e51cf6f00848d93aa3ce0bab16602fea7a319.

* unformat

* cleanup

* update state when connecting

* forgotten callback

* maybe fix? first tap didn't work

* Revert "maybe fix? first tap didn't work"

This reverts commit 739f0e3bd37323d10479b081a20d05c7fdff5495.

* remove set_target_fps

* Revert "remove set_target_fps"

This reverts commit 96f74553ef6fa2ab2a4d1a07880175e7da628c9f.

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-05 16:28:12 +01:00
Jason Wen
f66bf4b185 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#874) 2025-05-04 13:29:31 -04:00
Jason Wen
b6c6a3ad19 Merge branch 'upstream/openpilot/master' into sync-20250503
# Conflicts:
#	opendbc_repo
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/modeld/fill_model_msg.py
2025-05-04 13:21:27 -04:00
Trey Moen
87fae0c6f2 fix(clip): longer timeout for ffmpeg to finish (#35092) 2025-05-04 10:16:48 -07:00
Trey Moen
f704d18a8b feat(clip): title and metadata overlay (#35099)
* wip

* moar

* ensure inter is installed

* line len

* refactor

* dont need this

* no longer than

* show meta for 4s
2025-05-04 10:16:35 -07:00
Dean Lee
8ee99523f4 cleanup .gitignore (#35116) 2025-05-04 10:15:47 -07:00
Dean Lee
8c8b2c4488 replay: fix potential timestamp parsing error in Route::load (#35117)
Fix potential timestamp parsing error in Route::load
2025-05-04 10:15:25 -07:00
DevTekVE
d90e41f08f models: refactor model bundle structure (#870)
* Refactor model and artifact structures with version compatibility filtering

- Introduced `Artifact` struct and nested it within the `Model` struct for improved clarity and organization.
- Updated enums, logic, and parsing to align with the new struct definitions.
- Implemented version compatibility filtering for model bundles using the `is_bundle_version_compatible` helper.
- Enhanced artifact download handling by adding checks for missing URIs, better error management, and improved logging.
- Adjusted model fetching to point to the latest endpoint (`v3`).

* Make linter happy

* Make linter happy

* Refactor model data parsing to improve readability.

Replaced kwargs-based data extraction with explicit parameter passing for clarity. This enhances code readability and reduces ambiguities in method calls, making the parsing logic more maintainable and straightforward.

* Refactor error handling in active model bundle retrieval.

Wrapped the logic to fetch the active model bundle in a try-except block to prevent unhandled exceptions. This ensures more robust error handling and avoids potential crashes when retrieving or processing model data.

* Refactor exception handling in get_active_model_bundle

Replace bare except with Exception to improve specificity and clarity. This ensures better debugging practices and aligns with recommended coding standards. Other minor whitespace adjustments were made for improved readability.

* Update model path to use artifact fileName property

Replaced `fileName` with `artifact.fileName` in the custom model path construction. This ensures compatibility with updated drive model structures and avoids potential file resolution issues.
2025-05-04 17:03:22 +02:00
DevTekVE
600647d5e2 models: simplify modeld v2 logic process (#875)
* Refactor model runner methods for improved abstraction.

Moved slicing logic to a private `_slice_outputs` method and decoupled `_run_model` for clearer subclass implementation. Removed redundant `output` attribute in `ModelState` to streamline data handling.

* Add output parsing to model_runner and remove duplicate logic

Integrates an output parser directly into `model_runner` for streamlined inference and parsing. Removes redundant parser initialization from `modeld` to avoid duplication and enhance maintainability.

* Reordering

* linter

* linter
2025-05-03 21:01:17 +02:00
Discountchubbs
44ab494c41 BUG FIX: Fix .thneed model runners (#871)
Add support for thneed library and thneedmodel integration

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-05-03 08:50:40 +02:00
Shane Smiskol
db6832762b Tesla: forward Summon (#35113)
bump
2025-05-02 21:48:55 -07:00
Jason Wen
3f883ad215 ui: add longitudinal settings panel (#852)
* ui: add longitudinal settings panel

* ui preview

* add ui preview

* rename to Cruise
2025-05-03 00:41:04 -04:00
Harald Schäfer
df4f2955dc Revert TR (#35110)
* Revert "Tomb raider 2 (#35029)"

This reverts commit 2c162d9b75.

* bugfix

* fix policy

* min control speed
2025-05-02 20:54:42 -07:00
Shane Smiskol
a1ec8c6bfe test models: check steering disengage matches for Tesla (#35107)
test models: check steering disengage matches for tesla
2025-05-02 20:23:30 -07:00
Harald Schäfer
e1d2360b8c Revert: Tomb Raider 6 (#35105) 2025-05-02 10:17:40 -07:00
DevTekVE
6151abe08a ci: Add error handling for failed workflow run (#869)
Enhance action to fail on non-successful workflow runs

Add logic to check the conclusion of the watched workflow run. If the run ends with a non-successful status, the action now exits with an error to improve error handling and ensure reliability.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-05-02 12:05:26 -04:00
DevTekVE
b4c3e4d4d9 models: Remove local model compilation for modeldv2 (#868)
* Remove supercombo model ONNX file.

Deleted the large `supercombo.onnx` model file from the repository. This cleanup reduces repository size and dependency on unused or outdated files for this version.

* Disable tinygrad model compilation on macos temporarily

* Remove unused dmonitoring model file.

Deleted the ONNX model for dmonitoring as it is no longer required. This eliminates unnecessary assets and reduces repository size.

* Removing the model also from the snpe build, we have them, prebuilt
2025-05-02 16:25:23 +02:00
Jason Wen
e4ef131a77 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#867) 2025-05-02 01:18:02 -04:00
Shane Smiskol
b58552542d Tesla safety: fix high angle rate fault and enforce steering disengage via safety (#35101) 2025-05-01 22:10:16 -07:00
Jason Wen
72d883d95d Merge branch 'upstream/openpilot/master' into 0501-sync
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	opendbc_repo
2025-05-02 00:53:44 -04:00
dparring
c86204ce6d FCA: Ram 1500 improvements (#797)
* FCA: Ram 1500 improvements

* updating reference to my opendbc

* syncing latest opendbc

* move to car_specific_sp

* bump

* Realfast ram1500 (#1)

* Bump tinygrad to upstream master (#34973)

bump tg

* test_onroad: test liveParameters service timing (#34977)

Add live params to test onroad

* selfdrived: remove ignored processes list (#34978)

* selfdrived: remove ignored processes list

* it's a set

* calibrationd: read carParams from Params (#34981)

* Read CarParams once from Params

* Remove it from process replay

* locationd: make pose_kf inherit from KalmanFilter (#34982)

* Read message not json for initial state

* Delete lines

* Fix param

* MADS: prevent `wrongCarMode` from disabling MADS enabled state (#792)

* MADS: prevent `wrongCarMode` from disabling MADS enabled state

Add wrongCarModeNoEntry as a NO_ENTRY event to replace wrongCarMode (USER_DISABLE)
that would incorrectly disable MADS when in the wrong car mode. Provides
contextual guidance to users based on car brand, showing appropriate
instructions for re-engagement without requiring MADS to be re-enabled.

* move down

* warning only?

* cereal SIKE

* remove duplicate

* try this out

* final

* Readme: update with links to new branches and info about rewrite and reflash agnos (#795)

* Adding the new branches info and adding a warning to reflash agnos

* Using more blockquote

* it

---------

Co-authored-by: Stupefacient <brianbrownt@gmail.com>

* agnos 11.13 (#34980)

* agnos 11.12

* new build

* Multilang: Update pt-BR translation (#34983)

* [bot] Update Python packages (#34987)

Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>

* Multilang: Update ja translation (#34986)

* 日本語訳2025/3/19

* numerusform追加。

* connect to an unmetered networkに対応

* panda是正

* opendbc_repo是正

* Multilang: Update zh translation (#34985)

* update to latest userdata partition (#34990)

update

* paramsd: cache backwards compatibility (#34991)

* LiveParametersV2 key

* Param key

* Fix tests

* Remove old params if error

* Update exception message

* Update the test

* Add test for corrupted byte format in v1

* Rename params_reader => params

* hardwared: give stuck LTE connections a kick

This reverts commit e3e694096a.

* Revert "hardwared: give stuck LTE connections a kick"

This reverts commit e4aa346259.

* process_replay: fix GM and replace TOYOTA3 (#34996)

* Add volt and bolt param migration

* Remove mazda due to invalid sensor timings

* Fix the import

* Add mazda to excluded

* Bring back mazda, but add todo

* New segment for TOYOTA3

* Fix

* Update ref commit

* bump opendbc

* test_models: update relay malfunction check (#34999)

relay is checked in fwd hook

* process_replay: remove GM (volt) (#35000)

Remove volt segment

* Revert "test_models: update relay malfunction check" (#35002)

Revert "test_models: update relay malfunction check (#34999)"

This reverts commit 2cd0079abe.

* Reapply "Online lateral lag learning" (#34975)

* Online lateral lag learning (#34974)

This reverts commit b4cc9e68d1.

* pad to the best size for fft

* Fix static analysis

* Add typing

* Fix typing

* MAX_LAG

* Calculate cross correlation regardless if the points are valid

* Back to lagd

* Add lagd to process_config

* Lagd in test onroad

* Move lag estimator for lagd

* Remove duplicate entry from test_onroad

* Update process replay

* pre-fill the data

* Update cpu usage

* 25sec window

* Change the meaning of lateralDelayEstimate

* No newline

* Fix typing

* Prefill

* Update ref commit

* Add a unit test

* Fix static issues

* Time limit

* Or timeout

* Use mocker

* Update estimate every time

* empty test

* DT const

* enable RIVIAN again

* Update ref commit

* Update that again

* Improve the tests

* Fix static

* Add masking test

* Increase timeout

* Add liveDelay to selfdrived

* Add liveDelay to selfdrived in process_replay

* Fix block_avg restore after num_blocks

* regen most

* Update bolt

* Update ref commit

* Change the key name

* Add assert

* True weighted average

* Raise thermal setpoint (#35008)

We don't need to control all the way down to 70C

* UI: Update `AbstractControlSP_SELECTOR` and `OptionControlSP` (#800)

* controls

* Adjust label width dynamically based on layout type.

Updated the label's fixed width to be conditional on the layout type, improving adaptability for different inline layouts. Additionally, corrected indentation in the width calculation loop for consistency.

* Refactor OptionControlSP to improve parameter value handling and encapsulate logic in dedicated methods

* Refactor getParamValue to return an integer and ensure value is updated correctly in button click handler

* Trying to unify a bit the logic. still WIP

* Reducing a bit the change footprint

* Refactor spacing item handling to prevent duplicate insertion and improve layout management

---------

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

* bump panda

* Radard: vision-based yRel for Hyundai single-lead systems (#805)

Introduced processing for custom yRel values using HyundaiFlagsSP when the enhanced SCC flag is enabled. Updated `radard` to handle `CarParamsSP` and make necessary adjustments for Hyundai vehicles with specific SCC configurations.

* MADS: transition to soft-disable for specific gear states (#791)

* MADS: transition to soft-disable for specific gear states

This commit enhances the condition checking functionality of the Modular Assistive Driving System (MADS) to implement a 'soft-disable' feature during the vehicle's active motion when a non-forward drive gear is engaged. It includes utilizing structs to reference various car state attributes and modifying a function definition to improve clarity. This adjustment boosts the system's reaction to gear shifts, increasing the safety and efficiency of the driving assist system.

* structs

* UI: Device & Sunnylink Panels - Standardize push button size & alignment (#806)

* layout adjustments

* sunnylink_panel

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* [bot] Update Python packages (#35012)

* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>

* ci: Remove redundant Panda build step from prebuilt workflow (#810)

The Panda build step was unnecessary as it is not utilized in this workflow. This change simplifies the workflow and reduces redundant actions, improving efficiency.

* Device: Customizable Max Time Offroad (#796)

* Max Time Offroad

* Refactor & Fix param

* Error Handling

* rename SP variable

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.cc

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

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.h

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

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.cc

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

* UI layout changes for better alignment

selector is not big enough -> make it bigger ;)

OptionControlSP now includes a QMap argument to allow actual values to be set in param directly

* Rebase & resolve reviews

* change default to be closer to OP default

* me dumb

* MaxTimeOffroad: Add support for 30h limit and improve label formatting

* power_monitoring: Refactor MaxTimeOffroad parameter handling for clarity

* test: Add unit tests for MaxTimeOffroad parameter handling

* power_monitoring: Update MaxTimeOffroad handling to use seconds and improve shutdown logic

* power_monitoring: Improve exception handling and remove redundant shutdown check for MaxTimeOffroad

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Hyundai longitudinal: Parse lead info for camera-based SCC platforms (#809)

* Hyundai longitudinal: Parse lead info for camera-based SCC platforms

* fix

* update

* bump

* update tests

* lol why is this here

* bump

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>

* Models: point to v2 of driving models json for recompiled models (#817)

Use newer model version json since they have been recompiled

* ci: update squash script for external contributors (#811)

* Get head ref info

* Simpify adding the comment with the newest flagg by gh cli

* Dynamic origin

* Enhance PR processing: add label handling for forked PRs and improve variable naming

* Refactor PR label handling: use constant for trust-fork label and improve comments

* Fix remote addition in PR processing: change subprocess call to not check for errors

* Refactor PR comment handling: support multiple comments and improve clarity

* Refactor PR processing: streamline comment handling and improve error management

* Refactor add_pr_comments function: specify comments type as list of strings

* Maybe we don't prevent "behind" branches to be merged as lon as the PR itself is mergeable

* lint, leave me alone

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>

* sunnylink: fix sunnylink backup restore version parsing (#816)

* improvement

* fix: Improve version parsing logic for sunnypilot

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* DM: Enforce monitoring of MADS state in driver monitoring (#818)

* DM: Enforce monitoring of MADS state in driver monitoring

Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.

* how

* [bot] Update Python packages (#35017)

Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>

* Rename experimental long (#35011)

* now alpha long

* fix

* rename param

* thought i did this

* debug

* debug

* more

* more

* moar

* Revert "moar"

This reverts commit e347106246583982e1be206485ad4d8eb944f817.

* Revert "more"

This reverts commit 0746e6d2e400ce1715614c62af84a9680c4d65c1.

* Revert "more"

This reverts commit 0db5a8792c01bb2d687f9152e6ba37fb76d4a453.

* Revert "debug"

This reverts commit 72f235b13727980e4331ff487998ddc7c7f7fb63.

* Revert "debug"

This reverts commit 7871b69f8c1bdffed386c2baac99542fcc50f7eb.

* Temporary disable UI preview from CI (#35018)

disable

* Update Python packages (#819)

* Fix possible CAN ignition overlap due to incorrect counter tracking (#35019)

* fix-rivian-ign

* bump

* UI: Bugfix Max Time Offroad (#820)

bugfixes

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>

* CI: Improve `dev-c3-new` auto build (#825)

* force commit to force PR

* ci: add job to manage PR labels and remove trust label on new commits

* Add pull request trigger

* empty commit to test

* ci: update pull request label management logic and remove FORCE_RUN flag

* ci: update trust label management to use TRUST_FORK_PR_LABEL

* ci: update workflow to manage PR labels and adjust trigger conditions

* ci: rename jobs in workflow for consistency and clarity

* ci: add unleash-nightly-squash branch to workflow

* ci: add checkout step with GITHUB_TOKEN to workflow

* force wait

* what happens if negated the wait

* ci: add 'Wait for Tests' action to monitor workflow execution

* ci: update wait-for-tests action conditions and cleanup

* ci: refine conditions for managing PR labels and waiting for tests

* ci: enhance PR label conditions for workflow execution

* Cant use env on if

* maybe

* ci: update pull request workflow conditions and cleanup

* Missing end of line

* ci: rename workflow and update job name for clarity

* Cleaning

* ci: refine conditions for pull request handling in workflow

* ci: update handling of TRUST_FORK_LABEL in PR processing

* ci: remove fork trust warning from PR processing

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* CI: Update PR list query to exclude draft pull requests (#829)

* lagd: check sensors valid (#35027)

* Check if sensors valid

* Fix test

* Fix static

* Constants

* time buffer for pose valid

* Fix static

* Revert "DM: Enforce monitoring of MADS state in driver monitoring" (#830)

Revert "DM: Enforce monitoring of MADS state in driver monitoring (#818)"

This reverts commit 3615b1a203.

* DM: Enforce monitoring of MADS state in driver monitoring (#831)

* DM: Enforce monitoring of MADS state in driver monitoring

Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.

* how

* okay, only when active

* ui(raylib): update spinner progress bar to match Qt (#35028)

* lagd: estimate std (#35009)

* Std

* Fix static

* Refactor

* Assert std zero

* update

* ui(raylib): fix typos (#35030)

* Update modeld action logic (#35032)

* add action logic

* magic numbers

* unused

* plot accel

* more changes

* lagd: check for validity of the estimate when restoring state (#35034)

Do not restore if invalid

* Multilang: Update de translation (#35025)

added missing German translations

* Tomb raider 2 (#35029)

* db56b8fb-9135-4ab6-af18-99b7df7b2245/400

* fixes

* linter unhappy

* 6dbe0991-baa1-49ad-836a-ab370d1f0d92/400

* This one is good: 19387087-1005-475e-9015-9458dd8e7c5f/400

* Better every day: 39ed911c-0937-417f-97d2-58a8bb3caa53/400

* Actually end-to-end

* typo

* smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360

* Revert "smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360"

This reverts commit edd4f02386d83d82dd8a188985cde80ed1646b7f.

* 11632ef7-f555-489c-8480-e3bf97d9285e/400

* 08712d27-f6bd-4536-a30e-c729e5f62356/400

* 0a92a35e-1f72-476a-8cb6-c9f103f36822/400

* ee6d2394-2072-420c-a664-b4c0d4ed0b61/400

* no prev curv

* No double work

* fix bug

* smooth

* update prev action

* whitespace

* add little accel

* new ref

* Update plant.py

* DEC: adjust dynamic speed adaptation parameters (#813)

* early and better

* Update sunnypilot/selfdrive/controls/lib/dec/constants.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>

* OS04C10: use IFE downscaler for road cameras (#35023)

* squashh

* wrong

* clean up

* rename

* process replay migration: fix longitudinalPlan (#35035)

* ci: ui preview add unicode characters and emojis (#835)

Add unicode characters and emojis!

* ui(raylib): update text window font, new lines and indentation (#35031)

* NNLC: decreased low-speed factor (#822)

* NNLC: decreased low-speed factor

* np.float to float

* format

* add tests for sanity check

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* ui(raylib): calculate spinner progress in set_text (#35036)

* bugfix: Auto lane change - Add mode to disable lane changes (#826)

* off is off

* sugg

* line

* Update sunnypilot/selfdrive/controls/lib/tests/test_auto_lane_change.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>

* NNLC: use `safe_exp` to prevent overflow in `sigmoid` (#836)

* test

* prevent overflowing

* unused

* NNLC: fix weak torque in high lat-accel turns (#823)

* NNLC: fix weak torque in high lat-accel turns

* np.float to float

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* ci: trigger prebuilt builds via label from PR

* ci: enhance pull request handling for prebuilt workflows

* ci: add wait-for-action step to monitor selfdrive_tests workflow

* ci: add validation job to monitor selfdrive_tests for prebuilt workflows

* test

* force negative condition to validate flow

* force negative condition to validate flow

* ci: add wait_for_tests input to control selfdrive_tests workflow execution

* ci: update description for wait_for_tests input in workflow

* Cleaning

* Remove PR label when triggered by the label

* Rename

* Changing to target and only caring about labeled for the time being

* gh action needs cancelled not canceled

* Line ending

* ci: avoid deadlock on dev-c3 branch build when PR labeled dev-c3 (#839)

* ci: enhance PR checks to validate individual check runs before merging and ignore reset-and-squash as candidate for fail

* reset and squash script shouldn't will be cancelled only if a push to master has been made which always should take priority. The rest will be put on hold to avoid parallel squash scripts running

* Set concurrencty at workflow level?

* Set concurrencty at workflow level?

* change trigger to pull_request to validate

* Reducing the types of "pull request" events

* Keep it as target

* Playing eith run name a little

* Change to pull request not target

* simplifying

* set to just pull request without target

* maintain as pull request target

* ci: update auto pr review config and split turst fork pr (#842)

* Updating auto pr labeler

* auto pr review revamp

* Leaving event as pull request :)

* Check permission

* add chore

* Bringing back as original

* ci: bugfix flipped contains check for pull requests

* ci: bugfix cancelling only when push to master or workflow dispatch.

Otherwise don't let it cancel as it seems that when running with pull_request_target we are with ref pointing to target and thus the cancel condition was being met

* ui(raylib): constant spinner rotation speed (#35037)

* ci: improve conditions for publish and notify steps in workflow (#844)

* [bot] Update translations (#35040)

Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>

* Long planner: make work with training (#35043)

* revert useless

* update ref

* Modeld: small refactor (#35044)

refactor

* update smooth

* raylib: init updater (#35045)

* raylib: init updater

* cleanup

* Revert "OS04C10: use IFE downscaler for road cameras" (#35046)

Revert "OS04C10: use IFE downscaler for road cameras (#35023)"

This reverts commit 3b60b22cee.

* Tomb Raider 3 (#35042)

* 92b64884-4506-4a03-87ad-33e1a177fe73/400

* faster lat

* DM: Use `carControl.latActive` for MADS DM monitoring (#845)

* ci: fixes for trigger conditions on sync (#847)

pull_request_target is needed for security, but at the same time it makes life a little harder because the ref is different so we need to do some work to make sure we get what we are supposed to get

* ui(raylib): reduce spinner rotation artifact (#35048)

* ui(raylib): reduce spinner rotation artifact

A visual artifact (white pixels) appeared on the edge of the
rotating spinner track texture, likely due to RGB color bleed during
bilinear filtering in Raylib.

Pre-multiplying the alpha channel of the spinner track image using
`rl.image_alpha_premultiply` significantly reduces the visibility of the
artifact.

* lint

* ui(raylib): increase font size and wrap text in spinner (#35049)

- Wrap text onto separate lines
- Increase font size to be closer to Qt
- Remove extra letter spacing - 0.0 should use font default spacing, and this is used in `wrap_text`

Will fix vertical alignment separately, as both the text and progress bar layouts need to be considered

* ui(raylib): update spinner vertical pos (#35051)

Adjust the spinner vertical position when displaying text or a progress bar

- When displaying the progress bar, center the comma logo and spinner in the middle of the screen
- When displaying text, center the entire content vertically

Also updated `wrap_text` to not include an empty line in the array if it's the first line, so that `wrap_text("")` always returns `[]`

* ui(raylib): "exit" btn in text window on PC (#35052)

* ui(raylib): "exit" btn in text window on PC

* unused import

* Revert "ui(raylib): "exit" btn in text window on PC (#35052)"

This reverts commit f9767d2650.

* plotjuggler: support relative paths (#35054)

* Support relative paths

* Abspath for rlog too

* Reapply "ui(raylib): "exit" btn in text window on PC" (#35053)

* ui(raylib): "exit" btn in text window on PC

* unused import

* request close

* this was missing

* Disable low speed steer in modeld (#35056)

* disable low speed steer

* No steer under

* TOYOTA_RAV4_PRIME NNLC tuning gen 1 (#850)

neural_network_data: TOYOTA_RAV4_PRIME NNLC tuning gen 1

* SL: updating localproxy implementation (#841)

* Adding capabilities to route localProxy via sunnylink

* Undo

* Thx lint

* get api token

* cert is not valid when it's an IP. Still use cert, but don't validate

* move to car_specific_sp

* bump

---------

Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
Co-authored-by: Alexandre Nobuharu Sato <66435071+AlexandreSato@users.noreply.github.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: programanichiro <99449198+programanichiro@users.noreply.github.com>
Co-authored-by: eFini <ricklan@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: niko001 <nikolaus_fischer@t-online.de>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
Co-authored-by: Tim Wilson <twilsonco@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Warren Togami <wtogami@gmail.com>

* fixing missing event

* more event fixes

* fixing spacing

* more fixes

* revert

* update

* update

* update

* reverting unneeded event

* S P A C I N G

* bumping opendbc

* bump

* Update sunnypilot/selfdrive/car/car_specific.py

* Update sunnypilot/selfdrive/car/car_specific.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Stupefacient <brianbrownt@gmail.com>
Co-authored-by: Alexandre Nobuharu Sato <66435071+AlexandreSato@users.noreply.github.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: programanichiro <99449198+programanichiro@users.noreply.github.com>
Co-authored-by: eFini <ricklan@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Nayan <nayan8teen@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: niko001 <nikolaus_fischer@t-online.de>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: YassineYousfi <yyousfi1@binghamton.edu>
Co-authored-by: Tim Wilson <twilsonco@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Warren Togami <wtogami@gmail.com>
2025-05-02 00:28:06 -04:00
Shane Smiskol
e972a47b93 CI: check submodules after tests (#35100)
release: check submodules after tests
2025-05-01 20:27:14 -07:00
Shane Smiskol
37fa8dc2ba Tesla: move steering disengage to generic param (#35097)
* add event

* fix

* for now don't change

* bump to master
2025-05-01 20:26:28 -07:00
commaci-public
afcd031cf1 [bot] Update Python packages (#35095)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-05-01 13:59:07 -07:00
Kacper Rączy
45b273328d Enable online lag learning (#34968)
* Use in modeld

* Use in torqued

* Do not use default value in torqued

* Add liveDelay in process replay

* update ref

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-05-01 11:42:49 -07:00
DevTekVE
2ceafa2c57 ci: Fix prebuilt label behavior (#864)
* Refactor workflow to centralize branch source handling

Moved branch resolution logic to a single `SOURCE_BRANCH` variable for consistency and readability. Updated related conditionals and parameters to use this new variable, reducing redundancy and improving maintainability of branch-specific configurations.

* Refactor workflow to use repository-defined variables.

Replaced hardcoded branch names with repository-defined variables for improved configurability and maintainability. This ensures flexibility by allowing changes via repository settings without modifying the workflow file.
2025-05-01 11:44:43 +02:00
Jason Wen
b5baf8fc04 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#863) 2025-04-30 23:06:41 -04:00
discountchubbs
7bf30c17b0 Merge remote-tracking branch 'openpilot/master' into sync-04-30 2025-04-30 22:57:14 -04:00
Harald Schäfer
9f1e462faa Tomb Raider 6 (#35087)
* 5ec366c3-7883-4004-84a2-e4b14bac5b1d/400

* Use lat plan

* fix import

* fix

* 8d0a1b3b-9972-4e53-b9c5-3e13e5e3e404/400

* whitespace

* whitespace
2025-04-30 17:19:53 -07:00
Adeeb Shihadeh
c5ba5c9c23 push back a couple weeks, cvpr release! 2025-04-30 15:44:27 -07:00
Trey Moen
45787163a2 feat: clip.py (#35071) 2025-04-30 15:32:11 -07:00
Shane Smiskol
a0bcea5719 capitalization typo 2025-04-29 15:49:41 -07:00
Shane Smiskol
cf0b0399d9 replay: more speed options (#35091)
* match connect

* simple
2025-04-29 15:48:29 -07:00
commaci-public
91fbbf812f [bot] Update Python packages (#35085)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-28 13:33:28 -07:00
William Bonilla
c5b75168e9 Fix test_update_returns_state to flatten Kalman output (#35083)
fix(tests): flatten Kalman filter output in test_update_returns_state
2025-04-28 13:30:16 -07:00
Jason Wen
13efb6805c Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#856) 2025-04-28 14:22:48 -04:00
rav4kumar
cf9b45783d Merge remote-tracking branch 'comma/master' into sync-20250427 2025-04-28 14:06:18 -04:00
William Bonilla
c4acae6b51 "docs: update 'Turn the Speed Blue' tutorial with new UI path and fu… (#35016)
* "docs: update 'Turn the Speed Blue' tutorial with new UI path and function"

* Change 'Openpilot' to all lowercase ('openpilot') based on the review.
2025-04-27 19:54:00 -07:00
Trey Moen
c0b0bb554c fix(replay): search for route key in entire str (#35081)
fix(replay): look at whole segment string
2025-04-26 13:43:18 -07:00
DevTekVE
be168d14e9 SL: updating localproxy implementation (#841)
* Adding capabilities to route localProxy via sunnylink

* Undo

* Thx lint

* get api token

* cert is not valid when it's an IP. Still use cert, but don't validate
2025-04-26 19:33:35 +02:00
Harald Schäfer
e7cf508f50 Tomb Raider 5 (#35080)
846c53a4-b886-4942-a4d3-7ea3aff5be8d/400
2025-04-26 07:30:47 -07:00
Cameron Clough
9d17c73f6b avoid importing Raylib UI (#35078) 2025-04-25 19:09:19 -07:00
Cameron Clough
83b84a5bec Revert "ui(raylib): create BaseWindow (#35074)"
This reverts commit 124198460b.
2025-04-26 01:20:58 +01:00
Shane Smiskol
2619732d9f Fix tethering connection disabling internet (#35075)
* fix

* this is ignored in this networkmanager

* whoop
2025-04-25 16:49:09 -07:00
Cameron Clough
124198460b ui(raylib): create BaseWindow (#35074)
* ui(raylib): create BaseWindow

* test without typing

* revert

* Revert "test without typing"

This reverts commit c8a5e1b8322bb7250ede540d7b6d25eefa72cef1.

* lines
2025-04-25 23:33:32 +01:00
github-actions[bot]
41b34c6f43 [bot] Update translations (#35072)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-25 14:00:28 -07:00
commaci-public
38610419dc [bot] Update Python packages (#35041)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-25 13:58:25 -07:00
Jason Young
37839ea0c5 controls: publish current curvature in CarControl (#34679)
* controls: publish current curvature in CarControl

* clean up

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-04-25 13:57:18 -07:00
Cameron Clough
362ddfc0c7 ui: replace qt text window with raylib (#35064)
* remove qt text window

* use wrapper, render text window in thread

* add wait_for_exit method

* update imports
2025-04-25 14:17:47 +01:00
Cameron Clough
7eb1c31d72 ui(raylib/text): spacing between button and scrollbar (#35069) 2025-04-25 14:06:37 +01:00
Cameron Clough
92ada2170f ui(raylib): start scroll at bottom of text window (#35068) 2025-04-25 14:00:31 +01:00
Cameron Clough
c961fb095f ui(raylib): preserve whitespace in wrapped text (#35067)
* ui(raylib): preserve whitespace in wrapped text

* lint
2025-04-25 13:57:04 +01:00
Adeeb Shihadeh
37e86df41e CI: comment reporter links on PRs (#35066)
* comment

* Revert "Tomb Raider 4 (#35058)"

This reverts commit 756aebd39f.

* no dpeth

* Reapply "Tomb Raider 4 (#35058)"

This reverts commit 7143835b3d075271e86fb181e08f32db7720c6f8.

* no forks
2025-04-24 18:16:18 -07:00
Harald Schäfer
756aebd39f Tomb Raider 4 (#35058)
* dc455ed7-0ef1-4c57-9391-c71767784c7e/400

* f16884e6-417e-4842-aeda-b2e1b3edf40b/400
2025-04-24 16:24:21 -07:00
Cameron Clough
3ee2882093 ui: replace qt spinner with raylib (#35059)
* use raylib spinner

* remove qt spinner

* use wrapper, render spinner in thread

* english

* fix?

* match Qt font size more closely
2025-04-24 21:16:38 +01:00
Cameron Clough
7c223e5586 ui(raylib): decrease target FPS to 30 (#35062) 2025-04-24 21:00:48 +01:00
Cameron Clough
8088438bd6 hardware: make set_display_power not abstract (#35061)
hardware: make set_dispaly_power not abstract

follow-up to https://github.com/commaai/openpilot/pull/35060#discussion_r2058829397
2025-04-24 20:18:31 +01:00
Cameron Clough
196848c023 ui(raylib): set display power and brightness on init (#35060)
* add set_display_power to hardware.py

* set display power and brightness on app init
2025-04-24 15:55:15 +01:00
ZwX1616
e85d833a80 Revert "Revert "OS04C10: use IFE downscaler for road cameras"" (#35047)
* Revert "Revert "OS04C10: use IFE downscaler for road cameras" (#35046)"

This reverts commit aaaa2d0dd0.

* fixed

* patch it here

* surely
2025-04-23 21:09:22 -07:00
Jason Wen
1e5408f58f Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#851) 2025-04-24 00:05:15 -04:00
Jason Wen
b8b29a210a Merge branch 'upstream/openpilot/master' into sync-20250423 2025-04-23 23:44:50 -04:00
Warren Togami
63a188d2e0 TOYOTA_RAV4_PRIME NNLC tuning gen 1 (#850)
neural_network_data: TOYOTA_RAV4_PRIME NNLC tuning gen 1
2025-04-23 18:23:40 -07:00
Harald Schäfer
a38dcbb3fe Disable low speed steer in modeld (#35056)
* disable low speed steer

* No steer under
2025-04-23 14:15:06 -07:00
Cameron Clough
281a72780b Reapply "ui(raylib): "exit" btn in text window on PC" (#35053)
* ui(raylib): "exit" btn in text window on PC

* unused import

* request close

* this was missing
2025-04-23 14:06:09 +01:00
Jason Wen
52843834ba Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#849) 2025-04-23 01:09:17 -04:00
Jason Wen
b9385a2368 Merge branch 'upstream/openpilot/master' into sync-20250422
# Conflicts:
#	.github/workflows/selfdrive_tests.yaml
#	.github/workflows/ui_preview.yaml
#	common/params_keys.h
#	opendbc_repo
#	panda
#	selfdrive/car/card.py
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/car/tests/test_models.py
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/modeld/fill_model_msg.py
#	selfdrive/test/process_replay/process_replay.py
#	selfdrive/ui/qt/offroad/developer_panel.cc
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/translations/main_de.ts
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master-new`

Sync: `commaai/panda:master` into `sunnypilot/panda:master-new`
2025-04-23 00:44:53 -04:00
Kacper Rączy
7b5468b2e8 plotjuggler: support relative paths (#35054)
* Support relative paths

* Abspath for rlog too
2025-04-22 21:50:03 +00:00
Cameron Clough
754f5aa955 Revert "ui(raylib): "exit" btn in text window on PC (#35052)"
This reverts commit f9767d2650.
2025-04-22 22:30:20 +01:00
Cameron Clough
f9767d2650 ui(raylib): "exit" btn in text window on PC (#35052)
* ui(raylib): "exit" btn in text window on PC

* unused import
2025-04-22 22:07:47 +01:00
Cameron Clough
c9259a9bcf ui(raylib): update spinner vertical pos (#35051)
Adjust the spinner vertical position when displaying text or a progress bar

- When displaying the progress bar, center the comma logo and spinner in the middle of the screen
- When displaying text, center the entire content vertically

Also updated `wrap_text` to not include an empty line in the array if it's the first line, so that `wrap_text("")` always returns `[]`
2025-04-22 20:54:36 +01:00
Cameron Clough
651ff78cb0 ui(raylib): increase font size and wrap text in spinner (#35049)
- Wrap text onto separate lines
- Increase font size to be closer to Qt
- Remove extra letter spacing - 0.0 should use font default spacing, and this is used in `wrap_text`

Will fix vertical alignment separately, as both the text and progress bar layouts need to be considered
2025-04-22 16:07:05 +01:00
Cameron Clough
23524e2038 ui(raylib): reduce spinner rotation artifact (#35048)
* ui(raylib): reduce spinner rotation artifact

A visual artifact (white pixels) appeared on the edge of the
rotating spinner track texture, likely due to RGB color bleed during
bilinear filtering in Raylib.

Pre-multiplying the alpha channel of the spinner track image using
`rl.image_alpha_premultiply` significantly reduces the visibility of the
artifact.

* lint
2025-04-22 15:28:54 +01:00
DevTekVE
fd0d4a5aab ci: fixes for trigger conditions on sync (#847)
pull_request_target is needed for security, but at the same time it makes life a little harder because the ref is different so we need to do some work to make sure we get what we are supposed to get
2025-04-22 14:54:18 +02:00
Jason Wen
0102a1c704 DM: Use carControl.latActive for MADS DM monitoring (#845) 2025-04-22 00:03:06 -04:00
Harald Schäfer
8cefc00a6e Tomb Raider 3 (#35042)
* 92b64884-4506-4a03-87ad-33e1a177fe73/400

* faster lat
2025-04-21 17:06:53 -07:00
ZwX1616
aaaa2d0dd0 Revert "OS04C10: use IFE downscaler for road cameras" (#35046)
Revert "OS04C10: use IFE downscaler for road cameras (#35023)"

This reverts commit 3b60b22cee.
2025-04-21 17:02:36 -07:00
Adeeb Shihadeh
a9b9e0bb54 raylib: init updater (#35045)
* raylib: init updater

* cleanup
2025-04-21 16:13:55 -07:00
Bruce Wayne
a029d13398 update smooth 2025-04-21 15:44:30 -07:00
Harald Schäfer
33a7d853f0 Modeld: small refactor (#35044)
refactor
2025-04-21 15:10:41 -07:00
Harald Schäfer
34514ef176 Long planner: make work with training (#35043)
* revert useless

* update ref
2025-04-21 14:11:57 -07:00
github-actions[bot]
ed555cb948 [bot] Update translations (#35040)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-21 12:48:11 -07:00
DevTekVE
b64ceb41ed ci: improve conditions for publish and notify steps in workflow (#844) 2025-04-20 21:18:11 +02:00
Cameron Clough
d56baa0fbb ui(raylib): constant spinner rotation speed (#35037) 2025-04-20 15:03:49 +01:00
DevTekVE
9a1e420fa7 ci: bugfix cancelling only when push to master or workflow dispatch.
Otherwise don't let it cancel as it seems that when running with pull_request_target we are with ref pointing to target and thus the cancel condition was being met
2025-04-20 14:19:31 +02:00
DevTekVE
d0c209575e ci: bugfix flipped contains check for pull requests 2025-04-20 14:06:24 +02:00
DevTekVE
511e4c5919 ci: update auto pr review config and split turst fork pr (#842)
* Updating auto pr labeler

* auto pr review revamp

* Leaving event as pull request :)

* Check permission

* add chore

* Bringing back as original
2025-04-20 13:34:24 +02:00
DevTekVE
898f30744f ci: avoid deadlock on dev-c3 branch build when PR labeled dev-c3 (#839)
* ci: enhance PR checks to validate individual check runs before merging and ignore reset-and-squash as candidate for fail

* reset and squash script shouldn't will be cancelled only if a push to master has been made which always should take priority. The rest will be put on hold to avoid parallel squash scripts running

* Set concurrencty at workflow level?

* Set concurrencty at workflow level?

* change trigger to pull_request to validate

* Reducing the types of "pull request" events

* Keep it as target

* Playing eith run name a little

* Change to pull request not target

* simplifying

* set to just pull request without target

* maintain as pull request target
2025-04-20 13:04:35 +02:00
DevTekVE
4ea982ca37 ci: trigger prebuilt builds via label from PR
* ci: enhance pull request handling for prebuilt workflows

* ci: add wait-for-action step to monitor selfdrive_tests workflow

* ci: add validation job to monitor selfdrive_tests for prebuilt workflows

* test

* force negative condition to validate flow

* force negative condition to validate flow

* ci: add wait_for_tests input to control selfdrive_tests workflow execution

* ci: update description for wait_for_tests input in workflow

* Cleaning

* Remove PR label when triggered by the label

* Rename

* Changing to target and only caring about labeled for the time being

* gh action needs cancelled not canceled

* Line ending
2025-04-20 12:06:28 +02:00
Tim Wilson
a87986dd82 NNLC: fix weak torque in high lat-accel turns (#823)
* NNLC: fix weak torque in high lat-accel turns

* np.float to float

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-19 21:53:57 -04:00
Jason Wen
2fe3c2748e NNLC: use safe_exp to prevent overflow in sigmoid (#836)
* test

* prevent overflowing

* unused
2025-04-19 21:41:11 -04:00
Kumar
1bf752fc79 bugfix: Auto lane change - Add mode to disable lane changes (#826)
* off is off

* sugg

* line

* Update sunnypilot/selfdrive/controls/lib/tests/test_auto_lane_change.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-04-19 21:15:28 +02:00
Cameron Clough
618b7ccf23 ui(raylib): calculate spinner progress in set_text (#35036) 2025-04-19 17:08:33 +01:00
Tim Wilson
bcdb546638 NNLC: decreased low-speed factor (#822)
* NNLC: decreased low-speed factor

* np.float to float

* format

* add tests for sanity check

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-19 11:47:47 -04:00
Cameron Clough
fb5fa70e78 ui(raylib): update text window font, new lines and indentation (#35031) 2025-04-19 16:17:18 +01:00
DevTekVE
1db91d6257 ci: ui preview add unicode characters and emojis (#835)
Add unicode characters and emojis!
2025-04-19 07:53:20 +02:00
YassineYousfi
7ceb284d6d process replay migration: fix longitudinalPlan (#35035) 2025-04-18 19:21:52 -07:00
ZwX1616
3b60b22cee OS04C10: use IFE downscaler for road cameras (#35023)
* squashh

* wrong

* clean up

* rename
2025-04-18 14:29:37 -07:00
Kumar
65431f4e2f DEC: adjust dynamic speed adaptation parameters (#813)
* early and better

* Update sunnypilot/selfdrive/controls/lib/dec/constants.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
2025-04-18 14:02:50 -04:00
Harald Schäfer
2c162d9b75 Tomb raider 2 (#35029)
* db56b8fb-9135-4ab6-af18-99b7df7b2245/400

* fixes

* linter unhappy

* 6dbe0991-baa1-49ad-836a-ab370d1f0d92/400

* This one is good: 19387087-1005-475e-9015-9458dd8e7c5f/400

* Better every day: 39ed911c-0937-417f-97d2-58a8bb3caa53/400

* Actually end-to-end

* typo

* smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360

* Revert "smooooooth: 94e23541-eb84-4fef-9f51-6a2d82aff314/360"

This reverts commit edd4f02386d83d82dd8a188985cde80ed1646b7f.

* 11632ef7-f555-489c-8480-e3bf97d9285e/400

* 08712d27-f6bd-4536-a30e-c729e5f62356/400

* 0a92a35e-1f72-476a-8cb6-c9f103f36822/400

* ee6d2394-2072-420c-a664-b4c0d4ed0b61/400

* no prev curv

* No double work

* fix bug

* smooth

* update prev action

* whitespace

* add little accel

* new ref

* Update plant.py
2025-04-17 23:21:25 -07:00
niko001
65c210265b Multilang: Update de translation (#35025)
added missing German translations
2025-04-17 20:55:32 -07:00
Kacper Rączy
15326c2d30 lagd: check for validity of the estimate when restoring state (#35034)
Do not restore if invalid
2025-04-18 01:37:48 +00:00
Harald Schäfer
b42ec33a63 Update modeld action logic (#35032)
* add action logic

* magic numbers

* unused

* plot accel

* more changes
2025-04-17 17:59:15 -07:00
Cameron Clough
4f913f0cfb ui(raylib): fix typos (#35030) 2025-04-18 01:11:22 +01:00
Bruce Wayne
a4cdc96a99 update 2025-04-17 16:58:00 -07:00
Kacper Rączy
06a9483a24 lagd: estimate std (#35009)
* Std

* Fix static

* Refactor

* Assert std zero
2025-04-17 23:49:30 +00:00
Cameron Clough
c933914f86 ui(raylib): update spinner progress bar to match Qt (#35028) 2025-04-17 23:11:19 +01:00
Jason Wen
86a390780e DM: Enforce monitoring of MADS state in driver monitoring (#831)
* DM: Enforce monitoring of MADS state in driver monitoring

Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.

* how

* okay, only when active
2025-04-17 13:31:43 -04:00
Jason Wen
bdcc9d579f Revert "DM: Enforce monitoring of MADS state in driver monitoring" (#830)
Revert "DM: Enforce monitoring of MADS state in driver monitoring (#818)"

This reverts commit 3615b1a203.
2025-04-17 13:03:07 -04:00
Kacper Rączy
60da5dd39a lagd: check sensors valid (#35027)
* Check if sensors valid

* Fix test

* Fix static

* Constants

* time buffer for pose valid

* Fix static
2025-04-17 09:35:30 +02:00
DevTekVE
702a755307 CI: Update PR list query to exclude draft pull requests (#829) 2025-04-16 06:05:44 -04:00
DevTekVE
224f43b6fa CI: Improve dev-c3-new auto build (#825)
* force commit to force PR

* ci: add job to manage PR labels and remove trust label on new commits

* Add pull request trigger

* empty commit to test

* ci: update pull request label management logic and remove FORCE_RUN flag

* ci: update trust label management to use TRUST_FORK_PR_LABEL

* ci: update workflow to manage PR labels and adjust trigger conditions

* ci: rename jobs in workflow for consistency and clarity

* ci: add unleash-nightly-squash branch to workflow

* ci: add checkout step with GITHUB_TOKEN to workflow

* force wait

* what happens if negated the wait

* ci: add 'Wait for Tests' action to monitor workflow execution

* ci: update wait-for-tests action conditions and cleanup

* ci: refine conditions for managing PR labels and waiting for tests

* ci: enhance PR label conditions for workflow execution

* Cant use env on if

* maybe

* ci: update pull request workflow conditions and cleanup

* Missing end of line

* ci: rename workflow and update job name for clarity

* Cleaning

* ci: refine conditions for pull request handling in workflow

* ci: update handling of TRUST_FORK_LABEL in PR processing

* ci: remove fork trust warning from PR processing

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-15 15:53:29 -04:00
Nayan
a867dea681 UI: Bugfix Max Time Offroad (#820)
bugfixes

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
2025-04-15 18:12:08 +02:00
Shane Smiskol
d7a5661ffe Fix possible CAN ignition overlap due to incorrect counter tracking (#35019)
* fix-rivian-ign

* bump
2025-04-14 21:08:45 -07:00
Jason Wen
4c8ed80304 Update Python packages (#819) 2025-04-15 00:04:57 -04:00
Maxime Desroches
0a40162039 Temporary disable UI preview from CI (#35018)
disable
2025-04-14 18:36:55 -07:00
Shane Smiskol
abad7649d6 Rename experimental long (#35011)
* now alpha long

* fix

* rename param

* thought i did this

* debug

* debug

* more

* more

* moar

* Revert "moar"

This reverts commit e347106246583982e1be206485ad4d8eb944f817.

* Revert "more"

This reverts commit 0746e6d2e400ce1715614c62af84a9680c4d65c1.

* Revert "more"

This reverts commit 0db5a8792c01bb2d687f9152e6ba37fb76d4a453.

* Revert "debug"

This reverts commit 72f235b13727980e4331ff487998ddc7c7f7fb63.

* Revert "debug"

This reverts commit 7871b69f8c1bdffed386c2baac99542fcc50f7eb.
2025-04-14 17:17:59 -07:00
commaci-public
dced8d7f87 [bot] Update Python packages (#35017)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-14 16:51:16 -07:00
Jason Wen
3615b1a203 DM: Enforce monitoring of MADS state in driver monitoring (#818)
* DM: Enforce monitoring of MADS state in driver monitoring

Added `selfdriveStateSP.mads.enabled` to track MADS engagement. This ensures monitoring logic accounts for MADS alongside the existing selfdrive state checks, improving feature integration and event handling.

* how
2025-04-14 14:50:21 -04:00
DevTekVE
b41ace34cc sunnylink: fix sunnylink backup restore version parsing (#816)
* improvement

* fix: Improve version parsing logic for sunnypilot

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-14 14:18:05 -04:00
DevTekVE
b9d584245f ci: update squash script for external contributors (#811)
* Get head ref info

* Simpify adding the comment with the newest flagg by gh cli

* Dynamic origin

* Enhance PR processing: add label handling for forked PRs and improve variable naming

* Refactor PR label handling: use constant for trust-fork label and improve comments

* Fix remote addition in PR processing: change subprocess call to not check for errors

* Refactor PR comment handling: support multiple comments and improve clarity

* Refactor PR processing: streamline comment handling and improve error management

* Refactor add_pr_comments function: specify comments type as list of strings

* Maybe we don't prevent "behind" branches to be merged as lon as the PR itself is mergeable

* lint, leave me alone

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
2025-04-14 19:29:33 +02:00
DevTekVE
6bd47c4eec Models: point to v2 of driving models json for recompiled models (#817)
Use newer model version json since they have been recompiled
2025-04-13 21:39:26 +02:00
Jason Wen
43eefed514 Hyundai longitudinal: Parse lead info for camera-based SCC platforms (#809)
* Hyundai longitudinal: Parse lead info for camera-based SCC platforms

* fix

* update

* bump

* update tests

* lol why is this here

* bump

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
2025-04-12 12:22:42 -04:00
Nayan
f1d703e6e4 Device: Customizable Max Time Offroad (#796)
* Max Time Offroad

* Refactor & Fix param

* Error Handling

* rename SP variable

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.h

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

* Update selfdrive/ui/sunnypilot/qt/widgets/controls.cc

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

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.h

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

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/max_time_offroad.cc

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

* UI layout changes for better alignment

selector is not big enough -> make it bigger ;)

OptionControlSP now includes a QMap argument to allow actual values to be set in param directly

* Rebase & resolve reviews

* change default to be closer to OP default

* me dumb

* MaxTimeOffroad: Add support for 30h limit and improve label formatting

* power_monitoring: Refactor MaxTimeOffroad parameter handling for clarity

* test: Add unit tests for MaxTimeOffroad parameter handling

* power_monitoring: Update MaxTimeOffroad handling to use seconds and improve shutdown logic

* power_monitoring: Improve exception handling and remove redundant shutdown check for MaxTimeOffroad

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-12 16:33:17 +02:00
Jason Wen
a598d385f2 ci: Remove redundant Panda build step from prebuilt workflow (#810)
The Panda build step was unnecessary as it is not utilized in this workflow. This change simplifies the workflow and reduces redundant actions, improving efficiency.
2025-04-12 11:47:00 +02:00
commaci-public
b0915db50a [bot] Update Python packages (#35012)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-04-11 14:55:12 -07:00
Nayan
92707e8912 UI: Device & Sunnylink Panels - Standardize push button size & alignment (#806)
* layout adjustments

* sunnylink_panel

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-11 22:21:49 +02:00
Jason Wen
fb87ba681a MADS: transition to soft-disable for specific gear states (#791)
* MADS: transition to soft-disable for specific gear states

This commit enhances the condition checking functionality of the Modular Assistive Driving System (MADS) to implement a 'soft-disable' feature during the vehicle's active motion when a non-forward drive gear is engaged. It includes utilizing structs to reference various car state attributes and modifying a function definition to improve clarity. This adjustment boosts the system's reaction to gear shifts, increasing the safety and efficiency of the driving assist system.

* structs
2025-04-11 16:06:45 -04:00
Jason Wen
6a00ac9cd0 Radard: vision-based yRel for Hyundai single-lead systems (#805)
Introduced processing for custom yRel values using HyundaiFlagsSP when the enhanced SCC flag is enabled. Updated `radard` to handle `CarParamsSP` and make necessary adjustments for Hyundai vehicles with specific SCC configurations.
2025-04-11 14:28:59 -04:00
Adeeb Shihadeh
24c2d9a68a bump panda 2025-04-10 15:57:15 -07:00
Nayan
0a2fd7bd61 UI: Update AbstractControlSP_SELECTOR and OptionControlSP (#800)
* controls

* Adjust label width dynamically based on layout type.

Updated the label's fixed width to be conditional on the layout type, improving adaptability for different inline layouts. Additionally, corrected indentation in the width calculation loop for consistency.

* Refactor OptionControlSP to improve parameter value handling and encapsulate logic in dedicated methods

* Refactor getParamValue to return an integer and ensure value is updated correctly in button click handler

* Trying to unify a bit the logic. still WIP

* Reducing a bit the change footprint

* Refactor spacing item handling to prevent duplicate insertion and improve layout management

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-04-10 15:20:41 -04:00
Robbe Derks
3e6267967b Raise thermal setpoint (#35008)
We don't need to control all the way down to 70C
2025-04-10 16:33:36 +02:00
Kacper Rączy
f237649a7a Reapply "Online lateral lag learning" (#34975)
* Online lateral lag learning (#34974)

This reverts commit b4cc9e68d1.

* pad to the best size for fft

* Fix static analysis

* Add typing

* Fix typing

* MAX_LAG

* Calculate cross correlation regardless if the points are valid

* Back to lagd

* Add lagd to process_config

* Lagd in test onroad

* Move lag estimator for lagd

* Remove duplicate entry from test_onroad

* Update process replay

* pre-fill the data

* Update cpu usage

* 25sec window

* Change the meaning of lateralDelayEstimate

* No newline

* Fix typing

* Prefill

* Update ref commit

* Add a unit test

* Fix static issues

* Time limit

* Or timeout

* Use mocker

* Update estimate every time

* empty test

* DT const

* enable RIVIAN again

* Update ref commit

* Update that again

* Improve the tests

* Fix static

* Add masking test

* Increase timeout

* Add liveDelay to selfdrived

* Add liveDelay to selfdrived in process_replay

* Fix block_avg restore after num_blocks

* regen most

* Update bolt

* Update ref commit

* Change the key name

* Add assert

* True weighted average
2025-04-09 22:31:07 +00:00
Shane Smiskol
5d1816e2b8 Revert "test_models: update relay malfunction check" (#35002)
Revert "test_models: update relay malfunction check (#34999)"

This reverts commit 2cd0079abe.
2025-04-08 21:27:05 -07:00
Kacper Rączy
dec42839e3 process_replay: remove GM (volt) (#35000)
Remove volt segment
2025-04-09 04:13:02 +00:00
Shane Smiskol
2cd0079abe test_models: update relay malfunction check (#34999)
relay is checked in fwd hook
2025-04-08 21:11:24 -07:00
Shane Smiskol
4c7d29b907 bump opendbc 2025-04-08 21:08:04 -07:00
Kacper Rączy
0b72ae3bc2 process_replay: fix GM and replace TOYOTA3 (#34996)
* Add volt and bolt param migration

* Remove mazda due to invalid sensor timings

* Fix the import

* Add mazda to excluded

* Bring back mazda, but add todo

* New segment for TOYOTA3

* Fix

* Update ref commit
2025-04-09 03:12:52 +00:00
Adeeb Shihadeh
84b0baf68b Revert "hardwared: give stuck LTE connections a kick"
This reverts commit e4aa346259.
2025-04-08 11:04:00 -07:00
Adeeb Shihadeh
e4aa346259 hardwared: give stuck LTE connections a kick
This reverts commit e3e694096a.
2025-04-08 11:03:24 -07:00
Kacper Rączy
fc65a8ea8f paramsd: cache backwards compatibility (#34991)
* LiveParametersV2 key

* Param key

* Fix tests

* Remove old params if error

* Update exception message

* Update the test

* Add test for corrupted byte format in v1

* Rename params_reader => params
2025-04-08 02:23:11 +00:00
Jason Wen
1490a24378 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#798) 2025-04-07 21:40:48 -04:00
DevTekVE
a2761ba731 Merge remote-tracking branch 'comma/master' into sync-20250407
# Conflicts:
#	opendbc_repo
#	panda
2025-04-07 21:11:47 -04:00
Maxime Desroches
cdc801c3c1 update to latest userdata partition (#34990)
update
2025-04-07 11:51:53 -07:00
eFini
9f1a4569d1 Multilang: Update zh translation (#34985) 2025-04-07 10:55:52 -07:00
programanichiro
d1caf29f7d Multilang: Update ja translation (#34986)
* 日本語訳2025/3/19

* numerusform追加。

* connect to an unmetered networkに対応

* panda是正

* opendbc_repo是正
2025-04-07 10:55:35 -07:00
commaci-public
d78c9c26f6 [bot] Update Python packages (#34987)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-04-07 10:52:45 -07:00
Alexandre Nobuharu Sato
05ba480e02 Multilang: Update pt-BR translation (#34983) 2025-04-06 14:27:40 -07:00
Adeeb Shihadeh
f3c1427027 agnos 11.13 (#34980)
* agnos 11.12

* new build
2025-04-06 12:42:09 -07:00
DevTekVE
d7d4523e49 Readme: update with links to new branches and info about rewrite and reflash agnos (#795)
* Adding the new branches info and adding a warning to reflash agnos

* Using more blockquote

* it

---------

Co-authored-by: Stupefacient <brianbrownt@gmail.com>
2025-04-06 12:42:15 +02:00
Jason Wen
a08a29d5e6 MADS: prevent wrongCarMode from disabling MADS enabled state (#792)
* MADS: prevent `wrongCarMode` from disabling MADS enabled state

Add wrongCarModeNoEntry as a NO_ENTRY event to replace wrongCarMode (USER_DISABLE)
that would incorrectly disable MADS when in the wrong car mode. Provides
contextual guidance to users based on car brand, showing appropriate
instructions for re-engagement without requiring MADS to be re-enabled.

* move down

* warning only?

* cereal SIKE

* remove duplicate

* try this out

* final
2025-04-06 04:29:13 +00:00
Kacper Rączy
490c53e2dc locationd: make pose_kf inherit from KalmanFilter (#34982)
* Read message not json for initial state

* Delete lines

* Fix param
2025-04-05 05:48:34 +00:00
Jason Wen
976655b599 CI: Cache macOS Homebrew and Scons (#788)
* CI: Cache macOS builds

* try caching now

* close

* revert

* save homebrew cache

* final
2025-04-05 00:11:05 -04:00
Jason Wen
2105344725 Revert "MADS: Soft disable for non-Drive forward gear if in motion" (#790)
Revert "MADS: Soft disable for non-Drive forward gear if in motion (#784)"

This reverts commit b934aa37d4.
2025-04-04 22:59:23 -04:00
Jason Wen
8dec4ea5d7 Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)
This reverts commit bf2731b4
2025-04-04 22:43:00 -04:00
Kacper Rączy
1e3f6599bd calibrationd: read carParams from Params (#34981)
* Read CarParams once from Params

* Remove it from process replay
2025-04-04 23:05:36 +00:00
Jason Wen
658444ca77 CI: trigger UI report cache 2025-04-04 15:42:50 -04:00
Jason Wen
b934aa37d4 MADS: Soft disable for non-Drive forward gear if in motion (#784)
* MADS: Soft disable for non-Drive forward gear if moving

* test

* revert

* do this first

* Revert "do this first"

This reverts commit 0a4c938b7e.
2025-04-04 15:39:36 -04:00
Adeeb Shihadeh
cab57a00d0 selfdrived: remove ignored processes list (#34978)
* selfdrived: remove ignored processes list

* it's a set
2025-04-04 09:52:59 -07:00
Kacper Rączy
049193b178 test_onroad: test liveParameters service timing (#34977)
Add live params to test onroad
2025-04-04 03:31:55 +00:00
Stupefacient
84b934033c README for sunnypilot (#577)
* be gone thot

* hhhmm what is this

a little dusty but lets see if we can freshen it up

* some of these

* bye bye

* remove xml bs

* add doc link

* i cant type

* remove patron and old subnote

* remove broken link

* update licensing

* update

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-04-03 23:19:34 -04:00
Jason Wen
87ff98dc7c ui: update names (#678)
* ui: update names

* Revert "ui: update names"

This reverts commit 313510c8c0.

* gone

* init

* Changed all occurrences of 'openpilot' to 'sunnypilot'

All instances of 'openpilot' in the user interface, documentation, and prompts have been updated to 'sunnypilot'. These changes include source strings, warning messages, and the prompts shown to users. The adjustment is part of the rebranding process and aims to avoid any uncertainty or confusion for users.

* vanish translations

* translations

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-04-03 23:11:27 -04:00
Harald Schäfer
e45fc5e84b Bump tinygrad to upstream master (#34973)
bump tg
2025-04-03 19:51:15 -07:00
Jason Wen
6c8b2290fa Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#783) 2025-04-03 22:12:41 -04:00
Jason Wen
9dba62e686 Merge branch 'upstream/openpilot/master' into sync-20250403
# Conflicts:
#	.github/workflows/auto_pr_review.yaml
#	.github/workflows/selfdrive_tests.yaml
#	.github/workflows/ui_preview.yaml
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/controls/controlsd.py
2025-04-03 21:53:04 -04:00
Kacper Rączy
5c4ceb7b39 liveDelay message (#34976)
Bring back the lag message
2025-04-02 19:12:54 +00:00
Jason Wen
6a3d0e090c ci: update package management for ui_preview (#34967)
* ci: update package management for `ui_preview`

Add `apt-get update` before installing ImageMagick to ensure the package list is up-to-date. This prevents potential installation issues due to outdated package information.

* test commit

* try this

* revert
2025-04-02 11:38:29 -07:00
Adeeb Shihadeh
3707efff6b camerad: don't gate first frame on FSIN (#34972)
don't wait
2025-04-01 16:54:53 -07:00
Kacper Rączy
b4cc9e68d1 Revert "Online lateral lag learning" (#34974)
Revert "Online lateral lag learning (#34531)"

This reverts commit 1034dbd37c.
2025-04-01 21:44:30 +00:00
Iamz
9cb4d3d75e Update Thai translations (#34970) 2025-04-01 11:39:01 -07:00
Kacper Rączy
1034dbd37c Online lateral lag learning (#34531)
* Add struct and services

* Proof of concept

* Use vego

* Process replay support

* Fix issues

* Max not min

* Remove print

* Make lag positive

* Points and updates

* Sliding cross corr

* Stuff

* Remove redundant param

* Move to lagd

* Update alert

* Something that works

* Report isEstimated

* Corr field

* Use skimage masked corr

* Fixes

* Move to lat_accel_loc

* Use the delay it in the model

* Mark as executable

* Add 0.2 to initial

* add install line

* Back to 5m window

* Move the import up

* corr window 120

* Show is estimated

* Sort messages

* New impl

* Fix

* Params

* Set initial_lag elsewhere

* Add param

* Rename Param

* Fix type isues

* More blocks

* Masked fft NCC implementation

* Remove package installation

* Use 20hz data and interp the correlation peak

* Move ncc code to separate function

* steering_saturated support

* Constants

* Add recovery buffer

* Fix static

* min_valid_block_count nad liveDelay

* lateralDelayEstimate

* Fix comm issues. Do estimations at 4hz

* Fix

* Display the estimate

* Increase the block size

* Cache every minute

* DEBUG flag

* Add progress to the alert

* Fix crash

* points only in debug

* Fix BlockAverage restoration

* Comment

* Move estimators into estimator directory

* Remove lagd

* Feed only relevant messages

* Rewrite as a set literal

* np.diag with P_initial

* Fix static

* Struct renames

* Update ref commit

* Make it nicer

* Some renames
2025-04-01 04:02:02 +00:00
Kacper Rączy
39d4148c70 paramsd: cache restore unit test (#34966)
* Add a test

* Fix P_init restore

* Add migration to the first test

* Reuse the route from lld scenarios test
2025-04-01 01:45:58 +00:00
Kacper Rączy
ffcbdc8c43 paramsd: catch all exceptions during migration (#34965)
Catch all exceptions during migration
2025-03-31 23:59:29 +00:00
James
bad6103ce7 Remove duplicate "edited" type in PR review workflow (#34961) 2025-03-31 13:09:06 -07:00
Kacper Rączy
75cc300480 paramsd: refactor VehicleParamsLearner (#34955)
* Refactor ParamsLearner

* Make it VehicleParamsLearner

* Fix

* Use capnp serialization instead of json

* Fix speed

* Remove redundant comments

* Monitor observed_roll

* Just use init_state

* Comment

* Improve reset

* Set globals api

* Typing for return value

* Redo reset messaging

* Remove usages of math

* Fix process_replay custom_params

* Type ignores for rednose fields

* Remove import

* Reset previous values too

* Update ref_commit

* Revert it

* Bring it back

* Remove more

* Add migration for cached params
2025-03-31 20:07:39 +00:00
commaci-public
447f279f83 [bot] Update Python packages (#34962)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-31 13:07:23 -07:00
Maxime Desroches
c4efe2f973 add cache key for macOS runners (#34963)
* fix

* test

* restore

* cleanup
2025-03-31 13:06:37 -07:00
Discountchubbs
63ba5e864f car: abstract sunnypilot interfaces (#721)
* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file

* Method abstracting radar tracks in interfaces.py This makes the code more maintainable for future implementations to this file

* Add type annotation to params in initialize_car_interface_sp

* rename

* just internal

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-30 02:45:15 +00:00
DevTekVE
6b3f75bbf0 CI: refactor Squash and Merge with simplified branch merging (#726)
* Refactor squash and merge script for improved simplicity

Simplified the squash_and_merge.py script by replacing redundant utility functions and consolidating logic. Enhanced usability by aligning command-line arguments and leveraging streamlined git operations to improve maintainability and reliability.

* Fix argument names in squash PR script

Renamed CLI arguments from '--base' and '--source' to '--target' and '--base' to align with expected input format. This ensures the script runs correctly with proper argument mapping.

* Fix incorrect base branch argument in squash script

    Updated the `--base` argument to use `source_branch` instead of `branch` to ensure the squash script processes the correct base branch. Also adjusted the command to include `branch` as a separate argument for clarity and correctness.

* Reset to a clean state after squash error.

Add a `git reset --hard` command to ensure the repository returns to a clean state after encountering errors during the squash and merge process. This prevents lingering changes from affecting subsequent operations.

* Improve error handling in squash_and_merge_prs.py

Capture and display both stdout and stderr in error cases to provide more informative feedback. Adjust the PR comment to include available output for better debugging.

* Refactor PR squash process to enhance error handling.

Modify subprocess handling to use `result.returncode` for error checks instead of relying on exceptions. Consolidate error output retrieval and logging for better clarity, while maintaining the workflow for resetting changes on failure.

* Fix incorrect return in PR processing loop

Replaced `return` with `continue` to ensure all PRs in the loop are processed before exiting. This prevents premature termination of the function and ensures accurate success count reporting.

* Simplify subprocess output handling in squash_and_merge.py

Replaced labeled print statements with direct output of stdout and stderr. This change ensures cleaner logs and remains consistent with the function's purpose of output handling during subprocess execution.

* Update subprocess.run calls to use capture_output parameter

Replaced `stdout` and `stderr` with the `capture_output` parameter for cleaner and more concise subprocess handling. Also removed extraneous whitespace for improved code readability.

* testing moving the squash script given that it's called iteratively and switching branch might miss it

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-29 21:54:49 +00:00
DevTekVE
4268d7a19c Events: Refactor OnroadEventSP structure and add upstream cereal validation (#722)
* Refactor OnroadEventSP structure to contain list of events

A restructuring of the OnroadEventSP structure has been undertaken to accommodate a list of 'Event' substructures. The change is reflected in different files where OnroadEventSP is used. This update allows for more efficient management of multiple events by grouping them together under the revised OnroadEventSP structure.

* Rename `OnroadEventSP` to `OnroadEventsSP` across codebase.

Updated all references to `OnroadEventSP` to ensure consistency with the renamed struct `OnroadEventsSP`. This change improves code clarity and aligns naming conventions across modules.

* Add optional debug logging to schema validation script

Introduced a `DEBUG` flag and a `print_debug` function to streamline debug output management. This replaces direct `print` calls with conditional logging to control verbosity during execution.

Refactor structural validation logic in cereal test

Simplify the iteration over read_instances to streamline structural validation. Removed redundant comparisons and improved error handling to detect unreadable fields more effectively. Updated error messages for better clarity during debugging.

Update build command to include 'cereal' target in CI

Modified the scons build command in selfdrive_tests workflow to explicitly build the 'cereal' target. This ensures necessary components are included during the CI process, improving reliability and consistency.

Added workflow for cereal validation artifacts generation and validation against upstream

This commit encompasses significant changes to .github/workflows/selfdrive_tests.yaml, including the addition of two new jobs. One is responsible for 'Generating cereal validation artifacts' and the other for 'Validating cereal with Upstream'. This includes generating cereal schemas, building openpilot, and running validation schema instances against master. Furthermore, a new Python script (validate_sp_cereal_upstream.py) was also added to perform cereal schema instance generation and validation. These changes aim to enhance the testing process, ensuring schema compatibility and integration quality.

* Relocate cereal validation to a dedicated GitHub workflow

This commit introduces a distinct GitHub workflow for cereal validation named 'cereal_validation.yaml'. This workflow includes two jobs: one for generating cereal validation artifacts and another for validating cereal with the upstream project. Previously, these operations were included as separate jobs in 'selfdrive_tests.yaml'. However, the decoupling in this commit allows for a better organization of GitHub workflows within the project. Additionally, this separation allows these workflows to be individually configured and run, providing a greater degree of flexibility in managing our continuous integration activities.

* Rename workflow to "cereal validation" for clarity.

Updated the workflow name in the GitHub Actions configuration to better reflect its purpose. This change improves maintainability and ensures clearer identification of the workflow's function.

* Add LFS configuration and GitLab SSH setup to workflow

Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.

* rename

* format

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-29 17:34:31 -04:00
DevTekVE
245605dc55 ci: Add LFS configuration and GitLab SSH to squash & merge script (#725)
Integrate GitLab LFS handling by configuring LFS URLs and enabling SSH setup. This includes adding public GitLab keys and updating the workflow to support secure connections for LFS operations. Ensures proper handling of large files and seamless integration with GitLab.
2025-03-29 12:42:54 +01:00
Maxime Desroches
e674bc1355 Use Github Actions macOS runners for external contributors (#34956)
mac
2025-03-28 21:06:02 -07:00
Harald Schäfer
6c046e5aa3 Update np > 2.0 (#34949)
* Update np

* Update lock

* update rednose

* newest numpy has mypy issues

* typo

* revert
2025-03-28 11:37:03 -07:00
Harald Schäfer
05f7519628 Remove T_IDXS from road edges and lanelines (#34950)
* Not useful anymore

* add type
2025-03-28 10:43:43 -07:00
Harald Schäfer
b33677c0dc WORKFLOW.md : remove redundant testing and linting info 2025-03-28 10:30:56 -07:00
Robbe Derks
b8065d3138 Parse out more ublox sat info (#34947)
parse out more sat info
2025-03-28 10:26:37 +01:00
commaci-public
98a2b85529 [bot] Update Python packages (#34946)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-27 01:47:55 -07:00
Shane Smiskol
a2859090d8 controls: reset desired curvature while disabled (#34943)
* reset curvature while disabled

* comment

* duplicate line

* fix possible iso violation because it was unlimited while disengaged

* rename so you can't accidentally use

* update refs
2025-03-26 22:41:26 -07:00
Shane Smiskol
a6bfb9919d Rivian: increase low speed torque (#34939)
* bump opendbc for more torq

* bump to master
2025-03-26 17:10:10 -07:00
Louis Velez
ce318e9c40 ui: update spanish translation (#34944)
Update main_es.ts
2025-03-26 16:06:43 -07:00
Shane Smiskol
27d882cc0a Revert "logreader.py: concurrent file existence checks" (#34942)
Revert "logreader.py: concurrent file existence checks (#34875)"

This reverts commit e11b239b2e.
2025-03-26 14:45:35 -07:00
Adeeb Shihadeh
45de2f7f19 fix codespell 2025-03-26 10:46:16 -07:00
Adeeb Shihadeh
531893d1c5 simple gps layout 2025-03-26 10:27:57 -07:00
DevTekVE
e15974345b modeld: Enforce float type for lag_adjusted_curvature (#714)
Convert safe_desired_curvature to float before returning.

This ensures the returned value is explicitly a float, avoiding an issue when serializing it on capnp as it does not recognize numpy.float

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-26 08:26:21 +01:00
commaci-public
b413f3de47 [bot] Update Python packages (#34934)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-25 23:45:06 -07:00
Jason Wen
65853f0111 NNLC: Fix exact match consistency (#716)
Move the exact_match calculation after updating model_path and max_similarity to ensure consistency. This prevents potential discrepancies when rechecking NN paths and enhances code maintainability.
2025-03-26 01:08:22 -04:00
Adeeb Shihadeh
ea4554526e Keep steering active at standstill (#34918)
* Keep steering active at standstill

* bump opendbc

* bump opendbc

* update refs
2025-03-25 14:00:24 -07:00
Shane Smiskol
e652f435f9 max_lat_accel.py: use parallel processing (#34936)
* use run_across_segments

* disable tqdm
2025-03-25 13:26:16 -07:00
royjr
5ce03e6ecf ui: display fingerprint as fallback in platform selector (#709)
Update platform_selector.cc
2025-03-25 08:23:21 +01:00
Louis Velez
e607cbe5a2 ui: spanish translation update (#34933)
Translate unfinished strings in main_es.ts to Spanish, including ADB, Firehose Mode, and welcome messages for improved user experience.
2025-03-24 23:22:10 -07:00
Maxime Desroches
5d8fd36022 jenkins looper: new branch for each runs 2025-03-24 21:53:52 -07:00
Jason Wen
4055efdf4b ci: add commit SHA to build notifications (#712)
This change includes the current commit SHA in the workflow outputs of the sunnypilot-build-prebuilt.yaml file. It provides better traceability for builds, ensuring each workflow run is linked to the exact commit it was triggered from.
2025-03-25 00:25:04 -04:00
royjr
da79b6d494 ui: new icon for Lateral panel (#707)
* Create icon_lateral.svg

* Update settings.cc

* Delete icon_lateral.svg

* Create icon_lateral.png

* Update settings.cc

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-25 03:05:20 +00:00
Jason Wen
45c8f5c9d5 ci: Update PR title formatting for Squash and Merge (#711)
Changed the PR reference format from (`#123`) to (PR-123) in squash commit messages
to prevent GitHub from automatically adding reference comments to PRs when
`master-dev-c3-new` is force pushed.
2025-03-24 22:56:19 -04:00
Kumar
34bbdf4d7f Controls: Automatic lane change (#653)
* init alc controller

* only for sunny

* rebase fix

* ui

* add ui preview

* Update common/params_keys.h

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/SConscript

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.h

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral/lane_change_settings.cc

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* review sugg

* code review

* renaming

* move around

* style

* fix types and params exceptions handling

* take out magic numbers

* more

* rename

* shorter

* make sure reset happens at the end of every DH loop

* split into multiple updates

* just 3 seconds

* use default states

* oops

* more readable

* oops

* some space and lines

* run in DH loop directly

* adjust ui preview

* nudgeless should process immediately

* check option instead

* more explicit

* even more explicit

* tests

* brake pedal release should not allow auto lane change (caught by test)

* unnecessary

* no continuous auto lane change

* Revert "unnecessary"

This reverts commit 93d135b54a.

* more tests

* less

* less less

* update again

* more cleanup

* better

* AutoLaneChangeState -> AutoLaneChangeMode

* update

* lint

* unused

* test all states

* license

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-24 22:26:48 -04:00
Shane Smiskol
3748fdc355 Rivian: add another EPS query (#34932)
* bump

* update docs
2025-03-24 17:25:17 -07:00
Adeeb Shihadeh
2382f1cab0 Run DM model twice, prep for bigger models (#34894)
* twice

* swap

* adjust
2025-03-24 15:54:42 -07:00
Dean Lee
e11b239b2e logreader.py: concurrent file existence checks (#34875)
* concurrent file existence checks

* upper bound on parallel queries

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-03-24 15:46:42 -07:00
Shane Smiskol
de8806cdfd Add extrapolate option to max_lat_accel.py (#34931)
* add extrapolate

* -e

* adjust
2025-03-24 15:21:36 -07:00
Alexandre Nobuharu Sato
5a28b0c9fe Avoid IndexError in max_lat_accel.py due to empty values in dataset (#34926)
* Update max_lat_accel.py

The error you're encountering is due to the fact that the code is trying to calculate the 90th percentile of lateral acceleration values that are less than 0, but there are no such values in the dataset. This results in an empty list, which causes the np.percentile function to fail with an IndexError

* fix

* simpler

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-03-24 14:40:25 -07:00
Shane Smiskol
313a3d81e0 Rivian: add hardware part number query (#34930)
bump
2025-03-24 14:23:22 -07:00
commaci-public
7627432830 [bot] Update Python packages (#34928)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-24 10:27:31 -07:00
Jason Wen
cc1b233277 ui: vertical space for ListWidget (#706) 2025-03-24 00:32:31 -04:00
Kumar
029a601674 Device: Quiet Mode (#654)
* init quiet mode

* only for sunny

* static

* toggle

* let's back this up

* review sugg

* oh okay

* review

* fix: ensure boolean conversion for QuietDrive parameter

* Refactor return statement to use boolean conversion for clarity in quiet mode logic

* Update selfdrive/ui/sunnypilot/quietmode.py

* rename

* sunny

* Revert "sunny"

This reverts commit 6ac4cf4b8d.

* sunny

* Revert "sunny"

This reverts commit c2bffddc05.

* sunny

* ui: support dynamic state updates for `PushButtonSP`

* test btn

* override mouse release events

* Revert "test btn"

This reverts commit cd9c9dde9a.

* Reapply "test btn"

This reverts commit 9b36b2e085.

* abstract param flipping

* Revert "Reapply "test btn""

This reverts commit 8104a262b0.

* use new button state for PushButtonSP

* Quiet Drive -> Quiet Mode

* driver camera btn moved

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-23 23:15:11 -04:00
Jason Wen
982674b4a7 ui: support dynamic state updates for PushButtonSP (#708)
* ui: support dynamic state updates for `PushButtonSP`

* test btn

* override mouse release events

* Revert "test btn"

This reverts commit cd9c9dde9a.

* Reapply "test btn"

This reverts commit 9b36b2e085.

* abstract param flipping

* Revert "Reapply "test btn""

This reverts commit 8104a262b0.

* update device panel handling for the new param
2025-03-23 22:54:40 -04:00
royjr
96d73fe2b3 NNLC: bump max similarity for higher accuracy (#704)
Update helpers.py

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-23 20:04:12 +00:00
Jason Wen
a307a08591 ui: fix offset with OptionControlSP for macOS (#705)
ui: fix offset with `OptionControlSP`
2025-03-23 15:50:21 -04:00
Jason Wen
e6177c49aa athenad: avoid infinite loop waiting for comma registration (#701)
Athenad: avoid infinite loop waiting for comma registration
2025-03-22 22:48:58 -04:00
Jason Wen
ed39aaddbc ui: use allKeys to reset sunnypilot settings (#699)
* ui: exclude certain params from deletion during settings reset

* clear all and exclude directly and only reboot after confirmation

* cleaner

* handle this instead

* send it

* 1-liner

* nuke nuke

* space

* less
2025-03-22 22:41:42 -04:00
Tim Wilson
bab2d776b6 NNLC: use torque substitutes as fuzzy fingerprints (#700)
* NNLC: use torque substitutes as fuzzy fingerprints

* substitutes are not exact matches

* update nnlc helpers

for extra nnlc model path checks, take the first one that passes.

* Update sunnypilot/selfdrive/controls/lib/nnlc/helpers.py

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-22 23:49:05 +00:00
Adeeb Shihadeh
4bbb697998 bump panda 2025-03-22 15:06:25 -07:00
Jason Wen
002a37cdc4 ui: show branch selector in all branches (#698) 2025-03-22 16:20:19 -04:00
DevTekVE
43e43849ad sunnylink: Settings backup & restore (#681)
* Add AES encryption and utility methods

This commit introduces a new AESCipher class that can be used for AES encryption with support for both AES-128 and AES-256. It also adds a set of utility functions, including methods for RSA to AES key derivation, file decryption and compression, and encryption and decompression. These changes provide fundamental cryptographic functionalities for data security within the system.

* Revised backup management system with new structures

This update introduces important revisions to the backup management system. A new struct named 'BackupManagerSP' has been integrated into the 'custom.capnp' file, replacing 'CustomReserved6'. This new struct includes several variables that help keep track of backup and restore status, progress and related messages.

Additional code modifications were made in 'base.py' and 'api.py' to include a 'json' parameter in the 'api_get' method. Lastly, 'manager.py' has been updated with functions to manage device configuration backups to and from sunnylink.

The changes promote better handling and management of data backup and restoration processes. The update is specifically designed to ensure that the backup information is well integrated into the system, with properly tracked status and progress.

* Refactor `allKeys` to filter by parameter key type

Updated the `allKeys` method to support filtering by `ParamKeyType`, allowing more specific key retrieval. Added a default value for backward compatibility and updated related bindings and keys to reflect this change.

* Improve Backup and Restore mechanisms

The commit refactors and improves several aspects of the backup and restore mechanisms in the `BackupManagerSP` class.

These improvements include removing redundant status tracking variables and replacing them with unified ones, updating the messaging system to handle all changes correctly, and including an enumeration `OperationType` to keep track of the type of operation currently being processed.

This commit also applies stricter conditions for restore operations, such that it only restores parameters that are currently marked as backupable, and skips those that are not. This is a preventive measure against potential issues when restoring parameters that are no longer relevant or could conflict with current versions.

Also, the encryption and decryption methods were updated to use AES-256 for more security. These changes have increased the robustness and reliability of the backup and restoration processes.

* copyright

* Add backup_manager process to offroad sunnypilot tasks

The backup_manager process is introduced to handle backups during offroad mode when SunnyLink is ready. This ensures proper backup management functionality integrated into the system.

* Simplify backup endpoint construction in restore method

Replaced conditional expression with a more concise and readable `or` operation for constructing the backup endpoint. This makes the code cleaner and easier to maintain while preserving functionality.

* Added support for backing up and restoring sunnypilot settings

An update to the sunnypilot functionality now provides two new features that allow users to backup and restore their sunnypilot settings. The changes include the addition of UI controls for initiating backup and restore operations, and the creation of a system-wide state management function for tracking these operations. This enhancement significantly improves the user experience by providing a safety net for user settings in case of software failures, bugs, or unintended changes.

* Refactor type hints to use PEP 604 syntax for clarity

Replaced `Optional` and `Dict` type hints with `|` and `dict` syntax for improved readability and compliance with Python 3.10+. Updated related imports and adjusted list comprehension for cleaner code.

* Update import path for hardware module in utils.py

Replaced the import path for the `Paths` module to align with the new directory structure under `openpilot`. This ensures compatibility with recent project reorganization and avoids import errors.

* Improve RSA key handling and fix backup status comparison

Added explicit RSA key type checks to handle invalid key formats. Enhanced type safety in `manager.py` by ensuring the backup status comparison returns a boolean. These changes improve robustness and error handling in backups.

* format

* more

* Improve backup and restore flow with progress tracking and fixes

Added proper progress tracking and cleanup logic during restore operations. Enhanced restore experience by resetting progress after completion and introducing confirmation dialogs for errors and completion. Updated API compatibility with a version query parameter for backups.

* Enable backup button only when restore process is complete

Previously, the backup button could be enabled during a restore operation, which might cause unintended behavior. This update introduces a check to ensure the backup button remains disabled while a restore process is active. This improves user experience and prevents potential conflicts.

* Fix restore button state handling during restore process

Ensure the restore button is disabled consistently when a restore is in progress. This prevents user interaction issues and aligns the button state with the restore operation status.

* "Refactor restore logic and improve button state handling"

Replaced `is_restoring` with `restore_request_pending` for clarity and better state management. Adjusted button behavior to immediately disable upon user action, ensuring improved UX and preventing repeat inputs. Refined restore completion flow for better consistency and reliability.

* Refine restore process logic for SunnyLink settings.

Introduced `restore_request_started` to improve handling of restore states and ensure accurate UI updates during the process. Adjusted case handling to enhance clarity and maintain proper behavior when restoring settings, especially during ongoing or completed requests.

* revert

* move around

* fix enabled states for different statuses

* add prompt to notify backup is complete

* same states as restore

* disable buttons if sunnylink is off

* can use the same texts

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-22 15:58:04 +00:00
Jason Wen
efb44aeecd ui: Fix NNLC toggle not staying in persistent state (#697)
The `showEvent` method in `NeuralNetworkLateralControl` was removed as it duplicated functionality now handled in `LateralPanel`. The unused `refresh` method was also removed to streamline the code and improve maintainability.
2025-03-22 11:18:32 -04:00
Jason Wen
c70d3db1e6 Params: support filtering by ParamKeyType for allKeys (#696) 2025-03-22 10:29:24 -04:00
Jason Wen
309304a352 Controls: Neural Network Lateral Control (NNLC) for Torque Lateral Accel Control (#695)
* init

* more init

* keep it alive

* fixes

* more fixes

* more fix

* new submodule for nn data

* bump submodule

* update path to submodule

* spacing???

* update submodule path

* update submodule path

* bump

* dump

* bump

* introduce params

* Add Neural Network Lateral Control toggle to developer panel

This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.

* decouple even more

* static

* codespell

* remove debug

* in structs

* fix import

* convert to capnp

* fixes

* debug

* only initialize if NNLC is enabled or allow to enable

* oops

* fix initialization

* only allow engage if nnlc is off

* fix toggle param

* fix tests

* lint

* fix more test

* capnp test

* try this out

* validate if it's not None

* make it 33 to match

* align

* share the same friction input calculation

* return stock values if not enabled

* unused

* split base and child

* space

* rename

* NeuralNetworkFeedForwardModel

* less

* just use file name

* try this

* more explicit

* rename

* move it

* child class for additional controllers

* rename

* time to split out custom lateral acceleration

* move around

* space

* fix

* TODO-SP

* TODO-SP

* update regardless, it's an extension now

* update name and expose toggle

* ui: sunnypilot Panel -> Steering Panel

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral_panel.h

* merge

* move to steering panel

* no need for this

* live params in a thread

* no live for now

* new structs

* more ui

* more flexible

* more ui

* no longer needed

* another ui

* cereal changes

* bump opendbc

* simplify checks

* all in one place

* split Enhanced Lat Accel

* handle unrecognized platform

* test for fingerprinting

* fix fingerprint

* NNLC: Mock data for unrecognized cars

* fix fingerprints

* test to verify model loading

* bump neural_network_data

* use pytest

* use different one for now

* fix ui preview alignments

* typing

* more type

* show a platform

* show match

* init params for tests

* ok ruff

* make sure to loop through tests

* ok again ruff

* ok we need this lol

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-22 09:40:29 -04:00
Shane Smiskol
65d667e60e Revert "logreader: avoid repeated prompts in auto_strategy when rlogs are missing" (#34919)
Revert "logreader: avoid repeated prompts in auto_strategy when rlogs are mis…"

This reverts commit b8229ebca6.
2025-03-21 17:28:19 -07:00
Shane Smiskol
27ce30587a fix 2025-03-21 16:18:39 -07:00
Shane Smiskol
715a38fd6a max_lat_accel: support multiple routes 2025-03-21 16:16:53 -07:00
Shane Smiskol
124c75a94f Remove duplicate radar fault event (#34917)
🤦
2025-03-21 15:01:59 -07:00
Dean Lee
b8229ebca6 logreader: avoid repeated prompts in auto_strategy when rlogs are missing (#34890)
* avoid repeated prompts in auto_strategy when rlogs are missing

* shorter

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-03-21 14:43:48 -07:00
Jason Wen
0990212edc Revert "Controls: Neural Network Lateral Control (NNLC) for Torque Lateral Accel Control" (#694)
Revert "Controls: Neural Network Lateral Control (NNLC) for Torque Lateral Ac…"

This reverts commit ecb4026269.
2025-03-21 16:13:50 -04:00
Jason Wen
ecb4026269 Controls: Neural Network Lateral Control (NNLC) for Torque Lateral Accel Control (#667)
* init

* more init

* keep it alive

* fixes

* more fixes

* more fix

* new submodule for nn data

* bump submodule

* update path to submodule

* spacing???

* update submodule path

* update submodule path

* bump

* dump

* bump

* introduce params

* Add Neural Network Lateral Control toggle to developer panel

This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.

* decouple even more

* static

* codespell

* remove debug

* in structs

* fix import

* convert to capnp

* fixes

* debug

* only initialize if NNLC is enabled or allow to enable

* oops

* fix initialization

* only allow engage if nnlc is off

* fix toggle param

* fix tests

* lint

* fix more test

* capnp test

* try this out

* validate if it's not None

* make it 33 to match

* align

* share the same friction input calculation

* return stock values if not enabled

* unused

* split base and child

* space

* rename

* NeuralNetworkFeedForwardModel

* less

* just use file name

* try this

* more explicit

* rename

* move it

* child class for additional controllers

* rename

* time to split out custom lateral acceleration

* move around

* space

* fix

* TODO-SP

* TODO-SP

* update regardless, it's an extension now

* update name and expose toggle

* ui: sunnypilot Panel -> Steering Panel

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral_panel.h

* merge

* move to steering panel

* no need for this

* live params in a thread

* no live for now

* new structs

* more ui

* more flexible

* more ui

* no longer needed

* another ui

* cereal changes

* bump opendbc

* simplify checks

* all in one place

* split Enhanced Lat Accel

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-21 15:38:31 -04:00
Lee Jong Mun
2413f73108 kor translation update (#34915) 2025-03-20 23:38:05 -07:00
Jason Wen
75c9db260f ui: reset all sunnypilot settings (#692)
* ui: reset all sunnypilot settings

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>

---------

Co-authored-by: Discountchubbs <159560811+Discountchubbs@users.noreply.github.com>
2025-03-21 01:02:09 -04:00
Trey Moen
b511fb7245 fix: macOS CI (#34911)
force brew update
2025-03-20 20:45:41 -07:00
commaci-public
46e435f124 [bot] Update Python packages (#34914)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-20 19:23:42 -07:00
Shane Smiskol
5c6c438bcb Rivian: adjust lateral actuator delay (#34913)
* bump

* update refs
2025-03-20 18:22:12 -07:00
Shane Smiskol
c55ef3ae1b Rivian: enable torqued learning (#34912) 2025-03-20 17:09:52 -07:00
Shane Smiskol
2b9bd8dc36 Fix colors on torque-controller.xml 2025-03-20 15:31:42 -07:00
commaci-public
05700433d8 [bot] Update Python packages (#34909)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-03-20 14:28:24 -07:00
github-actions[bot]
a40ab9a69b [bot] Update translations (#34908)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-20 14:13:07 -07:00
Jason Wen
a2628fe4f6 ui: sunnypilot Panel -> Steering Panel (#691)
* ui: sunnypilot Panel -> Steering Panel

* Update selfdrive/ui/sunnypilot/qt/offroad/settings/lateral_panel.h
2025-03-20 17:01:47 -04:00
Jason Wen
d21e351003 Controls: Lateral Accel Torque Control Extension (#690)
* init

* more init

* keep it alive

* fixes

* more fixes

* more fix

* new submodule for nn data

* bump submodule

* update path to submodule

* spacing???

* update submodule path

* update submodule path

* bump

* dump

* bump

* introduce params

* Add Neural Network Lateral Control toggle to developer panel

This introduces a new toggle for enabling Neural Network Lateral Control (NNLC), providing detailed descriptions of its functionality and compatibility. It includes UI integration, car compatibility checks, and feedback links for unsupported vehicles.

* decouple even more

* static

* codespell

* remove debug

* in structs

* fix import

* convert to capnp

* fixes

* debug

* only initialize if NNLC is enabled or allow to enable

* oops

* fix initialization

* only allow engage if nnlc is off

* fix toggle param

* fix tests

* lint

* fix more test

* capnp test

* try this out

* validate if it's not None

* make it 33 to match

* align

* share the same friction input calculation

* return stock values if not enabled

* unused

* split base and child

* space

* rename

* NeuralNetworkFeedForwardModel

* less

* just use file name

* try this

* more explicit

* rename

* move it

* child class for additional controllers

* rename

* time to split out custom lateral acceleration

* move around

* space

* fix

* TODO-SP

* TODO-SP

* split nnlc and custom lat accel

* more

* not yet

* comment

* fix

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-20 16:01:08 -04:00
Discountchubbs
47c8ac2431 ui: Developer Panel Fixes (#688)
* Add error log to developer panel

* Add lang files

* Refactor GitHub runner control to local variable

Replaced the `enableGithubRunner` member variable with a local variable, as it is not used elsewhere in the class. Simplified visibility management for developer panel toggles in release branches.

* Modifying visibility rules for developer panel controls

This commit modifies the visibility settings for controls within the developer panel such as `enableGithubRunner`, `errorLogBtn`, `joystickToggle` and `longManeuverToggle`. The visibility of these controls is now dependent on whether the software is running in release mode. This update ensures that certain settings are hidden from the end user in the release version, enhancing the user interface by simplifying it and preventing potential user confusion.

* Translation files

* we already handle this in stock

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-19 19:16:54 -04:00
Jason Wen
bf2731b470 MADS: Steering Mode on Brake Pedal Press (#687)
* reimplement

* bump opendbc

* Apply suggestions from code review

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

* update toggle positions

* translations from bot later

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-03-19 18:24:56 -04:00
DevTekVE
01998f864d sunnylink: Improve API initialization and enhance WebSocket security (#662)
Refactor sunnylinkd for better readability and SSL support

Reorganized variable handling for Sunnylink API initialization. Updated WebSocket connection to use Authorization header and added SSL configuration based on the connection type. This enhances code clarity and ensures secure connections when not on localhost.

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-19 21:47:39 +00:00
Discountchubbs
d2846741bc ui: Error log button to Developer panel (#627)
* Add error log to developer panel

* Testing debug

* Fix condition for retry handling in action workflow

Updated the logic to properly check for 'NONE' author association instead of 'FIRST_TIME_CONTRIBUTOR' when determining retry limits. This ensures the workflow behaves as intended for contributors without prior activity.

* Clean

* Refine workflow condition logic for PR checks

Updated the `if` condition in the lfs-maintenance workflow to improve clarity and ensure proper evaluation. This change aligns the logical grouping for better readability and correctness in forked PR handling.

* Add lang files

* Update selfdrive/ui/qt/offroad/developer_panel.cc

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Refactor GitHub runner control to local variable

Replaced the `enableGithubRunner` member variable with a local variable, as it is not used elsewhere in the class. Simplified visibility management for developer panel toggles in release branches.

* Updating translations

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-19 21:06:42 +00:00
Dean Lee
6d12ade231 python ui: refactor spinner&text (#34897)
refactor spinner&text
2025-03-19 13:11:22 -07:00
Jason Wen
dd37a35b59 Revert "MADS: Steering Mode on Brake Pedal Press" (#686)
* Revert "MADS: Steering Mode on Brake Pedal Press (#684)"

This reverts commit 4525659a7e.

* bump
2025-03-19 16:02:45 -04:00
Trey Moen
e785026a98 feat(athenad): priority uploads (#34856)
Today, Firehose uploads and user-requested uploads from Connect are treated the same. This is not ideal behavior if the user wants to upload routes immediately for a bug report and the queue is full of uploads for Firehose. The workaround is to clear the queue and retry the upload from Connect.

This PR adds an optional `priority` to requested file uploads in `athenad`. By default, all requests are marked `Low`. However, if the caller wishes to mark their uploads as "more important," then the upload queue will prioritize those requests when uploading.

The only caveat to this PR is that we won't reorder files currently being uploaded. Most connections are quick enough to finish uploading max 4 files before polling the new high-priority items in the queue.

Closes https://github.com/commaai/openpilot/issues/34836

**Verification**

Added test case to insert upload tasks with differing priorities. Polling the queue produces items in the correct order (smallest # to largest).

PR to mark Connect uploads as high priority: https://github.com/commaai/connect/pull/557

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-03-19 19:22:54 +00:00
Jason Wen
4525659a7e MADS: Steering Mode on Brake Pedal Press (#684)
* MADS: cleanup param assignments

* MADS: Steering Mode on Brake Pedal Press

* bump opendbc

* translations

* make sure to initialize

* ci try this

* Revert "ci try this"

This reverts commit da975f61c3.

* Revert "translations"

This reverts commit a65aad5911.
2025-03-19 13:57:15 -04:00
programanichiro
2fca845153 Multilang: Update JA translations (#34904)
* 日本語訳2025/3/19

* numerusform追加。
2025-03-19 10:41:44 -07:00
Dean Lee
988fc477eb camerad: remove duplicate include (#34905)
remove duplicate include
2025-03-19 09:27:23 -07:00
Jason Wen
ad67bdc853 ci: disable prebuilts on pull requests (#685) 2025-03-19 10:11:07 -04:00
Jason Wen
6ad4ebdae6 MADS: cleanup param assignments (#683) 2025-03-19 00:45:53 -04:00
Maxime Desroches
c3bba7431a update to latest userdata partition (#34898)
update cache
2025-03-18 11:38:27 -07:00
DevTekVE
ed56ac52f4 ci: Add ui previews for new ui elements as well (#34886)
* Add previews for new ui elements as well

* Actualizar ui_preview.yaml

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-03-18 11:33:15 -07:00
Adeeb Shihadeh
d59e514209 missing an 2025-03-18 09:58:48 -07:00
Jason Wen
31b3897418 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#675) 2025-03-18 01:23:54 -04:00
DevTekVE
f0abacbc59 Merge branch 'refs/heads/master-at-17032025' into sync-17032025
# Conflicts:
#	opendbc_repo
#	selfdrive/car/card.py
#	selfdrive/car/tests/test_car_interfaces.py
#	selfdrive/car/tests/test_models.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/tests/test_latcontrol.py
#	selfdrive/pandad/panda.h
#	system/manager/process_config.py
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master-new`
2025-03-18 01:05:34 -04:00
Jason Wen
3177142bfc ci: update existing comment during Squash and Merge (#674)
* format

* ci: update existing comment during Squash and Merge

* dynamic target branch

* test label

* try again

* no f

* test

* should be edit-last

* quote

* fix arg

* final

* bold it

* revert
2025-03-17 03:49:27 -04:00
Jason Wen
4a04819d96 Redirect license to LICENSE.md (#672)
* Redirect license to LICENSE.md

* bump
2025-03-17 00:36:32 -04:00
Jason Wen
b95140666b ci: remove sunnylink pairing QR code from UI preview (#673) 2025-03-17 00:20:13 -04:00
Jason Wen
42871f7a9d pandad: dedicated aligned buffer for deserialization (#671)
* pandad: dedicated aligned buffer for deserialization

* ide pls
2025-03-16 19:53:53 -04:00
DevTekVE
cac8527115 sunnylink: pairing and sponsorship (#523)
* Refactor sunnylink panel code for clarity and initialization fixes.

Replaced explicit pointer types with `auto` for cleaner code and added proper initialization for the `offroad` boolean member. Simplified toggle logic by consolidating description updates for enabling/disabling sunnylink. These changes improve code readability and maintainability.

* Add Sunnylink sponsor and GitHub pairing functionality

This update introduces a feature to manage sponsorship-based roles and GitHub account pairing for Sunnylink. It includes new sponsor popups, sponsor-specific widgets, QR code logic, and backend API integrations. Additionally, new models and services support sponsor tier management and user-role synchronization.

* Translation files

* Param keys

* Add setup functions for SunnyLink sponsor and pair buttons

Introduce `setup_settings_sunnylink_sponsor_button` and `setup_settings_sunnylink_pair_button` to handle specific SunnyLink UI interactions. These functions streamline button clicks for sponsor and pairing actions within SunnyLink settings.

* Add new SunnyLink test cases for sponsor and pair buttons

Added `settings_sunnylink_sponsor_button` and `settings_sunnylink_pair_button` to the UI test case dictionary. This extends the SunnyLink test coverage to include sponsor and pairing functionalities.

* No need to import sunnylink from here, and it causes just circular dependency

* Enhance SunnylinkPanel functionality in off-road settings

This commit enhances the functionality of the SunnylinkPanel in the off-road settings of the SunnyPilot user interface. A paramWatcher is added to the SunnylinkPanel to observe "SunnylinkEnabled" parameter changes. Update functionalities are enhanced to handle showing and hiding of components based on various circumstances, such as whether the system is 'on-road' or 'off-road', and whether Sunnylink is enabled or not. The stopSunnylink and startSunnylink functions were also added to start or stop processes accordingly when Sunnylink is enabled or disabled. Additionally, the ui.h file is updated to efficiently handle Sunnylink roles and device users.

* Refactor SunnylinkPanel initialization and handling.

Reorganized SunnylinkPanel to improve structure and clarity by separating sunnylink client initialization and list widget setup. Enabled automatic sunnylink startup when the feature is enabled. Added minor formatting fixes for label display consistency.

* Add missing include for <optional> in ui.h

Including <optional> ensures compatibility with standard C++ features and prevents potential compilation errors. This addition aligns with best practices for maintaining robust and clean code.

* Updated setup_settings_sunnylink_sponsor_button and setup_settings_sunnylink_pair_button function signatures

Added an optional 'scroll' parameter to the setup_settings_sunnylink_sponsor_button and setup_settings_sunnylink_pair_button functions in the test_ui module. The modifications were made to allow for more flexible function usage by potentially enabling scroll operations during the execution of these UI setup steps.

* Enable Sunnylink initialization on panel show event

Begin Sunnylink connection automatically when the panel is displayed, ensuring the feature is active if enabled. Additionally, update the sponsor button text formatting for more concise styling.

* Translations

* Added checks for new UI files in PRs

The git workflow script `ui_preview.yaml` has been modified. The script now checks if the master branch contains a file corresponding to a UI file present in the PR. If a UI file in the PR does not have a match on the master branch, it is marked as new. These enhancements improve the comparison of UI changes between the master and PR branches, particularly with the identification of new UI files.

* cleanup

* duh

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-16 16:22:14 -04:00
DevTekVE
89e385b692 CI: update default screenshot in UI preview (#669)
Jason Jason...
2025-03-16 13:01:31 -04:00
DevTekVE
61b9d81ba6 CI: identify new screenshots in UI preview (#668)
Added checks for new UI files in PRs

The git workflow script `ui_preview.yaml` has been modified. The script now checks if the master branch contains a file corresponding to a UI file present in the PR. If a UI file in the PR does not have a match on the master branch, it is marked as new. These enhancements improve the comparison of UI changes between the master and PR branches, particularly with the identification of new UI files.
2025-03-16 17:08:21 +01:00
DevTekVE
4fbf7a81b4 sunnylink: Fix IMEI fetching during registration (#661)
Fix getting the imei for the registration
2025-03-16 11:12:43 -04:00
Jason Wen
f50d7a1842 ui: Update FirehosePanel with sunnypilot ui updates (#666) 2025-03-16 02:34:25 -04:00
Jason Wen
4ef46251a7 ui: Trim panel name for Firehose panel redirect (#664)
* ui: Trim panel name for Firehose panel redirect

* unused

* extra
2025-03-16 00:09:11 -04:00
Jason Wen
7f669ec1e7 MADS: Disable for Rivian (#663) 2025-03-15 22:28:32 -04:00
Jason Wen
1be2643dfd Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#656) 2025-03-15 21:24:44 -04:00
Jason Wen
db0ce99c01 Car interface: custom safety params (#659)
* init

* do it for hyundai

* Bump submodules

* no complaints

* use latest opendbc pr ref

* don't need this for leaf for now

* bump opendbc

* gotta set the sp safety flags in test models and safety replay!

* actually fetch CP_SP

* set safety param for lda button availability (lol forgot)

* use GET_FLAG

* Add TODO-SP

* bump submodules
2025-03-15 18:22:53 -04:00
Jason Wen
4879e2f5ec Bump opendbc 2025-03-15 18:22:53 -04:00
Jason Wen
70f8225efc Merge branch 'upstream/openpilot/master' into sync-20250312
# Conflicts:
#    opendbc_repo
#    selfdrive/car/tests/test_models.py
2025-03-13 02:41:16 -04:00
Jason Wen
6ed459d7cd Bump opendbc 2025-03-12 23:10:44 -04:00
DevTekVE
8c4f5f1ff4 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new` (#652) 2025-03-09 21:43:37 +01:00
DevTekVE
0798ebab07 Bumping refs 2025-03-09 21:15:25 +01:00
DevTekVE
141a7f5f72 Use numpy directly instead of numpy_fast for clip and interp
Replaced occurrences of `openpilot.common.numpy_fast` with direct imports from `numpy` across multiple files. This simplifies dependencies and ensures consistency with standard Python library usage. Adjusted tests to mock `numpy` functions accordingly.
2025-03-09 19:07:59 +01:00
DevTekVE
ba3acbce0a Add cl_print_build_errors to handle OpenCL build errors
This function logs detailed build failure information, including the status and build log retrieved from OpenCL. It provides better debugging support for diagnosing issues with OpenCL program compilation.
2025-03-09 18:29:32 +01:00
DevTekVE
425f5ebb2e Add clutil_legacy for OpenCL program support
Introduce `clutil_legacy` to handle OpenCL program creation from binaries and error string mapping. This improves modularity and prepares for enhanced OpenCL compatibility across platforms.
2025-03-09 17:57:59 +01:00
DevTekVE
1779a76d3c Update default model to "Filet o Fish"
Changed the DEFAULT_MODEL constant and updated the associated model hash to reflect the new default. This ensures consistency between the code and the new model configuration.
2025-03-09 15:00:12 +01:00
DevTekVE
a4ef5ad982 Merge remote-tracking branch 'comma/master' into sync-20250309
# Conflicts:
#	.github/workflows/ui_preview.yaml
#	common/params_keys.h
#	msgq_repo
#	opendbc_repo
#	panda
#	selfdrive/ui/qt/offroad/firehose.h
#	selfdrive/ui/tests/test_ui/run.py
#	system/manager/process_config.py
2025-03-09 14:53:03 +01:00
Jason Wen
bc65c8bef7 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#640) 2025-03-09 01:26:15 -05:00
Jason Wen
290383128e Sync: Fix conflicts 2025-03-09 00:53:06 -05:00
Jason Wen
f9952d7cb7 CI: Disable process_replay and remove fakedata (#651)
* CI: Disable process_replay

* remove fakedata

* don't bump panda yet
2025-03-08 23:30:44 -05:00
DevTekVE
d0f590b55e CI: use one label for runs-on (#650)
* test

* Fix runs-on so that things acutally run otherwise they get stuck due to gh change

* Add repository condition to process_replay in CI workflow

Restrict the process_replay job to run only for the commaai/openpilot repository. This change temporarily blocks execution for forks or other repositories.

* in another PR

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-03-08 23:06:26 -05:00
DevTekVE
7ddaf52b2b CI: adjust allow 1 retry for first time contributor and fork and skip sync lfs on fork PRs (#647)
* Update workflow condition to skip forked PRs during sync

This change ensures the LFS maintenance workflow does not run for pull requests originating from forked repositories. It enhances efficiency by avoiding unnecessary sync actions in these cases.

* Modified retry conditions in GitHub workflow file

Adjusted the retry conditions in the GitHub workflow setup file. The updated condition allows for a second attempt if the pull request originator is a 'FIRST_TIME_CONTRIBUTOR' from a forked repository. This modification lends more flexibility to first-time contributors by providing them with an additional chance to pass the tests.

* test

* test2

* test3

* Fix conditional logic for retry check in workflow script

The condition now correctly checks if the pull request is not from a fork using 'false' instead of 'true'. This ensures proper validation of retry attempts based on the contributor and repository source.

* Fix placement of event JSON logging in workflow script

Moved the `toJSON(github.event)` logging statement to ensure it runs after retry logic validation. This improves the logical flow of the script and maintains appropriate debugging output.

* Add debug logs for PR metadata and run attempt values

This change introduces debug logs to output key PR metadata, such as fork status, author association, and the GitHub run attempt value. These logs will aid in debugging and provide better visibility into workflow execution.

* Add debug log for PR fork and author association check

This change adds a debug log to display the evaluation of the fork and author association condition in the workflow. It helps in troubleshooting PR handling logic and ensures better visibility into the condition being assessed.

* Fix logical negation for fork checks in workflow script

Correct the evaluation of fork status using proper negation syntax. This ensures accurate logic in pull request conditions, improving the reliability of the workflow execution.

* Add log for first-time contributor check in workflow

This adds a debug statement to log whether the PR author is a first-time contributor. It helps improve observability and makes it easier to debug workflows involving author associations.

* Simplify log output in GitHub action script

Removed unnecessary debug echo statements to streamline the script and improve readability. Retained essential logic to handle retries and enforce restrictions on test flakiness.

* Simplify retry logic for pull request contributors.

Updated the condition to correctly identify and handle retries for first-time contributors and forked repositories. This ensures a clearer and more accurate retry policy in the workflow.

* Refine workflow conditions for PR checks and retries

Adjusted conditional logic in `lfs-maintenance.yaml` to improve readability and ensure proper handling of draft PRs. Updated retry logic in `setup/action.yaml` to reflect correct author association for stricter validations.
2025-03-06 15:02:29 +01:00
DevTekVE
a51ed062ca CI: allow 1 retry for first time contributor and fork and skip sync lfs on fork PRs (#646)
* Update workflow condition to skip forked PRs during sync

This change ensures the LFS maintenance workflow does not run for pull requests originating from forked repositories. It enhances efficiency by avoiding unnecessary sync actions in these cases.

* Modified retry conditions in GitHub workflow file

Adjusted the retry conditions in the GitHub workflow setup file. The updated condition allows for a second attempt if the pull request originator is a 'FIRST_TIME_CONTRIBUTOR' from a forked repository. This modification lends more flexibility to first-time contributors by providing them with an additional chance to pass the tests.
2025-03-06 10:24:14 +01:00
DevTekVE
17d292c773 CI: Protecting /release/ci with CODEOWNERS 2025-03-06 09:38:58 +01:00
DevTekVE
8c3f8064b2 Uploading codeowners (#645) 2025-03-06 09:34:33 +01:00
DevTekVE
b791d4ed55 Model: Handle missing 'sim_pose' gracefully in model outputs. (#644)
Handle missing 'sim_pose' gracefully in model outputs.

Check for the presence of 'sim_pose' in output data before processing. If absent, fallback to using 'plan' data to populate temporal pose fields, ensuring robustness and preventing potential runtime errors.
2025-03-02 20:52:44 +01:00
DevTekVE
1a8dd310ae Model: split modeld into it's own contained modeld implementation (#642)
* Add support for TinyGrad model runner processing

Introduced a new function `is_tinygrad_model` to detect TinyGrad as an active model runner. Updated the `is_stock_model` logic to account for TinyGrad models and added a new process entry for TinyGrad in the model manager. This enables handling TinyGrad models alongside existing configurations.

adding modeld back

Add support for `modeld_v2` and update paths for consistency

Updated `SConscript` files to integrate `modeld_v2` alongside `modeld` and adjusted script paths for correct metadata handling. Adjusted various configurations and scripts, such as `labeler.yaml` and `build_release.sh`, to include `modeld_v2` and ensure cohesive project structure.

Refactor imports to use updated `modeld_v2` paths.

Replaced outdated `modeld` references with their `modeld_v2` counterparts for consistency and clarity across the codebase. Also updated `.gitignore` to accommodate new directory structure. This change ensures better maintainability and alignment with the new directory schema.

Refactor and reorganize modeld to sunnypilot/modeld_v2 structure.

Moved and renamed `modeld` components to the new `sunnypilot/modeld_v2` directory for better organization and modularity. Updated imports and file references to align with the new structure, ensuring compatibility and functionality. Streamlined project structure to improve maintainability and future development.

* typo

* Use `stock` model runner and refactor model checks.

Replaces outdated model detection logic with unified `stock` runner integration, simplifying the decision flow for model selection. Includes `stock` as a new enum in the `Runner` type and updates affected references accordingly.

* Handle missing 'sim_pose' in model outputs gracefully.

Added conditional checks to ensure the code handles cases where 'sim_pose' is absent in the model outputs. Fallback behaviors use 'plan' data when 'sim_pose' is unavailable, preventing potential errors and enhancing robustness.
2025-03-02 20:49:30 +01:00
DevTekVE
cce0f14976 CI: Fix runner install script (#639)
Not sure why it stopped working before but this should work now
2025-03-01 15:29:31 +01:00
Jason Wen
d5aa4ba997 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#635) 2025-02-17 00:07:06 -05:00
Jason Wen
564914c3a4 test_processes: update ref logs to a0a1635 2025-02-16 23:43:51 -05:00
Jason Wen
a0a1635c55 Merge branch 'upstream/openpilot/master' into sync-20250215
# Conflicts:
#	common/params.cc
#	opendbc_repo
#	panda
#	selfdrive/car/tests/test_models.py
#	selfdrive/modeld/fill_model_msg.py
#	selfdrive/test/process_replay/process_replay.py
#	selfdrive/test/process_replay/ref_commit
#	selfdrive/ui/qt/offroad/developer_panel.cc
#	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_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
2025-02-16 22:10:32 -05:00
Jason Wen
bb407ae9bf MADS: mute canBusMissing if vehicle is in Park and enabled (#613)
* Car: mute `canBusMissing` if vehicle is in Park

* only when mads is enabled
2025-02-01 22:26:19 -05:00
Jason Wen
d7087d312c MADS: Properly handle gear events (#628)
* MADS: Properly handle gear events

* use referenced object directly

* fix tests

* unused

* rename
2025-02-01 22:11:10 -05:00
Jason Wen
17b3092e76 modeld: script to generate new default model hash and name (#629)
* modeld: script to generate new default model hash and name

* break CI intentionally to trigger new changes

* more verbose and fix

* more verbose hehe
2025-02-01 02:55:52 -05:00
Jason Wen
977b164dd3 Vehicle Selector (#619)
* QFrame

* symlink for OP

* symlink dat

* search with user input

* single list is fine

* bump opendbc

* set actual fingerprint

* more precision search

* different prompt in onroad/offroad

* confirm/cancel

* set while initializing

* tldr

* show demo car

* old qt

* need that param too

* use toList

* Need to be str

* Encoding

* generate `car.CarParams.brand` in json

* start cleanup

* generate no car docs platforms

* add brand to parser

* include all dashcamOnly platforms

* pass all fields to a platform in json

* introduce `getPlatformBundle`

* extract platform from CarPlatformBundle directly

* Fix name

* do not include dashcamOnly yet

* slight cleanup

* bump opendbc

* it's a json now

* split set platform

* move loadPlatformList to sp util

* add year list to bundle

* bros

* missed header

* invoke platform selector on show event
2025-02-01 00:55:09 -05:00
Jason Wen
767880ffaf ui: Display default driving model name (#623)
* ui: Display default driving model if in use

* add ref commit and tests

* fix commit

* update msg

* update msg

* fix lint

* use sha256 hash instead
2025-01-27 22:49:28 -05:00
Jason Wen
3abe1c9168 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#622) 2025-01-25 23:14:35 -05:00
Jason Wen
8801d1eb8e test_processes: update ref logs to 7e5a84b 2025-01-25 22:51:46 -05:00
Jason Wen
7e5a84b897 Merge branch 'upstream/openpilot/master' into sync-20250125
# Conflicts:
#	opendbc_repo
#	panda
#	selfdrive/modeld/fill_model_msg.py
#	selfdrive/pandad/pandad.cc
#	selfdrive/test/process_replay/ref_commit
#	selfdrive/ui/qt/home.h
#	selfdrive/ui/qt/offroad/developer_panel.cc
#	selfdrive/ui/qt/offroad/developer_panel.h
#	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_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
2025-01-25 22:50:03 -05:00
Jason Wen
c51e74e6af ui: Vehicle panel in settings (#617)
* ui: Vehicle panel in settings

* fix click
2025-01-24 21:57:46 -05:00
DevTekVE
c392b2b269 modeld: legacy MLSIM driving models support (#595)
* Add buffer length parameter for enhanced frame handling

Introduce a configurable `buffer_length` parameter to `DrivingModelFrame` to support dynamic buffer sizes, enabling better handling of different frame rates like 20Hz. Updates include necessary adjustments in buffer initialization, copying logic, and related model inputs for improved compatibility and flexibility.

* Rename variable `len` to `length` to avoid shadowing built-in.

Replaced the usage of `len` with `length` across the code to prevent conflicts with Python's built-in `len` function. This improves code clarity and reduces potential errors or misunderstandings in variable usage.

* Fix spacing inconsistency in modeld.py

    Added a missing newline for better code readability and consistency. This change has no impact on functionality but improves code formatting.

* Move numpy_inputs initialization to correct position

Repositioned the `numpy_inputs` initialization to align with the input shape processing logic. This ensures consistency in buffer management and clarifies the flow of code execution related to input handling.

* Add 20Hz model state, smart input, and model switcher classes

Introduce `ModelState20Hz`, `ModelSmartInput`, and `ModelSwitcher` for enhanced modularity and flexibility in modeld. Refactor `ModelState` to inherit from these new classes, enabling support for 20Hz processing and smart input initialization. Update associated files to handle the new buffer length parameter and metadata management.

* Refactor `modeld` to streamline feature handling logic

Simplified feature processing for both standard and "smart input" modes by consolidating logic into reusable methods. Updated variable naming, formatting, and spacing for consistency and readability. This refactor enhances maintainability and reduces redundancy in feature update operations.

* Silence debug print statements and use cloudlog for warnings.

Commented out a debug print statement in `commonmodel.cc` to reduce noise. Replaced `print` statements with `cloudlog.warning` in `model_smart_input.py` for improved logging consistency and better integration with the logging system.

* Clean up formatting and fix minor style inconsistencies

Removed unnecessary blank lines and adjusted spacing to standardize code style across the file. These changes improve readability without altering functionality or logic.

* Refactor modeld logic and remove unused 20Hz and smart inputs

Eliminated `ModelSmartInput`, `ModelSwitcher`, and `ModelState20Hz` classes, simplifying model state handling. Centralized model processing within a unified `ModelState` class and moved related code into `sunnypilot/modeld_20hz`. This improves maintainability by removing unused features and consolidating model execution logic, aligning with current system requirements.

* clean

* Remove debug print statement in commonmodel.cc

The `printf` statement logging buffer movement details was removed as it is unnecessary for release builds. This helps streamline the code and avoid excessive console output during execution.

* Refactor model handling for 20Hz and introduce model runners

Introduce ModelRunner abstraction with TinygradRunner and ONNXRunner to streamline model handling for TICI and non-TICI hardware. Added support for dynamic input preparation and 20Hz models while simplifying the model parsing logic. This improves modularity, readability, and extensibility for future updates.

* Remove unused import and fix import order in model_runner.py

This commit removes the unused 'dtypes' import from tinygrad.tensor and adjusts the import order for cleaner code. These changes enhance readability and maintain coding standards.

* Add is20hz field to custom.capnp schema

Introduce a new boolean field `is20hz` to the `custom.capnp` schema. This allows the system to identify 20Hz-specific configurations or data processing. No changes to existing behavior are introduced for non-20Hz cases.

* Add Meta20hz class for 20Hz model message handling.

Introduces a new Meta20hz class for filling 20Hz model messages, encapsulating functionality for curvature, lane lines, road edges, and more. Refactored `modeld.py` to utilize the new class, improving modularity and maintainability. Minor adjustments were made to initialize and handle model metadata.

* Refactor import paths to align with `openpilot` structure.

Updated several import statements to use the `openpilot` namespace for better consistency and organization. This aligns the sunnypilot components more closely with the overall project structure.

* Refactor modeld to support 20Hz models and modularize runners

Replaced legacy runner logic with a unified ONNX and Tinygrad runner to support 20Hz models. Centralized model metadata management and optimized input preparation for adaptability. Updated curvature handling and output parsing for improved modularity and maintainability.

* Add 20Hz metadata handling for model predictions

Introduce `Meta20hz` class for 20Hz-specific metadata and implement dynamic loading of meta model classes in `meta_helper.py`. Update `fill_model_msg.py` to use the new metadata structure, ensuring seamless integration with 20Hz models. Adjust imports in `model_runner.py` to align with project structure.

* "Refactor modeld_20hz to modeld_v2 with cleanup"

Refactored `modeld_20hz` module to `modeld_v2` for improved clarity and consistency. Removed unused code and aligned imports across modules to reflect the new structure. Enhanced maintainability by restructuring model-related files and updating references accordingly.

* Refactor variable names and adjust imports for clarity.

Renamed `len` to `length` to avoid conflict with the built-in function and improve readability. Reorganized imports in `fill_model_msg.py` for better structure and consistency.

* "Add missing newline at end of file in __init__.py

Ensure proper formatting by adding a newline at the end of the file. This adheres to POSIX standards and improves compatibility with some tools and version control systems."

* Handle model runner initialization errors gracefully

Wrap the model runner initialization in a try-except block to catch and log exceptions. This ensures that failures during initialization are logged with detailed information, improving debugging and error tracing.

* Refactor curvature calculation for clarity and reuse.

Introduce a dedicated `get_curvature_from_output` function to handle desired curvature retrieval, improving code readability and reusability. Replace redundant logic in curvature calculation with the new function to streamline the flow.

* Make 20Hz-specific variables conditional in modeld.py

Moved the initialization of 20Hz-specific variables to be conditional based on the `is_20hz` flag. This ensures that unnecessary memory allocations are avoided when the model is not running at 20Hz, improving efficiency and clarity.

* cleanup

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-24 05:01:14 +00:00
Jason Wen
213b977774 Car: Migrate sunnypilot CarControl to its own cereal (#606)
* carControlSP and move MADS to outside structs

* publish it

* apply to all car controller

* migrate sunnypilotParams

* migrate madsEnabled

* tldr

* convert to capnp

* unused

* wrong module

* fix name

* cancer is right (all tests should be passing now)

* bump opendbc
2025-01-23 10:47:16 -05:00
Jason Wen
f1837b8502 Sentry: sets environment tag (#605)
* Sentry: sets environment tag

* master channel

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-22 15:05:10 -05:00
Jason Wen
3e7240516e Car: Migrate sunnypilot CarParams to its own cereal (#604)
* sp flags

* pass CP_SP to card and car interfaces

* CP_SP in radar interface

* bump opendbc

* use dataclass like old times

* bump opendbc

* write to params for controls

* fix test models

* fix

* need to use copy instead

* fix data type

* add service

* more

* fix

* Revert "fix"

This reverts commit 74723d7fb2.

* Revert "fix data type"

This reverts commit 02355f44df.

* missed

* more

* no more lagging

* Reapply "fix data type"

This reverts commit dbf1b8583f.

* Reapply "fix"

This reverts commit 9cbce9968a.

* Revert "Reapply "fix""

This reverts commit 1871919b63.

* Revert "Reapply "fix data type""

This reverts commit 5e95752fd5.

* no longer

* Revert "no longer"

This reverts commit 66ee1ba151.

* Reapply "Reapply "fix data type""

This reverts commit 670a384333.

* Reapply "Reapply "fix""

This reverts commit 42f09f955c.

* only for car params sp

* rename

* fix more test

* no need for process replay

* pass stock car params to sp set car params

* pass stock car params to sp set car params

* deprecate CarParams.sunnypilotFlags to CarParamsSP.flags

* missed arg

* fix tests

* tests fixed

* need to pass this too

* must generate cp_sp!

* fix typing

* must be initialized prior can comm callback!

* no more cancer (@devtekve)

* remove more cancer

* Refactor `get_non_essential_params_sp` to simplify arguments (#612)

* Refactor 'get_non_essential_params_sp' function calls in tests

In both `test_latcontrol.py` and `process_replay.py`, simplified the function calls to 'get_non_essential_params_sp'. Removed an unnecessary call to 'get_non_essential_params'. This change makes the code cleaner and more efficient by reducing redundancy in the function calls. This modification also ensures consistency across different code files.

* Refactor get_non_essential_params_sp to take car_params.

Simplify parameters by modifying `get_non_essential_params_sp` to use `car_params` as input. Adjust related calls in test files and process replay to match the updated method signature. This improves code clarity and reduces redundancy.

* bump opendbc

* Refactor parameter handling for `get_params_sp`.

Removed unnecessary reassignment of `car_params` in calls to `get_params_sp`, ensuring a cleaner and more streamlined code structure. This change improves code clarity and eliminates redundant operations. All relevant assertions and behavior remain unaffected.

* bumping opedbc

* bump opendbc

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-22 14:22:32 -05:00
DevTekVE
403d77ff3f ci: squash and merge script update to allow merging less restrictively (#610)
Fix branch status check for merge readiness

Previously, any non-"CLEAN" status prevented merging. The check now specifically fails only if the branch is "BEHIND", allowing other statuses to proceed if valid. This ensures more accurate merge validations.
2025-01-22 13:41:56 +01:00
DevTekVE
9fe4d7ecc7 ui: Add Wi-Fi scan button to network settings (#608)
* Implemented custom Networking class for sunnypilot UI

This modification introduced a new 'NetworkingSP' class for the sunnypilot user interface. It's based on the existing Networking class, but tailored to the specific needs of the sunnypilot UI. This class adds a new 'Scan' button to the Wi-Fi screen and implements an additional layout to accommodate both 'Scan' and 'Advanced' buttons. It also contains updates to the file inclusions in 'settings.cc' to use the new class. Moreover, the accessibility of several member variables in the original Networking class has been updated from 'private' to 'protected'. This change enhances the modifiability and extensibility of the class structure.

* Add Spanish translations for networking scan messages

Added translations for "Scan" and "Scanning..." in the Spanish localization file. These updates ensure proper display and functionality in the networking scan feature for Spanish-speaking users.

* updating lang files

* Refactor networking component and clean up unused code.

Removed unnecessary comments and unused includes to enhance readability and maintainability. Refactored variable declarations for consistency and streamlined layout adjustments in the networking UI code.
2025-01-22 12:04:11 +01:00
DevTekVE
8d7315fa28 ci: Add support for "settings_network" and "settings_network_advanced" scene in UI tests (#609)
* Add support for "settings_network" scene in UI tests

Updated the workflow and test script to include the "settings_network" scene. Introduced a new setup function for "settings_network" and registered it in the scene-to-function mapping. This ensures proper handling and testing of network settings in the UI.

* Static analysis lol

* Add support for "settings_network_advanced" scene

Extend UI tests and workflow to include the "settings_network_advanced" scene. Updated the YAML workflow and test script to handle this new scene for comprehensive coverage.
2025-01-22 11:35:12 +01:00
DevTekVE
3e4be4a393 ci: Add branch reset workflow and improve squash script (#579)
* Add nightly branch reset workflow and improve squash script

Introduced a GitHub Actions workflow to reset and squash PRs nightly for the `master-dev-c3-new-test` branch. Enhanced `squash_and_merge.py` to handle more specific exit codes and `squash_and_merge_prs.py` to streamline PR processing. Updated argument handling in scripts and added validation for squash script execution.

* Forcing to show up

* UnForcing to show up

* Refactor branch handling to use inputs/environments directly

Removed intermediate step for setting branch variables and updated logic to use `inputs` or environment variables directly. Simplifies the workflow and improves maintainability by reducing redundancy and reliance on unnecessary outputs.

* Fix Python script invocation in CI workflow.

Replaced implicit script execution with an explicit `python3` command to ensure compatibility and consistency in the workflow. This change resolves potential issues with shell defaults or system configurations.

* Update branch reset logic in workflow script

Replaces checkout-based branch reset with deletion and recreation to ensure the target branch correctly points to the source branch. This change handles cases where the target branch may already exist.

* Refactor PR data handling to parse JSON input.

Updated the script to parse and handle PR data as JSON, ensuring proper data structure during processing. Adjusted functions to operate on parsed JSON instead of raw arguments for improved clarity and error handling.

* Refactor PR processing to streamline branch handling

Removed redundant `fetch_pr_branches` function and integrated branch fetching directly into `process_pr`. Simplified subprocess calls for clarity and added branch cleanup to prevent conflicts. This improves code maintainability and execution efficiency.

* Add PR number to squash and merge commit titles

This change appends the PR number to the title used in squash and merge commits, improving traceability and clarity in the commit history. The modification ensures easier identification of commits linked to specific pull requests.

* Enhance PR processing with sorting and additional checks

Implemented sorting of PRs by creation date and added checks for merge conflicts, commit data availability, and status check completion. Updated nightly squash script to provide detailed feedback via PR comments for skipped PRs. These changes improve the reliability and traceability of the merge process.

* Add traceback logging to error handling in squash_and_merge_prs

Enhanced error reporting by including full traceback details when an exception occurs in the `process_pr` function. This aids in debugging by providing more context on failures.

* Refactor and add debug output to PR merge check logic

Simplified multi-line statements into single lines for clarity and added debug `print` statements to log `merge_status` and its output. These changes enhance readability and facilitate debugging of the merge conflict check process.

* Add GITHUB_TOKEN to environment for CI workflow

Ensure the workflow has access to the GITHUB_TOKEN for authentication. This is necessary for interacting securely with the GitHub API during the CI process. Without this, some steps may fail due to lack of authorization.

* Enable scheduled workflow execution at midnight UTC

Reactivates the cron schedule for the workflow to run daily at midnight UTC. This ensures the workflow executes automatically without manual triggers, maintaining regular updates or checks.

* test

* Update workflow to trigger and monitor selfdrive tests

Replaced the direct triggering of the prebuilt workflow with a step to trigger and wait for the completion of selfdrive tests. Ensures prebuilt workflow runs only if selfdrive tests succeed, improving reliability of the CI process.

* Refine workflow trigger to fetch run URL and ID

Updated the workflow script to extract the run URL and derive the workflow ID from it. This ensures more accurate handling and tracking of GitHub Actions runs.

* Simplify selfdrive test triggering in workflow

Replaces custom script with a reusable GitHub Action to trigger and wait for selfdrive test completion. This improves maintainability and reduces complexity in the workflow file. Adjusts subsequent prebuilt workflow trigger to ensure compatibility.

* Remove duplicate prebuilt workflow trigger step

The redundant step for triggering the sunnypilot prebuilt workflow has been removed. This cleanup avoids unnecessary duplication and ensures a more streamlined workflow definition.

* Update selfdrive test trigger to use GitHub CLI commands

Replaced the third-party action with GitHub CLI for triggering and monitoring selfdrive tests. This change improves maintainability and reduces reliance on external dependencies. Updated related steps to ensure compatibility with the new approach.

* Add delay to ensure selfdrive tests workflow starts

Introduce a 120-second sleep before fetching the latest run ID to allow sufficient time for the selfdrive tests action to initialize. This prevents potential issues caused by attempting to retrieve the run ID too early.

* Improve push step to check for diffs before execution

Added logic to verify if there are differences between local and remote branches before attempting a push. This prevents unnecessary pushes and skips subsequent workflows when no changes are detected. Updated dependent steps to conditionally run based on the presence of changes.

* Update target branch and improve squash comment clarity

Renamed the default target branch from `master-dev-c3-new-test` to `nightly` in the workflow configuration. Enhanced squash process comments to dynamically reflect the `target_branch` value for better clarity and consistency.

* Add missing newline at end of file

Ensures the file complies with POSIX standards by including a newline at the end. This improves consistency and prevents potential issues with some tools or systems.

* Update default target branch and disable nightly schedule

Changed the default target branch to 'master-dev-c3-new' for workflow consistency. Commented out the nightly schedule to temporarily disable automated runs. No functional changes were made to other parts of the workflow.

* Refactored squash and merge scripts for improved PR handling

In this commit, significant updates have been made to the 'squash_and_merge.py' and 'squash_and_merge_prs.py' scripts related to how pull requests (PRs) are processed.

A 'source-branch' argument has been added to the argument parser. The merging command has been changed from 'merge' to 'rebase'.

The PR processing function has been refined. Specifically, PR validation is now a separate function confirming the conditions 'branch name', 'commit data', 'check pass status', and 'mergeability'. Now, any failures under these conditions result in skipping the PR with an appropriate warning.

The target branch is deleted if it exists, before a new one is created from the source branch. The squash script now runs with more structured arguments.

These changes generally improve PR handling in CI/CD pipelines, making them more efficient and error-resistant.

* Add 'PullRequest' to .codespellignore

This update includes 'PullRequest' in the .codespellignore file to prevent it from being flagged as a spelling error. It helps streamline code reviews and reduces false positives during spell checks.
2025-01-22 09:30:53 +01:00
Jason Wen
d08fd25784 Events: Migrate sunnypilot onroad events to its own cereal (#603)
* Events: Migrate sunnypilot onroad events to its own cereal

* more

* slightly more

* typing

* fix more

* fix mads state machine tests

* readjust order

* fix event

* abstract

* need these

* move around

* let's make sure it cleared on every loop

* Update selfdrive/selfdrived/alertmanager.py

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

* use upstream custom struct

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-20 22:18:19 -05:00
Jason Wen
4730a192b1 Revert "Events: Migrate sunnypilot onroad events to its own cereal" (#602)
Revert "Events: Migrate sunnypilot onroad events to its own cereal (#598)"

This reverts commit c9961f1590.
2025-01-20 21:50:54 -05:00
Jason Wen
5f10529a88 Device: Offroad Mode (#596)
* try scrolling

* Revert "try scrolling"

This reverts commit 18cc0828c0.

* init

* event

* add logic

* last bit

* expose toggle

* update toggle

* add offroad btn to it

* fix

* update
2025-01-20 16:59:54 -05:00
Jason Wen
bc67effb6d ui: Keep power buttons clickable while onroad (#601) 2025-01-20 16:04:56 -05:00
Jason Wen
c9961f1590 Events: Migrate sunnypilot onroad events to its own cereal (#598)
* Events: Migrate sunnypilot onroad events to its own cereal

* more

* slightly more

* typing

* fix more

* fix mads state machine tests

* readjust order

* fix event

* abstract

* need these

* move around

* let's make sure it cleared on every loop

* Update selfdrive/selfdrived/alertmanager.py

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

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-20 13:23:44 -05:00
Jason Wen
d58b0f403f bump submodules 2025-01-20 01:37:58 -05:00
Jason Wen
837eea06a4 MADS: remove controlsAllowedLat to maintain compatibility with stock cereal (#597)
* MADS: remove `controlsAllowedLat` to maintain compatibility with stock cereal

* unused

* bump panda
2025-01-19 20:48:16 -05:00
Jason Wen
485ac32250 Longitudinal: Distance button hold to toggle Chill/Experimental Mode (#576)
* Longitudinal: Distance button hold to toggle Chill/Experimental Mode

* unused

* fix

* no need

* Refactor: Introduce ButtonHoldTracker to manage button hold durations (#593)

Add ButtonHoldTracker for button hold logic and tests

Introduce a new `ButtonHoldTracker` class to manage button hold durations, replacing manual timer handling in `ExperimentalSwitcher`. Updated `ExperimentalSwitcher` to leverage this implementation for cleaner and more modular code. Added comprehensive unit tests for both `ButtonHoldTracker` and `ExperimentalSwitcher` to ensure functionality and edge case coverage.

* Revert "Refactor: Introduce ButtonHoldTracker to manage button hold durations (#593)"

This reverts commit 7ee7e73ce7.

* less in selfdrived

* pass carparams into child

* tests for cruisehelper

* rename these bad bois (happy now @devtekve? xD)

* Apply suggestions from code review

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

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-19 20:23:51 +00:00
Jason Wen
5c38aeae0b Longitudinal: Dynamic Experimental Control (#572)
* init dec

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix static test

* ff

* fix static test

* unitee testt

* Refactor test_dynamic_controller and fix formatting issues

Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.

* Refactor test indentation for dynamic controller tests

Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.

* Migrated to pytest using claude

* Integrate radar parameter into dynamic controller's pytest tests

Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.

* Disabling unittest file to allow checks on the pipeline to succeed.

Pending to remove this, but leaving it to validate the move to pytest is okay before merging

* Replace unittest with pytest for dynamic controller tests

Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.

* new line...

* Refactor and modularize DynamicExperimentalController logic

Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.

* Add missing import for messaging in helpers.py

The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.

* Format

* Formatting

* rebase fix

* Refactor MpcSource definition and update references.

Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.

* Format

* Refactor DEC into a dedicated longitudinal planner class

Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.

* **Refactor DEC module structure for better organization**

Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.

* static test

* static

* had moved to car_state

* cleanup

* some more

* static method

* move around

* more cleanup

* stuff

* into their own

* rename

* check live param

* sync with stock

* type hint

* unused

* smoother trans

* window time

* fix type hint

* pass sm.frame from plannerd

* more fixes

* more

* more explicit

* fix test

* Revert "fix test"

This reverts commit 635b15f2bc.

* Revert "pass sm.frame from plannerd"

This reverts commit a8deaa69b8.

* use internal frame

* update name

* never used

* this is why it was never using DEC

* more logs

* slight cleanup

* remove to fail test

* update name

* more

* rename

* move around

* explicit type hints

* move to constants py

* Revert "explicit type hints"

This reverts commit c205497b

* more

* don't set to exp mode initial if DEC is active

* use walrus for None

* Revert "use walrus for None"

This reverts commit 5f2396d490.

* fix wrong typing and variable name

* use walrus (needs cleanup)

* fix tests

* revert smooht lead for now

* dec: how good is FirstOrderFilter?

* Update dec.py

* dec: faster ?

* Revert "dec: faster ?"

This reverts commit 40259cd22a.

* Revert "Update dec.py"

This reverts commit 3f29ccbd99.

* Revert "dec: how good is FirstOrderFilter?"

This reverts commit 01e06df542.

* Update slow-down logic and constants for improved behavior

Adjust the slowdown scaling factor and anomaly handling to refine behavior without abrupt resets. Modify constants to increase window size and adjust probabilities and distances for smoother adaptation. Update version to reflect the new changes.

* Fix lead detection fallback for weighted average check.

Add a fallback value of -1 when computing the weighted average to prevent errors caused by invalid or None values. This ensures robust lead detection and avoids potential crashes or undefined behavior.

* visuals for DEC

* try this

* add opacity

* should be active and dimmer

* even dimmer

* Update dec.py

* Update constants.py

* use another method for drawing

* migrate to sp only

* fix

* init

---------

Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-19 12:04:54 -05:00
Jason Wen
177bfc9ba7 ui: Model Selector: display prompt with rich text widget (#591) 2025-01-19 10:00:05 +01:00
Jason Wen
155f9ee3b9 bump submodules 2025-01-19 02:50:02 -05:00
Jason Wen
073887221d MADS: Honda: controls, events, and cluster updates (#589)
* MADS: Honda: Cluster icons and events updates

* bump opendbc

* nuke them all to test

* try this

* bring them back

* fix icons

* MADS: Honda: Allow steering

* rename

* match stock

* bump submodules
2025-01-19 02:48:53 -05:00
Jason Wen
36453f2014 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#590) 2025-01-18 19:19:51 -05:00
Jason Wen
2792ce472a Merge branch 'upstream/openpilot/master' into sync-20240118
# Conflicts:
#	cereal/custom.capnp
#	cereal/log.capnp
2025-01-18 18:54:56 -05:00
Jason Wen
4e6cc1f3bc ui: Hide regulatory button on non-comma devices (#585)
Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-18 20:22:15 +00:00
DevTekVE
f5764c2edf ci: release drafter sort by default (time)
Using sort by title made things look out of order. If we want to organize them a bit furter, we can do that manually before moving forward with a release.
2025-01-18 15:16:43 +01:00
DevTekVE
027023a7ff CI: Update release drafter config (#588)
* Remove contributors section from release drafter template

The contributors section has been removed to simplify the release notes format. This change ensures a cleaner and more focused release draft template.

* Update release-drafter config with new labels and options

Added 'exclude-labels' to filter out 'no-changelog' items and improved category settings with 'collapse-after'. Introduced 'sort-by' for title-based sorting to enhance organization.
2025-01-18 15:10:13 +01:00
DevTekVE
da980312d9 Add Release Drafter configuration and workflow (#586)
* Add configuration files for Release Drafter

This commit introduces two configuration files for the Release Drafter. These include release-drafter.yml which will help categorize changes into features, bug fixes, and maintenance, and workflows/release-drafter.yml which defines a GitHub actions workflow to update release drafts.

* Work on both master branches

* Meh static and i dont need this tbh
2025-01-18 14:29:20 +01:00
Jason Wen
1a3f86a542 ui: Transition offroad state for Device panel buttons (#584) 2025-01-18 02:38:29 +00:00
Jason Wen
ac255742b6 MADS: Toyota: remove LKAS button support (#583)
* MADS: Toyota: remove LKAS button support

* remove mads button test

* bump submodules

* bump submodules

* test_processes: update ref logs to 4b12690
2025-01-17 19:22:50 -07:00
Jason Wen
d15d56b161 sentry: log fingerprints and save exceptions (#581)
* sentry: log fingerprints and save exceptions

* no point

* remove unused imports

* use deprecated

* have to do this

* remove

* cap

* no duplicate

* typo

* don't use deprecated method

* wrap them around

* do this instead

* new endpoint

* no need
2025-01-17 17:22:45 +00:00
Jason Wen
429b461eae Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#580) 2025-01-16 18:00:26 -05:00
Jason Wen
ce3c55c691 test_processes: update ref logs to afde277 2025-01-16 17:13:53 -05:00
Jason Wen
afde2771f8 Merge branch 'upstream/openpilot/master' into sync-20250116
# Conflicts:
#    .github/workflows/ui_preview.yaml
#    opendbc_repo
#    panda
#    release/release_files.py
#    selfdrive/test/process_replay/ref_commit
#    selfdrive/ui/tests/test_ui/run.py
2025-01-16 17:12:53 -05:00
Jason Wen
01c5dbdc4c Hyundai CAN: auto-enable radar tracks on applicable Mando radar (#561)
* more

* event and checks

* comments

* missed events

* retry 2 times is enough

* rename to radar tracks

* fix data type

* more rename

* bump opendbc

* drain first

* put it behind a toggle lol

* re-enable

* update comments

* revert lead smoothing

* Revert "revert lead smoothing"

This reverts commit 872267970c.

* real events and radard engagement

* only show up for hyundai with mando

* update translations

* bump opendbc

* fix event name

* update description

* move above

* translations

---------

Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
2025-01-13 16:14:00 -05:00
Kumar
c3bfd17028 Revert "Longitudinal: Dynamic Experimental Control" (#571)
Revert "Longitudinal: Dynamic Experimental Control (#564)"

This reverts commit bba3c39e2f.
2025-01-13 05:17:15 +00:00
Kumar
bba3c39e2f Longitudinal: Dynamic Experimental Control (#564)
* init dec

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix static test

* ff

* fix static test

* unitee testt

* Refactor test_dynamic_controller and fix formatting issues

Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.

* Refactor test indentation for dynamic controller tests

Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.

* Migrated to pytest using claude

* Integrate radar parameter into dynamic controller's pytest tests

Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.

* Disabling unittest file to allow checks on the pipeline to succeed.

Pending to remove this, but leaving it to validate the move to pytest is okay before merging

* Replace unittest with pytest for dynamic controller tests

Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.

* new line...

* Refactor and modularize DynamicExperimentalController logic

Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.

* Add missing import for messaging in helpers.py

The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.

* Format

* Formatting

* rebase fix

* Refactor MpcSource definition and update references.

Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.

* Format

* Refactor DEC into a dedicated longitudinal planner class

Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.

* **Refactor DEC module structure for better organization**

Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.

* static test

* static

* had moved to car_state

* cleanup

* some more

* static method

* move around

* more cleanup

* stuff

* into their own

* rename

* check live param

* sync with stock

* type hint

* unused

* smoother trans

* window time

* fix type hint

* pass sm.frame from plannerd

* more fixes

* more

* more explicit

* fix test

* Revert "fix test"

This reverts commit 635b15f2bc.

* Revert "pass sm.frame from plannerd"

This reverts commit a8deaa69b8.

* use internal frame

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-12 19:11:58 -05:00
Jason Wen
4a60eb50e5 ui: new design for Device panel buttons (#557)
* init btns

* better design

* force offroad in another PR

* old calibration design for now

* revert

* ci: fix position

* try this

* check ci

* Revert "check ci"

This reverts commit 80795cc700.

* test more ci

* Revert "test more ci"

This reverts commit 05670b5ad6.

* nuke more on CI

* unlikely but why not

* Revert "unlikely but why not"

This reverts commit 72f45a7516.

* Revert "nuke more on CI"

This reverts commit 7f406efc24.

* try this

* Revert "try this"

This reverts commit 3ce6768067.

* same across
2025-01-12 15:29:08 -05:00
DevTekVE
2f2b13382b CI: update install script to allow restore of github runner after agnos update (#562)
* Refactor GitHub runner installation script

Enhance the script with modular functions for better readability and maintenance. Add support for restoration mode, enabling the recovery of existing runner configurations. Improve error handling, argument parsing, and system configuration setup.

* Ensure runner directory existence before restoration

Add a prerequisite check to verify the runner directory exists, preventing restoration failures due to a missing directory. Adjust exit code logic for proper handling when no restoration is required.

* rw not needed until a bit later

* Refactor system configuration handling and remount logic.

Reorganized system setup functions and centralized remount logic for consistency and clarity. Improved script structure by separating utility and setup functions, ensuring proper remounting behavior with a robust exit trap. Reduced redundancy and enhanced maintainability.

* silly change
2025-01-12 11:37:02 +01:00
DevTekVE
9ccc5cc3ea models: retain pre-20hz drive model support (#531)
* modeld: Retain pre-20hz drive model support

* Method not available anymore on OP

* some fixes

* Revert "Long planner get accel: new function args (#34288)"

* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"

* Revert "long planner: allow throttle reflects usage (#33792)"

* Revert "Gate acceleration on model gas press predictions (#33643)"

* Reapply "Gate acceleration on model gas press predictions (#33643)"

This reverts commit 76b08e37cb.

* Reapply "long planner: allow throttle reflects usage (#33792)"

This reverts commit c75244ca4e.

* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"

This reverts commit b2b7d21b7b.

* Reapply "Long planner get accel: new function args (#34288)"

This reverts commit 74dca2fccf.

* don't need

* retain snpe

* wrong

* they're symlinks

* remove

* put back into VCS

* add back

* don't include built

* Refactor model runner retrieval with caching support

Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.

* Update model runner determination logic with caching fix

Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.

* parse inputs via metadata

* load model and metadata dynamically

* cherry pick from devtekve as base

* lateral_control_params & prev_desired_curv: MLSIM V0 to Null Pointer

* old desired_curv data: MLSIM V1 to Postal Service

* Bringing what was on master back then

* Cleaning up

* Refactor model pipeline for modularity and dynamic input handling

Refactored the model pipeline by introducing helper functions to modularize model loading, metadata extraction, and input preparation. Improved flexibility in handling dynamic input keys and parsing outputs based on model configuration. Removed deprecated or unused code segments for cleaner and more maintainable structure.

* Push NDv2 because why not and fix modeld

* `Refactor model parsing and clean unused code dependencies`

Simplified `parse_outputs` by removing unnecessary `input_keys` parameter, ensuring cleaner logic. Updated `PROCESS_NAME` for standardization and eliminated deprecated `Pathlib` dependencies in model paths. Minor adjustments improve input handling for lateral control parameters.

* Refactor model and metadata loading functions.

Simplified and clarified `load_model` by renaming it to `get_model_path` and removing redundant variable assignments. Streamlined `load_metadata` by directly returning the loaded metadata without intermediate variables. These changes improve code readability and maintainability.

* Refactor modeld process selection based on SNPE support.

Introduce conditional logic to determine and start the appropriate modeld process (SNPE or default) based on hardware support. This improves flexibility and ensures correct process management.

* Walrus baby

* Update longitudinal_planner.py

* Improve model download progress handling and translations

Refactored model download status handling logic for better clarity and added mechanisms to track status changes efficiently. Updated UI text and translations across multiple languages to reflect consistent and accurate model download states.

* Revert "Update longitudinal_planner.py"

This reverts commit b44a687e4c.

* Fix variable naming for curvature size in modeld.py

Renamed the variable `len` to `length` to avoid conflict with the built-in `len()` function, improving code clarity and preventing potential errors. Also removed trailing spaces in commented-out sections for better formatting consistency.

* sync with upstream

* some are different

* should work

* sim_pose only exists in in ndv3 and prior

* dynamic meta constants

* fix

* uiview: disable power saving

* fix this

* ain't coasting for y'all

* Static analysis

* Refactor initialization of model inputs for clarity.

Removed redundant pre-initialization of `driving_style`, `nav_features`, and `nav_instructions` variables. Instead, directly initialize these within their respective conditional blocks for better readability and reduced memory usage.

* default to none

* enable in next PR

* more

* Revert "more"

This reverts commit f5a4220588.

* Revert "enable in next PR"

This reverts commit 621cc4f18e.

* no need to cast bool

* nuke

* fix desired curvature for pre LAv1 models

* mypy

* static

* fix

* new json

* Going to a test branch with a different model json list

* renamed model json

* Update model runner handling in custom.capnp and helpers

Refactored model runner logic by introducing a `runner` field in `custom.capnp` and simplifying `get_active_model_runner` logic. Removed deprecated function `get_model_runner_by_filename` and added a temporary filter in `fetcher.py` to enforce `snpe` until full tinygrad support is implemented.

* Revert "Update model runner handling in custom.capnp and helpers"

This reverts commit f34d872c13.

* Revert "renamed model json"

This reverts commit 15c6ed303b.

* Revert "Going to a test branch with a different model json list"

This reverts commit 4c1408fee5.

* Reapply "renamed model json"

This reverts commit c6fec6912a.

Reapply "Going to a test branch with a different model json list"

This reverts commit 83e253e9a3.

* Add 'runner' property to 'ModelBundle' and update relevant functions

The 'ModelBundle' class in 'custom.capnp' has been extended to include a 'runner' property. This required updating 'fetcher.py' to handle the 'runner' property when parsing model bundles. Additionally, the helper function 'get_model_runner_by_filename' has been removed from 'helpers.py' as it is no longer needed because the 'runner' property provides this information. The 'get_active_model_runner' function has also been updated in light of these changes.

* Refine bundle selection logic in SoftwarePanelSP

Improve logic for determining which model bundle to display by considering download status and failure state. Remove unnecessary function call to enhance clarity and maintainability.

* tmp

* Add retrieval of active model bundle in manager loop

Introduce a call to `get_active_bundle` to fetch the active model bundle and store it in `self.active_bundle`. This ensures the active bundle is always up-to-date during the model management process.

* Add "Use Default" option for model selection

Introduced a "Use Default" option in the model selection dropdown, allowing users to reset to the default model. Adjusted logic to handle default selection and ensure proper parameter updates. Fixed bundle status handling during the download process in the model manager.

* Refactor type hint in active_bundle assignment.

Removed an unnecessary type hint in the active_bundle assignment for cleaner and more maintainable code. This change does not affect functionality but improves code readability.

* no nested

* update json url

* split out

* format

* condense

* more

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Kumar <36933347+rav4kumar@users.noreply.github.com>
2025-01-11 22:32:01 -05:00
DevTekVE
898b7f28a8 Better model builder (#559)
* Add job to fetch and upload model artifacts

Introduced a new `get_model` job to retrieve and upload model artifacts as part of the workflow. Updated the `build_model` job to download and clean up model files before building, ensuring an isolated and streamlined process. These changes improve modularity and artifact handling in the CI pipeline.

* Refine model file handling in build workflow

Restrict deletion and download commands to ".onnx" files to prevent unintended removal or overwriting of non-ONNX files. This ensures a more targeted and safer workflow for handling model artifacts.

* Update model artifact handling in build workflow

Changed artifact upload path to include only .onnx files and commented out the deletion of existing models. Also added a dependency for the build stage to ensure proper execution sequence.

* Update build workflow to refine model artifact handling

Removed unused code for deleting models and fixed the artifact path. Added a reference file logging custom name and upstream branch for better traceability. These changes streamline the workflow and improve clarity.

* Set dynamic run-name for sunnypilot build workflow

Added a customizable `run-name` field in the sunnypilot build model workflow. This allows more informative and dynamic naming based on input parameters such as `custom_name` or `upstream_branch`. Improves clarity and traceability in workflow runs.

* Add customization options and metadata generation to build

Introduce new inputs for file name prefix and 20Hz model specification in the workflow. Enable renaming of model files, generation of file hashes, and creation of a `metadata.json` file containing build details. This improves flexibility and enhances artifact information management.

* Refactor CI workflow to remove redundant get_model job

The `get_model` job has been removed, and its relevant steps have been merged into the `build_model` job to streamline the workflow. Additionally, a patch for `SConstruct` has been added to support an arbitrary cache directory configuration. This simplifies the pipeline while maintaining functionality.

* powersave ok ok

* Revert "powersave ok ok"

This reverts commit 716b9f1e2d.

* Update build process to use .thneed files over .pkl

Replaced .pkl file references with .thneed in the sunnypilot build workflow. Adjusted file renaming, hashing, and metadata handling to align with the new file format. This ensures compatibility with the updated file structure.

* let's seeeeeeeeee

* Remove unused CXXFLAGS from build step in workflow

CXXFLAGS options `-Wno-vla-extension` and `-Wno-vla-cxx-extension` were removed from the `scons` command as they are no longer necessary. This simplifies the build configuration and ensures cleaner workflows.
2025-01-11 19:23:00 -05:00
Jason Wen
72a4e0970a MADS: Filter disengage events without lateral control impact (#556) 2025-01-10 19:27:41 -05:00
Jason Wen
acd46aa94b modeld: retain SNPE and thneed drive model support (#555)
* modeld: Retain pre-20hz drive model support

* Method not available anymore on OP

* some fixes

* Revert "Long planner get accel: new function args (#34288)"

* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"

* Revert "long planner: allow throttle reflects usage (#33792)"

* Revert "Gate acceleration on model gas press predictions (#33643)"

* Reapply "Gate acceleration on model gas press predictions (#33643)"

This reverts commit 76b08e37cb.

* Reapply "long planner: allow throttle reflects usage (#33792)"

This reverts commit c75244ca4e.

* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"

This reverts commit b2b7d21b7b.

* Reapply "Long planner get accel: new function args (#34288)"

This reverts commit 74dca2fccf.

* don't need

* retain snpe

* wrong

* they're symlinks

* remove

* put back into VCS

* add back

* don't include built

* Refactor model runner retrieval with caching support

Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.

* Update model runner determination logic with caching fix

Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.

* default to none

* enable in next PR

* more

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-10 18:34:06 -05:00
Jason Wen
7329128325 ci: generate Trips panel for ui preview (#549)
* ci: generate trips panel for ui preview

* fix name
2025-01-10 17:48:04 -05:00
Jason Wen
402ee444b7 Revert "modeld: retain SNPE and thneed drive model support" (#551)
Revert "modeld: retain SNPE and thneed drive model support (#530)"

This reverts commit 56aa07844a.
2025-01-10 16:25:16 -05:00
Jason Wen
5b99c8b185 Revert "ci: generate Trips settings panel for ui preview" (#548)
Revert "ci: generate Trips settings panel for ui preview (#546)"

This reverts commit b29117c02a.
2025-01-10 11:25:32 -05:00
Jason Wen
b29117c02a ci: generate Trips settings panel for ui preview (#546)
ci: generate trips panel for ui preview
2025-01-10 10:59:11 -05:00
Jason Wen
56aa07844a modeld: retain SNPE and thneed drive model support (#530)
* modeld: Retain pre-20hz drive model support

* Method not available anymore on OP

* some fixes

* Revert "Long planner get accel: new function args (#34288)"

* Revert "Fix low-speed allow_throttle behavior in long planner (#33894)"

* Revert "long planner: allow throttle reflects usage (#33792)"

* Revert "Gate acceleration on model gas press predictions (#33643)"

* Reapply "Gate acceleration on model gas press predictions (#33643)"

This reverts commit 76b08e37cb.

* Reapply "long planner: allow throttle reflects usage (#33792)"

This reverts commit c75244ca4e.

* Reapply "Fix low-speed allow_throttle behavior in long planner (#33894)"

This reverts commit b2b7d21b7b.

* Reapply "Long planner get accel: new function args (#34288)"

This reverts commit 74dca2fccf.

* don't need

* retain snpe

* wrong

* they're symlinks

* remove

* put back into VCS

* add back

* don't include built

* Refactor model runner retrieval with caching support

Added caching for active model runner type via `ModelRunnerTypeCache` to enhance performance and avoid redundant checks. Introduced a `force_check` flag to bypass the cache when necessary. Updated related code to handle cache clearing during onroad transitions.

* Update model runner determination logic with caching fix

Enhances `get_active_model_runner` to utilize caching more effectively by ensuring type consistency and updating cache only when necessary. Also updates `is_snpe_model` to pass the `started` state to the runner determination function, improving behavior for dynamic checks.

* default to none

* enable in next PR

* more

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-10 08:56:10 -05:00
DevTekVE
d5f5887830 CI: Increase test report creation timeout and improve build times (#545)
* Increase timeout for test report creation by 1 minute

Adjusted the `timeout-minutes` value to allow more time for the
test report creation step.

* Add script to disable power save in build workflow

This commit integrates the `disable-powersave.py` script into the sunnypilot build workflow. It ensures power save mode is disabled during the build process, improving reliability and consistency.

* Set PYTHONPATH before running disable-powersave.py

The change ensures the correct Python module path is set when executing the disable-powersave script. This update prevents potential import issues by including the GitHub workspace in the PYTHONPATH.

* Refactor powersave handling with a dedicated script

Replaced inline powersave disable logic with a new script `manage-powersave.py` to handle enabling and disabling power saving mode. Updated the CI workflow to use this script and added a step to re-enable powersave after builds. This improves clarity and modularity for power management operations.

* Enable CPU core count display in power save script

Introduce multiprocessing to show the number of CPU cores available. Added messages to indicate power save mode state and core count, improving script feedback and user clarity.

* Refine power save mode logging output.

Improve clarity of logging messages in `manage-powersave.py` by indicating CPU core counts before and after applying changes. Simplified the power save state message for better readability.

* Updated scons cache key restore logic in GitHub workflows

This commit updates the restore key logic in two GitHub workflow config files (sunnypilot-build-model.yaml and sunnypilot-build-prebuilt.yaml). The restore key sequence has been revised for improved accuracy and consistency. This should optimize the cache hit rate and speed up the subsequent builds.

* Add comments on GitHub Actions cache isolation behavior

Clarifies the cache isolation enforced by GitHub Actions for security reasons. Notes that only caches from the default branch are shared across all builds, and this behavior cannot be changed. This improves maintainability and understanding of the workflow configuration.
2025-01-10 10:04:38 +01:00
DevTekVE
9e6656fd2e models: Fix cache expiration logic in fetcher.py
Ensure the cache is treated as expired when last_sync is zero. This prevents potential issues with uninitialized or missing sync timestamps, enhancing reliability.
2025-01-09 10:51:17 +01:00
Jason Wen
04ddb10c1d Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#544) 2025-01-09 00:11:52 -05:00
Jason Wen
8edeb458d4 Merge branch 'openpilot/master' into sync-20250108
# Conflicts:
#	common/base.py
#	common/comma_connect.py
#	opendbc_repo
#	panda
2025-01-08 23:42:52 -05:00
Jason Wen
ec044790fb Revert "Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new" (#543)
Revert "Sync: `commaai/openpilot:master` into `sunnypilot/sunnypilot:master-n…"

This reverts commit e682957101.
2025-01-08 23:37:41 -05:00
Jason Wen
1b92f6ba3b ui: add trips panel in settings (#542)
* ui: add trips panel in settings

* adjust ui preview clicks

* ci: add optional scroll parameter to setup functions in UI preview

* add trips to ui preview and scrolling for dev panel

* fix keyboard
2025-01-09 03:49:48 +00:00
Jason Wen
b434043db7 ci: add optional scroll parameter to setup functions in UI preview (#541) 2025-01-09 03:18:07 +00:00
Jason Wen
d0f11e59ad ui: deprecate RETURN_IF_SUNNYPILOT macro and cleanup (#540) 2025-01-09 02:49:55 +00:00
Jason Wen
1b7066eb12 ui: add drive stats and move comma Prime status on offroad home (#537)
ui: add drive stats to offroad home screen
2025-01-09 02:22:09 +00:00
Jason Wen
8ee28e4f79 ui: split offroad home in its own class (#538)
* ui: split offroad home in its own class

* fix
2025-01-08 20:15:53 -05:00
Jason Wen
19f3cfd3d7 ui: update experimental mode button settings index (#539) 2025-01-08 19:57:06 -05:00
Jason Wen
d6ec84c068 System: fix dynamic pathing for crash logs (#535) 2025-01-07 09:48:29 -05:00
Jason Wen
e682957101 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#533)
* cabana: enhance message heatmap visualization (#34239)

* enhance message heatmap visualization

* TODO

* improve log_factor

* typo

* bit_flip_counts

* Openpilot webcam support improved (#34215)

* control webcam with ENV vars

* WIP: actual instructions

* wording

* file no longer exists

* this is expected behavior, just untested

* more readable

* tested on fresh install

* wording tweaks

* explicit USE_WEBCAM toggle required

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* debug-ability improved

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* newline removed

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update metadrive wheel (#34292)

* test

* new wheel

* fix IR power scaling (#34293)

* fix IR power scaling

* Update system/hardware/tici/hardware.h

* replay: Update video immediately after seek when paused. (#34237)

replay: Update video immediately after seeking when paused.

Otherwise, if paused then have to resume playback for the video
frame to update and show the new location.

Implemented by temporarily un-pausing replay for a single
frame time.

* cabana: add live and time-window heatmap modes for enhanced signal analysis (#34296)

add live and time-window heatmap modes

* timed: diff against absolute value of timedelta (#34299)

* cabana: miscellaneous bug fixes and enhancements (#34297)

* toHexString

* use QToolBar

* fix incorrect groove rect

* limit CAN_MAX_DATA_BYTES

* add series type selector to chart toolbar

* dim inactive messages

* rename

* add help to chart

* cleanup

* cabana: real-time cursor and video frame sync for chart and video (#34301)

* sync cursor and thumbnail between chart and video

* Revert "replay: Update video immediately after seek when paused. (#34237)"

This reverts commit 3363881844.

* use thumbnails while scrubing

* draw alert

* no update on resume

* draw timestamp

* cleanup

* replay:  fix various synchronization and event handling issues (#34254)

fix various synchronization and event handling issues

* cabana: fix crash in live streaming mode by skipping thumbnail display (#34302)

resolve crash in live streaming mode

* bump panda

* [bot] Update Python packages (#34304)

Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>

* cleanup touch_replay (#34305)

mathematics

* uv from brew doesn't have self update

* Skip registration on newer devices (#34316)

* tici: fix cpp device type (#34315)

fix cpp

* Tinygrad upstream master (#34325)

Upstream master

* [bot] Update Python packages (#34320)

Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>

* cabana: fix missing transmitter after undoing DBC message removal (#34329)

fix missing transmitter after undoing DBC message removal

* Quick GC pass heading into 2025 (#34330)

* first pass

* bye bye snpe

* [bot] Update Python packages (#34334)

Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>

* Notre Dame model in tinygrad (#34324)

* release model: 6f23a03f-486b-4d3e-a314-19d149644c7c/700

* old style model in tinygrad

* fix desire

* tg hack

* 20Hz

* no gas probs

* No gas here

* better indexing

---------

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>

---------

Co-authored-by: Dean Lee <deanlee3@gmail.com>
Co-authored-by: Mike Busuttil <31480000+MikeBusuttil@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
Co-authored-by: Angus Gratton <gus@projectgus.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2025-01-07 06:28:20 +00:00
Jason Wen
c13f159a77 Revert "models: retain SNPE runner support" (#529)
Revert "models: retain SNPE runner support (#522)"

This reverts commit f84d27c4ee.
2025-01-06 22:06:50 +00:00
DevTekVE
8970a7aa5b ui: prevent driving model change with offroad transition (#524)
* Update model manager logic and handle offroad transitions

Added is_onroad state tracking in SoftwarePanelSP to handle offroad transitions. Updated model manager conditions for improved bundle validation. Removed unnecessary clear operation for ModelManager_DownloadIndex during offroad transitions to optimize behavior.

* Using is_onroad softwarePanel

* Enable model label button only when conditions are met

Previously, the button's state update was misplaced, leading to potential issues with its interactive availability. The logic has been adjusted to ensure it is properly enabled or disabled based on onroad status and download progress. This change improves UX consistency and prevents unintended actions.

* Remove redundant setEnabled call for currentModelLblBtn

The setEnabled call was unnecessary as its functionality was not required in this context. Cleaning up this code improves readability and removes redundant operations. No changes to functionality or behavior were introduced.

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-05 18:58:10 -05:00
Jason Wen
f84d27c4ee models: retain SNPE runner support (#522)
* tinygrad with snpe

* force with snpe to validate

* fix path

* fix more paths

* Adjust modeld execution logic based on active model runner

Introduced a check to conditionally execute `modeld` based on the active model runner. Added support for distinguishing between SNPE and TinyGrad runners using new helper functions and updated `custom.capnp` definitions. This change optimizes process management by ensuring compatibility with the selected model runner.

* Refactor modeld process function checks.

Introduce `is_stock_model` to clarify logic and replace direct uses of `is_snpe_model` where the stock model condition is needed. Additionally, rename the duplicate "modeld" process in sunnyPilot to "modeld_snpe" for clarity and consistency.

* ignore tg

* fix process name

* ruff

* fix thneed paths

* mypy

* remove our own

* use upstream compile3

* fix thneed

* try this

* Revert "remove our own"

This reverts commit 1cf4f57502.

* try using compile2.py again

* add back symlink

* fix path

* more fix

* wrong path again

* Revert "wrong path again"

This reverts commit f5301c19d5.

* update

* hardcode path to our submodule

* force path

* try this

* fix file name

* try this

* again

* Revert "again"

This reverts commit 17c8cd7376.

* Revert "try this"

This reverts commit 767f78bbcf.

* Revert "fix file name"

This reverts commit 485eef68da.

* Revert "try this"

This reverts commit 41fef87680.

* Revert "force path"

This reverts commit 5c3b408937.

* Revert "hardcode path to our submodule"

This reverts commit 5ee1950b6f.

* Revert "update"

This reverts commit fb313bd7fb.

* Reapply "wrong path again"

This reverts commit 309639aeb3.

* Revert "wrong path again"

This reverts commit f5301c19d5.

* Revert "more fix"

This reverts commit 23dd423e78.

* Revert "fix path"

This reverts commit 75d338f2bd.

* Revert "add back symlink"

This reverts commit 9f71ad0b8a.

* Revert "try using compile2.py again"

This reverts commit 914117d2e1.

* Reapply "remove our own"

This reverts commit b1996377b3.

* don't even compile anymore

* need it for default snpe model

* add to lfs

* bring onnx back for sim

* must add this back

* need this

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-05 17:47:27 -05:00
DevTekVE
c12c22eac7 ui: onroad skeleton (#521)
* onroad init

* init model renderer

* Add default virtual destructors to HudRenderer and AnnotatedCameraWidget

This ensures proper cleanup of derived classes if they override these destructors. Adding default destructors promotes better memory safety and adheres to modern C++ best practices.

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-05 05:14:18 -05:00
DevTekVE
5b1bfc26db ui: add sunnylink settings and sidebar status (#503)
* Add Sunnylink integration for improved device communication

This commit introduces Sunnylink support, including modules for API interactions, device registration, logging, and uploader processes. Key changes involve adding Sunnylink-related components, such as sunnylinkd, manage_sunnylinkd, and associated utilities, along with seamless integration into process management.

* Refactor Sunnylink modules and update import paths

Standardize parameter handling in Sunnylink functions by initializing Params within functions as needed. Update imports to use fully-qualified paths for better clarity and consistency. Also, refactor logging messages for improved readability and maintainability.

* Add Sunnylink support and improve log handling

Introduced Sunnylink-specific functionality, including compression for oversized logs and platform-specific socket handling for macOS. Improved logging mechanisms, refactored log queue management, and fixed exception handling in sunnylinkd.

* Refactor and fix minor coding style inconsistencies

Remove unnecessary string concatenation, adjust spacing for better readability, and ensure cleaner code in `athenad.py` and `sunnylink.py`. Added a macOS-specific comment for TCP_KEEPALIVE configuration to improve code clarity.

* Replace platform system check with sys platform in athenad.py

To check for macOS platform, the code in athenad.py has been altered. Originally, the platform.system() function was used. However, the function has been replaced with sys.platform for a more consistent and preferable syntax. Particularly, this has been modified in the context of setting socket options.

* Apply suggestions from code review

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Simplify imports and reformat API function.

Removed unused `platform` import for cleanup in `athenad.py`. Improved readability of `api_get` in `__init__.py` by reformatting the long return statement into multiple lines.

* Adjust backoff logic and refactor API call formatting.

Introduce randomness to backoff calculation in Sunnylink API to reduce synchronization issues. Minor code refactoring improves readability in the API call logic.

* Refactor Sunnylink network check logic.

Removed hardware-based network check due to performance concerns and replaced it with a real-time device state monitoring loop. This improves efficiency and ensures accurate online status before proceeding with Sunnylink registration.

* Apply suggestions from code review

* `Refactor saveParams error handling and simplify logic`

Removed redundant try-except block wrapping the entire method for clarity. Moved error logging directly inside the loop to handle individual parameter exceptions more effectively. Simplified dictionary construction and improved error logging format.

* Add BACKUP flag to select persistent parameters

This commit introduces a new BACKUP flag and applies it to specific persistent parameters in `params.cc` and `params.h`. The BACKUP flag enhances data retention by designating parameters for inclusion in backups, ensuring crucial information is preserved across sessions.

* Simplify Sunnypilot params formatting

Removed unnecessary blank lines and adjusted the Sunnypilot comment format for better readability and consistency. No functional changes were made.

* SP: Move Sunnypilot-related code to sunnypilot/sunnylink (#504)

* Refactor and relocate sunnylink-related modules

sunnylink components have been reorganized for better modularity and clarity, with files moved under `sunnypilot/sunnylink`. Unused code was removed, and reusable utilities were separated for easier maintenance. Adjusted references across the project to reflect these changes.

* Permissions

* adding init py

* Add sunnylink toggle to developer panel and translations

This commit introduces a new toggle for enabling or disabling sunnylink in the developer panel. Corresponding translation entries have been added for all supported languages to ensure compatibility across the UI.

* Add SunnyLink integration and multi-language support updates

Enhanced SidebarSP with SunnyLink connection status and temperature display. Extended translations for multiple languages, including new strings. Updated build scripts and added utility functions for SunnyPilot-specific features.

* Need it this way as it's intentionally shortened. Sorry

* format

* only block drawing

* format

* format

* fix path

* cleanup translations

* sunnylink panel

* offroad transition

* remove stretch

* add panel to ui preview

* Translating to spanish

* just reorder params

* Refactor sidebar drawing method names and remove unused code.

Renamed `paintSidebar` to `drawSidebar` for better clarity across both `Sidebar` and `SidebarSP` classes. Removed unused utility functions `drawRoundedRect` and `interpColor` to streamline the codebase and improve maintainability.

* Updating translations

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-05 10:47:28 +01:00
DevTekVE
0b1d97fc72 sunnylink support (#499)
* Add Sunnylink integration for improved device communication

This commit introduces Sunnylink support, including modules for API interactions, device registration, logging, and uploader processes. Key changes involve adding Sunnylink-related components, such as sunnylinkd, manage_sunnylinkd, and associated utilities, along with seamless integration into process management.

* Refactor Sunnylink modules and update import paths

Standardize parameter handling in Sunnylink functions by initializing Params within functions as needed. Update imports to use fully-qualified paths for better clarity and consistency. Also, refactor logging messages for improved readability and maintainability.

* Add Sunnylink support and improve log handling

Introduced Sunnylink-specific functionality, including compression for oversized logs and platform-specific socket handling for macOS. Improved logging mechanisms, refactored log queue management, and fixed exception handling in sunnylinkd.

* Refactor and fix minor coding style inconsistencies

Remove unnecessary string concatenation, adjust spacing for better readability, and ensure cleaner code in `athenad.py` and `sunnylink.py`. Added a macOS-specific comment for TCP_KEEPALIVE configuration to improve code clarity.

* Replace platform system check with sys platform in athenad.py

To check for macOS platform, the code in athenad.py has been altered. Originally, the platform.system() function was used. However, the function has been replaced with sys.platform for a more consistent and preferable syntax. Particularly, this has been modified in the context of setting socket options.

* Apply suggestions from code review

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Simplify imports and reformat API function.

Removed unused `platform` import for cleanup in `athenad.py`. Improved readability of `api_get` in `__init__.py` by reformatting the long return statement into multiple lines.

* Adjust backoff logic and refactor API call formatting.

Introduce randomness to backoff calculation in Sunnylink API to reduce synchronization issues. Minor code refactoring improves readability in the API call logic.

* Refactor Sunnylink network check logic.

Removed hardware-based network check due to performance concerns and replaced it with a real-time device state monitoring loop. This improves efficiency and ensures accurate online status before proceeding with Sunnylink registration.

* Apply suggestions from code review

* `Refactor saveParams error handling and simplify logic`

Removed redundant try-except block wrapping the entire method for clarity. Moved error logging directly inside the loop to handle individual parameter exceptions more effectively. Simplified dictionary construction and improved error logging format.

* Add BACKUP flag to select persistent parameters

This commit introduces a new BACKUP flag and applies it to specific persistent parameters in `params.cc` and `params.h`. The BACKUP flag enhances data retention by designating parameters for inclusion in backups, ensuring crucial information is preserved across sessions.

* Simplify Sunnypilot params formatting

Removed unnecessary blank lines and adjusted the Sunnypilot comment format for better readability and consistency. No functional changes were made.

* SP: Move Sunnypilot-related code to sunnypilot/sunnylink (#504)

* Refactor and relocate sunnylink-related modules

sunnylink components have been reorganized for better modularity and clarity, with files moved under `sunnypilot/sunnylink`. Unused code was removed, and reusable utilities were separated for easier maintenance. Adjusted references across the project to reflect these changes.

* Permissions

* adding init py

* more

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-05 02:27:44 -05:00
Jason Wen
9c58fa1020 ui: remove stretch in sunnypilot panel (#520)
* no need to stretch for listwidget

* button moved
2025-01-05 01:59:30 -05:00
DevTekVE
ee5c1c4507 Modular Assistive Driving System (MADS) (#446)
* allow re-regage

* bump opendbc

* bump panda

* apply pause/resume fix for hyundai (should do this in a separate PR)

* bump opendbc

* fix

* rename

* Fix?

* make sure to disengage for allow always cars

* fix

* combine

* more fix

* not needed

* check if engagement is from openpilot's state machine

* Rename

* fix panda safety

* fix

* no fake lfa button for @devtekve ;)

* fix non drive gear re-engage

* fix settings

* combine

* add replace method

* use replace

* remoev already checks if it exists

* fix

* group

* add todo

* reserve events

* cleaner

* hyundai: only allow for cars with lfa button

* sunnyParams

* make sure it's car only

* Move car-specific changes to opendbc

* no need

* bump opendbc

* more fixes

* no more available

* more!

* final?

* always emit user disable

* no longer needed

* move unit test

* add sunnypilot to unit tests

* bump opendbc

* use new cereal

* bump opendbc

* static analysis

* no unittest

* no need available

* UI border update

* show MADS updates

* Add TODO

* no longer needed

* fix changed events

* fix cluster enabled

* don't add pre enable if not long

* should use enabled

* enabled <-> active

* better format

* bump opendbc

* static analysis

* static analysis

* Rename test as collector was dying

* Show our overriding

* Revert "show MADS updates"

This reverts commit daf0ad62

Revert "fix changed events"

This reverts commit 31d8c97f

* ignoring reserved events

* adjusting creation delays

* back to stock

removing allow_cancel

* should be enabled

* revert

* silent lkas disable

* no need

* user disable tests

* just warning

* MUST REMOVE test process replay

* fix no entry

* fixme

* bump opendbc

* need this check

* cleanup

* allow entering paused state if no entry from disabled

* brake hold should apply to all

* in lists

* update unit test

* simpler

* unused

* same thing

* fix

* only mads in enabled state and long in disabled state

* unify silent enable

* do this for dlob

* bump submodules

* fix

* bump submodules

* bump opendbc

* less frequent

* more events

* fix

* allow no entry to paused for non-drive gears

* fix

* use cereal

* Revert "allow no entry to paused for non-drive gears"

This reverts commit 6d64a4dd9c.

* allow in all

* Revert "allow in all"

This reverts commit 6375f14891.

* should not be all!

* rename for clarity

* silent park brake

* flipped

* bump submodules

* Bump to latest mads-new panda

* bump panda

* more nissan

* bump panda

* bump msgq

* bump panda

* bump submodules

* bump opendbc

* bump opendbc

* improving the state

* Revert "PlayStation® model (#34133)"

This reverts commit 5160bee543.

* should be none

* bump panda

* bump opendbc

* Apply suggestions from code review

* bump panda

* bump ref panda

* add todo-sp

* bump panda ref

* bump more panda

* changing refs

* nuke nuke nuke

* use sunny's newer states

* bump with new panda

* bump panda

* Parse more flags from alt exp, more tests, hyundai main cruise allowed

* Parse more flags from alt exp, more tests, hyundai main cruise allowed

* missed

* mutation for controls allowed rising edge

* ford mutation

* license

* remove

* unused

* bump submodules

* use always allowed mads button alt exp

* fix

* whitelist jason's lastname to codespell

* test_processes: update ref logs to 82c0278

* bump submodules

* bump submodules

* bump submodules

* bump panda

* add controls mismatch lateral event

* Simplify lateral disengagement logic for MADS configuration

Reversed the conditional to align the logic with the `disengage_lateral_on_brake` parameter. This ensures that lateral disengagement behavior is more intuitive and matches the expected configuration. Improves code readability and reduces potential misconfigurations.

* remove unified engagement mode in panda

* controls allow should be allowed at all times

* squash! treat MADS button as user entry

* heartbeat for mads

* heartbeat mismatch exit control

* remove always allow mads button from alt

* move to safety_mads

* remove main cruise allowed from alt

* bump panda

* heartbeat engaged mads mismatch mutation test

* bump panda

* use mads the third panda

* ignore pre enable with mads

* only force exit if actually actuating

* use brake signal instead of pedal events when dlob is active

* fix tests

* fix panda tests

* bump panda

* new events to retain long blocks

* format

* uem: do not engage mads if long is engaged

* bump submodules

* fix not allowed engaged bug

* block uem from engaging

* flipped

* use different heartbeat check if dlob

* hard code to skip heartbeat check

* remove toyota lta status for lkas, causes weird behaviors

* block tesla

* bump panda

* bump to merged panda

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* Apply suggestions from code review

* code ignore spells

* needs to be in carstate

* Bump opendbc

* Update MADS toggle descriptions for clarity.

Added notes to clarify behavior of the "MadsMainCruiseAllowed" setting, particularly its impact on vehicles without LFA/LKAS buttons. This ensures users are informed about potential implications when disabling this feature.

* Updating translations + Adding spanish

* Disengage Lateral on Brake -> Pause Lateral on Brake

* test_processes: update ref logs to dd41005

* Apply suggestions from code review

* fix mads button not allowed

* bump submodules

* bump submodule

* test_processes: update ref logs to 0a0b998

* has multiple lists

* Revert "has multiple lists"

This reverts commit a37c1d26fe.

* base

* Reapply "has multiple lists"

This reverts commit d1cd8dcc81.

* migrate mads toggles to sp panel

* this is why it keeps crashing

* house keeping

* more housekeeping

* more housekeeping

* don't show description by default (yet)

* reset to main panel when clicked away

* more

* some more with interactions

* don't stretch cause it looks weird with descriptions

* simpler to handle offroad transition

* some are toggleable while onroad

* remove unused event

* slight cleanup

* default to true for HKG main cruise toggle

* append to list after

* add Customize MADS to UI preview

* simpler

* move to sp list

* how tf was this removed

* update mads settings button on show event

* test_processes: update ref logs to efa9c32

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-04 20:48:02 -05:00
DevTekVE
993c4a0d2a Driving Model Manager (#457)
* Introduce Model Manager to handle downloads and verification

This commit introduces a new Model Manager responsible for handling model downloads, including driving and navigation application models. The manager also verifies file hashes and communicates download progress for an improved user experience.

The Model Manager is asynchronous and utilizes asyncio and aiohttp for enhanced performance, including robust error handling.

Impacted files in the 'cereal', 'common', 'sunnypilot', and 'system' directories have been updated accordingly. The 'ModelsFetcher' process configuration has been modified to run only when off-road, ensuring optimum resource management.

This update aims to enhance code clarity, improve performance, and streamline the handling of model downloads.

* "Update model management and fetching for SunnyPilot"

This update refactors the model management, downloading and cache verification mechanisms of SunnyPilot. New functionalities, such as smart cache handling, have been implemented in ModelFetcher in sunnypilot/models/model_fetcher.py. Also, the model downloading process has been moved to a separate async function _download_bundle in ModelManagerSP in sunnypilot/models/model_manager.py. Hash verification of files is now performed in an async function verify_file in sunnypilot/models/model_helper.py. Changes in system parameters related to model management have been reflected in system/manager/manager.py.

* Integrate download ETA calculations in model manager

This commit introduces a new feature that calculates and tracks the Estimated Time of Arrival (ETA) for downloading models in the model manager component. The 'eta' property in the 'DownloadProgress' structure in 'custom.capnp' is changed from 'Float32' to 'UInt32'.

In the 'model_manager.py' file, a new method '_calculate_eta' has been added to perform ETA calculations. An additional dictionary '_download_start_times' has been created to keep track of the start time of each model download. The ETA is calculated every time a portion of the model file is downloaded, and it gets updated in the 'DownloadProgress' structure. Finally, the start time is cleared after the download completes.

In 'model_manager_audit.py', an additional check is added to only print downloadProgress for the downloads currently in progress.

* format

* no default model cache {} because it can be considered a valid json, we do not want that

* Refactor typing annotations to use PEP 604 syntax.

Updated type hints to adopt PEP 604 union syntax (`X | None`) and replaced `List` and `Dict` with modern built-in `list` and `dict`. This change improves consistency and readability while aligning with Python 3.10+ standards.

* Simplify logging messages and remove unused imports.

Removed an unused import from `model_manager.py` to improve clarity and maintainability. Also refined a log message in `model_fetcher.py` by removing unnecessary formatting for consistency.

* Refactor model handling and simplify cache fallback logic.

Updated type annotations for `selected_bundle` in `model_manager.py` for clarity. Streamlined cache fallback logic in `model_fetcher.py` by removing redundant conditionals while preserving functionality. These changes improve code readability and maintainability.

* "Fix formatting for ModelManager_DownloadIndex retrieval

Condensed parameter alignment in the get method for improved readability and adherence to style guidelines. This change does not affect functionality but ensures consistent code formatting."

* Need to have main defined for process_config to be able to run it

* Refactor model management to support active bundle tracking

Introduce the concept of an active model bundle with a new persistent parameter and API updates. Added fields for `generation` and `environment` in model metadata, improved caching, and updated methods to manage active model states efficiently.

* UI commit (#515)

* Refactor model management to support active bundle tracking

Introduce the concept of an active model bundle with a new persistent parameter and API updates. Added fields for `generation` and `environment` in model metadata, improved caching, and updated methods to manage active model states efficiently.

* Add new driving model selection feature to settings

This commit introduces a new feature to the settings that allows users to select different driving models. It fetches available models and displays their download progress. The created UI also suggests a calibration reset after model download. The changes include the creation of 'SoftwarePanelSP' within 'settings.' Additionally, 'sunnypilot/SConscript' has been updated to include 'settings.cc' and 'software_panel.cc'. Changes also include localization for this feature.

* Show model description during download status

This update ensures the model description is displayed when a model is in the downloading state. It improves the user interface by providing real-time feedback during the download process.

* Update translations for multiple languages

Added new and updated translation strings in several language files, including Spanish, Arabic, Chinese (Simplified and Traditional), Turkish, Korean, Thai, Japanese, and Brazilian Portuguese. These updates include placeholder translations for new UI elements and features.

* Refactor model name handling and add generation check.

Replaced `bundleName` with `model_name` for better clarity in status messages. Added a generation mismatch check before showing the reset parameters dialog to avoid unnecessary prompts.

* Update model handling in SoftwarePanelSP

Remove unused "common/model.h" and replace "CURRENT_MODEL" with "..." as the default return value in GetModelName. Adjust logic to check for active bundles instead of selected bundles for improved accuracy. Minor text change for clarity in UI label.

* Rename `GetModelName` to `GetActiveModelName` for clarity.

The new name better reflects the function's purpose of retrieving the active model name, improving code readability. All relevant calls and references have been updated to ensure consistency across the codebase.

* Update sunnypilot/models/model_helper.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Refactor download status handling and add 'cached' state

Introduce 'cached' as a new download status and adjust relevant logic across components to support it. Simplify and streamline model status handling in the software panel for better readability and maintainability. Ensure consistent status reporting for all model types.

* Update translations for multiple languages

Refined and expanded translations across various languages, replacing placeholders with meaningful text. This improves clarity and user experience in the multilingual interface.

* Update terminology from 'bundle' to 'model' in UI texts

Replaced occurrences of 'bundle' with 'model' in button labels, dialog titles, and messages in the SoftwarePanelSP code. This improves clarity and aligns terminology with current functionality.

* Update translation placeholders for model fetching texts

Replaced "Fetching bundles" with "Fetching models" across multiple languages to align text placeholders with the updated functionality. Adjusted related background download messages for clarity and consistency.

* cleanup

* not used, and likely not needed

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* cleaning up

* Update system/manager/process_config.py

* Simplify model parsing and index handling logic.

Refactored `ModelManager_DownloadIndex` retrieval to use the walrus operator, streamlining the conditional logic. Additionally, restructured model list initialization in `_parse_bundle` for improved readability and maintainability. These changes enhance code clarity and reduce redundancy.

* `Improve error handling in model cache retrieval`

Revised the `get` method to ensure it returns an empty dictionary on errors or missing data, avoiding potential `None`-related issues. Added logging for clearer diagnostics when cached model data is unavailable or retrieval fails. This improves reliability and debuggability of the model fetching process.

* Fix cached model data handling by parsing JSON response

Previously, cached model data was returned as a raw string, causing potential issues when using the data. The change ensures the cached data is properly parsed into JSON format before returning, improving reliability and consistency.

* Adjust modelManagerSP rate and Ratekeeper frequency

Reduced the rate for modelManagerSP in services and aligned the Ratekeeper frequency in model_manager.py to 0.1.

* Update model fetcher URL and adjust modelManagerSP rate

Updated the model fetcher URL to point to the correct resource for driving models. Adjusted the rate of modelManagerSP in both its service definition and the corresponding Ratekeeper initialization to 1 Hz for improved consistency.

* Refactor model download logic for clarity and efficiency

Simplify the logic for finding the model to download by combining redundant constructs into a single line. This improves code readability and reduces unnecessary variable assignments.

* Fix cache keys for manual prebuilt actions because they were missing the cache when manually built

* no need to log

* formatting

* revert ci changes

* Refactor and restructure `modeld` to `models` module.

Renamed `modeld` directory to `models` for clarity and consistency. Updated all references and imports to reflect the new structure. This improves maintainability and aligns with naming conventions.

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-04 15:05:21 -05:00
DevTekVE
63f0237e7a prebuilt: Squash and merge script (#497)
* Add script for squash and merge workflow automation

Introduced `squash_and_merge.py` to automate the process of squashing a source branch and merging it into a target branch. The script handles backups, commit message creation, stashing, cleanup, and includes optional push functionality. Provides user prompts and error handling to simplify complex merge workflows.

* temp1

* Switch to PEP 604 style for optional and generic type hints

Replaces `Optional` and `List` with the simpler `X | None` and `list[X]` syntax introduced in Python 3.10. Updated all function signatures accordingly for consistency and modernity. Also made minor string formatting consistency adjustments.

* Fix type annotation for temp_branch variable

Updated the temp_branch variable to include a proper type annotation (`str | None`). This change improves code clarity and aligns with Python typing standards.

* more hints
2025-01-04 09:43:03 +01:00
Jason Wen
a3ab6db7eb ui: sunnypilot panel in settings (#513)
* ui: sunnypilot panel in settings

* add panel to comment

* test populate screenshot

* Revert "test populate screenshot"

This reverts commit 426b6c26c5.
2025-01-03 17:18:38 -05:00
Jason Wen
3a64efe52f Bump submodules 2025-01-03 15:07:10 -05:00
Jason Wen
3966599e9d ui: sunnypilot offroad UI (#512)
* Revert "Revert "ui: sunnypilot offroad UI" (#511)"

This reverts commit 0e264e1b05.

* Revert "move files to sp dir"

This reverts commit c72d732259.

* remove drive stats for now

* update translation

* update onboarding

* remove sp onboarding for now

* rearrange

* remove more

* shorter license
2025-01-03 15:04:09 -05:00
Jason Wen
0e264e1b05 Revert "ui: sunnypilot offroad UI" (#511)
Revert "ui: sunnypilot offroad UI (#500)"

This reverts commit 3717a111af.
2025-01-03 11:02:19 -05:00
Jason Wen
3717a111af ui: sunnypilot offroad UI (#500)
* add sp flag

* return if sp macro

* controls

* drive stats

* some more

* more

* skip the whole thing

* missed

* more

* more main

* not ready to push yet but sure

* get them icons

* later

* own icons

* Revert "own icons"

This reverts commit e07bd8e670.

* blank icon

* render differently on mac

* static

* set toggle and title space properly

* format

* remove prior objects

* good spacing for ButtonParamControlSP

* more space formatting

* on device fix

* update home wifi prompt

* handle AbstractControlSP_SELECTOR hide events properly

* use sp

* ignore name

* more

* keep spacing

* better flag

* settings button moved

* small cleanup

* move files to sp dir

* remove for now

* developer different icon

* add scrolling to ui test

* Revert "add scrolling to ui test"

This reverts commit c8d1c65d89.

* format

* make them virtual

* do we still need this?

* Apply suggestions from code review

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

* revert for now

* shorter license

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-03 09:36:36 -05:00
DevTekVE
262d17ead2 Tools: Setup CLion run configs and external tools (#486)
* Add CLion run configs and external tools setup

Introduced CLion configuration files for "Build Debug" and "Build Release," along with external tool definitions for Poetry SCons commands. Additionally, commented out `.idea` in `.gitignore` to track necessary project-specific settings.

* rename

* only exclude specific files from gitignore

* wildcard

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2024-12-24 01:14:06 -05:00
DevTekVE
0bfa9fca88 SP: GitHub runner as service and able to toggle via developer panel (#494)
* Add support for GitHub Actions runner management

Introduce a new process and configuration to manage a GitHub Actions runner. Added a persistent "EnableGithubRunner" parameter and a script to control the runner service. Integrated the feature into the system's process manager logic.

* Restrict GitHub runner usage on metered networks.

This update modifies the `use_github_runner` function to include a check for metered networks using `HARDWARE.get_network_metered()`. This ensures the GitHub runner is not enabled when the network is metered, improving network usage efficiency.

* Add GitHub runner service toggle to developer panel

Introduces a new toggle in the developer panel to enable or disable the GitHub runner service. This provides developers with a convenient way to control the service from the UI.

* translations

* Refactor network condition check for GitHub runner.

Updated `use_github_runner` to include network type in metered network checks. This ensures more accurate validation by considering specific network types when determining metered status.

* Mark as executable

* Update paths and shebangs for consistency across scripts

Modified file paths to align with the new directory structure under `/data/media/0/github` and updated the shebang in `github_runner.sh` for better environment compatibility. Adjusted the `BUILD_DIR` in the GitHub workflow to reflect the new path.

* Fix string translation for GitHub runner parameter text

Added translation support for the GitHub runner service description text. This ensures consistent localization across the UI.

* Remove gitlab_runner.sh from Sunnypilot blacklist.

The script is no longer required to be blacklisted, likely due to updates or changes in its usage. This improves the maintainability of the blacklist by removing unnecessary entries.

* lang stuff

* Update BASE_DIR determination based on mount point

Refactored scripts to dynamically set BASE_DIR depending on whether /data/media is a valid mount point. This ensures compatibility with different environments and improves robustness of path resolution.

* Refactor GitHub runner logic in process_config.

Simplified enabling conditions for the GitHub runner by removing dependency on hardware network checks and adding a logical combination of offroad and runner-related functions. This improves code readability and reduces hardware coupling.
2024-12-23 09:19:26 +01:00
DevTekVE
cd73feec57 ci: Update version identifier in workflow for staging and release (#496)
Update version identifier in workflow for staging and release

Appended "-staging" and "-release" to the VERSION variable in the GitHub Actions workflow to clearly distinguish build types. This ensures clarity in versioning for staging and release environments.
2024-12-23 01:47:41 +01:00
DevTekVE
bd49be185f ci: enable macos runners again (#495)
no need to block macos anymore. Turns out runners are free on github public repos
2024-12-23 01:03:21 +01:00
DevTekVE
37e493ce0d CI: Add GitHub Action to build models from upstream (#491)
* Add support for custom model naming in workflow

This update introduces a new optional input `custom_name` to the `sunnypilot-build-model` GitHub workflow. If provided, it customizes the artifact name; otherwise, the default naming scheme is used. This enhances flexibility for build artifact identification.

* fix name

* Update cache key logic in build workflow

Replaced `github.ref_name` with a fallback to `github.head_ref || github.ref_name` in cache keys to handle branches and pull requests more reliably. This ensures consistent cache retrieval and improves workflow efficiency.

* Simplify artifact upload logic in CI workflow

Consolidated redundant artifact upload steps into a single action, leveraging a fallback mechanism for naming. This streamlines the workflow, reducing duplication and improving maintainability.

* Make publish step resilient and add conditional notify

Added `continue-on-error` to the publish step to allow workflow progression even if it fails. Introduced a condition to notify step that depends on publish outcome being successful. These changes improve workflow reliability and error handling.

* Fix conditional syntax in GitHub Actions workflow

Updated the conditional statement in the notify job to use the correct GitHub Actions expression syntax. This ensures proper evaluation of the publish step's success outcome.

* Update condition for notify step in GitHub Actions workflow

Replaced the deprecated syntax `${{ steps.publish.outcome == 'success' }}` with the recommended `success()` function. This ensures compatibility with newer GitHub Actions features and improves maintainability.

* Update build workflow to handle PR drafts and improve concurrency

Added support for pull request draft events to trigger the workflow, ensuring drafts are not missed. Removed `continue-on-error` in the publish step to improve reliability and prevent silent failures. Simplifies and enhances workflow robustness.

* Update pull request workflows and add draft check logic

Removed unnecessary pull request event types and drafts settings, consolidating logic. Added a condition to skip publishing for non-draft pull requests, ensuring better control over the deployment process.
2024-12-23 00:37:02 +01:00
DevTekVE
e114dc5a6f CI: Use environments for manual approvals on GH Actions for feature branches (#493)
* We no longer need to dispatch manually a workflow, it will wait for the publish to be approved for feature branches.
* The notification template has been extracted to a variable for the repo, meaning no need to do commit push to update it! (https://github.com/sunnypilot/sunnypilot/settings/variables/actions/DISCORD_GENERAL_UPDATE_NOTICE)
* The configuration for what can be auto deployed is now also a variable, no need to commit a change to update that (https://github.com/sunnypilot/sunnypilot/settings/variables/actions/AUTO_DEPLOY_PREBUILT_BRANCHES)
* The configuration for what sends a message on `#dev-feedback` channel on discord is also configurable (https://github.com/sunnypilot/sunnypilot/settings/variables/actions/DEV_FEEDBACK_NOTIFICATION_BRANCHES)
2024-12-22 18:18:21 +01:00
DevTekVE
ad537fcb89 CI: Build prebuilts and models from github and self hosted runners (#476)
* Create a GitHub Actions workflow for synchronizing the repository to GitLab and enhance GitLab CI settings

A new GitHub Actions workflow for mirroring the current repository to GitLab is added. This workflow is triggered by both push and delete events in addition to manual triggering. The role of GitHub actions runner is defined through a series of steps. A new '.gitlab-ci.yml' build configuration file is also introduced, with a more comprehensive definition of variables, jobs, and pipeline rules for its utilization in the GitLab CI/CD pipeline.

Further, other changes include the addition of scripts for installing and uninstalling GitLab CI runner, along with modifying the SCons build system configuration file to include custom cache directory. Moreover, 'release_files.py' has been revised to include additional blacklisted and whitelisted files specific to Sunnypilot, ensuring suitable settings for the CI flow.

The improvements facilitate a smoother integration between GitHub and GitLab, powerfully harnessing the capabilities of both platforms for more efficient and effective CI/CD pipelines and version control management.

* not needed for this

* Update workflow to build model from upstream repository

Revised the CI workflow to build directly from the upstream `commaai/openpilot` repository. Simplified configuration, removed unused steps, and added support for specifying the upstream branch dynamically via inputs.

* Update SConstruct to allow passing arbitrary cache_dir

Modified the SConstruct file to enable setting a custom cache directory via arguments. This enhances flexibility in configuring cache paths during the build process.

* Refactor build workflow to improve branch handling logic.

Reorganized conditions for setting environment variables, replacing repository_dispatch with workflow_dispatch for prebuilt builds. Added a fallback error message for unsupported triggers to improve robustness. This enhances clarity and ensures compatibility with the intended workflow triggers.

* test test test

* test test test

* test test test

* Enable publication flag during build configurations

Added `SHOULD_PUBLISH=true` to all relevant build configuration steps to ensure proper handling of publishing logic. Updated environment variables to include this flag for downstream usage. Removed the error-check step for unsupported configurations.

* Simplify publish condition in workflow logic

Replaced the previous condition for publishing with a single output variable, `should_publish`, to streamline logic and improve maintainability. This change reduces redundancy and makes the workflow more adaptable to future updates.

* Simplify restore key patterns in build workflow.

Removed unnecessary trailing dashes in SCons cache restore keys to streamline and slightly improve key matching logic. This ensures better consistency with the current workflow setup.

* Update cache key usage in build workflow

Replaced `github.ref_name` with `github.head_ref` for cache keys to ensure accurate branch-specific caching. Added fallback restore-keys for master branches to improve cache efficiency and reduce redundant builds.

* Improved debug logging in GitHub actions workflow

This commit refines the debug logging in our GitHub Actions workflow for the Sunnypilot build. This change provides more granularity, enabling logging only during debug mode, which helps to keep the runtime logs less cluttered during normal operations. This includes the conditionally displaying of environmental variables, GitHub output contents, and directory listings.

Additionally, debug mode verbosity was added to rsync commands to aid troubleshooting file transfers during the build process.

Blank lines were also reduced for better readability and cleaner code presentation.

* test diff path

* Refactor SCons cache handling in build workflow

Replaced hardcoded cache directory paths with an environment variable (`SCONS_CACHE_DIR`) for better maintainability and flexibility. Updated related workflow steps to utilize the new variable and adjusted cache key usage. Removed unused `BASE_BUILD_NUMBER` variable to clean up the configuration.

* Update cache key to include commit SHA in workflow

This change adds the commit SHA to the cache key in the GitHub Actions workflow. It ensures more precise caching by differentiating builds based on the specific commit, reducing potential conflicts.

* clean

Update GitHub runner service to set environment variables

Updated the ExecStart command to explicitly set HOME, USER, LOGNAME, and MAIL environment variables. This ensures the runner operates with the correct environment configuration, improving reliability and compatibility.

Refactor GitHub runner service ExecStart command.

Replaced direct command execution with running the service as a specific user using `su`. This improves compatibility and aligns with best practices for user-based execution. No functional changes are expected.

Update GitHub runner service to set environment variables

The ExecStart command now sets HOME, USER, LOGNAME, and MAIL environment variables for the runner process. This ensures proper environment initialization for the designated user, improving compatibility and reliability during execution.

Refactor GitHub runner service template handling.

Revised the `modify_service_template` function to create a properly structured service template for the GitHub runner. Updated service permissions, execution parameters, and enabled the function call to ensure usage during runner setup.

* Refactor GitHub Runner installer to improve argument parsing.

Reworked the script to implement flexible and explicit command-line argument parsing using flags like `--token`, `--repo`, and `--start-at-boot`. Added support for setting default values and enabling/disabling auto-start based on the `--start-at-boot` flag. Improved error handling and usage messaging for better user experience.

* Update cache keys in sunnypilot build workflow

Modified the cache keys to include `github.ref_name` for more precise caching and restore behavior. This improves build consistency by better differentiating between branches and refs. No changes to the overall workflow logic.

* Remove 'tinygrad/*' from release file exclusions

This change modifies the release file exclusions by removing 'tinygrad/*'. The adjustment ensures that files in the 'tinygrad' directory are now included in the release process, aligning with updated packaging requirements.

* Simplify release file exclusions list.

Removed redundant and unnecessary file patterns from the exclusions list in `release_files.py`. This streamlines the file handling process and reduces maintenance overhead.

* Refactor SCons cache path and key structure.

Updated the SCons cache directory path to `SCONS_CACHE_DIR` for clarity and consistency. Improved the caching key structure to include `github.head_ref` for better cache differentiation and restore hierarchy. Adjusted related build instructions to reflect the new environment variable.

* Refactor branch configuration in CI workflow

Standardize branch name handling by replacing hardcoded values with environment variables. This improves maintainability and simplifies updates to branch names across the workflow. Updated references to use the new dynamic environment variable approach.
2024-12-21 20:19:48 +01:00
Jason Wen
cf74e6416c Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#488) 2024-12-19 10:57:30 -05:00
devtekve
7592669d74 test_processes: update ref logs to a20d7a4 2024-12-19 15:46:00 +00:00
DevTekVE
a20d7a4279 Bump panda for sync 2024-12-19 16:30:02 +01:00
DevTekVE
e4fc6ffe7a Merge remote-tracking branch 'comma/master' into sync-20241219-3
# Conflicts:
#	panda
#	selfdrive/test/process_replay/ref_commit
2024-12-19 16:29:02 +01:00
DevTekVE
cf30110d65 CI: cherry pick maxime's fix for pipelines docker (#487)
set python upper bound to 3.13 (#34286)

* try

* test

* ...

* wow

* y

* docker

* <

(cherry picked from commit 9c9b273a3e)

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-12-19 15:50:20 +01:00
DevTekVE
a48d43ec2b CI: adding recurring sync to lfs (#489)
Allows us to automatically keep our LFS in sync with comma's and also to manually perform a sync if we need to. Even able to sync the LFS from a given commit hash or a given branch. Useful for model stuff.
2024-12-19 15:32:40 +01:00
Jason Wen
c8fe86c552 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#484) 2024-12-17 07:04:03 -05:00
Jason Wen
952354c847 test_processes: update ref logs to fffa98e 2024-12-17 06:49:31 -05:00
Jason Wen
fffa98ee85 Merge branch 'upstream/master' into sync-20241712
# Conflicts:
#	.github/workflows/ci_weekly_run.yaml
#	opendbc_repo
#	panda
#	selfdrive/test/process_replay/ref_commit
2024-12-17 06:27:31 -05:00
Jason Wen
c69cd934af Setup sunnypilot package (#483)
Setup sunnypilot as a package
2024-12-16 19:47:29 -05:00
DevTekVE
437663ff98 CI: Fix process replay to properly work with local routes (#469)
Updating test_processes.py to easily upload ref routes locally to git instead of azure
2024-12-11 10:22:45 +01:00
Jason Wen
8b54fb8372 Revert "ci: Skip simulator failures" (#475)
Revert "ci: Skip simulator failures (#470)"

This reverts commit 705dd83a2f.
2024-12-08 20:26:35 -05:00
Jason Wen
0f74e0f760 Sync: commaai/openpilot:master into sunnypilot/openpilot:master-new (#474) 2024-12-08 20:12:29 -05:00
Jason Wen
4cccd07fd6 Merge branch 'upstream/master' into sync-20241208
# Conflicts:
#	.github/workflows/tools_tests.yaml
#	opendbc_repo
2024-12-08 19:40:20 -05:00
Jason Wen
b42c997f83 LFS: Sync refs from upstream (#472)
* Adding script to pull from comma's LFS before pushing to ours

* updating the script a little to allow pulling all when needed if needed

* static ..

* format

* Fuck the simulator always failing

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: devtekve <devtekve@gmail.com>
2024-12-08 22:03:47 +01:00
Jason Wen
6aaa245e65 Revert "LFS: Sync refs from upstream" (#471)
Revert "LFS: Sync refs from upstream (#467)"

This reverts commit 8132fe9f0e.
2024-12-08 15:41:04 -05:00
DevTekVE
705dd83a2f ci: Skip simulator failures (#470)
bai sim for now
2024-12-08 15:11:38 -05:00
DevTekVE
8132fe9f0e LFS: Sync refs from upstream (#467)
* Adding script to pull from comma's LFS before pushing to ours

* updating the script a little to allow pulling all when needed if needed

* static ..

* format

* Fuck the simulator always failing

* Apply suggestions from code review

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2024-12-08 14:39:35 -05:00
DevTekVE
5dc5b6accb ci: Save cache for master-new (#468)
Adding master-new to the whitelisted refs for caching stuff
2024-12-08 13:33:32 -05:00
Jason Wen
cc1bfcf12e Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#465) 2024-12-05 18:12:23 -05:00
Jason Wen
bd6d207c8a Merge branch 'upstream/master' into sync-20241205 2024-12-05 17:48:01 -05:00
Jason Wen
777ff8dcb4 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#459) 2024-11-26 23:44:36 -05:00
Jason Wen
9446dd60d1 Merge branch 'upstream/master' into sync-20241126
# Conflicts:
#	opendbc_repo
2024-11-26 22:54:12 -05:00
Jason Wen
1deae82f12 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#458) 2024-11-23 12:28:14 -05:00
Jason Wen
0649653947 Merge branch 'upstream/master' into sync-20241122 2024-11-23 10:26:18 -05:00
DevTekVE
ab65b19ba5 Hyundai: Enhanced Smart Cruise Control (ESCC) (#443)
* initial updates to the actions to run for sp

* ignore license file

* more updates

* undoing some of the changes because I was blocking the runs on

* allowing the submodule check as well

* Allowing macos builds

* test adding cache key

* don't attempt build_release for selfdrive for the time being.

* Blocking macos builds as well since they have a 10x miltiplier for GH aciton minutes, waaaay too much!

* lol nice typo codespell

* change ref commit id to check if replay passes

* Sync up submodules for ESCC

* Remove ESCC base and interfaces classes

Consolidated ESCC functionalities directly into the Hyundai ESCC module, removing redundant base and interface classes. This simplified the class structure and improved code maintainability.

* Removing hints because they were causing a circular dependency

* bump opendbc

* bump opendbc

* Bump opendbc

* Fixing inconsistencies thanks to the tests!

* Bumping opendbc after fixing tests

* update opendbc

* Updating to the new flags ordinal on cereal

* Reverting some of the misc changes, clarifying naming and passing the scc12 and fca11 values to the methods as they are defined out of order

* undoing more naming changes to simplify diff

* More naming and tiny adjustments

* use constant for msg id

* bump opendbc

* bump submodules

* already added

* bump opendbc

* bump opendbc

* bump opendbc

* fix init

* bump submodules

* bump submodules

* unit test!

* rename

* always use true radar tracks if available

* update comment

* bump submodules

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2024-11-22 09:07:39 -05:00
DevTekVE
36f8192612 ci: sunnypilot UI GH Action fix ensure push to master-ui artifact (#453)
Fixes the GitHub action that was failing when the pipeline was running as a result of a push to master-new because it was not properly recognized as "master"
2024-11-17 09:49:37 +01:00
DevTekVE
4b66cd0577 ci: fix repo permissions in ui preview (#450)
* more fix

* forcing a change on UI to test

* undo ui change for test

* temp add branch

* adding more ways to set the master uo

* more bruteforce

* undoing force
2024-11-16 22:27:29 -05:00
DevTekVE
ad742515f1 ci: sunnypilot show UI diff on PRs (#449)
add master-new as well to the triggers for the diff ui
2024-11-16 23:45:12 +01:00
Jason Wen
2426354d72 bump opendbc (#448)
* bump opendbc

* Bump opendbc to our changed car params

* New Int16 test

* spFlags

* original name?

* Testing more carparams combinations

* Another crazy idea

* typo

* use this field

* bump

* bump opendbc

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2024-11-16 17:04:12 -05:00
DevTekVE
cf55992c26 CI: sunnypilot configuration (#447)
* initial updates to the actions to run for sp

* ignore license file

* more updates

* undoing some of the changes because I was blocking the runs on

* allowing the submodule check as well

* Allowing macos builds

* test adding cache key

* don't attempt build_release for selfdrive for the time being.

* Blocking macos builds as well since they have a 10x miltiplier for GH aciton minutes, waaaay too much!

* lol nice typo codespell

* change ref commit id to check if replay passes
2024-11-16 10:24:47 -05:00
DevTekVE
3da0dfd47f Updating submodules 2024-11-15 08:16:52 +01:00
Jason Wen
6edaf619bf Add Custom MIT License (#438) 2024-11-15 08:11:51 +01:00
1487 changed files with 93257 additions and 58746 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:
...

6
.codespellignore Normal file
View File

@@ -0,0 +1,6 @@
Wen
REGIST
PullRequest
cancelled
FOF
NoO

View File

@@ -13,27 +13,6 @@
*.o-*
*.os
*.os-*
*.so
*.a
venv/
.venv/
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

View File

@@ -5,7 +5,7 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[{*.py, *.pyx, *.pxd}]
[*.{py,pyx,pxd}]
charset = utf-8
indent_style = space
indent_size = 2

6
.gitattributes vendored
View File

@@ -7,12 +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
selfdrive/ui/qt/spinner_larch64 filter=lfs diff=lfs merge=lfs -text
selfdrive/ui/qt/text_larch64 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

11
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,11 @@
* @sunnypilot/dev-internal
/.github/ @devtekve @sunnyhaibin
/release/ci/ @devtekve @sunnyhaibin
/tinygrad_repo @devtekve @Discountchubbs
/tinygrad/ @devtekve @Discountchubbs
/selfdrive/controls/lib/longitudinal_planner.py @devtekve @Discountchubbs
/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @devtekve @Discountchubbs
/selfdrive/modeld/ @devtekve @Discountchubbs
/sunnypilot/model* @devtekve @Discountchubbs
/sunnypilot/sunnylink/ @devtekve
/system/athena/ @devtekve

12
.github/labeler.yaml vendored
View File

@@ -1,6 +1,10 @@
CI / testing:
ci:
- changed-files:
- any-glob-to-all-files: "{.github/**,**/test_*,Jenkinsfile}"
- any-glob-to-all-files: "{.github/**,**/test_*,**/test/**,Jenkinsfile}"
chore:
- changed-files:
- any-glob-to-all-files: "{.github/**}"
car:
- changed-files:
@@ -12,7 +16,7 @@ simulation:
ui:
- changed-files:
- any-glob-to-all-files: 'selfdrive/ui/**'
- any-glob-to-all-files: '{selfdrive/assets/**,selfdrive/ui/**,system/ui/**}'
tools:
- changed-files:
@@ -24,4 +28,4 @@ multilanguage:
autonomy:
- changed-files:
- any-glob-to-all-files: "{selfdrive/modeld/models/**,selfdrive/test/process_replay/model_replay_ref_commit}"
- any-glob-to-all-files: "{selfdrive/modeld/models/**,selfdrive/test/process_replay/model_replay_ref_commit,sunnypilot/modeld*/models/**}"

43
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
exclude-labels:
- 'no-changelog'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
collapse-after: 5
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
collapse-after: 5
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
replacers:
- search: '/[Ss][Uu][Nn][Nn][Yy][Pp][Ii][Ll][Oo][Tt]/g'
replace: 'sunnypilot'
- search: '/\b[Ss][Pp]\b/g'
replace: 'SP'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
name-template: 'v$RESOLVED_VERSION 🚀'
tag-template: 'v$RESOLVED_VERSION'
version-template: "0.$MAJOR.$MINOR.$PATCH" # The day OP becomes v1, we need to bump this
tag-prefix: "v0." # The day OP becomes v1, we need to bump this
prerelease-identifier: "staging"
template: |
## Changes
$CHANGES

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: 'false'
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, edited]
types: [ opened, reopened, synchronize, edited ]
jobs:
labeler:
@@ -9,14 +9,15 @@ jobs:
permissions:
contents: read
pull-requests: write
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
@@ -24,30 +25,67 @@ jobs:
# Check PR target branch
- name: check branch
uses: Vankka/pr-target-branch-action@def32ec9d93514138d6ac0132ee62e120a72aed5
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: /^(?!master$).*/
exclude: /commaai:.*/
exclude: /sunnypilot:.*/
change-to: ${{ github.base_ref }}
already-exists-action: close_this
already-exists-comment: "Your PR should be made against the `master` branch"
# Welcome comment
- name: "First timers PR"
uses: actions/first-interaction@v1
if: github.event.pull_request.head.repo.full_name != 'commaai/openpilot'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |
<!-- _(run_id **${{ github.run_id }}**)_ -->
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
* Convert your PR to a draft unless it's ready to review
* Read the [contributing docs](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md)
* Before marking as "ready for review", ensure:
* the goal is clearly stated in the description
* all the tests are passing
* the change is [something we merge](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md#what-gets-merged)
* include a route or your device' dongle ID if relevant
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'
TRUST_FORK_PR_LABEL: 'trust-fork-pr'
steps:
- name: Check if PR has dev label
id: check-labels
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
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', 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 == '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,
repo: context.repo.repo,
issue_number: prNumber,
body: `The \`${process.env.TRUST_FORK_PR_LABEL}\` label has been automatically removed because new commits were pushed to this PR. This PR will need to be re-reviewed before the label can be applied again.`
});

View File

@@ -5,31 +5,29 @@ 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:
name: create badges
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
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
git checkout --orphan badges
git rm -rf --cached .
git config user.email "badge-researcher@comma.ai"
git config user.email "badge-researcher@sunnypilot.ai"
git config user.name "Badge Researcher"
git add translation_badge.svg

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

@@ -0,0 +1,78 @@
name: cereal validation
on:
push:
branches:
- master
pull_request:
paths:
- 'cereal/**'
workflow_dispatch:
workflow_call:
inputs:
run_number:
default: '1'
required: true
type: string
concurrency:
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:
CI: 1
jobs:
generate_cereal_artifact:
name: Generate cereal validation artifacts
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
submodules: true
- run: ./tools/op.sh setup
- name: Build openpilot
run: scons -j$(nproc) cereal
- name: Generate the log file
run: |
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"
cp cereal/messaging/tests/validate_sp_cereal_upstream.py "cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py"
cp schema_instances.bin "cereal/messaging/tests/cereal_validations/schema_instances.bin"
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: cereal_validations
path: cereal/messaging/tests/cereal_validations
validate_cereal_with_upstream:
name: Validate cereal with Upstream
runs-on: ubuntu-24.04
needs: generate_cereal_artifact
steps:
- 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"
- run: ./tools/op.sh setup
- name: Build openpilot
working-directory: openpilot
run: scons -j$(nproc) cereal
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: cereal_validations
path: openpilot/cereal/messaging/tests/cereal_validations
- name: 'Run the validation'
run: |
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 == 'commaai/openpilot'
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: commaai/openpilot/.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: commaai/openpilot/.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'
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,14 +34,14 @@ jobs:
mkdocs build
# Push to docs.comma.ai
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
- uses: actions/checkout@v6
if: github.ref == 'refs/heads/master' && github.repository == 'sunnypilot/sunnypilot'
with:
path: openpilot-docs
ssh-key: ${{ secrets.OPENPILOT_DOCS_KEY }}
repository: commaai/openpilot-docs
repository: sunnypilot/sunnypilot-docs
- name: Push
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
if: github.ref == 'refs/heads/master' && github.repository == 'sunnypilot/sunnypilot'
run: |
set -x

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,
});

72
.github/workflows/lfs-maintenance.yaml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: Sync comma's LFS
env:
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'
on:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
workflow_dispatch: # enables manual triggering
inputs:
upstream_branch:
default: 'master'
type: string
jobs:
sync:
runs-on: ubuntu-latest
# Skip if PR is in draft mode
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)) && !github.event.pull_request.head.repo.fork
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: 'commaai/openpilot'
ref: ${{ inputs.upstream_branch }}
- name: LFS Fetch
run: |
git lfs fetch
- name: Set up Git
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- 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
echo "Already on a branch, proceeding with push"
else
echo "Detached HEAD state detected, creating temporary branch"
git checkout -b temp_branch
fi
- name: Update LFS Config
run: |
echo '[lfs]' > .lfsconfig
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
echo ' locksverify = false' >> .lfsconfig
- name: Push LFS
id: sync-and-commit
run: |
git lfs ls-files -l
git lfs push --all origin

42
.github/workflows/model_review.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: "model review"
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'selfdrive/modeld/models/*.onnx'
workflow_dispatch:
jobs:
comment:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Checkout master
uses: actions/checkout@v6
with:
ref: master
path: base
- run: git lfs pull
- run: cd base && git lfs pull
- name: scripts/reporter.py
id: report
run: |
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "## Model Review" >> $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
uses: marocchino/sticky-pull-request-comment@baa7203ed60924babbe5dcd0ac8eae3b66ec5e16
with:
header: model-review
message: ${{ steps.report.outputs.content }}

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,13 +6,13 @@ 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:
name: build prebuilt
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
env:
PUSH_IMAGE: true
permissions:
@@ -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

28
.github/workflows/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Release Drafter
on:
push:
branches:
- master
tags:
- 'v*'
pull_request_target:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions:
contents: read
jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -5,50 +5,27 @@ on:
workflow_dispatch:
jobs:
build_masterci:
name: build master-ci
env:
TARGET_DIR: /tmp/openpilot
ImageOS: ubuntu20
container:
image: ghcr.io/commaai/openpilot-base:latest
build___nightly:
name: build __nightly
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
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 != 'workflow_dispatch' }}
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: Build master-ci
run: |
release/build_devel.sh
- name: Run tests
run: |
export PYTHONPATH=$TARGET_DIR
cd $TARGET_DIR
scons -j$(nproc)
pytest -n logical selfdrive/car/tests/test_car_interfaces.py
- name: Push master-ci
run: |
unset TARGET_DIR
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,37 +34,67 @@ jobs:
package_updates:
name: package_updates
runs-on: ubuntu-latest
container:
image: ghcr.io/commaai/openpilot-base:latest
if: github.repository == 'commaai/openpilot'
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 -c submodule."tinygrad".update=none submodule update --remote
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: |
scons -j$(nproc) --minimal opendbc_repo
PYTHONPATH=. python selfdrive/car/docs.py
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,350 +0,0 @@
name: selfdrive
on:
push:
branches:
- master
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.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
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:
name: build release
runs-on:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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: Check submodules
if: github.repository == 'commaai/openpilot'
timeout-minutes: 3
run: release/check-submodules.sh
- 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"
build:
runs-on:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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' && 'namespace-profile-macos-8x14' || 'macos-latest' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Homebrew cache
uses: ./.github/workflows/auto-cache
with:
path: ~/Library/Caches/Homebrew
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
# package install has DeprecationWarnings
PYTHONWARNINGS: default
- run: git lfs pull
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- name: Getting scons cache
uses: ./.github/workflows/auto-cache
with:
path: /tmp/scons_cache
- name: Building openpilot
run: . .venv/bin/activate && scons -j$(nproc)
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'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || 'ubuntu-24.04' }}
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:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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
runs-on:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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:
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
- ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-experiments:docker.builds.local-cache=separate' || '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') && 1 || 3) }}
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: report-${{ inputs.run_number || '1' }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
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 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
@@ -20,10 +21,32 @@ jobs:
stale-pr-message: 'This PR has had no activity for ${{ env.DAYS_BEFORE_PR_STALE }} 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
delete-branch: ${{ github.event.pull_request.head.repo.full_name == 'sunnypilot/sunnypilot' }} # 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 }}
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

@@ -0,0 +1,229 @@
name: Build Model from Upstream
env:
BUILD_DIR: "/data/openpilot"
OUTPUT_DIR: ${{ github.workspace }}/output
SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache
UPSTREAM_REPO: "commaai/openpilot"
TINYGRAD_PATH: ${{ github.workspace }}/tinygrad_repo
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:
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
run-name: Build model [${{ inputs.custom_name || inputs.upstream_branch }}] from ref [${{ inputs.upstream_branch }}]
jobs:
get_model:
runs-on: ubuntu-latest
env:
REF: ${{ inputs.upstream_branch }}
outputs:
model_date: ${{ steps.commit-date.outputs.model_date }}
steps:
# 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: 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: |
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: |
cd ${{ github.workspace }}/openpilot
git lfs pull
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models/*.onnx
build_model:
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:
submodules: recursive
- run: git lfs pull
- name: Cache SCons
uses: actions/cache@v4
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.)
# 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
scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_NEW_BRANCH }}-model
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_BRANCH }}-model
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_NEW_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}-${{ env.MASTER_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}
- name: Set environment variables
id: set-env
run: |
# Set up common environment
source /etc/profile;
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
printenv >> $GITHUB_ENV
if [[ "${{ runner.debug }}" == "1" ]]; then
cat $GITHUB_OUTPUT
fi
- name: Setup build environment
run: |
mkdir -p "${BUILD_DIR}/"
sudo find $BUILD_DIR/ -mindepth 1 -delete
echo "Starting build stage..."
echo "BUILD_DIR: ${BUILD_DIR}"
echo "CI_DIR: ${CI_DIR}"
echo "VERSION: ${{ steps.set-env.outputs.version }}"
echo "UV_PROJECT_ENVIRONMENT: ${UV_PROJECT_ENVIRONMENT}"
echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
echo "-------"
if [[ "${{ runner.debug }}" == "1" ]]; then
printenv
fi
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --disable
rm -rf ${{ env.MODELS_DIR }}/*.onnx
- name: Download model artifacts
uses: actions/download-artifact@v4
with:
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: |
source /etc/profile
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}"
# Loop through all .onnx files
find "${{ env.MODELS_DIR }}" -maxdepth 1 -name '*.onnx' | while IFS= read -r onnx_file; do
base_name=$(basename "$onnx_file" .onnx)
output_file="${{ env.MODELS_DIR }}/${base_name}_tinygrad.pkl"
echo "Compiling: $onnx_file -> $output_file"
QCOM=1 python3 "${{ env.TINYGRAD_PATH }}/examples/openpilot/compile3.py" "$onnx_file" "$output_file"
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 }}
mkdir -p ${{ env.OUTPUT_DIR }}
# Copy the model files
rsync -avm \
--include='*.dlc' \
--include='*.pkl' \
--include='*.onnx' \
--exclude='*' \
--delete-excluded \
--chown=comma:comma \
${{ env.MODELS_DIR }}/ ${{ env.OUTPUT_DIR }}/
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
--model-dir "${{ env.MODELS_DIR }}" \
--output-dir "${{ env.OUTPUT_DIR }}" \
--custom-name "${{ env.MODEL_NAME }}" \
--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 }}${{ 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: |
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --enable

View File

@@ -0,0 +1,369 @@
name: sunnypilot prebuilt action
env:
BUILD_DIR: "/data/openpilot"
OUTPUT_DIR: ${{ github.workspace }}/output
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_SOURCE_BRANCH: 'master'
# Runtime configuration
SOURCE_BRANCH: "${{ github.head_ref || github.ref_name }}"
on:
push:
branches: [ master, master-dev ]
tags: [ 'release/*' ]
pull_request_target:
types: [ labeled ]
workflow_dispatch:
inputs:
wait_for_tests:
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
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: 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, prepare_strategy ]
concurrency:
group: build-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
runs-on: [self-hosted, tici]
outputs:
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:
submodules: recursive
ref: ${{ env.SOURCE_BRANCH }}
repository: ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.head.repo.full_name || github.repository }}
- run: git lfs pull
- name: Cache SCons
uses: actions/cache@v4
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.)
# 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_SOURCE_BRANCH }}
scons-${{ runner.os }}-${{ runner.arch }}
- name: Set environment variables
id: set-env
run: |
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
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
printenv >> $GITHUB_ENV
if [[ "${{ runner.debug }}" == "1" ]]; then
cat $GITHUB_OUTPUT
fi
- name: Setup build environment
run: |
mkdir -p "${BUILD_DIR}/"
sudo find $BUILD_DIR/ -mindepth 1 -delete
echo "Starting build stage..."
echo "BUILD_DIR: ${BUILD_DIR}"
echo "CI_DIR: ${CI_DIR}"
echo "VERSION: ${{ steps.set-env.outputs.version }}"
echo "UV_PROJECT_ENVIRONMENT: ${UV_PROJECT_ENVIRONMENT}"
echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
echo "-------"
if [[ "${{ runner.debug }}" == "1" ]]; then
printenv
fi
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --disable
- name: Build Main Project
run: |
export PYTHONPATH="$BUILD_DIR"
./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
ls -la ${BUILD_DIR}
fi
- name: Prepare Output
run: |
sudo rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}
rsync -am${RUNNER_DEBUG:+v} \
--exclude='.sconsign.dblite' \
--exclude='*.a' \
--exclude='*.o' \
--exclude='*.os' \
--exclude='*.pyc' \
--exclude='moc_*' \
--exclude='__pycache__' \
--exclude='Jenkinsfile' \
--exclude='**/release/' \
--exclude='**/.github/' \
--exclude='**/selfdrive/ui/replay/' \
--exclude='**/__pycache__/' \
--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}/
- name: 'Tar.gz files'
run: |
tar czf prebuilt.tar.gz -C ${{ env.OUTPUT_DIR }} .
ls -la prebuilt.tar.gz
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: prebuilt
path: prebuilt.tar.gz
- name: Re-enable powersave
if: always()
run: |
PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --enable
publish:
concurrency:
# 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: ${{ needs.prepare_strategy.outputs.environment }}
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: prebuilt
- name: Untar prebuilt
run: |
mkdir -p ${{ env.OUTPUT_DIR }}
tar xzf prebuilt.tar.gz -C ${{ env.OUTPUT_DIR }}
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Publish to Public Repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo '${{ toJSON(needs.build.outputs) }}'
ls -la ${{ env.OUTPUT_DIR }}
${{ env.CI_DIR }}/publish.sh \
"${{ github.workspace }}" \
"${{ env.OUTPUT_DIR }}" \
"${{ 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 }}"
echo ""
echo "---- To update the list of branches that auto deploy prebuilts -----"
echo ""
echo "1. Go to: ${{ github.server_url }}/${{ github.repository }}/settings/variables/actions/AUTO_DEPLOY_PREBUILT_BRANCHES"
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:
- prepare_strategy
- build
- publish
runs-on: ubuntu-24.04
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: Prepare notification message
id: message
run: |
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
if: (always() && contains(github.event_name, 'pull_request') && (github.event.action == 'labeled' && github.event.label.name == 'prebuilt'))
env:
LABEL: prebuilt
steps:
- name: Remove trust-fork-pr label if present
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.LABEL
});
console.log(`Removed '${process.env.LABEL}' label from PR #${prNumber}`);

View File

@@ -0,0 +1,243 @@
name: Build dev
env:
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'
on:
push:
branches:
- master
pull_request_target:
types: [ labeled ]
branches:
- 'master'
workflow_dispatch:
inputs:
source_branch:
description: 'Source branch to reset from'
required: true
default: 'master'
type: string
target_branch:
description: 'Target branch to reset and squash into'
required: true
default: 'master-dev'
type: string
cancel_in_progress:
description: 'Cancel any in-progress runs of this workflow'
required: false
default: true
type: boolean
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: ${{ inputs.cancel_in_progress || github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
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 == 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 == vars.PREBUILT_PR_LABEL || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, vars.PREBUILT_PR_LABEL))))
)
with:
workflow: tests.yaml # The workflow file to monitor
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add GitLab public keys
run: |
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub
- name: Check branches exist
run: |
# Check if source branch exists
if ! git ls-remote --heads origin ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }} | grep -q "${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"; then
echo "Source branch ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }} does not exist!"
exit 1
fi
# Make sure we have the latest source branch
git fetch origin ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
# Check if target branch exists
if ! git ls-remote --heads origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} | grep -q "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"; then
echo "Target branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} does not exist, creating it from ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
git checkout -b ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} origin/${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
git push origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}
else
# Fetch target branch if it exists
git fetch origin ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}
fi
- name: Reset target branch
run: |
echo "Resetting ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} to match ${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}"
# Delete if exists and recreate pointing to source
git branch -D ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} || true
git branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} origin/${{ inputs.source_branch || env.DEFAULT_SOURCE_BRANCH }}
- name: Get PRs to squash
id: get-prs
run: |
# Use GitHub API to get PRs with specific label, ordered by creation date
PR_LIST=$(gh api graphql -f query='
query($search_query:String!) {
search(query: $search_query, type:ISSUE, first:40) {
nodes {
... on PullRequest {
number
headRefName
title
createdAt
labels(last:10) {
nodes {
name
}
}
headRepository {
name
nameWithOwner
url
isFork
}
commits(last: 1) {
nodes {
commit {
statusCheckRollup {
state
}
}
}
}
}
}
}
}' -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 }}
- name: Process PRs
run: |
cp ${{ github.workspace }}/release/ci/squash_and_merge.py /tmp/squash_and_merge.py && \
chmod +x /tmp/squash_and_merge.py && \
python3 ${{ github.workspace }}/release/ci/squash_and_merge_prs.py \
--pr-data '${{ steps.get-prs.outputs.PR_LIST }}' \
--target-branch ${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }} \
--squash-script-path '/tmp/squash_and_merge.py'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update LFS Config
run: |
echo '[lfs]' > .lfsconfig
echo ' url = ${{ env.LFS_URL }}' >> .lfsconfig
echo ' pushurl = ${{ env.LFS_PUSH_URL }}' >> .lfsconfig
echo ' locksverify = false' >> .lfsconfig
- 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
# Check for diffs between local and remote
if git diff $TARGET_BRANCH origin/$TARGET_BRANCH --quiet; then
echo "No changes to push - local and remote branches are identical"
echo "has_changes=false" >> $GITHUB_OUTPUT
exit 0
fi
# Push with the authenticated origin
if ! git push origin $TARGET_BRANCH --force; then
echo "Failed to push changes to $TARGET_BRANCH"
exit 1
fi
echo "Branch $TARGET_BRANCH has been reset and updated with squashed PRs"
echo "has_changes=true" >> $GITHUB_OUTPUT
- name: Trigger and wait for selfdrive tests
if: steps.push-changes.outputs.has_changes == 'true'
run: |
echo "Triggering selfdrive tests..."
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=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 }}

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

@@ -8,18 +8,24 @@ on:
branches:
- 'master'
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' && '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 }}"
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:
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
name: preview
runs-on: ubuntu-latest
timeout-minutes: 20
@@ -28,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
@@ -46,98 +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: commaai/ci-artifacts
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.event_name == 'push'
working-directory: ${{ github.workspace }}/master_ui
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 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
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=$?
if ! 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
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/"
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/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/commaai/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/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/commaai/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/commaai/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 "<>"
@@ -145,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

@@ -0,0 +1,52 @@
name: 'Wait for Tests'
description: 'Action to wait for workflow tests to start and complete'
inputs:
workflow:
description: 'The workflow file name to monitor'
required: true
default: 'tests.yaml'
branch:
description: 'The branch to monitor (defaults to current branch)'
required: false
default: ''
github-token:
description: 'GitHub token for API access'
required: true
wait-time:
description: 'Initial sleep time in seconds before monitoring starts'
required: false
default: '30'
should-wait-for-start:
description: 'Whether to wait for tests to start'
required: false
default: false
runs:
using: 'composite'
steps:
- name: Wait for tests to start
if: inputs.should-wait-for-start == 'true'
shell: bash
run: |
echo "Sleeping for ${{ inputs.wait-time }} seconds to give some time for the action to start and then we'll wait"
sleep ${{ inputs.wait-time }}
- name: Wait for tests to finish
shell: bash
run: |
BRANCH="${{ inputs.branch || github.head_ref || github.ref_name }}"
echo "Looking for workflow runs of ${{ inputs.workflow }} on branch $BRANCH"
RUN_ID=$(gh run list --workflow=${{ inputs.workflow }} --branch="$BRANCH" --limit=1 --json databaseId --jq '.[0].databaseId')
echo "Watching run ID: $RUN_ID"
gh run watch "$RUN_ID"
CONCLUSION=$(gh run view "$RUN_ID" --json conclusion --jq '.conclusion')
echo "Run concluded with: $CONCLUSION"
if [[ "$CONCLUSION" != "success" ]]; then
echo "❌ Workflow run failed with conclusion: $CONCLUSION"
exit 1
fi
env:
GITHUB_TOKEN: ${{ inputs.github-token }}

32
.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,32 +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/logcatd/logcatd
selfdrive/mapd/default_speeds_by_region.json
system/proclogd/proclogd
selfdrive/ui/translations/alerts_generated.h
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
@@ -72,10 +64,10 @@ flycheck_*
cppcheck_report.txt
comma*.sh
selfdrive/modeld/thneed/compile
selfdrive/modeld/models/*.thneed
selfdrive/modeld/models/*.pkl
selfdrive/modeld/models/*.pkl*
sunnypilot/modeld*/models/*.pkl
# openpilot log files
*.bz2
*.zst
@@ -104,3 +96,13 @@ Pipfile
# Ignore all local history of files
.history
.ionide
.claude/
.context/
PLAN.md
TASK.md
### JetBrains ###
!.idea/customTargets.xml
!.idea/tools/*
!.run/*

15
.gitmodules vendored
View File

@@ -1,18 +1,21 @@
[submodule "panda"]
path = panda
url = ../../commaai/panda.git
url = https://github.com/sunnyhaibin/panda.git
[submodule "opendbc"]
path = opendbc_repo
url = ../../commaai/opendbc.git
url = https://github.com/sunnypilot/opendbc.git
[submodule "msgq"]
path = msgq_repo
url = ../../commaai/msgq.git
url = https://github.com/commaai/msgq.git
[submodule "rednose_repo"]
path = rednose_repo
url = ../../commaai/rednose.git
url = https://github.com/commaai/rednose.git
[submodule "teleoprtc_repo"]
path = teleoprtc_repo
url = ../../commaai/teleoprtc
url = https://github.com/commaai/teleoprtc
[submodule "tinygrad"]
path = tinygrad_repo
url = https://github.com/commaai/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

25
.idea/customTargets.xml generated Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CLionExternalBuildManager">
<target id="a62f99e8-5ec4-434c-8122-49efed5af108" name="uv Scons Build Debug" defaultType="TOOL">
<configuration id="b93ec964-16e5-4962-a12e-3ed360ce8f02" name="uv Scons Build Debug">
<build type="TOOL">
<tool actionId="Tool_External Tools_uv Scons Build Debug" />
</build>
<clean type="TOOL">
<tool actionId="Tool_External Tools_uv Scons Clean" />
</clean>
</configuration>
</target>
<target id="edd8ad9d-183b-467c-a355-0d9a0ecab026" name="uv Scons Build Release" defaultType="TOOL">
<configuration id="09523339-5ce3-4223-ab9e-904f38ad7752" name="uv Scons Build Release">
<build type="TOOL">
<tool actionId="Tool_External Tools_uv Scons Build Release" />
</build>
<clean type="TOOL">
<tool actionId="Tool_External Tools_uv Scons Clean" />
</clean>
</configuration>
</target>
</component>
</project>

23
.idea/tools/External Tools.xml generated Normal file
View File

@@ -0,0 +1,23 @@
<toolSet name="External Tools">
<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) --ccflags=\&quot;-fno-inline\&quot;&quot;" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="uv Scons Clean" 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 -c&quot; " />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<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)&quot; " />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
</toolSet>

View File

@@ -1,4 +1,4 @@
[lfs]
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
url = https://gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git/info/lfs
pushurl = ssh://git@gitlab.com/sunnypilot/public/sunnypilot-new-lfs.git
locksverify = false

4
.lfsconfig-comma Normal file
View File

@@ -0,0 +1,4 @@
[lfs]
url = https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
pushurl = ssh://git@gitlab.com/commaai/openpilot-lfs.git
locksverify = false

10
.run/Build Debug.run.xml Normal file
View File

@@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build Debug" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="sunnypilot" TARGET_NAME="uv Scons Build Debug" CONFIG_NAME="uv Scons Build Debug" RUN_PATH="ui">
<envs>
<env name="QT_DBL_CLICK_DIST" value="150" />
</envs>
<method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build Release" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" WORKING_DIR="file://$ProjectFileDir$/selfdrive/ui" PASS_PARENT_ENVS_2="true" PROJECT_NAME="sunnypilot" TARGET_NAME="uv Scons Build Release" CONFIG_NAME="uv Scons Build Release" RUN_PATH="ui">
<envs>
<env name="QT_DBL_CLICK_DIST" value="150" />
</envs>
<method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
</method>
</configuration>
</component>

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,13 +1,38 @@
FROM ghcr.io/commaai/openpilot-base:latest
FROM ubuntu:24.04
ENV PYTHONUNBUFFERED=1
ENV OPENPILOT_PATH=/home/batman/openpilot
ENV PYTHONPATH=${OPENPILOT_PATH}:${PYTHONPATH}
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,81 +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
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

53
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,9 +244,8 @@ 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"),
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
])

21
LICENSE.md Normal file
View File

@@ -0,0 +1,21 @@
# Custom MIT License
Copyright (c) 2024, Haibin Wen, SUNNYPILOT LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to view and modify the Software, subject to the following conditions:
1. **Permission Required**: Permission Required for Commercial, For-Profit, or Closed Source Use: Use of the Software, in whole or in part, for any commercial purposes, for-profit projects, or in closed source projects requires explicit written permission from the original author(s).
2. **Redistribution**: Any redistribution of the Software, modified or unmodified, must retain this license notice and the following acknowledgment:
"This software is licensed under a custom license requiring permission for use."
3. **Visibility**: Any project that uses the Software must visibly mention the following acknowledgment:
"This project uses software from Haibin Wen and SUNNYPILOT LLC and is licensed under a custom license requiring permission for use."
4. **No Warranty**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contact sunnypilot Support <support@sunnypilot.ai> for permission requests.
---
Haibin Wen, SUNNYPILOT LLC

149
README.md
View File

@@ -1,107 +1,74 @@
<div align="center" style="text-align: center;">
![](https://user-images.githubusercontent.com/47793918/233812617-beab2e71-57b9-479e-8bff-c3931347ca40.png)
<h1>openpilot</h1>
## 🌞 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.
<p>
<b>openpilot is an operating system for robotics.</b>
<br>
Currently, it upgrades the driver assistance system in 275+ supported cars.
</p>
## 💭 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/
<h3>
<a href="https://docs.comma.ai">Docs</a>
<span> · </span>
<a href="https://docs.comma.ai/contributing/roadmap/">Roadmap</a>
<span> · </span>
<a href="https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md">Contribute</a>
<span> · </span>
<a href="https://discord.comma.ai">Community</a>
<span> · </span>
<a href="https://comma.ai/shop">Try it on a comma 3X</a>
</h3>
## Documentation
https://docs.sunnypilot.ai/ is your one stop shop for everything from features to installation to FAQ about the sunnypilot
Quick start: `bash <(curl -fsSL openpilot.comma.ai)`
## 🚘 Running on a dedicated device in a car
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).
![openpilot tests](https://github.com/commaai/openpilot/actions/workflows/selfdrive_tests.yaml/badge.svg)
[![codecov](https://codecov.io/gh/commaai/openpilot/branch/master/graph/badge.svg)](https://codecov.io/gh/commaai/openpilot)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![X Follow](https://img.shields.io/twitter/follow/comma_ai)](https://x.com/comma_ai)
[![Discord](https://img.shields.io/discord/469524606043160576)](https://discord.comma.ai)
## Installation
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).
</div>
## 🎆 Pull Requests
We welcome both pull requests and issues on GitHub. Bug fixes are encouraged.
<table>
<tr>
<td><a href="https://youtu.be/NmBfgOanCyk" title="Video By Greer Viau"><img src="https://github.com/commaai/openpilot/assets/8762862/2f7112ae-f748-4f39-b617-fabd689c3772"></a></td>
<td><a href="https://youtu.be/VHKyqZ7t8Gw" title="Video By Logan LeGrand"><img src="https://github.com/commaai/openpilot/assets/8762862/92351544-2833-40d7-9e0b-7ef7ae37ec4c"></a></td>
<td><a href="https://youtu.be/SUIZYzxtMQs" title="A drive to Taco Bell"><img src="https://github.com/commaai/openpilot/assets/8762862/05ceefc5-2628-439c-a9b2-89ce77dc6f63"></a></td>
</tr>
</table>
Pull requests should be against the most current `master` branch.
## 📊 User Data
By default, sunnypilot uploads the driving data to comma servers. You can also access your data through [comma connect](https://connect.comma.ai/).
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 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.
## Licensing
sunnypilot is released under the [MIT License](LICENSE). This repository includes original work as well as significant portions of code derived from [openpilot by comma.ai](https://github.com/commaai/openpilot), which is also released under the MIT license with additional disclaimers.
The original openpilot license notice, including comma.ais indemnification and alpha software disclaimer, is reproduced below as required:
> openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
>
> Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys fees and costs) which arise out of, relate to or result from any use of this software by user.
>
> **THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
> YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
> NO WARRANTY EXPRESSED OR IMPLIED.**
For full license terms, please see the [`LICENSE`](LICENSE) file.
## 💰 Support sunnypilot
If you find any of the features useful, consider becoming a [sponsor on GitHub](https://github.com/sponsors/sunnyhaibin) to support future feature development and improvements.
Using openpilot in a car
------
By becoming a sponsor, you will gain access to exclusive content, early access to new features, and the opportunity to directly influence the project's development.
To use openpilot in a car, you need four things:
1. **Supported Device:** a comma 3/3X, available at [comma.ai/shop](https://comma.ai/shop/comma-3x).
2. **Software:** The setup procedure for the comma 3/3X allows users to enter a URL for custom software. Use the URL `openpilot.comma.ai` to install the release version.
3. **Supported Car:** Ensure that you have one of [the 275+ supported cars](docs/CARS.md).
4. **Car Harness:** You will also need a [car harness](https://comma.ai/shop/car-harness) to connect your comma 3/3X to your car.
We have detailed instructions for [how to install the harness and device in a car](https://comma.ai/setup). Note that it's possible to run openpilot on [other hardware](https://blog.comma.ai/self-driving-car-for-free/), although it's not plug-and-play.
<h3>GitHub Sponsor</h3>
### Branches
| branch | URL | description |
|------------------|----------------------------------------|-------------------------------------------------------------------------------------|
| `release3` | openpilot.comma.ai | This is openpilot's release branch. |
| `release3-staging` | openpilot-test.comma.ai | This is the staging branch for releases. Use it to get new releases slightly early. |
| `nightly` | openpilot-nightly.comma.ai | This is the bleeding edge development branch. Do not expect this to be stable. |
| `nightly-dev` | installer.comma.ai/commaai/nightly-dev | Same as nightly, but includes experimental development features for some cars. |
<a href="https://github.com/sponsors/sunnyhaibin">
<img src="https://user-images.githubusercontent.com/47793918/244135584-9800acbd-69fd-4b2b-bec9-e5fa2d85c817.png" alt="Become a Sponsor" width="300" style="max-width: 100%; height: auto;">
</a>
<br>
To start developing openpilot
------
<h3>PayPal</h3>
openpilot is developed by [comma](https://comma.ai/) and by users like you. We welcome both pull requests and issues on [GitHub](http://github.com/commaai/openpilot).
<a href="https://paypal.me/sunnyhaibin0850" target="_blank">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal this" title="PayPal - The safer, easier way to pay online!" border="0" />
</a>
<br></br>
* Join the [community Discord](https://discord.comma.ai)
* Check out [the contributing docs](docs/CONTRIBUTING.md)
* Check out the [openpilot tools](tools/)
* Read about the [development workflow](docs/WORKFLOW.md)
* Code documentation lives at https://docs.comma.ai
* Information about running openpilot lives on the [community wiki](https://github.com/commaai/openpilot/wiki)
Your continuous love and support are greatly appreciated! Enjoy 🥰
Want to get paid to work on openpilot? [comma is hiring](https://comma.ai/jobs#open-positions) and offers lots of [bounties](https://comma.ai/bounties) for external contributors.
Safety and Testing
----
* openpilot observes [ISO26262](https://en.wikipedia.org/wiki/ISO_26262) guidelines, see [SAFETY.md](docs/SAFETY.md) for more details.
* openpilot has software-in-the-loop [tests](.github/workflows/selfdrive_tests.yaml) that run on every commit.
* The code enforcing the safety model lives in panda and is written in C, see [code rigor](https://github.com/commaai/panda#code-rigor) for more details.
* panda has software-in-the-loop [safety tests](https://github.com/commaai/panda/tree/master/tests/safety).
* Internally, we have a hardware-in-the-loop Jenkins test suite that builds and unit tests the various processes.
* panda has additional hardware-in-the-loop [tests](https://github.com/commaai/panda/blob/master/Jenkinsfile).
* We run the latest openpilot in a testing closet containing 10 comma devices continuously replaying routes.
Licensing
------
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
Any user of this software shall indemnify and hold harmless Comma.ai, Inc. and its directors, officers, employees, agents, stockholders, affiliates, subcontractors and customers from and against all allegations, claims, actions, suits, demands, damages, liabilities, obligations, losses, settlements, judgments, costs and expenses (including without limitation attorneys fees and costs) which arise out of, relate to or result from any use of this software by user.
**THIS IS ALPHA QUALITY SOFTWARE FOR RESEARCH PURPOSES ONLY. THIS IS NOT A PRODUCT.
YOU ARE RESPONSIBLE FOR COMPLYING WITH LOCAL LAWS AND REGULATIONS.
NO WARRANTY EXPRESSED OR IMPLIED.**
User Data and comma Account
------
By default, openpilot uploads the driving data to our servers. You can also access your data through [comma connect](https://connect.comma.ai/). We use your data to train better models and improve openpilot for everyone.
openpilot is open source software: the user is free to disable data collection if they wish to do so.
openpilot logs the road-facing cameras, 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.
By using openpilot, you agree to [our Privacy Policy](https://comma.ai/privacy). 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.
<span>-</span> Jason, Founder of sunnypilot

View File

@@ -1,10 +1,62 @@
Version 0.9.9 (2025-04-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)
========================
* New driving model
* New training architecture using parts from MLSIM
* Steering actuation delay is now learned online
* Ford Escape 2023-24 support thanks to incognitojam!
* Ford Kuga 2024 support thanks to incognitojam!
* Hyundai Nexo 2021 support thanks to sunnyhaibin!
* Tesla Model 3 and Y support thanks to lukasloetkolben!
* Coming soon
* New driving model supervised by MLSIM
* An online learner for steering actuator delay
* Lexus RC 2023 support thanks to nelsonjchen!
Version 0.9.8 (2025-02-28)
========================

View File

@@ -3,210 +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('--pc-thneed',
action='store_true',
dest='pc_thneed',
help='use thneed on pc')
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.')
## 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/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 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"]
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",
"#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="#",
@@ -214,121 +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
cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
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']
# compatibility for older SCons versions
try:
qt_env.Tool('qt3')
except SCons.Errors.UserError:
qt_env.Tool('qt')
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
@@ -352,15 +228,8 @@ SConscript(['rednose/SConscript'])
# Build system services
SConscript([
'system/proclogd/SConscript',
'system/ubloxd/SConscript',
'system/loggerd/SConscript',
])
if arch != "Darwin":
SConscript([
'system/sensord/SConscript',
'system/logcatd/SConscript',
])
if arch == "larch64":
SConscript(['system/camerad/SConscript'])
@@ -370,11 +239,10 @@ SConscript(['third_party/SConscript'])
SConscript(['selfdrive/SConscript'])
if Dir('#tools/cabana/').exists() and GetOption('extras'):
SConscript(['tools/replay/SConscript'])
if arch != "larch64":
SConscript(['tools/cabana/SConscript'])
SConscript(['sunnypilot/SConscript'])
external_sconscript = GetOption('external_sconscript')
if external_sconscript:
SConscript([external_sconscript])
if Dir('#tools/cabana/').exists() and arch != "larch64":
SConscript(['tools/cabana/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

@@ -1,9 +1,11 @@
import os
import capnp
from importlib.resources import as_file, files
CEREAL_PATH = os.path.dirname(os.path.abspath(__file__))
capnp.remove_import_hook()
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp"))
with as_file(files("cereal")) as fspath:
CEREAL_PATH = fspath.as_posix()
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp"))

View File

@@ -10,34 +10,449 @@ $Cxx.namespace("cereal");
# DO rename the structs
# DON'T change the identifier (e.g. @0x81c2f05a394cf4af)
struct CustomReserved0 @0x81c2f05a394cf4af {
struct ModularAssistiveDrivingSystem {
state @0 :ModularAssistiveDrivingSystemState;
enabled @1 :Bool;
active @2 :Bool;
available @3 :Bool;
enum ModularAssistiveDrivingSystemState {
disabled @0;
paused @1;
enabled @2;
softDisabling @3;
overriding @4;
}
}
struct CustomReserved1 @0xaedffd8f31e7b55d {
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;
}
}
struct CustomReserved2 @0xf35cc4560bbf6ec2 {
# 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 CustomReserved3 @0xda96579883444c35 {
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 CustomReserved4 @0x80ae746ee2596b11 {
struct ModelManagerSP @0xaedffd8f31e7b55d {
activeBundle @0 :ModelBundle;
selectedBundle @1 :ModelBundle;
availableBundles @2 :List(ModelBundle);
struct DownloadUri {
uri @0 :Text;
sha256 @1 :Text;
}
enum DownloadStatus {
notDownloading @0;
downloading @1;
downloaded @2;
cached @3;
failed @4;
}
struct DownloadProgress {
status @0 :DownloadStatus;
progress @1 :Float32;
eta @2 :UInt32;
}
struct Artifact {
fileName @0 :Text;
downloadUri @1 :DownloadUri;
downloadProgress @2 :DownloadProgress;
}
struct Model {
type @0 :Type;
artifact @1 :Artifact; # Main artifact
metadata @2 :Artifact; # Metadata artifact
enum Type {
supercombo @0;
navigation @1;
vision @2;
policy @3;
offPolicy @4;
}
}
enum Runner {
snpe @0;
tinygrad @1;
stock @2;
}
struct Override {
key @0 :Text;
value @1 :Text;
}
struct ModelBundle {
index @0 :UInt32;
internalName @1 :Text;
displayName @2 :Text;
models @3 :List(Model);
status @4 :DownloadStatus;
generation @5 :UInt32;
environment @6 :Text;
runner @7 :Runner;
is20hz @8 :Bool;
ref @9 :Text;
minimumSelectorVersion @10 :UInt32;
overrides @11 :List(Override);
}
}
struct CustomReserved5 @0xa5cd762cd951a455 {
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;
enabled @1 :Bool;
active @2 :Bool;
enum DynamicExperimentalControlState {
acc @0;
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 CustomReserved6 @0xf98d843bfd7004a3 {
struct OnroadEventSP @0xda96579883444c35 {
events @0 :List(Event);
struct Event {
name @0 :EventName;
# event types
enable @1 :Bool;
noEntry @2 :Bool;
warning @3 :Bool; # alerts presented only when enabled or soft disabling
userDisable @4 :Bool;
softDisable @5 :Bool;
immediateDisable @6 :Bool;
preEnable @7 :Bool;
permanent @8 :Bool; # alerts presented regardless of openpilot state
overrideLateral @10 :Bool;
overrideLongitudinal @9 :Bool;
}
enum EventName {
lkasEnable @0;
lkasDisable @1;
manualSteeringRequired @2;
manualLongitudinalRequired @3;
silentLkasEnable @4;
silentLkasDisable @5;
silentBrakeHold @6;
silentWrongGear @7;
silentReverseGear @8;
silentDoorOpen @9;
silentSeatbeltNotLatched @10;
silentParkBrake @11;
controlsMismatchLateral @12;
hyundaiRadarTracksConfirmed @13;
experimentalModeSwitched @14;
wrongCarModeAlertOnly @15;
pedalPressedAlertOnly @16;
laneTurnLeft @17;
laneTurnRight @18;
speedLimitPreActive @19;
speedLimitActive @20;
speedLimitChanged @21;
speedLimitPending @22;
e2eChime @23;
}
}
struct CustomReserved7 @0xb86e6369214c01c8 {
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;
struct NeuralNetworkLateralControl {
model @0 :Model;
fuzzyFingerprint @1 :Bool;
struct Model {
path @0 :Text;
name @1 :Text;
}
}
}
struct CustomReserved8 @0xf416ec09499d9d19 {
struct CarControlSP @0xa5cd762cd951a455 {
mads @0 :ModularAssistiveDrivingSystem;
params @1 :List(Param);
leadOne @2 :LeadData;
leadTwo @3 :LeadData;
intelligentCruiseButtonManagement @4 :IntelligentCruiseButtonManagement;
struct Param {
key @0 :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;
}
}
struct CustomReserved9 @0xa1680744031fdb2d {
struct BackupManagerSP @0xf98d843bfd7004a3 {
backupStatus @0 :Status;
restoreStatus @1 :Status;
backupProgress @2 :Float32;
restoreProgress @3 :Float32;
lastError @4 :Text;
currentBackup @5 :BackupInfo;
backupHistory @6 :List(BackupInfo);
enum Status {
idle @0;
inProgress @1;
completed @2;
failed @3;
}
struct Version {
major @0 :UInt16;
minor @1 :UInt16;
patch @2 :UInt16;
build @3 :UInt16;
branch @4 :Text;
}
struct MetadataEntry {
key @0 :Text;
value @1 :Text;
tags @2 :List(Text);
}
struct BackupInfo {
deviceId @0 :Text;
version @1 :UInt32;
config @2 :Text;
isEncrypted @3 :Bool;
createdAt @4 :Text; # ISO timestamp
updatedAt @5 :Text; # ISO timestamp
sunnypilotVersion @6 :Version;
backupMetadata @7 :List(MetadataEntry);
}
}
struct CarStateSP @0xb86e6369214c01c8 {
speedLimit @0 :Float32;
}
struct LiveMapDataSP @0xf416ec09499d9d19 {
speedLimitValid @0 :Bool;
speedLimit @1 :Float32;
speedLimitAheadValid @2 :Bool;
speedLimitAhead @3 :Float32;
speedLimitAheadDistance @4 :Float32;
roadName @5 :Text;
}
struct ModelDataV2SP @0xa1680744031fdb2d {
laneTurnDirection @0 :TurnDirection;
enum TurnDirection {
none @0;
turnLeft @1;
turnRight @2;
}
}
struct CustomReserved10 @0xcb9fd56c7057593a {

View File

@@ -48,6 +48,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
preEnableStandstill @12; # added during pre-enable state with brake
gasPressedOverride @13; # added when user is pressing gas with no disengage on gas
steerOverride @14;
steerDisengage @94; # exits active state
cruiseDisabled @15;
speedTooLow @16;
outOfSpace @17;
@@ -86,6 +87,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
laneChange @50;
lowMemory @51;
stockAeb @52;
stockLkas @98;
ldw @53;
carUnrecognized @54;
invalidLkasSetting @55;
@@ -126,6 +128,9 @@ struct OnroadEvent @0xc4fa6047f024e718 {
espActive @90;
personalityChanged @91;
aeb @92;
userBookmark @95;
excessiveActuation @96;
audioFeedback @97;
soundsUnavailableDEPRECATED @47;
}
@@ -488,13 +493,14 @@ struct DeviceState @0xa4d8b5af2aa492eb {
# device thermals
cpuTempC @26 :List(Float32);
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;
@@ -565,6 +571,7 @@ struct DeviceState @0xa4d8b5af2aa492eb {
chargingDisabledDEPRECATED @18 :Bool;
usbOnlineDEPRECATED @12 :Bool;
ambientTempCDEPRECATED @30 :Float32;
nvmeTempCDEPRECATED @35 :List(Float32);
}
struct PandaState @0xa7649e2575e4591e {
@@ -580,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;
@@ -709,6 +716,7 @@ struct PandaState @0xa7649e2575e4591e {
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerModeDEPRECATED;
safetyParamDEPRECATED @20 :Int16;
safetyParam2DEPRECATED @26 :UInt32;
fanStallCountDEPRECATED @34 :UInt8;
}
struct PeripheralState {
@@ -913,6 +921,8 @@ struct ControlsState @0x97ff69c53601abf1 {
saturated @7 :Bool;
actualLateralAccel @9 :Float32;
desiredLateralAccel @10 :Float32;
desiredLateralJerk @11 :Float32;
version @12 :Int32;
}
struct LateralLQRState {
@@ -1080,7 +1090,7 @@ struct ModelDataV2 {
confidence @23: ConfidenceClass;
# Model perceived motion
temporalPose @21 :Pose;
temporalPoseDEPRECATED @21 :Pose;
# e2e lateral planner
action @26: Action;
@@ -1174,6 +1184,8 @@ struct ModelDataV2 {
struct Action {
desiredCurvature @0 :Float32;
desiredAcceleration @1 :Float32;
shouldStop @2 :Bool;
}
}
@@ -1468,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 {
@@ -1586,6 +1603,10 @@ struct UbloxGnss {
svId @0 :UInt8;
gnssId @1 :UInt8;
flagsBitfield @2 :UInt32;
cno @3 :UInt8;
elevationDeg @4 :Int8;
azimuthDeg @5 :Int16;
pseudorangeResidual @6 :Float32;
}
}
@@ -2135,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;
@@ -2156,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 {
@@ -2211,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);
@@ -2272,6 +2297,24 @@ struct LiveTorqueParametersData {
points @10 :List(List(Float32));
version @11 :Int32;
useParams @12 :Bool;
calPerc @13 :Int8;
}
struct LiveDelayData {
lateralDelay @0 :Float32;
validBlocks @1 :Int32;
status @2 :Status;
lateralDelayEstimate @3 :Float32;
lateralDelayEstimateStd @5 :Float32;
points @4 :List(Float32);
calPerc @6 :Int8;
enum Status {
unestimated @0;
estimated @1;
invalid @2;
}
}
struct LiveMapDataDEPRECATED {
@@ -2440,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 {
@@ -2478,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;
@@ -2504,6 +2555,7 @@ struct Event {
gnssMeasurements @91 :GnssMeasurements;
liveParameters @61 :LiveParametersData;
liveTorqueParameters @94 :LiveTorqueParametersData;
liveDelay @146 : LiveDelayData;
cameraOdometry @63 :CameraOdometry;
thumbnail @66: Thumbnail;
onroadEvents @134: List(OnroadEvent);
@@ -2528,7 +2580,8 @@ struct Event {
livestreamDriverEncodeIdx @119 :EncodeIndex;
# microphone data
microphone @103 :Microphone;
soundPressure @103 :SoundPressure;
rawAudioData @147 :AudioData;
# systems stuff
androidLog @20 :AndroidLogEntry;
@@ -2550,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;
@@ -2576,16 +2633,16 @@ struct Event {
# DO change the name of the field and struct
# DON'T change the ID (e.g. @107)
# DON'T change which struct it points to
customReserved0 @107 :Custom.CustomReserved0;
customReserved1 @108 :Custom.CustomReserved1;
customReserved2 @109 :Custom.CustomReserved2;
customReserved3 @110 :Custom.CustomReserved3;
customReserved4 @111 :Custom.CustomReserved4;
customReserved5 @112 :Custom.CustomReserved5;
customReserved6 @113 :Custom.CustomReserved6;
customReserved7 @114 :Custom.CustomReserved7;
customReserved8 @115 :Custom.CustomReserved8;
customReserved9 @116 :Custom.CustomReserved9;
selfdriveStateSP @107 :Custom.SelfdriveStateSP;
modelManagerSP @108 :Custom.ModelManagerSP;
longitudinalPlanSP @109 :Custom.LongitudinalPlanSP;
onroadEventsSP @110 :Custom.OnroadEventSP;
carParamsSP @111 :Custom.CarParamsSP;
carControlSP @112 :Custom.CarControlSP;
backupManagerSP @113 :Custom.BackupManagerSP;
carStateSP @114 :Custom.CarStateSP;
liveMapDataSP @115 :Custom.LiveMapDataSP;
modelDataV2SP @116 :Custom.ModelDataV2SP;
customReserved10 @136 :Custom.CustomReserved10;
customReserved11 @137 :Custom.CustomReserved11;
customReserved12 @138 :Custom.CustomReserved12;
@@ -2638,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()
@@ -145,12 +157,16 @@ class SubMaster:
self.updated = {s: False for s in services}
self.recv_time = {s: 0. for s in services}
self.recv_frame = {s: 0 for s in services}
self.alive = {s: False for s in services}
self.freq_ok = {s: False for s in services}
self.sock = {}
self.data = {}
self.valid = {}
self.logMonoTime = {}
self.logMonoTime = {s: 0 for s in services}
# zero-frequency / on-demand services are always alive and presumed valid; all others must pass checks
on_demand = {s: SERVICE_LIST[s].frequency <= 1e-5 for s in services}
self.static_freq_services = set(s for s in services if not on_demand[s])
self.alive = {s: on_demand[s] for s in services}
self.freq_ok = {s: on_demand[s] for s in services}
self.valid = {s: on_demand[s] for s in services}
self.freq_tracker: Dict[str, FrequencyTracker] = {}
self.poller = Poller()
@@ -177,8 +193,6 @@ class SubMaster:
data = new_message(s, 0) # lists
self.data[s] = getattr(data.as_reader(), s)
self.logMonoTime[s] = 0
self.valid[s] = False
self.freq_tracker[s] = FrequencyTracker(SERVICE_LIST[s].frequency, self.update_freq, s == poll)
def __getitem__(self, s: str) -> capnp.lib.capnp._DynamicStructReader:
@@ -215,14 +229,10 @@ class SubMaster:
self.logMonoTime[s] = msg.logMonoTime
self.valid[s] = msg.valid
for s in self.services:
if SERVICE_LIST[s].frequency > 1e-5 and not self.simulation:
# alive if delay is within 10x the expected frequency
self.alive[s] = (cur_time - self.recv_time[s]) < (10. / SERVICE_LIST[s].frequency)
self.freq_ok[s] = self.freq_tracker[s].valid
else:
self.freq_ok[s] = True
self.alive[s] = self.seen[s] if self.simulation else True
for s in self.static_freq_services:
# alive if delay is within 10x the expected frequency; checks relaxed in simulator
self.alive[s] = (cur_time - self.recv_time[s]) < (10. / SERVICE_LIST[s].frequency) or (self.seen[s] and self.simulation)
self.freq_ok[s] = self.freq_tracker[s].valid or self.simulation
def all_alive(self, service_list: Optional[List[str]] = None) -> bool:
return all(self.alive[s] for s in (service_list or self.services) if s not in self.ignore_alive)

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

@@ -6,6 +6,7 @@ import cereal.messaging as messaging
from cereal.messaging.tests.test_messaging import events, random_sock, random_socks, \
random_bytes, random_carstate, assert_carstate, \
zmq_sleep
from cereal.services import SERVICE_LIST
class TestSubMaster:
@@ -26,7 +27,9 @@ class TestSubMaster:
sm = messaging.SubMaster(socks)
assert sm.frame == -1
assert not any(sm.updated.values())
assert not any(sm.alive.values())
assert not any(sm.seen.values())
on_demand = {s: SERVICE_LIST[s].frequency <= 1e-5 for s in sm.services}
assert all(sm.alive[s] == sm.valid[s] == sm.freq_ok[s] == on_demand[s] for s in sm.services)
assert all(t == 0. for t in sm.recv_time.values())
assert all(f == 0 for f in sm.recv_frame.values())
assert all(t == 0 for t in sm.logMonoTime.values())
@@ -83,6 +86,7 @@ class TestSubMaster:
"cameraOdometry": (20, 10),
"liveCalibration": (4, 4),
"carParams": (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

@@ -0,0 +1,222 @@
#!/usr/bin/env python3
import argparse
import sys
from typing import Any, List, Tuple
DEBUG = False
def print_debug(string: str) -> None:
if DEBUG:
print(string)
def create_schema_instance(struct: Any, prop: Tuple[str, Any]) -> Any:
"""
Create a new instance of a schema type, handling different field types.
Args:
struct: The Cap'n Proto schema structure
prop: A tuple containing the field name and field metadata
Returns:
A new initialized schema instance
"""
struct_instance = struct.new_message()
field_name, field_metadata = prop
try:
field_type = field_metadata.proto.slot.type.which()
# Initialize different types of fields
if field_type in ('list', 'text', 'data'):
struct_instance.init(field_name, 1)
print_debug(f"Initialized list/text/data field: {field_name}")
elif field_type in ('struct', 'object'):
struct_instance.init(field_name)
print_debug(f"Initialized struct/object field: {field_name}")
return struct_instance
except Exception as e:
print(f"Error creating instance for {field_name}: {e}")
return None
def get_schema_fields(schema_struct: Any) -> List[Tuple[str, Any]]:
"""
Retrieve all fields from a given schema structure.
Args:
schema_struct: The Cap'n Proto schema structure
Returns:
A list of field names and their metadata
"""
try:
# Get all fields from the schema
schema_fields = list(schema_struct.schema.fields.items())
print_debug("Discovered schema fields:")
for field_name, field_metadata in schema_fields:
print_debug(f"- {field_name}")
return schema_fields
except Exception as e:
print(f"Error retrieving schema fields: {e}")
return []
def generate_schema_instances(schema_struct: Any) -> List[Any]:
"""
Generate instances for all fields in a given schema.
Args:
schema_struct: The Cap'n Proto schema structure
Returns:
A list of schema instances
"""
schema_fields = get_schema_fields(schema_struct)
instances = []
for field_prop in schema_fields:
try:
instance = create_schema_instance(schema_struct, field_prop)
if instance is not None:
instances.append(instance)
except Exception as e:
print(f"Skipping field due to error: {e}")
print(f"Generated {len(instances)} schema instances")
return instances
def persist_instances(instances: List[Any], filename: str) -> None:
"""
Write schema instances to a binary file.
Args:
instances: List of schema instances
filename: Output file path
"""
try:
with open(filename, 'wb') as f:
for instance in instances:
f.write(instance.to_bytes())
print(f"Successfully wrote {len(instances)} instances to {filename}")
except Exception as e:
print(f"Error persisting instances: {e}")
sys.exit(1)
def read_instances(filename: str, schema_type: Any) -> List[Any]:
"""
Read schema instances from a binary file.
Args:
filename: Input file path
schema_type: The schema type to use for reading
Returns:
A list of read schema instances
"""
try:
with open(filename, 'rb') as f:
data = f.read()
instances = list(schema_type.read_multiple_bytes(data))
print(f"Read {len(instances)} instances from {filename}")
return instances
except Exception as e:
print(f"Error reading instances: {e}")
sys.exit(1)
def compare_schemas(original_instances: List[Any], read_instances: List[Any]) -> bool:
"""
Compare original and read-back instances to detect potential breaking changes.
Args:
original_instances: List of originally generated instances
read_instances: List of instances read back from file
Returns:
Boolean indicating whether schemas appear compatible
"""
if len(original_instances) != len(read_instances):
print("❌ Schema Compatibility Warning: Instance count mismatch")
return False
compatible = True
for struct in read_instances:
try:
getattr(struct, struct.which()) # Attempting to access the field to validate readability
except Exception as e:
print(f"❌ Structural change detected: {struct.which()} is not readable.\nFull error: {e}")
compatible = False
return compatible
def main():
"""
CLI entry point for schema compatibility testing.
"""
# Setup argument parser
parser = argparse.ArgumentParser(
description='Cap\'n Proto Schema Compatibility Testing Tool',
epilog='Test schema compatibility by generating and reading back instances.'
)
# Add mutually exclusive group for generation or reading mode
mode_group = parser.add_mutually_exclusive_group(required=True)
mode_group.add_argument('-g', '--generate', action='store_true',
help='Generate schema instances')
mode_group.add_argument('-r', '--read', action='store_true',
help='Read and validate schema instances')
# Common arguments
parser.add_argument('-f', '--file',
default='schema_instances.bin',
help='Output/input binary file (default: schema_instances.bin)')
# Parse arguments
args = parser.parse_args()
# Import the schema dynamically
try:
from cereal import log
schema_type = log.Event
except ImportError:
print("Error: Unable to import schema. Ensure 'cereal' is installed.")
sys.exit(1)
# Execute based on mode
if args.generate:
print("🔧 Generating Schema Instances")
instances = generate_schema_instances(schema_type)
persist_instances(instances, args.file)
print("✅ Instance generation complete")
elif args.read:
print("🔍 Reading and Validating Schema Instances")
generated_instances = generate_schema_instances(schema_type)
read_back_instances = read_instances(args.file, schema_type)
# Compare schemas
if compare_schemas(generated_instances, read_back_instances):
print("✅ Schema Compatibility: No breaking changes detected")
sys.exit(0)
else:
print("❌ Potential Schema Breaking Changes Detected")
sys.exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,48 +1,56 @@
#!/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),
"liveTorqueParameters": (True, 4., 1),
"liveDelay": (True, 4., 1),
"androidLog": (True, 0.),
"carState": (True, 100., 10),
"carControl": (True, 100., 10),
"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.),
@@ -64,30 +72,46 @@ _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, QueueSize.BIG),
"backupManagerSP": (False, 1., 1, QueueSize.BIG),
"selfdriveStateSP": (True, 100., 10),
"longitudinalPlanSP": (True, 20., 10),
"onroadEventsSP": (True, 1., 1),
"carParamsSP": (True, 0.02, 1),
"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.),
@@ -105,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,22 +4,11 @@ common_libs = [
'params.cc',
'swaglog.cc',
'util.cc',
'i2c.cc',
'watchdog.cc',
'ratekeeper.cc'
'ratekeeper.cc',
]
if arch != "Darwin":
common_libs.append('gpio.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',
@@ -29,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

@@ -1,46 +0,0 @@
import jwt
import os
import requests
from datetime import datetime, timedelta, UTC
from openpilot.system.hardware.hw import Paths
from openpilot.system.version import get_version
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
class Api:
def __init__(self, dongle_id):
self.dongle_id = dongle_id
with open(Paths.persist_root()+'/comma/id_rsa') as f:
self.private_key = f.read()
def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)
def post(self, *args, **kwargs):
return self.request('POST', *args, **kwargs)
def request(self, method, endpoint, timeout=None, access_token=None, **params):
return api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)
def get_token(self, expiry_hours=1):
now = datetime.now(UTC).replace(tzinfo=None)
payload = {
'identity': self.dongle_id,
'nbf': now,
'iat': now,
'exp': now + timedelta(hours=expiry_hours)
}
token = jwt.encode(payload, self.private_key, algorithm='RS256')
if isinstance(token, bytes):
token = token.decode('utf8')
return token
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
headers = {}
if access_token is not None:
headers['Authorization'] = "JWT " + access_token
headers['User-Agent'] = "openpilot-" + get_version()
return requests.request(method, API_HOST + "/" + endpoint, timeout=timeout, headers=headers, params=params)

26
common/api/__init__.py Normal file
View File

@@ -0,0 +1,26 @@
from openpilot.common.api.comma_connect import CommaConnectApi
class Api:
def __init__(self, dongle_id):
self.service = CommaConnectApi(dongle_id)
def request(self, method, endpoint, **params):
return self.service.request(method, endpoint, **params)
def get(self, *args, **kwargs):
return self.service.get(*args, **kwargs)
def post(self, *args, **kwargs):
return self.service.post(*args, **kwargs)
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, 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()

72
common/api/base.py Normal file
View File

@@ -0,0 +1,72 @@
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
self.jwt_algorithm, self.private_key, _ = self.get_key_pair()
def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)
def post(self, *args, **kwargs):
return self.request('POST', *args, **kwargs)
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, payload_extra=None, expiry_hours=1, **extra_payload):
now = datetime.now(UTC).replace(tzinfo=None)
payload = {
'identity': self.dongle_id,
'nbf': now,
'iat': now,
'exp': now + timedelta(hours=expiry_hours),
**extra_payload
}
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, 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, session=None, json=None, **params):
headers = {}
if access_token is not None:
headers['Authorization'] = "JWT " + access_token
version = self.remove_non_ascii_chars(get_version())
headers['User-Agent'] = self.user_agent + version
# 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

@@ -0,0 +1,11 @@
import os
from openpilot.common.api.base import BaseApi
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
class CommaConnectApi(BaseApi):
def __init__(self, dongle_id):
super().__init__(dongle_id, API_HOST)
self.user_agent = "openpilot-"

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

View File

@@ -1,8 +0,0 @@
import platform
def suffix():
if platform.system() == "Darwin":
return ".dylib"
else:
return ".so"

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

@@ -1,5 +1,4 @@
class FirstOrderFilter:
# first order filter
def __init__(self, x0, rc, dt, initialized=True):
self.x = x0
self.dt = dt
@@ -16,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) \

View File

@@ -1,84 +0,0 @@
#include "common/gpio.h"
#include <string>
#ifdef __APPLE__
int gpio_init(int pin_nr, bool output) {
return 0;
}
int gpio_set(int pin_nr, bool high) {
return 0;
}
int gpiochip_get_ro_value_fd(const char* consumer_label, int gpiochiop_id, int pin_nr) {
return 0;
}
#else
#include <fcntl.h>
#include <unistd.h>
#include <cstring>
#include <linux/gpio.h>
#include <sys/ioctl.h>
#include "common/util.h"
#include "common/swaglog.h"
int gpio_init(int pin_nr, bool output) {
char pin_dir_path[50];
int pin_dir_path_len = snprintf(pin_dir_path, sizeof(pin_dir_path),
"/sys/class/gpio/gpio%d/direction", pin_nr);
if (pin_dir_path_len <= 0) {
return -1;
}
const char *value = output ? "out" : "in";
return util::write_file(pin_dir_path, (void*)value, strlen(value));
}
int gpio_set(int pin_nr, bool high) {
char pin_val_path[50];
int pin_val_path_len = snprintf(pin_val_path, sizeof(pin_val_path),
"/sys/class/gpio/gpio%d/value", pin_nr);
if (pin_val_path_len <= 0) {
return -1;
}
return util::write_file(pin_val_path, (void*)(high ? "1" : "0"), 1);
}
int gpiochip_get_ro_value_fd(const char* consumer_label, int gpiochiop_id, int pin_nr) {
// Assumed that all interrupt pins are unexported and rights are given to
// read from gpiochip0.
std::string gpiochip_path = "/dev/gpiochip" + std::to_string(gpiochiop_id);
int fd = open(gpiochip_path.c_str(), O_RDONLY);
if (fd < 0) {
LOGE("Error opening gpiochip0 fd");
return -1;
}
// Setup event
struct gpioevent_request rq;
rq.lineoffset = pin_nr;
rq.handleflags = GPIOHANDLE_REQUEST_INPUT;
/* Requesting both edges as the data ready pulse from the lsm6ds sensor is
very short(75us) and is mostly detected as falling edge instead of rising.
So if it is detected as rising the following falling edge is skipped. */
rq.eventflags = GPIOEVENT_REQUEST_BOTH_EDGES;
strncpy(rq.consumer_label, consumer_label, std::size(rq.consumer_label) - 1);
int ret = util::safe_ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &rq);
if (ret == -1) {
LOGE("Unable to get line event from ioctl : %s", strerror(errno));
close(fd);
return -1;
}
close(fd);
return rq.fd;
}
#endif

View File

@@ -1,33 +0,0 @@
#pragma once
// Pin definitions
#ifdef QCOM2
#define GPIO_HUB_RST_N 30
#define GPIO_UBLOX_RST_N 32
#define GPIO_UBLOX_SAFEBOOT_N 33
#define GPIO_GNSS_PWR_EN 34 /* SCHEMATIC LABEL: GPIO_UBLOX_PWR_EN */
#define GPIO_STM_RST_N 124
#define GPIO_STM_BOOT0 134
#define GPIO_BMX_ACCEL_INT 21
#define GPIO_BMX_GYRO_INT 23
#define GPIO_BMX_MAGN_INT 87
#define GPIO_LSM_INT 84
#define GPIOCHIP_INT 0
#else
#define GPIO_HUB_RST_N 0
#define GPIO_UBLOX_RST_N 0
#define GPIO_UBLOX_SAFEBOOT_N 0
#define GPIO_GNSS_PWR_EN 0 /* SCHEMATIC LABEL: GPIO_UBLOX_PWR_EN */
#define GPIO_STM_RST_N 0
#define GPIO_STM_BOOT0 0
#define GPIO_BMX_ACCEL_INT 0
#define GPIO_BMX_GYRO_INT 0
#define GPIO_BMX_MAGN_INT 0
#define GPIO_LSM_INT 0
#define GPIOCHIP_INT 0
#endif
int gpio_init(int pin_nr, bool output);
int gpio_set(int pin_nr, bool high);
int gpiochip_get_ro_value_fd(const char* consumer_label, int gpiochiop_id, int pin_nr);

View File

@@ -1,4 +1,6 @@
import os
import fcntl
import ctypes
from functools import cache
def gpio_init(pin: int, output: bool) -> None:
@@ -52,3 +54,36 @@ def get_irqs_for_action(action: str) -> list[str]:
if irq.isdigit() and action in get_irq_action(irq):
ret.append(irq)
return ret
# *** gpiochip ***
class gpioevent_data(ctypes.Structure):
_fields_ = [
("timestamp", ctypes.c_uint64),
("id", ctypes.c_uint32),
]
class gpioevent_request(ctypes.Structure):
_fields_ = [
("lineoffset", ctypes.c_uint32),
("handleflags", ctypes.c_uint32),
("eventflags", ctypes.c_uint32),
("label", ctypes.c_char * 32),
("fd", ctypes.c_int)
]
def gpiochip_get_ro_value_fd(label: str, gpiochip_id: int, pin: int) -> int:
GPIOEVENT_REQUEST_BOTH_EDGES = 0x3
GPIOHANDLE_REQUEST_INPUT = 0x1
GPIO_GET_LINEEVENT_IOCTL = 0xc030b404
rq = gpioevent_request()
rq.lineoffset = pin
rq.handleflags = GPIOHANDLE_REQUEST_INPUT
rq.eventflags = GPIOEVENT_REQUEST_BOTH_EDGES
rq.label = label.encode('utf-8')[:31] + b'\0'
fd = os.open(f"/dev/gpiochip{gpiochip_id}", os.O_RDONLY)
fcntl.ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, rq)
os.close(fd)
return int(rq.fd)

View File

@@ -1,92 +0,0 @@
#include "common/i2c.h"
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <cassert>
#include <cstdio>
#include <stdexcept>
#include "common/swaglog.h"
#include "common/util.h"
#define UNUSED(x) (void)(x)
#ifdef QCOM2
// TODO: decide if we want to install libi2c-dev everywhere
extern "C" {
#include <linux/i2c-dev.h>
#include <i2c/smbus.h>
}
I2CBus::I2CBus(uint8_t bus_id) {
char bus_name[20];
snprintf(bus_name, 20, "/dev/i2c-%d", bus_id);
i2c_fd = HANDLE_EINTR(open(bus_name, O_RDWR));
if (i2c_fd < 0) {
throw std::runtime_error("Failed to open I2C bus");
}
}
I2CBus::~I2CBus() {
if (i2c_fd >= 0) {
close(i2c_fd);
}
}
int I2CBus::read_register(uint8_t device_address, uint register_address, uint8_t *buffer, uint8_t len) {
std::lock_guard lk(m);
int ret = 0;
ret = HANDLE_EINTR(ioctl(i2c_fd, I2C_SLAVE, device_address));
if (ret < 0) { goto fail; }
ret = i2c_smbus_read_i2c_block_data(i2c_fd, register_address, len, buffer);
if ((ret < 0) || (ret != len)) { goto fail; }
fail:
return ret;
}
int I2CBus::set_register(uint8_t device_address, uint register_address, uint8_t data) {
std::lock_guard lk(m);
int ret = 0;
ret = HANDLE_EINTR(ioctl(i2c_fd, I2C_SLAVE, device_address));
if (ret < 0) { goto fail; }
ret = i2c_smbus_write_byte_data(i2c_fd, register_address, data);
if (ret < 0) { goto fail; }
fail:
return ret;
}
#else
I2CBus::I2CBus(uint8_t bus_id) {
UNUSED(bus_id);
i2c_fd = -1;
}
I2CBus::~I2CBus() {}
int I2CBus::read_register(uint8_t device_address, uint register_address, uint8_t *buffer, uint8_t len) {
UNUSED(device_address);
UNUSED(register_address);
UNUSED(buffer);
UNUSED(len);
return -1;
}
int I2CBus::set_register(uint8_t device_address, uint register_address, uint8_t data) {
UNUSED(device_address);
UNUSED(register_address);
UNUSED(data);
return -1;
}
#endif

View File

@@ -1,19 +0,0 @@
#pragma once
#include <cstdint>
#include <mutex>
#include <sys/types.h>
class I2CBus {
private:
int i2c_fd;
std::mutex m;
public:
I2CBus(uint8_t bus_id);
~I2CBus();
int read_register(uint8_t device_address, uint register_address, uint8_t *buffer, uint8_t len);
int set_register(uint8_t device_address, uint register_address, uint8_t data);
};

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

@@ -199,7 +199,6 @@ class SwagLogger(logging.Logger):
co = f.f_code
filename = os.path.normcase(co.co_filename)
# TODO: is this pylint exception correct?
if filename == _srcfile:
f = f.f_back
continue

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));
}

1
common/model.h Normal file
View File

@@ -0,0 +1 @@
#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,12 @@ Params::~Params() {
assert(queue.empty());
}
std::vector<std::string> Params::allKeys() const {
std::vector<std::string> Params::allKeys(ParamKeyFlag flag) const {
std::vector<std::string> ret;
for (auto &p : keys) {
ret.push_back(p.first);
if (flag == ALL || (p.second.flags & flag)) {
ret.push_back(p.first);
}
}
return ret;
}
@@ -115,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) {
@@ -140,7 +150,7 @@ int Params::put(const char* key, const char* value, size_t value_size) {
}
// fsync to force persist the changes.
if ((result = fsync(tmp_fd)) < 0) break;
if ((result = HANDLE_EINTR(fsync(tmp_fd))) < 0) break;
FileLock file_lock(params_path + "/.lock");
@@ -195,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,16 +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,
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 = {});
@@ -27,16 +46,18 @@ public:
Params(const Params&) = delete;
Params& operator=(const Params&) = delete;
std::vector<std::string> allKeys() 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

Some files were not shown because too many files have changed in this diff Show More