Commit Graph

2664 Commits

Author SHA1 Message Date
Adeeb Shihadeh 38faa7c2cb bump msgq (#38057)
* bump msgq

* bump msgq

* fix ui
2026-05-21 16:29:27 -07:00
Armand du Parc Locmaria 52e182611d initial usbgpu support (#37906)
* zero ll patched big model

* probe in a subprocess so usbgpu lock gets released

* compiles

* runs

* num_jobs gets overwritten, use side effect

* poll tg devices

* make sure build crashes on missing gpu

* fine not to rely on Device.default

* seperate tg env for each model runner

* comment

* Revert "seperate tg env for each model runner"

This reverts commit f6470cc4258eaeb3e8e37907ef370871c9af5aa4.

* env is shared, gate on flag

* no fallback warp dev must be set

* build for current device only, unless pc/release

* comment

* list

* listen for plug in

* add icon to status bar, read params on every frame (?)

* log available devices

* try copy out when loading?

* Revert "log available devices"

This reverts commit e8c52a5d59456d4820ecb13b99a6c46ea1386a20.

* Revert "try copy out when loading?"

This reverts commit 518f403aa03faeda1950fe3dbce0d9e4c1584455.

* don't trigger device probe/caching on modeld prepare

* re-export with ll and road edges

* dont cache devices in manager process

* get USBGPU from params

* no usbgpu env

* missed one

* sconscript don't poll

* unconditional env

* always explicitely set devices on input tensors

* set DEV so amd uses right compiler and iface??

* fix flag

* bump tg

* rm xdg_cache_home

* tg don't bump all the way

* missing gmmu=0 at compile time

* dm set dev

* tg backend

* update gitignore

* missing import

* unused imports

* rely on Device.DEFAULT at compile time (already the case bc onnxrunner)

* comments

* dm warp needs DEV set too

* build both smol and big

* misc typos

* set dev at compile time

* don't need

* DEV=CPU when getting metadata, ensure we don't grab gpu lock

* this would also grab lock

* put bool

* warp compile always prepare only

* missed one

* poll ui

* missing here

* don't force usbgpu at build time

* tmp patch fetch_fw

* catch all, follow hardwared patterns

* simpler

* compile make input queues

* revert this

* group this more readable

* rm empty line

* make dummy frame using numpy

* revert compile make input queues

* no compiler at runtime

* cleanup

* fine to rebuild all on change to device node for now

* fix usbgpu_present

* fix sconscript

* no size in header stream decompress

* DEBUG=2

* minimal viable feedback

* egpu gray

* oops

* gotta do this actually

* modeld build only depends on modeld devices

* don't ship onnx to release? or chunk

* don't need

* can only set compiler on dev=

* none device works, will use default

* make linter happy

* chunk agnostic onnx input to compile_modeld

* chunk big onnx

* +x chunker

* fix #!

* and don't ship chunked onnx to release

* firmware now in correct location

* better err on missing onnx/chunk

* SConscript also need to accept chunked onnx

* metadata also need to load maybe chunked

* dedupe cmd

* this needs to be on cpu

* devices are set in the tgflags, we already depend on them

* rebuilding on changed order is fine

* read file chunked can already load either chunked or not

* chunk all big onnx

* less confusing

* unused import

* python device to load onnx bytes

* default device for runners, python for metadata

* why not

* chunked to shm
2026-05-19 22:41:57 -07:00
Shane Smiskol e9cf5d67cf ui: offroad alerts params thread (#38043)
* offroad alerts in thread

* stashh

* better

* revert

* revert

* revert

* clean up

* rename

* hack
2026-05-14 22:45:04 -07:00
Shane Smiskol aa26dded8b ui: lower priority background threads (#38031)
* drop realtime so preempt can happen during swap

* prime state and firehose

* and params

* above
2026-05-12 21:33:40 -07:00
Shane Smiskol a06f31b472 ui: param thread (#38029)
* ui param thread

* 5hz

* later

* rename

* temp

* clean up

* no ui mutate from thread

* cmt
2026-05-12 21:24:12 -07:00
Shane Smiskol b3ed39525d ui: bg brightness write thread (#38030)
* bg brightness thread

* rn

* later

* better

* rn
2026-05-12 20:37:57 -07:00
Shane Smiskol af92603d17 Move experimental mode param to ui_state.py (#38017)
* re-do

* rm more

* and that
2026-05-11 21:06:23 -07:00
Shane Smiskol ecb661fe85 ui: get version info once (#38018)
* these are written by manager

* rm
2026-05-11 20:39:46 -07:00
Shane Smiskol dff6a80faf Remove some blocking params 2026-05-11 20:16:54 -07:00
Shane Smiskol 3a764c0ae3 Params: rm nonblocking funcs (#38016)
* rm nonblocking funcs

* same behavior

* and put_bool

* missing!

* and nonblocking

* cmt
2026-05-11 20:00:00 -07:00
Adeeb Shihadeh 93ed08ba20 agnos 18.1.2 + raylib 6.0 (#37997)
* raylib 6

* uv lock

* one more time
2026-05-10 17:19:33 -07:00
Shane Smiskol a3d3d0fea6 Firehose and PrimeState: put_nonblocking 2026-05-09 01:27:47 -07:00
Shane Smiskol 5745909e9b ui: bump priority above plannerd and radard (#37984)
* bump ui prio

* use prio
2026-05-08 02:13:00 -07:00
Shane Smiskol ab1a962803 ui: measure ui state time in CPU time (#37983)
* all

* rename
2026-05-08 00:48:43 -07:00
Shane Smiskol 32671d1c3f ui: nonblocking Params writes (#37982)
ui: nonblocking writes for ExperimentalMode + DriverView toggles + cycle-restart

All four put calls fire from the main render thread on user interaction
and block on disk fsync, causing visible UI frame spikes.

Each consumer is safe under nonblocking:
- onboarding inactivity_callback: write-and-forget (~25 ms saved)
- home long-press exp toggle: ui_state.experimental_mode owns visual state (~10 ms)
- onroad exp_button: $held_mode + selfdriveState owns visual state
- restart_needed_callback (OnroadCycleRequested): cross-process signal,
  consumer is selfdrived which polls the param

BigParamControl-driven toggles in settings (developer.py, toggles.py)
are intentionally left blocking — those widgets refresh visual state
from disk every frame to mirror external changes, which would race a
nonblocking write.
2026-05-07 23:34:53 -07:00
Shane Smiskol 6420e8d92a Scroller: restore tapping home to open settings while it's auto scrolling (#37978)
* restore tapping home to open settings while it's auto scrolling

* rename

* oneline
2026-05-06 23:19:45 -07:00
ZwX1616 2596de8543 Revert "DM: Lancia Delta HF Integrale model (#37696)" (#37971)
This reverts commit d8569b07eb.
2026-05-06 19:25:34 -07:00
Armand du Parc Locmaria dd0690da6f ui: log fps (#37927)
* log raylib fps

* log fps from frame time

* whitespace

* or just log frame time?

* init pubmaster in init window

* yield timings

* bump ordinal

* dont log on screen off

* UInt

* lint

* /0

* oops

* oops2

* more precise raylib frame time, can get fps with 1/ft

* don't crash on screen off

* NL

* no _

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-05-05 01:31:06 -07:00
Shane Smiskol f64f3944a6 will -> may 2026-05-04 16:51:06 -07:00
Shane Smiskol 1caae26cfc restart_needed_callback takes no args 2026-05-04 16:37:15 -07:00
Shane Smiskol 94cf600bfe comma four: warning for enabling alpha long (#37959)
* warning for alpha long on mici

* copy

* don't show green until done

* lambda

* helper

* fix
2026-05-04 16:36:03 -07:00
Trey Moen 1a93104bfd modem.py (#37811) 2026-05-02 10:04:53 -07:00
Shane Smiskol ab43fd1369 ui: re-apply mici/AugmentedRoadView _calc_frame_matrix caching (#37948)
* ui: speed up `mici/AugmentedRoadView` by optimizing _calc_frame_matrix caching (#36669)

speed up AugmentedRoadView by optimizing _calc_frame_matrix caching

* ui: apply rect.x/y as a 2D screen offset post-projection

Removes the parent rect's screen position from the cached
video_transform passed to ModelRenderer. Instead, ModelRenderer
applies (rect.x, rect.y) as a 2D offset to projected_points at draw
time.

Why this works: the rect.x/y term in video_transform gets multiplied
by P_calib[2] before the perspective divide, then divided by the same
value, which cancels out to a simple additive shift on the final
screen coordinate. So adding x to video_transform[0,2] is equivalent
to adding x to screen_x post-projection.

Net effect: the cache key in _calc_frame_matrix no longer needs to
include rect.x/y. Cache stays hot under translation (e.g. swiping
between layouts), and the model overlay tracks the camera at 60Hz
because the offset is updated cheaply each frame.

This addresses the original revert reason for #36669 (model overlay
visually desyncs from camera during a home<->onroad swipe).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ui: update model screen offset every frame, not just on cache miss

set_screen_offset() was called inside the cache-miss path of
_calc_frame_matrix, so the offset only updated at ~20Hz (calib publish
rate). The model overlay visibly lagged the camera during a swipe.

Move it out of the cached path so it updates each frame.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fully clean up

* shorter cmts

* make non

* clean up

* fix ty

---------

Co-authored-by: Dean Lee <deanlee3@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 01:22:02 -07:00
Shane Smiskol 605dfaa1a9 ui: fix torque bar points caching while scrolling (#37946)
* ui: keep arc_bar_pts cache hot when bar is translated

The LRU cache key included (cx, cy), which change every frame when
the parent widget's rect translates (e.g. during a scroll animation
in MainLayout). That made every cache lookup miss, recomputing the
arc geometry twice per frame and dropping fps.

Compute the shape at origin (so the cache key only depends on the
geometry: radius, thickness, angles), then translate to (cx, cy)
after. Cache stays hot under translation.

Measured on comma four (engaged, scrolling): ~5fps recovered while
moving between layouts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fully clean up

* fully clean up

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 00:00:01 -07:00
Shane Smiskol d20794f900 mici home: alerts pill touch zone only when alerts (#37940)
* fix

* clean up
2026-05-01 02:01:23 -07:00
Shane Smiskol dd7da3153a mici ui: don't show stale frame on startup (#37936)
* fix frame under text

* claude always taking the hard path

* cmt

* it still shows on start

* revert

* fix

* wait to show

* already a bug, don't fix here

* cmt

* cmt
2026-05-01 01:45:49 -07:00
Daniel Koepping dab51a864f show alert severity (#37931)
* alert icons, sort by severity

* rename
2026-04-29 15:26:55 -07:00
Shane Smiskol 13ea74bcb4 ui: fix DM orange transitions (#37922)
* fix transitions and use eff active

* huh

* wtf

* clean up

* strict

* strict

* back

* back
2026-04-27 00:13:30 -07:00
ZwX1616 dc6e644359 ui: DM icon turns orange briefly after awareness drops (#37826)
* change icon after 1s

* match

* timinng

* speed up

* tint

* cleanup
2026-04-26 17:49:21 -07:00
Daniel Koepping 494eba5961 Raise mici thermal limits (#37891)
* adjust thermal bands

* raise OFFROAD_DANGER_TEMP

* rename thermal bands

* rm warm
2026-04-24 13:22:43 -07:00
Adeeb Shihadeh 7d71354fd0 ui: remove firehose count (#37886) 2026-04-22 19:57:59 -07:00
Daniel Koepping 49685fc2bc ui: fix long maneuver toggle (#37622) 2026-04-22 17:59:34 -07:00
ZwX1616 571a547671 Fix driver preview alert text and sound (#37875)
* fix type and add text

* short

* fix sound too

---------

Co-authored-by: Comma Device <device@comma.ai>
2026-04-21 16:19:20 -07:00
Adeeb Shihadeh b29d0a17af DM: readability, part 1 (#37872)
* spellings

* unused

* no roll

* lil more

* lil more

* one more

* policy enum

* better trans

* set_timer -> set_policy

* set_timer -> set_policy

* no yaonet

* del redundant code

---------

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
2026-04-21 15:43:13 -07:00
Adeeb Shihadeh 6996e87f8d dm: helpers.py -> policy.py (#37864) 2026-04-20 19:20:48 -07:00
stef 5d7155fdda body ui c3 & c4 (#37794)
* c4 body ui

* clean up diff

* clean up

* default bodyview debug with True

* remove battery indicator and fix close settings bug

* organize debug file

* clean

* clean up frame index

* remove unneccessary is body check

* update bodyview

* remove joystick_debug_mode based events

* remove debug script

* apply suggestions

* clean diff

* clean diff

* move ignition message

* save a line

* remove visibility set and fix tici body face when sidebar open

* remove explicit textColor offroad message

* remove unused imports

* revert pairing dialog

* apply suggestions

* add body specific icon

* add body icon for homescreen

* set mode for state on tici after on body changed

* tiny

* tweak

* v

* tweaks

* icon ratio was wrong!

* same order

* rm

* apply suggestions

* remove commented lines in animation

* onroad click callback was on home bug and fix setup widget settings call back hack

* fix body changed

* one liner

* clean up

* formatting

* if false

* revert to master + reimplement

* close sidebar on body home tici

* make ignition message bigger on c3

* flip eye direction when turning

---------

Co-authored-by: Nick <nickorie@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-04-18 13:00:05 -07:00
ZwX1616 389b639ef2 DriverMonitoringState v2 (#37799)
* draft ds

* better names

* what is this

* build new

* better names2

* more

* bit more cleanup

* rm those

* .

* .2

* selfdrived

* depre

* hk

* fix test

* fix rest

* 1

* fix enum

* update cereal

* fix rest

* more

* add step

* fix all

* imports

* cant?

* .

* simplify

* bool

* fix some migrate

* cleanup

* fix fix

* Update cereal/log.capnp

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

* touchup

* what

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-04-17 21:58:05 -07:00
Shane Smiskol 63ab2fb1b3 four: calibrate DM orientation (#37149)
* calib face

* clean up

* fix double neg

* cmt

* local changes

* keep for dm preview for now

* comments

* comments

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

* Update selfdrive/ui/mici/onroad/driver_state.py
2026-04-15 10:15:32 -07:00
Daniel Koepping 1276452cfc add blocked-startup offroad label (#37833)
add blocked-startup offroad label
2026-04-15 00:15:57 -07:00
Daniel Koepping 8b2eac4d1f use warning as alert icon (#37832)
replace bell with warning icon
2026-04-15 00:09:59 -07:00
Daniel Koepping e78e6261ca Add touch zone for alerts (#37819)
* add touch zone for alerts

* adjust touch zone

* 200 px zones

* 50/30 split

* adjust zones
2026-04-14 23:19:40 -07:00
Daniel Koepping 4a15bdcdae Add alerts pill (#37821)
* add notification pill

* add update

* comment

* lfs upload

* rename

* fix

* try widget

* white is banned!

* same for bell

* need everywhere?

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2026-04-14 12:02:30 -07:00
Jason Wen 9db432e8fb installer: update cached remote URL during fork installs (#37797) 2026-04-10 01:33:47 -07:00
Adeeb Shihadeh a89ed55b65 cereal: group inline deprecated fields (#37791) 2026-04-09 10:41:04 -07:00
Shane Smiskol 934fd5a5a8 soundd: ramp immediate alert volume (#37788)
* raise volume

* stuff

* fix

* 4s

* revert

* clean up

* lean up
2026-04-09 00:13:27 -07:00
Shane Smiskol b5576de97e soundd: update volume while playing alert (#37789)
lways
2026-04-08 23:56:24 -07:00
ZwX1616 d8569b07eb DM: Lancia Delta HF Integrale model (#37696)
* 00c00ac7-7b6e-4546-b86f-7ddd5f0596b4

* mici cleanup

* update msg

* rename
2026-04-01 16:14:15 -07:00
Shane Smiskol bf43c7e8c7 fix scaled exclamation point 2026-03-31 18:22:56 -07:00
Daniel Koepping 6b94c47c6a Lateral maneuver report (#37562)
* lateral report

* mutually exclude buttons

* gating

* set maneuver

* add timer

* timer text

* fix plot

* use curvature

* more curves

* fix gating

* rm delay

* highway speed only

* msg

* add sine

* add step-down

* use relative

* text

* stabilize

* tuning

* windup

* text

* winddown

* no windup

* tuning

* more tuning

* more

* formatting

* test faster

* extend sine

* report crossings

* add readme

* clean report

* fix lint

* gating

* fix

* straighter

* compensate roll

* rm abs roll

* len

* Revert "rm abs roll"

This reverts commit a22d6bb136f90d2bf997e6b9aeee2f784398ef42.

* Revert "compensate roll"

This reverts commit dfda52119cc4a2e29ac2854b9154c08459086fea.

* print actuators

* show curve and roll

* tune roll

* text

* slower

* timer

* too much banked streets in US

* readme

* filter incomplete

* plot jerk

* plot angle jerk

* lil edits

* fix lint

* apply suggestions

* better table

* apply comments

* clean

* shane comments

* deflicker

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2026-03-27 13:31:00 -07:00
Adeeb Shihadeh 5766202763 translations: auto-generate with codex (#37462) 2026-03-23 08:59:37 -07:00