Compare commits

..

2071 Commits

Author SHA1 Message Date
rav4kumar
6b10358865 sunny said to split it, now he is going to say make separate pr... coming up 2025-10-13 13:40:48 -07:00
rav4kumar
79e84fe081 clean up 2025-10-13 13:16:35 -07:00
rav4kumar
c1416c5c06 clean up 2025-10-13 12:55:55 -07:00
rav4kumar
2a4317aa56 vibe pytest cleanup 2025-10-13 12:55:55 -07:00
rav4kumar
555a0d1393 clean ul; 2025-10-13 12:55:55 -07:00
rav4kumar
f1f9894777 missing params 2025-10-13 12:55:55 -07:00
rav4kumar
0ff2dde674 vibe: Linear Interpolation 2025-10-13 12:55:55 -07:00
rav4kumar
1ddd0ea633 return type 2025-10-13 12:55:55 -07:00
rav4kumar
ba0f963357 good time to remove 2025-10-13 12:55:55 -07:00
rav4kumar
833a13e076 so picky 2025-10-13 12:55:55 -07:00
rav4kumar
652ede7264 vibe pytest 2025-10-13 12:55:55 -07:00
rav4kumar
1cd9c8cd3c vibe 2025-10-13 12:55:53 -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
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
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
Jason Wen
17e25f78b4 ui: dynamic ICBM status (#1357)
* ui: dynamic ICBM status

* straight up pls
2025-10-10 17:00:44 -04:00
Nayan
9b92cdd2cc ui: fix standstill timer reset when offroad (#1351)
Standstill timer fix
2025-10-09 23:57:09 -04: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Jason Wen
85d2653fda Speed Limit Assist: No Easter Eggs 2025-09-30 17:50:35 -04: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
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
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
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
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
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
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
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
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
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
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
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
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
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
Adeeb Shihadeh
ffd54e41ee bump manager starting time after 519ea9d 2025-03-17 15:19:34 -07:00
commaci-public
469b494026 [bot] Update Python packages (#34893)
* Update Python packages

* fix ruff

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-03-17 12:47:49 -07:00
Adeeb Shihadeh
fe08e52683 0.9.9 soon 2025-03-17 09:26:52 -07:00
Dean Lee
5cffaf5bb5 url_file.py: remove the unnecessary str() wrapping around the hexdigest() (#34891)
remove the unnecessary str() wrapping around the hexdigest()
2025-03-17 12:23:57 +00: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
eFini
d1042df632 Multilang: Update ZH translations (#34889)
update zh translations
2025-03-16 20:39:50 -07: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
Shane Smiskol
9571fc5607 radard: use a filter for aLeadTau (#34883)
use a filter
2025-03-15 23:49:22 -07:00
Jason Wen
f50d7a1842 ui: Update FirehosePanel with sunnypilot ui updates (#666) 2025-03-16 02:34:25 -04:00
Shane Smiskol
abc1c5fb95 selfdrived: add canError for radar can errors (#34873)
radar can invalid
2025-03-15 22:21:58 -07:00
Adeeb Shihadeh
c0b39d328d fix typo 2025-03-15 22:08:43 -07: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
Adeeb Shihadeh
561d33d81e remove '-release' suffix 2025-03-15 20:55:03 -07: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
Adeeb Shihadeh
519ea9dcab Make model daemons Python processes (#34880) 2025-03-15 15:55:29 -07: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
Adeeb Shihadeh
fb7b9c0f94 camerad: log failed sync time (#34878)
* camerad: log failed sync time

* mv

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-15 14:02:03 -07:00
Shane Smiskol
5c3020844e car interfaces: each specify their own dependencies (#34874)
* remove these

* fix

* oops

* clean up

* nl

* bump
2025-03-14 22:37:49 -07:00
Shane Smiskol
4e7c605a79 Ford: radar is invalid while in reverse (#34866)
* temp unavailable

* fix

* replay multiple

* clean up

* bump

* rename

* reason is in liveTracks

* more rename

* bump

* fix

* bump

* fix

* need to totally ignore it, or it will throw commIssues for radarErrors or not alive

* this is just simpler -- good thing kept struct

* rm
2025-03-14 21:08:30 -07:00
Shane Smiskol
714348e17e liveTracks: bool error fields (#34869)
* bool fields

* liveTracks.valid is already set using errors

* fix

* clean up

* same but diff

* fix

* fix

* fix test

* clean up

* rm radarErrors

* whoops

* no struct

* Revert "no struct"

This reverts commit ed8ec02493673f850800344c73c969508fc38991.

* bump

* update
2025-03-14 20:40:28 -07:00
Shane Smiskol
811272dc28 radarState: check average frequency (#34872)
* always check radarState freq since it polls on modelV2 and sends at a fixed rate

* fine

* can just check this since valid is all_checks on liveTracks, and liveTracks.valid is len(errors) as well

full circle
2025-03-14 19:37:27 -07:00
Adeeb Shihadeh
e1eac057ca camerad: fix rare BPS startup issues (#34871)
* repros

* handle old frames

* cleanup

* more freq

* fix request id skipping

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-14 19:30:09 -07:00
Shane Smiskol
349d569dfa radard: radar errors are captured in valid flag (#34870)
* already set valid from this

* clean up
2025-03-14 17:21:02 -07:00
Shane Smiskol
07edc54db6 bump opendbc (#34868)
bump
2025-03-14 16:16:10 -07:00
Shane Smiskol
7ab558a789 run_process_on_route: support multiple processes (#34867)
support multiple procs
2025-03-14 16:09:23 -07:00
Kacper Rączy
02519b7a6e process_replay: refactor migrate_deviceState (#34864)
* Refactor migrate_deviceState

* Fix again
2025-03-14 22:24:41 +00:00
Shane Smiskol
a8bb9cfe41 Revert "ignore"
This reverts commit bd2f0017ff.
2025-03-13 20:50:51 -07:00
Shane Smiskol
bd2f0017ff ignore 2025-03-13 20:49:55 -07:00
Dean Lee
c0b6d58236 setup: fix dangling pointer Issue in curl header setup (#34860)
fix dangling pointer in curl header setup
2025-03-13 10:42:22 -07:00
Dean Lee
1cd6ca467d pandad: forward debug logs to cloudlog (#34859)
forward debug logs to cloudlog
2025-03-13 10:40:26 -07:00
Kacper Rączy
3652dff77a paramsd: allow uncalibrated values while calibrating (#34852)
* Use uncalibrated values

* Use calib_valid

* Move valids together

* Add calibration valid field

* Add migration block for new field

* No paramsdTemporaryError while calibrating

* comment

* Fix static issues

* Update ref commit

* Comment

* Remove redundant field

* check for calstatus in selfdrived

* Remove comment

* Update ref commit
2025-03-13 07:51:25 +01: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
royjr
41536f6e48 ui: update arabic translations (#34857)
Update main_ar.ts
2025-03-12 19:21:28 -07:00
Adeeb Shihadeh
196eb50d23 camerad: log whether sync fails in IFE or BPS (#34854) 2025-03-12 15:59:27 -07:00
Adeeb Shihadeh
96641ac12c no gh actions in release 2025-03-12 14:56:40 -07:00
Adeeb Shihadeh
800a41c4e1 agnos 11.11 (#34816) 2025-03-12 14:02:54 -07:00
Alexandre Nobuharu Sato
8c14985c00 Multilang: update pt_BR translations (#34851)
* Multilang: update pt_BR translations

* no need (s)
2025-03-12 11:04:55 -07:00
Dean Lee
dbbb938ae0 commonmodel: release input_frame_cl and input_frames_cl (#34850)
release input_frame_cl and input_frames_cl
2025-03-12 10:44:04 -07:00
Shane Smiskol
04aed6ba89 Firehose: fix plural is/are (#34849)
* use qt plurals

* remove old
2025-03-12 01:38:13 -07:00
Shane Smiskol
4e469a2987 raise timeout for forks 2025-03-12 00:48:49 -07:00
Shane Smiskol
b732e8eee9 bump opendbc (#34848)
* bump

* bump

* adds EV flag
2025-03-12 00:47:34 -07:00
Adeeb Shihadeh
3f6fd3da78 test_onroad threshold tuning 2025-03-11 16:03:00 -07:00
Shane Smiskol
18db927fc1 test_models: convert can data to namedtuple (#34845)
* stash

* fastest

* faster but not fastest

* clean up

* here too

* fix that

* revert

* already sorted

* rev

* clean up

* allow empty

* lower tm time for cache miss
2025-03-11 14:58:05 -07:00
Dean Lee
4d86e0b039 pyproject.toml: add pygame and dbus-next dependencies (#34826)
add pygame and dbus-next dependencies to pyproject.toml
2025-03-11 13:57:20 -07:00
Adeeb Shihadeh
8c359892be camerad: clear request queue on exit (#34842)
* camerad: doesn't need rt

* clear q
2025-03-11 11:02:02 -07:00
Adeeb Shihadeh
b33342c18f loggerd: limit encoded queue size (#34837)
* loggerd: limit encoded queue size

* less spammy
2025-03-11 10:22:49 -07:00
Lee Jong Mun
dc9b5b7c25 kor translation update (#34838) 2025-03-10 17:29:55 -07:00
ZwX1616
1c678c910e camerad: fix AE oscillation (#34833)
* flooring is fine

* .

* better solution

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-10 16:01:03 -07:00
Alexandre Nobuharu Sato
58e5b31cca Multilang: update pt-BR translations (#34832) 2025-03-10 13:56:21 -07:00
github-actions[bot]
c749e90846 [bot] Update translations (#34829)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-10 10:57:25 -07:00
commaci-public
5b6c7ddc93 [bot] Update Python packages (#34830)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-10 10:57:06 -07:00
Adeeb Shihadeh
f870e48b3a BASEDIR -> DIR 2025-03-10 09:43:46 -07:00
Dean Lee
5574b91d17 python ui: add confirm dialog implementation (#34828)
add confirm dialog implementation
2025-03-10 08:28:32 -07:00
Dean Lee
2bfbb181e5 python ui: add Keyboard Implementation (#34827)
implement keyboard
2025-03-09 18:48:01 -07:00
Dean Lee
06d6f254df radard: use dict comprehension for ar_pts construction (#34824)
use dict comprehension
2025-03-09 18:10:30 -07: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
Adeeb Shihadeh
8edaaeae50 one more firehose faq 2025-03-09 10:07:14 -07: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
Alexandre Nobuharu Sato
08e70f19ed Multilang: update pt-BR translations (#34821)
update pt-BR translations
2025-03-09 09:50:22 -07:00
Lee Jong Mun
ddfbb88cde kor translation update (#34822) 2025-03-09 09:49:47 -07: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
Dean Lee
b98e10acc1 pandad_api_impl: add nogil to can_list_to_can_capnp (#34823)
add nogil to can_list_to_can_capnp
2025-03-08 20:28:08 -08: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
commaci-public
ce355250be [bot] Update Python packages (#34819)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-07 22:04:03 -08:00
Adeeb Shihadeh
878ca53d78 hw: remove unused function 2025-03-07 19:01:11 -08:00
commaci-public
7090c1be59 [bot] Update Python packages (#34818)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-07 17:25:07 -08:00
Shane Smiskol
d469ce669b test_models: missing skip dashcam for panda safety
found when using release safety FW
2025-03-07 16:58:18 -08:00
ZwX1616
d807b5c476 Filet o Fish model (#34798)
* 690b01c3 seems ok

* correct temporal

* push

* inplace

* bs

* what thw

* is this wrong

* frames are skipped

* new models

* simplify decimation

* clean up

* clean up modelframe

* need attr

* lint

* 0

* use all samples

* this should break - Revert "use all samples"

This reverts commit 6c0d7943ac5fbb7ae60af1a1201e2423e4c3c105.

* add lc probs

* Revert "this should break - Revert "use all samples""

This reverts commit ca38c54333555266a0d2c885c28af28941841431.

* Reapply "this should break - Revert "use all samples""

This reverts commit a3f0246f209f85f06b9090d9492bfba32ed8cfed.

* Revert "Reapply "this should break - Revert "use all samples"""

This reverts commit 7fd3d2a191b688e5ef7b4dcc8f5379e900af10f8.

* new fish

* e07ce1de-bdea-463e-b5bc-a38ce8d43f4f/700

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-07 14:24:22 -08:00
Dean Lee
2d2efb3f58 pyui: implement styled label and text box (#34813)
implement styled label
2025-03-07 14:20:49 -08:00
Dean Lee
fa79b29cba soundd: use with statement for wave.open to ensure proper resource cleanup (#34815)
use with statement for wave.open to ensure proper resource cleanup
2025-03-07 13:08:05 -08:00
Dean Lee
3e629acf79 camerad: use ALL_CAMERA_CONFIGS array (#34810)
use ALL_CAMERA_CONFIGS array
2025-03-07 10:31:01 -08:00
Dean Lee
a0a9df2d55 loggerd: enhance ZstdFileWriter test coverage with variable data sizes (#34812)
enhance ZstdFileWriter test coverage
2025-03-07 10:23:46 -08:00
Shane Smiskol
0789877cd3 paramsd: fix unbounded yaw rate while calibrating (#34806)
* rm

* comments

* default values when yaw rate invalid

* clean up

Revert "default values when yaw rate invalid"

This reverts commit e983abb3b009f15a57ebdfbadd4f616aba5b266e.

do the same for yaw rate we do for roll

and

* 1 is fine

* update refs

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2025-03-06 22:44:09 -08:00
commaci-public
e61a4ac76e [bot] Update Python packages (#34805)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-06 19:43:02 -08:00
github-actions[bot]
11618c617f [bot] Update translations (#34804)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-06 19:42:47 -08:00
Shane Smiskol
ae3a715f51 test_fw_query_on_routes: support no FW 2025-03-06 18:52:46 -08:00
Adeeb Shihadeh
ca7b4340c1 camerad: make recovery reset threshold based on queue depth (#34803)
Co-authored-by: Comma Device <device@comma.ai>
2025-03-06 16:57:37 -08:00
Adeeb Shihadeh
c3a83ccc63 simplify release build 2025-03-06 16:00:48 -08:00
Shane Smiskol
08fea7fa27 Fix torque control layout 2025-03-06 13:20:56 -08:00
Adeeb Shihadeh
63f60505db ui: no scroll terms (#34797)
* remove scroller

* match setup style

* rm that
2025-03-06 10:55:39 -08:00
Mauricio Alvarez Leon
88fa3cdd90 op adb: change directory to match ssh (#34770)
Update adb_shell.sh
2025-03-06 10:18:12 -08:00
Dean Lee
e9f7c01a3a camerad: move output_type to config (#34792)
move output_type to config
2025-03-06 10:17:58 -08:00
Dean Lee
e3ce984701 clutil: remove deprecated and unused code (#34793)
remove deprecated and unused code
2025-03-06 10:17:11 -08:00
Dean Lee
2c2c6e6437 deleter: fix duplicate segments in get_preserved_segments return value (#34795)
fix duplicate segments in get_preserved_segments return value
2025-03-06 10:16:56 -08:00
Dean Lee
47f37d5fec remove numpy_fast.py (#34796) 2025-03-06 10:14:53 -08:00
Robbe Derks
1506ff3122 bump panda 2025-03-06 17:29:04 +01: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
Shane Smiskol
f3bfdf6969 Rivian: don't show set speed in UI (#34705)
* Rivian: don't show set speed in UI

* stash

* bump

* use speed

* bump

* bump to master

* update refs

* default true
2025-03-05 23:49:00 -08:00
Shane Smiskol
59bb5c54b3 Rivian: cancel command (#34767)
* test it

* bump

* bump

* bump

* bump

* clean up

* bump refs
2025-03-05 20:50:22 -08:00
Shane Smiskol
95adfd97f0 bump opendbc 2025-03-05 20:37:30 -08:00
Adeeb Shihadeh
8c2cd247f0 camerad: stress test (#34735)
* refactor a bunch of stuff

* prob

* enable

* rm print

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-05 19:31:44 -08:00
Adeeb Shihadeh
4bb0dfd59c camerad: cleaner queueing logic (#34786) 2025-03-05 17:12:30 -08:00
Adeeb Shihadeh
f4d17cbfdd camerad: sanity check tests (#34785)
lil more
2025-03-05 16:54:35 -08:00
Adeeb Shihadeh
65bf2ec0ea test_onroad: add sanity check on ecode outputs (#34784)
* test_onroad: add sanity check on ecode outputs

* exact
2025-03-05 15:58:03 -08:00
Adeeb Shihadeh
821148150b Revert "make test_onroad faster (#34704) (#34783)
* Revert "make test_onroad faster (#34704)"

This reverts commit 470ec46830.

* try this

* add there

* cleanup

* try this

* lil more

* list

* classic

* don't skip test
2025-03-05 15:42:22 -08:00
Jason Young
d15599a30b tools: updates to find_segments_with_message notebook (#34782)
* cleanup, refactor, progress bar

* more cleanup, add EXTRA_SEGMENTS

* not everyone can see that route

* add to README

* update README

* red panda support
2025-03-05 16:40:51 -05:00
Harald Schäfer
e394569eae Pre leak TinyGrad unbump (#34781) 2025-03-05 13:33:45 -08:00
Shane Smiskol
a82db2d331 Revert "Filet o Fish model" (#34780)
Revert "Filet o Fish model (#34775)"

This reverts commit 31076b818d.
2025-03-05 01:41:16 -08:00
github-actions[bot]
50d059f96b [bot] Update translations (#34778)
Update translations

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-04 22:54:21 -08:00
commaci-public
54f845c369 [bot] Update Python packages (#34779)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-04 22:54:05 -08:00
ZwX1616
31076b818d Filet o Fish model (#34775)
* 690b01c3 seems ok

* correct temporal

* push

* inplace

* bs

* what thw

* is this wrong

* frames are skipped

* new models

* simplify decimation

* clean up

* clean up modelframe

* need attr

* lint

* 0

* use all samples

* this should break - Revert "use all samples"

This reverts commit 6c0d7943ac5fbb7ae60af1a1201e2423e4c3c105.

* add lc probs

* Revert "this should break - Revert "use all samples""

This reverts commit ca38c54333555266a0d2c885c28af28941841431.

* Reapply "this should break - Revert "use all samples""

This reverts commit a3f0246f209f85f06b9090d9492bfba32ed8cfed.

* Revert "Reapply "this should break - Revert "use all samples"""

This reverts commit 7fd3d2a191b688e5ef7b4dcc8f5379e900af10f8.

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-04 20:35:57 -08:00
ZwX1616
3f9437e249 process_replay: support lane changes in model_replay (#34777)
* lane changes need to see these

* newline

* add lc probs
2025-03-04 20:24:17 -08:00
ZwX1616
3e8e7e8e6d update model_replay route (#34774)
* update route

* Update selfdrive/test/process_replay/model_replay.py

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

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-03-04 18:36:30 -08:00
ZwX1616
7dfbf0b1e1 process_replay: set sensor in cameraState migration (#34776)
set sensor in cameraState migration
2025-03-04 18:28:44 -08:00
Alexandre Nobuharu Sato
b8362fd725 Multilang: update pt-BR translations (#34773)
update pt-BR translations
2025-03-04 15:25:01 -08:00
Shane Smiskol
bc422a0738 juggle: use DBC dict generator (#34772)
* juggle: support tesla DBC

* better

* fix

* sort
2025-03-04 13:54:43 -08:00
Jason Young
fe4585ee88 tools: notebook to search commaCarSegments for a CAN ID (#34771) 2025-03-04 16:27:25 -05:00
Adeeb Shihadeh
e5ba737db0 Revert "Filet o Fish model (#34637)"
This reverts commit 159b1c9eb4.
2025-03-03 22:56:59 -08:00
Shane Smiskol
f818c5528f bump opendbc (#34768)
bump
2025-03-03 20:24:16 -08:00
Shane Smiskol
6891b795c4 controls: limit max curvature from lateral acceleration (#34651)
* limit max curvature with lateral accel too

* not a guideline

* roll compensation in curv clip

* improve clipping and alerting

* typo

* clean up

* no float

* get ready

* good idea

* good

* redundant

* TODO

* test

* do max curvature clip last

* flip

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2025-03-03 19:47:52 -08:00
Shane Smiskol
949aaaba2c regenerate problem segments 2025-03-03 19:34:49 -08:00
Shane Smiskol
9c9a060365 saturated warning: remove redundant speed check 2025-03-03 19:11:53 -08:00
Kacper Rączy
338b7c915f regen: use ci bucket for files (#34766)
* Remove route meta mode

* use get_url

* Remove useless import
2025-03-04 03:10:48 +00:00
Adeeb Shihadeh
34a072890c fix translations 2025-03-03 18:39:12 -08:00
Adeeb Shihadeh
701868d5cd firehose auto start + stats (#34747)
* don't need that

* stats

* lil more

* lil more

* cleanup

* tweaks

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-03 18:21:02 -08:00
Adeeb Shihadeh
41346b2cc7 agnos 11.10 (#34764) 2025-03-03 16:40:35 -08:00
Shane Smiskol
68d22b960b rename steer_limited (#34763)
rename
2025-03-03 16:28:49 -08:00
ZwX1616
159b1c9eb4 Filet o Fish model (#34637)
* 690b01c3 seems ok

* correct temporal

* push

* inplace

* bs

* what thw

* is this wrong

* frames are skipped

* new models

* simplify decimation

* clean up

* clean up modelframe

* need attr

* lint

* 0

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-03-03 15:15:36 -08:00
commaci-public
e39e4b9a61 [bot] Update Python packages (#34761)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-03 14:47:18 -08:00
Adeeb Shihadeh
ec81e78c54 no gps localizer 2025-03-03 12:58:43 -08:00
Adeeb Shihadeh
97ffda4ada agnos 11.9 (#34762) 2025-03-03 10:16:05 -08:00
eFini
9200ae38c1 zhs/zht translation update (#34760)
* updated CHT/CHS translations

* better "firehose" translation
2025-03-03 09:37:24 -08:00
Adeeb Shihadeh
1836d1594c Revert "selfdrived: remove ignored process list (#34491)", needed for C3 with NVMe for now
This reverts commit 82722217be.
2025-03-03 09:28:16 -08:00
Shane Smiskol
792e75582a Ford CAN FD: enable safety in release (#34759)
bump
2025-03-02 22:57:17 -08:00
programanichiro
0f2bc09fe7 ja translation update (#34745)
* Firehoseモード翻訳

* 翻訳調整。

* 翻訳調整。

* はみ出し、表現調整。

* Openpilot->openpilot

* 翻訳調整。

* 句読点調整。
2025-03-02 20:31:49 -08:00
Adeeb Shihadeh
a2bc5061e4 camerad: fix bps flush (#34758) 2025-03-02 20:22:06 -08:00
Adeeb Shihadeh
a922b69239 jenkins: enable os04 test (#34757)
This reverts commit a4980dbb0d.
2025-03-02 20:12:22 -08:00
Dean Lee
c52112ad4e loggerd: eliminate recursion from handle_encoder_msg (#33453)
* refactor handle_encoder_msg

* removing the recursion only

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-03-02 20:01:21 -08:00
Maxime Desroches
2431bc6262 ci: fix firehose UI preview position (#34754)
prev
2025-03-02 17:14:55 -08:00
Maxime Desroches
e539e34f73 ci: only specify scene name once in UI preview test (#34752)
remove this garbage
2025-03-02 16:56:38 -08:00
Adeeb Shihadeh
29ff29bcb5 master-ci is dead 2025-03-02 13:49:19 -08:00
Adeeb Shihadeh
c32c405f65 remove model shims (#34750) 2025-03-02 13:39:36 -08:00
Adeeb Shihadeh
0abe348283 gc old stuff in modeld 2025-03-02 13:23:33 -08:00
Adeeb Shihadeh
54f1b00447 Log git source commit (#34749)
* Log git source commit

* strip

* fix trim

* no trim
2025-03-02 13:11:38 -08:00
Adeeb Shihadeh
2d9f33cbe2 detect BASEDIR 2025-03-02 12:46:00 -08: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
Mauricio Alvarez Leon
38100805bf move update_translations from scons to GHA (#34481)
* remove update_translations from scons

* update_translations GHA

* working GHA

* fix scons fails

* job name

* remove test_update_translations

* cleanup

* move to repo-maintenance

* Update .github/workflows/repo-maintenance.yaml

* bring that back

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-03-02 10:20:03 -08:00
Adeeb Shihadeh
5067ee1e94 plotjuggler: fix for fork routes 2025-03-02 09:45:05 -08:00
Lee Jong Mun
f50e1baa89 kor translation update (#34741) 2025-03-01 17:34:38 -08:00
Adeeb Shihadeh
095088ea91 Deprecate master-ci (#34744) 2025-03-01 13:16:44 -08:00
Dean Lee
2d882b716a replay: update help text with route and service list details (#34743)
improve help
2025-03-01 10:33:49 -08: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
commaci-public
cace242433 [bot] Update Python packages (#34739)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-03-01 00:50:08 -08:00
Adeeb Shihadeh
f90faf30bc bump to 0.9.9 2025-02-28 19:35:34 -08:00
Adeeb Shihadeh
a1ac4ce23f update release notes 2025-02-28 17:10:47 -08:00
Shane Smiskol
a14bcb5461 fix static analysis 2025-02-28 17:01:20 -08:00
Shane Smiskol
7d43fbae7f debug_fw_fingerprinting_offline: add rxoffset 2025-02-28 15:55:50 -08:00
Adeeb Shihadeh
33e84ad4b3 dedicated firehose ui (#34712)
* init

* lil more

* revert that for now

* update that too

* update

* update test

* update

* i hate translations
2025-02-28 15:12:40 -08:00
Adeeb Shihadeh
00e447bc30 Revert "camerad: make robust to introduced failures (#34723)"
This reverts commit c10abce1d5.
2025-02-28 14:09:53 -08:00
Willem Melching
9d65a49ee8 cabana SocketCanStream: support CAN-FD (#34728) 2025-02-28 10:31:58 -08:00
Kacper Rączy
00a0547978 paramsd: invalid angle offset alert (#34715)
* Add angle offset valid field

* Remove print

* Move it

* Add check in selfdrived

* Same thing for stiffnessFactor and steerRatio

* Fix

* Alert callback

* Fix bugs

* Fix

* Update events

* Make it functional

* Ref commit

* Update ref commit

* Remove dot

* Fix

Fix formatting

* Default values

* Update ref commit
2025-02-28 18:40:12 +01:00
Dean Lee
d9bc9be388 camerad: ensure sync objects are assigned only on successful creation (#34731)
ensure sync objects are assigned only on successful creation
2025-02-28 07:49:48 -08:00
Dean Lee
1bd0d6577c camerad: remove unnecessary pthread linkage (#34732)
remove unnecessary pthread linkage
2025-02-28 07:49:10 -08:00
Dean Lee
1c66515bed cabana: simplify streaming arguments (#34730)
* simplify streaming arguments

* update README
2025-02-28 04:48:22 -08:00
Shane Smiskol
59b4b2e6f8 test models: test vehicle speed (#34727)
* test vehicle speed

* clean up

* whoops

* ohhhhhh

* work

* clean up

* clean up

* all good

* fix

* shorter

* bump

* update refs

* bump to master
2025-02-28 02:35:58 -08:00
Shane Smiskol
d12370600e Fix car interface test (#34729)
* bump

* bump opendbc

* bump

* bump to master
2025-02-28 02:26:46 -08:00
Adeeb Shihadeh
c10abce1d5 camerad: make robust to introduced failures (#34723)
* camerad: make robust to introduced failures

* more test

* start here

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-27 18:26:31 -08:00
Maxime Desroches
25463deeec Disable IR switch before setting torch (#34725)
switch reset
2025-02-27 17:20:32 -08:00
ZwX1616
29ca4aa7de modeld refactor: supercombo -> vision+policy (#34718)
* should be ok

* update tg

* type

* wrong model

* is no more

* update readme

* add back

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-27 17:00:56 -08:00
Shane Smiskol
8f3e773977 actuators: rename steer to torque (#34724)
* bump

* temp fix

* fix

* forgot these
2025-02-27 16:12:55 -08:00
ZwX1616
b927d3ef46 bump tinygrad to latest master (#34719)
* bump tg

* update commit
2025-02-27 14:41:14 -08:00
Adeeb Shihadeh
937e2f7eb2 camerad: spectra stress test (#34716)
* cam stress

* lint fixes

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-27 13:41:33 -08:00
Shane Smiskol
c8e598e647 Revert "Speed up juggle.py loading"
This reverts commit 87fc6d177b.
2025-02-26 23:07:58 -08:00
Shane Smiskol
51598a7580 add platform to PJ title 2025-02-26 20:13:22 -08:00
Shane Smiskol
87fc6d177b Speed up juggle.py loading 2025-02-26 20:09:56 -08:00
Shane Smiskol
6723106bf5 Move vehicle_model.py to opendbc (#34681)
* move

* fix

* move test too

* bump

* better

* bump to master
2025-02-26 17:35:43 -08:00
commaci-public
bd879be27a [bot] Update Python packages (#34717)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-26 17:31:40 -08:00
Shane Smiskol
a8c14a4e10 Script to plot max lateral acceleration events (#34710)
* max lat accel script

* more

* clean up

* 90th percentile good

* ugh
2025-02-25 18:03:59 -08:00
Maxime Desroches
470ec46830 make test_onroad faster (#34704)
* revert that

* again

* port over

* clean

* round
2025-02-25 10:32:35 -08:00
Adeeb Shihadeh
f2480d68b8 update issue templates 2025-02-25 09:27:50 -08:00
Shane Smiskol
5bde16fc0f Rivian in release (#34700)
* bump

* bump

* fix

* bump

* fix footnotes

* bump

* docs

* add rivian to proc replay

* update
2025-02-24 22:09:22 -08:00
commaci-public
7c904e796e [bot] Update Python packages (#34695)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-24 22:04:05 -08:00
Dean Lee
cd014325c5 camerad: remove unused CameraState forward declaration (#34703)
remove unused CameraState forward declaration
2025-02-24 15:58:15 -08:00
Jason Young
d3af4a31ec PC: Fix Panda DFU device permissions (#34674) 2025-02-24 18:35:48 -05:00
Harald Schäfer
d41311ca20 Switch PC running to tinygrad with LLVM (#34660)
* try llvm on cpu

* update lock

* Make sure test fails

* With BEAM=3 its fast

* small fixes

* more fixes

* Fix macos

* do dm too

* rm ort
2025-02-24 14:51:10 -08:00
Maxime Desroches
c13b1f95e1 Revert "Bump submodules every hour"
This reverts commit a8e416abbe.
2025-02-24 11:33:48 -08:00
Adeeb Shihadeh
a4a2e19dd6 new cars! 2025-02-24 08:30:35 -08:00
Dean Lee
0619e9a581 v4l_encoder: used encoder_info.fps instead of hardcoded 20 (#34701)
Used encoder_info.fps instead of hardcoded 20
2025-02-24 07:06:38 -08:00
commaci-public
949fe31bad [bot] Update Python packages (#34693)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-23 18:23:04 -08:00
Kacper Rączy
66425a61c9 test_models: sort messages by time (#34691)
Sort messages by time in test_models
2025-02-23 13:14:18 -08:00
commaci-public
5c662da0db [bot] Update Python packages (#34692)
Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-23 21:14:07 +00:00
commaci-public
e3b7fa032c [bot] Update Python packages (#34690)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-23 12:50:30 -08:00
commaci-public
c8a8bf2ce7 [bot] Update Python packages (#34687)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-23 10:29:53 -08:00
commaci-public
088ba13f21 bump opendbc
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-22 21:09:21 -08:00
Adeeb Shihadeh
0300525d83 bump opendbc 2025-02-22 19:34:01 -08:00
Adeeb Shihadeh
a4980dbb0d disable os04 test for now 2025-02-22 18:42:32 -08:00
commaci-public
8cae7b2bc6 [bot] Update Python packages (#34680)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-22 18:41:27 -08:00
commaci-public
7ffea8a0eb [bot] Update Python packages (#34673)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-22 18:27:16 -08:00
Mauricio Alvarez Leon
d15d77f7bb op.sh: adb (#34468)
* add op adb

* adb_shell.sh

* su comma

* add to op output
2025-02-22 11:24:03 -08:00
commaci-public
5bc58e0b36 [bot] Update Python packages (#34670)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-22 10:58:33 -08:00
Adeeb Shihadeh
07835dc1ae jenkins: add pytest -s for debugging (#34672) 2025-02-22 10:52:48 -08:00
commaci-public
6ff80028b0 [bot] Update Python packages (#34667)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-22 02:35:05 -08:00
Shane Smiskol
e9aa331f0f set curvature in joystickd (#34668)
* set curvature in joystickd

* Update joystickd.py

* Update joystickd.py
2025-02-22 01:43:00 -08:00
Shane Smiskol
a8e416abbe Bump submodules every hour 2025-02-21 23:52:23 -08:00
commaci-public
2944bead37 [bot] Update Python packages (#34664)
* Update Python packages

* fix that

* fix that too

* bump panda

* bump

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-21 17:37:04 -08:00
Dean Lee
61bec65f32 common: add MovingAverage class for real-time windowed average calculation (#34569)
* add MovingAverage class for real-time windowed average calculation

* move to util.py
2025-02-21 14:47:21 -08:00
Dean Lee
c3c878908d camerad: Inline processing_time calculation during frame data initialization (#34661)
* Inline processing_time calculation during frame data initialization

* remove timestamp_end_of_isp
2025-02-21 12:50:46 -08:00
Adeeb Shihadeh
e00b5337d2 misc encoder cleanups 2025-02-21 10:41:30 -08:00
Adeeb Shihadeh
9881cf9c20 slightly more robust time validity check 2025-02-21 10:22:19 -08:00
Dean Lee
839c8fbd6b camerad/MemoryManager: remove lock and reduce redundant lookups (#34656)
remove lock and reduce redundant lookups
2025-02-21 09:58:26 -08:00
Dean Lee
2c56f44380 camerad: remove unused variables (#34657)
remove unused variables
2025-02-21 09:57:53 -08:00
Dean Lee
47c04210e2 camerad: refactor frame processing to direct handling (#34655)
refactor frame processing
2025-02-21 09:18:35 -08:00
Dean Lee
2215abb762 camerad: use single instance of MemoryManager for all cameras (#34654)
use single instance of MemoryManager for all cameras
2025-02-21 08:48:10 -08:00
Maxime Desroches
00acf26908 jenkins loop: update branch on start (#34649)
refresh
2025-02-20 21:35:09 -08:00
Adeeb Shihadeh
9167e3dcf6 Revert "camerad: fix incorrect row offset calculation in calculate_exposure_value (#34634)"
This reverts commit 2941445849.
2025-02-20 19:54:41 -08:00
Adeeb Shihadeh
e7dddaeb7e rm test_time_to_onroad.py 2025-02-20 17:13:20 -08:00
Adeeb Shihadeh
952def7abf start logging services first (#34646)
* start logging services first

* fix test

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-20 16:53:07 -08:00
Maxime Desroches
7c791ae3d9 jenkins: fix looping (#34645)
fix
2025-02-20 16:37:05 -08:00
Dean Lee
2941445849 camerad: fix incorrect row offset calculation in calculate_exposure_value (#34634)
Fix incorrect row offset calculation
2025-02-20 16:23:23 -08:00
Maxime Desroches
614be347ba jenkins: add more devices to camerad test (#34643)
* more cam

* para

* fix
2025-02-20 16:20:50 -08:00
Adeeb Shihadeh
2e374cd962 on-device building fixups (#34642)
* on-device building fixups

* fix
2025-02-20 16:16:57 -08:00
Adeeb Shihadeh
d9a8fab3e6 test_onroad: run same checks on both EncodeIdx and CameraState (#34638)
* try this

* cleanup

* lil more

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-20 15:46:19 -08:00
Adeeb Shihadeh
bdf0b7b42e camerad: use full VIPC buffers for BPS cams (#34641) 2025-02-20 15:03:13 -08:00
commaci-public
2ea241ff7e [bot] Update Python packages (#34639)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-20 14:52:46 -08:00
royjr
263e349d7e ui: update arabic translations (#34640)
* Update main_ar.ts

* arabic first to fix rtl
2025-02-20 14:47:39 -08:00
Adeeb Shihadeh
52b66a1c0c Stricter cam sync tests (#34609)
* strict

* fix that

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-20 14:15:38 -08:00
Adeeb Shihadeh
617eb33edc camerad/OX03C10: accept FSIN on every frame (#34636) 2025-02-20 13:17:48 -08:00
Dean Lee
6d0aafd0f4 camerad: fix null dereference in camera_bufs_raw when accessing cur_camera_buf (#34635)
Fix null dereference in camera_bufs_raw
2025-02-20 10:57:20 -08:00
Dean Lee
99e552b485 camerad: remove camera threads (#34627)
* remove camera threads

* remove unnecessary frame delay handling logic

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-20 08:52:03 -08:00
Dean Lee
4835e9fa88 camerad: rename set_exposure_target to calculate_exposure_value (#34631)
rename set_exposure_target to calculate_exposure_value
2025-02-20 08:08:49 -08:00
Dean Lee
51d21f0113 camerad: fix crash during camera re-alignment (#34630)
fix crash during road camera re-alignment
2025-02-20 08:07:15 -08:00
BirdZhang
5bcaca7321 [udev rules] Add back bbaa vendor id (#34632)
As some pandas (such as c2) still use the bbaa vendor id, add bbaa back to avoid misrecognition.
2025-02-20 08:06:46 -08:00
Shane Smiskol
dc8fbcd7e3 Rivian: lower lateral jerk limit (#34629)
bump
2025-02-20 01:55:00 -08:00
Shane Smiskol
ba236db20b Move car safety modes to opendbc (#34628)
* bump

* fix test_models
2025-02-20 01:45:44 -08:00
Shane Smiskol
f2fb0b92ad debug_fw_fingerprinting_offline.py: better formatting 2025-02-19 23:30:33 -08:00
Dean Lee
0f5f3c4cb2 camerad: cleanup syncFirstFrame (#34626)
* cleanup syncFirstFrame

* handle disabled camera
2025-02-19 21:34:36 -08:00
Dean Lee
4674d0ae53 python ui: fix scroll issues (#34600)
fix scroll issues
2025-02-19 21:15:21 -08:00
Dean Lee
df2d615fc7 python ui: Implement styled rounded buttons with multiple states (#34603)
* styled button

* corner rounding in pixels
2025-02-19 21:14:35 -08:00
Adeeb Shihadeh
071f8ba658 LogReader: add time_series helper 2025-02-19 16:43:54 -08:00
Shane Smiskol
b0735e44f3 Faster Tesla fingerprinting (#34621)
* bump

* docs

* fix
2025-02-19 15:48:19 -08:00
YassineYousfi
9ec69ddb36 modeld: trigger model metadata on script change (#34623) 2025-02-19 15:11:33 -08:00
Shane Smiskol
f3004c22ce Rm all known cars (#34624)
* bump

* docs

* rm all_known_cars

* bump

* fix lint
2025-02-19 15:09:19 -08:00
Maxime Desroches
d3fd36b5b7 jenkins: always clean old git repos on checkout (#34625)
* force

* test

* cleanup
2025-02-19 14:51:09 -08:00
Adeeb Shihadeh
b35d86551d Revert "Remove EncodeIdx packets from qlog (#34590)"
This reverts commit 917b45afd0.
2025-02-19 13:17:44 -08:00
Dean Lee
acd00b9791 camerad: sync initial frame ID (#34614)
* sync initial frame ID

* count enabled cameras

* static function

* Replace std::abs with std::max/std::min to avoid overflow

* rebase master

* timeout

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-19 13:09:49 -08:00
Maxime Desroches
9b74021766 jenkins loop: refresh deactivated branches (#34622)
refresh
2025-02-19 11:45:43 -08:00
Adeeb Shihadeh
fb3f5dd169 camerad: make handle_camera_event readable (#34620)
* renames

* lil more

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-18 22:58:53 -08:00
Dean Lee
51ba8f796d params: separate parameter keys from params.cc (#34526)
seperate keys
2025-02-18 21:42:31 -08:00
Adeeb Shihadeh
19b11825fc Revert "Faster Tesla fingerprinting and Rivian VIN (#34617)"
This reverts commit 7c93049408.
2025-02-18 21:38:11 -08:00
Adeeb Shihadeh
bea096f0c5 op: skip env check for op switch (#34619) 2025-02-18 21:18:34 -08:00
Dean Lee
1cff1a363e camerad: simplify SpectraBuf::init by reducing redundant flags (#34618)
refactor init
2025-02-18 21:13:04 -08:00
Shane Smiskol
7c93049408 Faster Tesla fingerprinting and Rivian VIN (#34617)
* bump

* update docs
2025-02-18 19:49:33 -08:00
Shane Smiskol
64320615c5 Enable Tesla Model 3/Y behind dashcam (#34615)
* bump panda

* bump opendbc
2025-02-18 14:53:01 -08:00
Shane Smiskol
8e19185cee Bump submodules (#34616)
* bump

* now libsafety

* skip rivian for now
2025-02-18 13:48:28 -08:00
Adeeb Shihadeh
a30d3f7d72 test_onroad: cleanup with time series LogReader (#34613) 2025-02-17 21:26:21 -08:00
Adeeb Shihadeh
b3d5ab6a38 camerad/OX03C10: gate first frame on FSIN pulse (#34611) 2025-02-17 20:39:58 -08:00
Adeeb Shihadeh
4c6b7c3c44 camerad: remove GPU debayer (#34610) 2025-02-17 17:52:10 -08:00
Adeeb Shihadeh
bab1254a02 LogReader: add time series helper (#34608)
* simple time series

* example
2025-02-17 16:26:41 -08:00
Adeeb Shihadeh
6f5f8e7746 loggerd: reduce debug log frequency 2025-02-17 15:06:16 -08:00
Dean Lee
1a63fef85a ui/spinner.py: adjust spinner rotation speed based on FPS (#34601)
adjust spinner rotation speed based on FPS
2025-02-17 15:02:45 -08:00
YassineYousfi
f06701ea24 modeld: add model names to metadata (#34602)
* modeld: add model names to metadata

* lint

* type hint

* oops

* assert

* ok Any
2025-02-17 14:15:34 -08:00
Adeeb Shihadeh
07ef523ec1 system/ui docs (#34607) 2025-02-17 10:40:07 -08:00
Adeeb Shihadeh
73266a016c test_onroad: always show model exec timings (#34606)
Co-authored-by: Comma Device <device@comma.ai>
2025-02-17 09:18:41 -08:00
Dean Lee
ca05c25ba2 python ui: Implement FPS monitor (#34605)
monitor fps
2025-02-17 08:10:36 -08:00
Shane Smiskol
d2c0bcf7b9 use model aLead in MPC (#34598)
* use model aLead in MPC

* update
2025-02-16 21:24:41 -08: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
Dean Lee
fc77ac706e python ui: implement inertial scrolling for GuiScrollPanel (#34596)
implement inertial scrolling for GuiScrollPanel
2025-02-16 12:47:22 -08:00
Dean Lee
d4d0312794 python ui: display FPS on top-left corner if DEBUG_FPS=1 (#34595)
* display FPS on top-left corner if DEBUG_FPS=1

* use generator

* use rl.draw_fps
2025-02-16 12:35:04 -08:00
Dean Lee
99ef66de4b python ui: implement reset.py (#34593)
reset
2025-02-16 08:59:32 -08:00
Adeeb Shihadeh
27b5a727e3 Revert "Mypy: Got passing on macos (#34591)"
This reverts commit b09b48130e.
2025-02-16 08:50:46 -08:00
BrainLess
b09b48130e 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>
2025-02-16 00:05:52 -08:00
Adeeb Shihadeh
917b45afd0 Remove EncodeIdx packets from qlog (#34590) 2025-02-15 15:17:58 -08:00
Adeeb Shihadeh
e86dbb622d update release notes 2025-02-15 15:16:39 -08:00
Dean Lee
ce7ff5c0e6 ui: Initial UI rewrite using pyray (spinner and text window) (#34583)
* pyray init version

* remove c++ code

* cleanup

* restruct the directory layout

* improve GuiApplication

* smooth out the texture after resize

* use atexit to close app

* rename FontSize->FontWeight

* make files executable

* use Inter Regular for FrontWeight.NORMAL

* set FLAG_VSYNC_HINT to avoid tearing while scrolling

* smoother scrolling

* mange textures in gui_app
2025-02-15 12:44:20 -08:00
Adeeb Shihadeh
958c8d1ce3 Beautiful camera timings (#34558)
* the start of something beautiful

* mv that

* cleanup

* cleanup output

* the good stuff

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-14 21:33:50 -08:00
Adeeb Shihadeh
c4ee645fbc tici: move kgsl affinity to modeld core (#34588) 2025-02-14 19:35:43 -08:00
Kacper Rączy
032f3688a2 plotjuggler: opt-out log migration (#34587)
* Option to migrate logs if needed

* Opt-out migration

* Remove late import
2025-02-15 02:41:39 +00:00
Adeeb Shihadeh
ec6c7cd152 adjust default can_replay route slice to work with test_onroad 2025-02-14 17:29:01 -08:00
Adeeb Shihadeh
efda24dbe1 camerad: match some BPS settings (#34548)
* start common

* fix bayer pattern

* lil more

* all 1q10

* cc en

* same pts?

* this is weird

* some cleanup

* less

* off

* clean up

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-14 16:05:00 -08:00
Maxime Desroches
9ccfecb813 use PyPI wheel for raylib on PC (#34586)
* wheel

* build
2025-02-14 15:17:26 -08:00
Maxime Desroches
4b278fe14f Jenkins in a loop (#34582)
* loop

* better

* clean

* more

* fix
2025-02-13 19:21:45 -08:00
Adeeb Shihadeh
d1b93287f2 camerad: flush BPS requests (#34581)
* repro

* cleanup

* flush bps

* cleanup

* revert that

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-13 19:19:56 -08:00
Harald Schäfer
77a442c4e8 Long planner: allow negative accel constraint (#34565)
* allow negative accel constraint

* dont let MPC do clipping

* Typo

* whitespace

* Fix tests

* More cruise accel

* rm print

* ref commit
2025-02-12 13:11:32 -08:00
Shane Smiskol
d6a0e49def Move safety constants to opendbc (#34573)
* forgot these

* bump

* get these

* and flags

* fix

* bump

* test

* debug

* print sim thread errors
2025-02-11 21:48:20 -08:00
Adeeb Shihadeh
d98a554b17 tici: set core affinity for all realtime processes (#34574) 2025-02-11 21:20:31 -08:00
Adeeb Shihadeh
3d097faec0 Revert "camerad: enable BPS (#34570)"
This reverts commit da2a5f4305.
2025-02-11 20:30:37 -08:00
Adeeb Shihadeh
fbf918b311 test_onroad fixups (#34572)
* test_onroad fixpus

* fix
2025-02-11 20:15:30 -08:00
Adeeb Shihadeh
6ec5d82a29 tici: affine ICP IRQ to camerad core (#34571) 2025-02-11 19:20:35 -08:00
Adeeb Shihadeh
da2a5f4305 camerad: enable BPS (#34570)
* camerad: enable BPS

* update power draw
2025-02-11 14:03:32 -08:00
Dean Lee
644130ca3d encoderd: use AV_CODEC_ID_H264 codec for qcamera encoding (#34498) 2025-02-11 12:46:43 +00:00
Dean Lee
3c0990e716 move thumbnail generation from camerad to encoderd (#34554)
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-02-10 23:43:46 +00:00
Dean Lee
27c11eb597 athena upload: streaming file upload (#34559)
streaming file upload
2025-02-10 13:57:31 -08:00
commaci-public
4cca971888 [bot] Update Python packages (#34561)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-10 10:26:48 -08:00
Adeeb Shihadeh
c4c43bebd2 Drop Ubuntu 20.04 support (#34557) 2025-02-09 13:41:11 -08:00
Dean Lee
ad2b1edbd0 replay: flush codec buffers after seeking (#34556)
* flush codec buffers after seeking

* replace avio_seek with the higher-level avformat_seek_file

* exit early
2025-02-09 13:02:43 -08:00
Dean Lee
65e478f27f camerad: simplify buffer indexing in enqueue_req_multi (#34553)
simplify buffer indexing in enqueue_req_multi
2025-02-09 09:58:47 -08:00
Dean Lee
4b7a25efc3 loggerd: remove unused zlib and libswscale linkage (#34552)
remove unused link
2025-02-09 09:13:58 -08:00
Adeeb Shihadeh
1090af6e3d camerad: IFE register cleanup (#34550)
* start there

* lil more

* get camera num out of there

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-08 14:02:49 -08:00
Adeeb Shihadeh
22591dc6f8 op: simplify service restart (#34551) 2025-02-08 13:59:50 -08:00
Dean Lee
9ec54f59c6 loggerd: switch logging from raw file format to zstd compressed files (#34549)
* switch logging from raw file format to zstd compressed files

* more zst suffix

* compress bootlog

* remove class RawFile

* Optimize ZstdFileWriter by adding input caching

* use ZSTD_compressStream2

* cleanup

* LOG_COMPRESSION_LEVEL=10

* space

* add zst suffix to LOGS_SIZE_RATE
2025-02-08 12:55:31 -08:00
Adeeb Shihadeh
4066d49d70 camerad: debayer in the BPS (#33763)
* bps support

* cleanup with offsetof

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-07 19:28:50 -08:00
Shane Smiskol
8b67e04d7d test_models: remove cereal (#34547)
rm more
2025-02-07 16:16:50 -08:00
Shane Smiskol
092685cae7 test_models: use opendbc CanData (#34546)
* replace with non-messaging CanData

* clean up
2025-02-07 15:55:52 -08:00
Shane Smiskol
b4a9c67bbe qcomgps: fix NameError on teardown (#34545)
continue teardown if diag not there
2025-02-07 14:06:02 -08:00
Shane Smiskol
fb517b5bca Remove can_capnp_to_can_list (#34542)
* about equal with multiprocessing

* but almost half without ;)

* rm

* Update tools/replay/can_replay.py
2025-02-06 20:54:31 -08:00
Shane Smiskol
3c72f1aa42 can_list_to_can_capnp: use opendbc CanFrame 2025-02-06 20:23:25 -08:00
Adeeb Shihadeh
49f7cb835b agnos 11.7 (#34471)
* agnos 11.7

* new build

* new build

* new build

* nb

* raylib

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-02-06 19:22:40 -08:00
Shane Smiskol
65d7b86902 test_models: remove selfdrived dependency (#34539)
* remove selfdrived

* fully

* todo

* yay

* moremoremore

* clean up

* more

* don't care

* update refs

* bump to master

* no more selfdrived

* yup

* too complex

* Update selfdrive/car/tests/test_models.py

* Update selfdrive/car/tests/test_models.py
2025-02-06 19:17:01 -08:00
Shane Smiskol
151e5ba20f test_models: remove Params 2025-02-06 18:55:07 -08:00
Shane Smiskol
951631e1ab Remove brand-specific button logic from car_specific.py (#34540)
* yay

* moremoremore

* clean up

* more

* don't care

* update refs

* bump to master
2025-02-06 18:02:31 -08:00
Adeeb Shihadeh
5b870c6f92 camerad: simple BPS support (#34538)
* camerad: simple BPS support

* works

* cleanup

* lil more

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-02-06 15:23:19 -08:00
Adeeb Shihadeh
e31ae06959 camerad: remove AR register processing (#34537) 2025-02-06 14:15:37 -08:00
Adeeb Shihadeh
9bc35c0919 Revert "athena upload: reduce memory usage and improve efficiency with streaming (#34528)"
This reverts commit 4c65f51a55.
2025-02-06 11:50:04 -08:00
Maxime Desroches
61fa7e1ead raylib python bindings (#34534)
* build

* fix

* build

* wheel

* arm

* linux

* both
2025-02-05 15:35:06 -08:00
Shane Smiskol
40863aa988 card: default events (#34532)
default events
2025-02-04 20:26:47 -08:00
commaci-public
ddc29430ec [bot] Update Python packages (#34530)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-02-04 20:02:11 -08:00
Dean Lee
4c65f51a55 athena upload: reduce memory usage and improve efficiency with streaming (#34528)
* reduce memory usage and improve upload efficiency with streaming

* space
2025-02-04 13:10:13 -08:00
Robbe Derks
12307dcb37 op auth command (#34529)
* auth command

* no python
2025-02-04 11:26:57 -08:00
Shane Smiskol
26f972b9f7 Bump opendbc (#34525)
* no debug param and new import

* bump

* bump to master

* and fix that

* oop

* bump to master
2025-02-03 21:05:23 -08:00
Maxime Desroches
9658fcbe79 Revert "unpin pyopenssl (#34522)" (#34524)
This reverts commit b1843ee7a7.
2025-02-03 11:37:27 -08:00
Maxime Desroches
b1843ee7a7 unpin pyopenssl (#34522)
try
2025-02-03 10:28:54 -08:00
commaci-public
ebe48552cf [bot] Update Python packages (#34520)
* Update Python packages

* fix

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-02-03 10:22:52 -08:00
Adeeb Shihadeh
17647f99a4 setup: try removing uv update loop 2025-02-02 21:45:13 -08: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
Adeeb Shihadeh
cc14903137 strip output on sudo_read 2025-02-01 12:48:04 -08: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
Adeeb Shihadeh
6d12a47d05 Revert "camerad: disable ISP for now (#34440)"
This reverts commit e48752d8fa.
2025-01-31 19:17:07 -08:00
Shane Smiskol
e3d83b4b13 camerad: fix tearing when hitting frame timeout (#34514)
* this works

* todo
2025-01-31 17:14:58 -08:00
eFini
913337d98c update CHT/CHS translations (#34513)
updated CHT/CHS translations
2025-01-31 08:47:13 -08:00
Dean Lee
2b19b8f3d7 ui/DeveloperPanel: initialize offroad state, refresh toggle, and cleanup Includes (#34510)
small fixes
2025-01-30 22:56:14 -08:00
Adeeb Shihadeh
a5dd2ab2aa athena: upload logs in parallel (#34509)
Co-authored-by: Comma Device <device@comma.ai>
2025-01-30 20:12:00 -08:00
programanichiro
bfb898ef3f update ja translations (#34506)
* 見切れる部分の見直しと表現を調整。

* 和訳を追加。

* Improved truncation
見切れを改善。

* FIREHOSEモード!
2025-01-30 14:56:16 -08:00
Kacper Rączy
a8b829167d locationd: use cloudlog (#34508)
* Use cloudlog instead of print

* Changes
2025-01-30 22:36:20 +00:00
Shane Smiskol
1e35a24564 fdcan: rate limit CAN core reset (#34507)
bump panda
2025-01-30 14:08:27 -08:00
Adeeb Shihadeh
5d421020c3 Revert "SConstruct: remove CPPPATH entries for libyuv and json11 (#34504)"
This reverts commit 7792fee92c.
2025-01-30 11:47:49 -08:00
Maxime Desroches
c82af71e83 model_replay: raise max modelV2 exec time (#34505)
raise
2025-01-30 11:21:45 -08:00
Andrei Radulescu
d4a7a87a3c third_party: raylib builds on macos (#34499)
* updated raylib setup for macos

* raylib setup.sh renamed to build.sh

* simplified copy

* silent curl
2025-01-30 10:34:29 -08:00
Dean Lee
804b801ef8 SConstruct: remove duplicate -lzmq link (#34503)
remove duplicate -lzmq link
2025-01-30 10:30:54 -08:00
Dean Lee
7792fee92c SConstruct: remove CPPPATH entries for libyuv and json11 (#34504)
cleanup cpppath
2025-01-30 10:30:40 -08:00
Alexandre Nobuharu Sato
cdf46e340f update pt-BR translations (#34500) 2025-01-30 09:48:04 -08:00
Dean Lee
a9956c0116 cleanup: remove SNPE paths from SConstruct (#34501)
remove SNPE paths from SConstruct
2025-01-30 07:37:00 -08:00
Adeeb Shihadeh
79e52ea83d FIREHOSE mode v0.1 (#34496)
* add toggle

* athena

* fix mypy
2025-01-29 15:31:15 -08:00
Robbe Derks
bf4e9170c5 Add Tesla to car_specific events (#34493) 2025-01-29 10:41:38 -08:00
Robbe Derks
0a17b21321 bump panda again 2025-01-29 17:02:24 +01:00
Robbe Derks
acfc44a490 bump panda 2025-01-29 16:53:43 +01:00
Dean Lee
227bb68e18 replay: improve segment loading and event handling (#34490)
improve segment Loading and Event Handling
2025-01-28 15:37:05 -08:00
YassineYousfi
2eb3585dae Not Too Shabby Model (#34484)
* b25c27a8-263b-4f3f-b1f8-72ac49b4f9c7/700

* replay

* model_replay: support empty
2025-01-28 12:16:13 -08:00
Adeeb Shihadeh
82722217be selfdrived: remove ignored process list (#34491) 2025-01-27 21:17:27 -08: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
Dean Lee
e7b63dce65 encoderd: enhance robustness of open() with HANDLE_EINTR Macro (#34478)
HANDLE_EINTR
2025-01-27 19:46:43 -08:00
Shane Smiskol
1b1d37db65 Toyota: clip pitch for PERMIT_BRAKING (#34489)
bump
2025-01-27 17:13:40 -08:00
Mauricio Alvarez Leon
3eb02f1d54 ui-preview: fix keyboard screenshot (#34482)
* update to click keyboard SSH ADD

* Update run.py
2025-01-27 17:05:46 -08:00
BirdZhang
15211b2e52 Update to new USB VID (#34487)
https://github.com/commaai/panda/pull/2112/files
2025-01-27 14:01:59 -08:00
commaci-public
ca11a18061 [bot] Update Python packages (#34486)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-01-27 10:01:50 -08:00
YassineYousfi
8bfce0979d modeld: use temporalPose from model (#34460)
* modeld: use temporalPose from model

* cleanup
2025-01-26 10:29:58 -08: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
Mauricio Alvarez Leon
c57f535238 add adb toggle to developerPanel (#34459)
* add adb toggle to developerPanel

* translations + toggleOrder

* initial docs

* move adb.sh into toggle

* finish up docs

* QProcess

* adbToggle h

* translations

* vanish translations

* description

* tr

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-25 13:24:24 -08:00
Andrei Radulescu
754882c985 reset: auto-format is back (#34479)
* Revert "update factory reset"

This reverts commit 533206be2f.

* keep reset message

* Update selfdrive/ui/qt/setup/reset.h

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-25 12:29:48 -08:00
Shane Smiskol
1d86afdf83 carName -> brand (#34474)
* bump

* brand

* body is lower
2025-01-25 01:39:06 -06:00
Shane Smiskol
dc7fa59e35 Toyota: tweak longitudinal gains (#34473)
bump
2025-01-25 01:36:03 -06:00
Kacper Rączy
93a8a18b6d locationd: frequency based bad observation resiliance and recovery (#34476)
* Improve it

* Fix static

* Fix test_consistent_timing_spikes test

* Fix tests

* Comment

* Remove crap
2025-01-25 05:38:20 +00: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
Jason Wen
45de7664bc ui: move alpha longitudinal control toggle to Developer panel (#34467)
* ui: move alpha longitudinal control toggle to Developer panel

* show toggle in ui preview

* Revert "show toggle in ui preview"

This reverts commit 4b12964726b966a906840099ecc1d584e307b614.

* write to CarParamsPersistent on ui init

* no need for new msg

* missed

* no icon
2025-01-24 18:24:56 -08:00
Shane Smiskol
a90720690c Toyota: fix acceleration discontinuity when stopping (#34472)
bump
2025-01-24 17:16:55 -08:00
Shane Smiskol
540c45bfec Log git diff inside submodules (#34469)
get diffs inside submodules
2025-01-24 16:27:24 -08:00
Adeeb Shihadeh
45276652b8 update translations 2025-01-24 16:23:23 -08:00
Shane Smiskol
7803ff4f62 Revert "update translations"
my lupdate is broken?!

This reverts commit 9982b03e47.
2025-01-24 13:50:36 -08:00
Shane Smiskol
9982b03e47 update translations 2025-01-24 13:49:59 -08:00
Adeeb Shihadeh
d0f5e5a09d Revert "Move alpha longitudinal control toggle to developer panel (#34223)"
This reverts commit d4a6f62c40.
2025-01-24 10:47:14 -08:00
Dean Lee
2e1436a515 camerad/ife.h: add #pragma once (#34464)
add #pragma once
2025-01-24 10:24:51 -08:00
Dean Lee
26cedc5ff1 bridge: remove deprecated services check (#34463)
Remove deprecated services check from get_services
2025-01-24 10:24:20 -08:00
Dean Lee
770c59eb4e Revert "ui: show driver camera in popup on demand" (#34412)
Revert "ui: show driver camera in popup on demand (#33459)"

This reverts commit 5f3625436c.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-23 22:12:19 -08: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
Maxime Desroches
822c624413 bump opendbc (#34461)
bump
2025-01-23 20:27:22 -08:00
Adeeb Shihadeh
c916635ad8 agnos 11.6 (#34458) 2025-01-23 17:04:41 -08:00
Adeeb Shihadeh
cf83167ce6 add AdbEnabled param 2025-01-23 16:14:46 -08:00
Maxime Desroches
52f935da74 model_replay: check modelExecutionTime (#34457)
* metric

* fix

* format

* table

* test failure

* cleanup

* 3

* 4
2025-01-23 16:14:02 -08:00
programanichiro
645418e754 Multilang ja translations (#34444)
* Japanese translation

* Adjusting the translation to avoid truncation.
見切れ翻訳を調整。

* Fixes some issues1.
指摘事項調整。

* update

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-23 15:35:15 -08:00
ZwX1616
0ca726ed29 camerad: increase dcam ae min (#34455)
* never dip below 0.125

* clamp is double
2025-01-23 14:13:35 -08:00
Adeeb Shihadeh
aca1567a8c didn't bump yet 2025-01-23 11:16:14 -08:00
Adeeb Shihadeh
be9e5fe763 agnos 11.6 2025-01-23 10:48:53 -08: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
Shane Smiskol
02ec9e5bf8 dmonitoringmodeld: clean exit (#34454)
* nice exit

* correct spacing

* sentry
2025-01-22 20:39:52 -08:00
Shane Smiskol
590a37a566 Ford CAN: enable long safety in release (#34453)
bump
2025-01-22 20:23:00 -08:00
ugtthis
8613530b46 Keyboard UX/UI: Access to caps lock - clearer icons (#34362)
* add-slash-to uppercase

* caps-lock-works

* leaner and simpler

* this is simpler

* better...

* simpler

* rm comments

* clearer naming

* make more explicit

* change to SHIFT_KEY

* change name

* works - no more double tap

* better and works

* more readable

* simpler but still readable

* more self documenting

* whoops

* add back - needed for if string requirment not meant
2025-01-22 19:51:54 -08:00
Adeeb Shihadeh
c3211b1c25 bump panda 2025-01-22 19:46:58 -08:00
Adeeb Shihadeh
5db124ae07 agnos 11.5 (#34413)
* agnos 11.5

* new build

* prod manifest
2025-01-22 19:46:06 -08:00
Dean Lee
f98c6a7f8a camerad: properly clean up sync objects after request flush (#34418)
destroy sync objects after re-align
2025-01-22 19:39:05 -08:00
royjr
feb9b1cd8d op.sh start stop restart (#34404)
* op start stop restart

* =}

* only agnos

* Revert "only agnos"

This reverts commit ffb720ff3f08f5bd59ad77a45d89c3ac3b4d4621.

* only agnos systemctl

* fix got taps

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-22 17:01:29 -08: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
commaci-public
dcb05af228 [bot] Update Python packages (#34431)
* Update Python packages

* codespell

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-21 21:04:19 -08:00
Adeeb Shihadeh
bb09fd0d4e pandad: reset safety mode on exit (#32103)
* boardd: reset safety mode on exit

old-commit-hash: dd18ccbf0a9ab72ace0a7533632d5939c0719953

* comment

old-commit-hash: 01b598e8dde93548f7783be19b1cb37d22fadc23

* log it

old-commit-hash: 181c4d412e9e3a9c576934e16fc26a9b6e07a117

* logmessaged might not be alive

old-commit-hash: 7483ba0eac42875a822df97596d23ff277bf3865

* reproduction, manager gets SIGTERM from python_process

old-commit-hash: b90402bd776c3933bfe3dd60998f9913b4bd0068

* even smaller repro

old-commit-hash: 03dd430b7131da2b48243714df0513c6a1e594f0

* should work

old-commit-hash: 388c4273385ee4c67b1a229ccb9abac6dd94dd0f

* let's not change that rn

old-commit-hash: d057299058503e8fb792b5a765d0da4af6bef943

* something like this

old-commit-hash: 123d6ed845d662aec2bd95d1ccf9c2782308d693

* pandad.cc should receive same SIGTERM and exit

old-commit-hash: afc5ef6b916c54ac2ec471d144f601ead71250cb

* stash

old-commit-hash: e02e0dc488de51c5d40d227c4c2202ba40436d8d

* remove debugging

old-commit-hash: ac170d0ca32a4285be22e28ec7730fcba3d0697d

* remove debugging

old-commit-hash: 50949600aeed231347cc4c600a8a7d24accde674

* match behavior

old-commit-hash: 5f24167c58caf98b641af2f63f839015e404c349

* convention

old-commit-hash: 1664113a232c4b1a3aa67073e9e8cebef414518f

* systemd option

old-commit-hash: 95183ff77842fcb9592715db07396be28d778197

* manager option

old-commit-hash: 2071893299cb32c3a7cd8a444d8d386c5fa96511

* just curious if this works, change to ELM327 on exit

old-commit-hash: 9674ed525134aa03f995942b18163cb047a59c5b

* Revert "just curious if this works, change to ELM327 on exit"

This reverts commit d4ae294d419dc3d787d11dee4474799f3fb2acef.

old-commit-hash: 6d24edd1635ddd0b8ed68a4a4fc8aaaa88984e45

* check onroad

same update

* useless

* comment

* fix

* debug

* Revert "debug"

This reverts commit 2bb138610ea7b26d8610d36ef3f0bbb2d6ada388.

* Update common/util.h

* double wait does not work, blocking in signal handler not good, exit on do_exit, change to SIGINT, use existing stop to support ctrl+c

nope

* organize?

* no sys

* None

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-21 18:32:33 -08:00
Shane Smiskol
475c9ba497 bump msgq (#34445)
* Reapply "Reapply "bump msgq (#34410)" (#34443)"

This reverts commit cb6eb4f3cf.

* here too

* running locally in loop to make sure this was fluke

* running locally in loop to make sure this was fluke
2025-01-21 18:25:14 -08:00
Shane Smiskol
4bb578ff1b Fix duplicate process names (#34446)
* test

* anything actually use this?

* keep it around
2025-01-21 17:29:56 -08:00
Shane Smiskol
cb6eb4f3cf Revert "Reapply "bump msgq (#34410)" (#34443)"
This reverts commit 45903adaf6.
2025-01-21 16:48:28 -08:00
Shane Smiskol
45903adaf6 Reapply "bump msgq (#34410)" (#34443)
* Reapply "bump msgq (#34410)"

This reverts commit 895c78b09a.

* fix exit early
2025-01-21 16:34:27 -08:00
Adeeb Shihadeh
8f8f185a95 sensord: add new config (#34442)
* sensord: add new config

* fix mypy
2025-01-21 16:26:13 -08:00
Dean Lee
2a9e5ed7f8 camerad: add destructor to SpectraBuffer for proper resource cleanup (#34419)
Add destructor to SpectraBuffer for proper resource cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-21 15:19:48 -08:00
Adeeb Shihadeh
e48752d8fa camerad: disable ISP for now (#34440) 2025-01-21 15:10:50 -08:00
Shane Smiskol
9ceb8cc324 swaglog: support np.bool_ (#34439)
fix np.bool_
2025-01-21 12:52:51 -08:00
Korben
ffa5834225 Update main_fr.ts (#34437)
French language update. The only constraint encountered was the “Developer” menu, which I had to abbreviate to “Dév.” because its translation ("Développeur") went beyond the interface.
2025-01-21 10:11:58 -08: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
royjr
c96e7ee4fd ui: update arabic translations (#34433)
Update main_ar.ts
2025-01-20 10:02:51 -08:00
Joshua Mack
eba4cfbca5 Multilang: update Spanish translation (#34434)
* Test slightly shorter name

* Confirm translations & add Wi-Fi pairing

* Revert "Test slightly shorter name"

This reverts commit b5aca0939132de45993441c5578323be70d79b89.
2025-01-20 10:02:32 -08: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
Alexandre Nobuharu Sato
f23d7bf995 Multilang: update pt-BR translation (#34427) 2025-01-19 17:02:42 -08:00
Dean Lee
3219fe1472 encoder: optimize MessageBuilder data handling by adopting encoded data (#34391)
optimize data handing by adopting external data
2025-01-19 16:22:40 -08:00
Dean Lee
205c2b63aa modeld: simplify model message construction by removing redundant variables (#34354)
Simplify model message construction by removing redundant variables
2025-01-19 16:21:02 -08:00
Lee Jong Mun
7b9220e3dd remove duplicate condition (#34425) 2025-01-19 16:19:40 -08:00
Alexandre Nobuharu Sato
d4a6f62c40 Move alpha longitudinal control toggle to developer panel (#34223)
* duplicate alphalong toggle

* add description

* cleanup

* add cases

* remove old alpha_long toggle and cleanup

* fix some design errors

* Revert "fix some design errors"

This reverts commit c11b8c41c033f81fd0b2f9a0fb3724a92c8025b9.

* Create FUNDING.yml

* cleanup

* hidde btn in release and no translate

* remove new translations

* update translation files

* rm obsolete translations

* if is a release branch or if the car already have long control the alphaLongToggle should not be visible

* fix identation

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-01-19 16:19:18 -08:00
Alexandre Nobuharu Sato
31672520e1 Multilang: update pt-BR translation (#34426)
update pt-BR translation
2025-01-19 16:16:29 -08:00
Adeeb Shihadeh
bc2fe9d897 how to get in the training set (#34424)
* how to get in the training set

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update docs/CONTRIBUTING.md
2025-01-19 15:16:26 -08:00
Dean Lee
31ae8958ee hardware/tici: simplify use of std::ofstream (#34420)
Simplify Use of std::ofstream
2025-01-19 14:53:28 -08:00
Dean Lee
ba6afb19ed ui/cameraview: gate glDeleteTextures to PC platforms only (#34423)
delete textures only when QCOM2 is not defined
2025-01-19 14:11:27 -08: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
Lee Jong Mun
3c3617088b Multilang: kor translation update (#34422) 2025-01-19 10:33:11 -08: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
Dean Lee
39a1f040d6 ui/installer: replace time_valid() with util::system_time_valid() for consistency (#34417)
replace time_valid() with util::system_time_valid() for consistency
2025-01-18 19:59:08 -08: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
Adeeb Shihadeh
ae58be87bc cereal fork compatibility (#34414)
* more custom

* cleanup

* lil more
2025-01-18 13:29:02 -08:00
Adeeb Shihadeh
f0257a847d Update README.md 2025-01-18 13:27:11 -08: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
Calvin Park
5509850986 Install user SecOCKey to params (#34401)
* Install user SecOCKey to params

* Move it to launch_chffrplus.sh/launch

* Move it to card.py

* Basic error check

* Catch Exception to suppress the linter

* Make it local to secOC section
2025-01-18 11:25:07 -08:00
Dean Lee
7a1bf26aa5 ui: prevent device pairing if no internet or system time is invalid (#34403)
* gate pairing device if system time is invalid

* update translations

* Check for internet connectivity

* Update selfdrive/ui/qt/widgets/prime.cc

* Update selfdrive/ui/qt/widgets/prime.cc

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-18 11:18:45 -08: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
Shane Smiskol
895c78b09a Revert "bump msgq (#34410)"
This reverts commit 4dc95f6064.
2025-01-17 21:17:05 -08:00
Shane Smiskol
4dc95f6064 bump msgq (#34410)
* bump msgq

* bump
2025-01-17 20:39:14 -08: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
Shane Smiskol
c515021576 joystick: fix long control state 2025-01-16 16:07:56 -08:00
Shane Smiskol
733206fdd9 fix joystick 2025-01-16 16:06:11 -08:00
Jason Wen
429b461eae Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master-new (#580) 2025-01-16 18:00:26 -05:00
Shane Smiskol
1d919221e4 Update build.py 2025-01-16 14:52:26 -08:00
Shane Smiskol
37b4e61b00 Allow brake hold (#34384)
* allow brake hold

* rev
2025-01-16 14:22:02 -08: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
Shane Smiskol
0539df7685 bring back ui.py (#34396)
* bring back uipy

* fix it

* fix
2025-01-15 18:50:44 -08:00
Adeeb Shihadeh
a2ced8c8eb Log satellite count in GpsLocationData (#34395)
* Log satellite count in GpsLocationData

* update refs

* forgot to build
2025-01-15 16:53:39 -08:00
Shane Smiskol
69d33ac11d Toyota: allow brake hold (#34394)
toyota okay
2025-01-15 15:03:22 -08:00
Maxime Desroches
707a845218 fix uv (#34393)
uv fix
2025-01-15 14:23:58 -08:00
Adeeb Shihadeh
db61cfb2c1 Update RELEASES.md 2025-01-15 14:20:54 -08:00
Adeeb Shihadeh
3f629e97eb release this month 2025-01-15 13:54:58 -08:00
Shane Smiskol
2258ea310d Hyundai: match cancel button panda safety logic (#34390)
* rising edge

* should work

* TODO

* fix
2025-01-14 21:37:55 -08:00
Shane Smiskol
38fad751cb card: fix cruise speed initialization w/ buttons (#34386)
* fix initialize w/ buttons

* what

* comment
2025-01-14 19:58:22 -08:00
Shane Smiskol
b3fc407538 VW: switch to common pcmCruise check (#34389)
Update car_specific.py
2025-01-14 19:54:28 -08:00
Shane Smiskol
3d38b139bc card: vcruise all in one place (#34387)
* no reason to not be here

* oh this was off by a frame!

* ref
2025-01-14 19:37:44 -08:00
Shane Smiskol
a1d81e63e1 Fix missing visual car dash alerts (#34385)
* fix missing visual dash alerts

* update refs
2025-01-14 18:52:40 -08:00
Kacper Rączy
2054495e79 process_replay: add cast in migrate_longitudinalPlan (#34383)
* Cast

* Something

* Remove newline
2025-01-15 01:37:28 +00:00
Kacper Rączy
ea4a127ab8 process_replay: ignore unknown members in the migration code (#34382)
* Fix the migration for the events

* clean up

clean up

clean up

* no continue

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-15 00:12:48 +00:00
Sammohana
8eebce75ac Getting rid of openpilot.common.numpy_fast (#34368)
* Got rid openpilot.common.numpy_fast

* fixed some data type erros

* importing numpy instead of importing specific functions

* fixing some numpy importing mistakes

* Update selfdrive/car/cruise.py

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2025-01-14 14:52:56 -08:00
commaci-public
c54cd4569a Toyota: remove longitudinal derivative (#34378)
* Update Python packages

* update refs

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-01-14 13:32:09 -08:00
Jason Young
f771ddac88 PlotJuggler: Layout for debugging locationdTemporaryError (#34381)
* PlotJuggler: layout for debugging locationd

* not needed, and codespell doesn't like it
2025-01-14 11:12:05 -08:00
Dean Lee
0e7c697bad raylib: revert auto fit screen size (#34380)
revert auto fit screen size
2025-01-13 19:45:13 -08:00
Adeeb Shihadeh
57abd8b0c2 Remove release files (conceptually) (#34379)
* Remove release files (conceptually)

* fix
2025-01-13 19:31:21 -08:00
Dean Lee
1ab98e38e5 raylib: refactor to implement new App class (#34375)
refactor to implement new App class
2025-01-13 14:52:03 -08: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
commaci-public
4d714113d1 [bot] Update Python packages (#34376)
* Update Python packages

* time -> time_helpers

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2025-01-13 09:38:17 -08:00
ugtthis
7b09d08764 CI: Add missing uppercase_keyboard UI view (#34347)
* add-uppercase-preview

* testing-UI-on-fork

* change back

* add-my-branch

* needs to see sha from fork for test

* fix missing sha

* change back

* get correct named artifact

* try this

* experimenting coordinates

* try these coordinates

* try these coordinates

* draws circles to see touches - changes coordinates

* try these changes

* better coordinates

* click is more centered

* try again

* revert back

* revert these too

* last revert...
2025-01-13 09:05:22 -08:00
ugtthis
71951566c5 Keyboard: add missing control btns to uppercase (#34344)
* add-slash-to uppercase

* Trigger UI preview workflow
2025-01-13 01:22:04 -08:00
Shane Smiskol
db2032c398 Move uds.py (#34374)
* rm uds pt. 1

* rm uds pt. 2

* imports
2025-01-13 00:54:10 -08: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
Adeeb Shihadeh
74ed6c5657 oops need raw 2025-01-12 15:07:18 -08:00
Adeeb Shihadeh
99bb7da850 third_party: add raygui (#34369) 2025-01-12 15:02:30 -08: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
Adeeb Shihadeh
d35ef3b3d5 swaglog: fix locale dependence (#34367) 2025-01-12 11:57:26 -08:00
Dean Lee
47b13f54f6 encoderd: refactor VideoEncoder::publisher_publish to standardize member variable access (#34342)
remove redundant pointer parameter
2025-01-12 11:38:20 -08:00
Dean Lee
1068779294 modeld: properly release OpenCL context in __dealloc__ method (#34353)
release OpenCL context in __dealloc__
2025-01-12 10:15:26 -08:00
Adeeb Shihadeh
55cdf5ad7c release soon 2025-01-12 08:58:53 -08: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
Cameron Clough
08779941e5 loggerd: typing and remove unused default arg (#34349) 2025-01-09 22:12:10 +00:00
Cameron Clough
f761f53205 deleter cleanups (#34345) 2025-01-09 20:00:45 +00: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
Kacper Rączy
5dd1972f96 logreader: support filesystem DATA_ENDPOINT (#34340)
* Check if DATA_ENDPOINT is a dir

* Change url resolution to support joining dirs
2025-01-09 01:20:59 +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
Maxime Desroches
89204b5464 test_onroad: adjust rlog size (#34336)
s
2025-01-07 19:45:53 -08:00
ZwX1616
2290d2f2fb camerad: ISP lsc buffers (#34335)
* luts

* assert sizeof

* remove 0s

---------

Co-authored-by: Comma Device <device@comma.ai>
2025-01-07 16:12:29 -08: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
Harald Schäfer
c8264cbf2c 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>
2025-01-06 20:52:36 -08: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
commaci-public
b1170c98c1 [bot] Update Python packages (#34334)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-01-06 09:55:37 -08: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
Adeeb Shihadeh
420d6f0d5e Quick GC pass heading into 2025 (#34330)
* first pass

* bye bye snpe
2025-01-05 15:10:24 -08: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
Dean Lee
8b4ddc987f cabana: fix missing transmitter after undoing DBC message removal (#34329)
fix missing transmitter after undoing DBC message removal
2025-01-04 10:35:22 -08: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
commaci-public
253f4343f0 [bot] Update Python packages (#34320)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2025-01-02 11:40:55 -08:00
Harald Schäfer
5c5f2aacc8 Tinygrad upstream master (#34325)
Upstream master
2024-12-31 14:02:04 -08:00
Adeeb Shihadeh
b36db7810c tici: fix cpp device type (#34315)
fix cpp
2024-12-26 20:48:45 -08:00
Adeeb Shihadeh
9cf02ca8db Skip registration on newer devices (#34316) 2024-12-26 20:22:44 -08:00
Adeeb Shihadeh
2e0c91c295 uv from brew doesn't have self update 2024-12-24 17:21:34 -08: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
Maxime Desroches
14123e94bb cleanup touch_replay (#34305)
mathematics
2024-12-23 17:30:05 -05:00
commaci-public
e98741f5b2 [bot] Update Python packages (#34304)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-12-23 17:09:55 -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
Adeeb Shihadeh
87f7bb6a9e bump panda 2024-12-22 09:59:14 -08:00
Dean Lee
52c8a12b08 cabana: fix crash in live streaming mode by skipping thumbnail display (#34302)
resolve crash in live streaming mode
2024-12-22 09:27:24 -08: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
Dean Lee
d6214690dc replay: fix various synchronization and event handling issues (#34254)
fix various synchronization and event handling issues
2024-12-21 14:32:49 -08:00
Dean Lee
822f613139 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
2024-12-21 13:49:18 -08:00
Dean Lee
9e8815def4 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
2024-12-21 13:49:09 -08: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
Adeeb Shihadeh
484b96f2b6 timed: diff against absolute value of timedelta (#34299) 2024-12-20 15:28:52 -08:00
Dean Lee
7ac011ca89 cabana: add live and time-window heatmap modes for enhanced signal analysis (#34296)
add live and time-window heatmap modes
2024-12-20 10:40:05 -08:00
Angus Gratton
3363881844 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.
2024-12-19 20:15:04 -08:00
Adeeb Shihadeh
ce4ebbde64 fix IR power scaling (#34293)
* fix IR power scaling

* Update system/hardware/tici/hardware.h
2024-12-19 16:16:59 -08:00
Maxime Desroches
0265f20976 Update metadrive wheel (#34292)
* test

* new wheel
2024-12-19 14:57:29 -08:00
Mike Busuttil
7a72e419fe 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>
2024-12-19 14:36:36 -08:00
Dean Lee
9f3c2f0a37 cabana: enhance message heatmap visualization (#34239)
* enhance message heatmap visualization

* TODO

* improve log_factor

* typo

* bit_flip_counts
2024-12-19 10:49:35 -08: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
Maxime Desroches
9c9b273a3e set python upper bound to 3.13 (#34286)
* try

* test

* ...

* wow

* y

* docker

* <
2024-12-18 22:17:28 -08:00
Harald Schäfer
383893d39e Long planner get accel: new function args (#34288)
* Change function args

* typo

* typo

* ref commit
2024-12-18 16:41:57 -08:00
YassineYousfi
1a7c284445 National Public Radio Model 📻 (#34259)
* f3a009b7-dcb9-41f3-8917-6fcb3cec37bf/400

* 65f26b40-56c9-4c6c-a3ac-e1788bd52567/400
2024-12-18 16:13:47 -08:00
Lukas
af5082089e cabana: issue filtering by addresses in FindSignal tool (#34283)
fixed filtering by addresses issue in cabana
2024-12-18 14:11:05 -08:00
Harald Schäfer
17ca6389e1 Tinygrad runner (#34261)
* squash

* dmonitoringmodeld: use cl transform (#34235)

* needs cleanup

* only if tici

* bump tinygrad

* check width

* base modelframe

* .

* need to be args

* more cleanup

* no _frame in base

* tici only

* its DrivingModelFrame

* .6 is fair

---------

Co-authored-by: Comma Device <device@comma.ai>

* Update tinygrad

* tg upstream

* bump tg

* bump tg

* debug

* attr

* misc cleanup

* whitespace

* remove

* Add TODOs to make python proc for modelrunners

* whitespace

---------

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-12-18 11:58:59 -08:00
Adeeb Shihadeh
ff97a43c50 fix typo 2024-12-17 20:42:44 -08:00
ZwX1616
9c3aa2e2dc camerad: add os04+4.6mm lsc profile (#34280)
* draft

* ifdef in cl

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-12-17 20:32:08 -08:00
Shane Smiskol
7ffad1935d bump msgq (#34278)
bump
2024-12-17 15:43:51 -08:00
Maxime Desroches
155d842a3b set plot limits for touch events viz (#34277)
lim
2024-12-17 15:10:13 -08:00
Dean Lee
d40fd1956d wifimanager: use asyncCall to avoid timeout when adding connections (#34273)
* use asyncCall to avoid timeout when adding Wi-Fi connections

* use async call for addTetheringConnection

* only this change

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-12-17 14:48:08 -08:00
Shane Smiskol
857133635c ui: wait for lte connection to update before reactivating (#34275)
async
2024-12-17 14:35:43 -08:00
Shane Smiskol
f149083e4a ui: initialize tethering connection on startup (#34274)
* initialize hotspot connection on init

* better place

* fix
2024-12-17 14:25:31 -08:00
Adeeb Shihadeh
247ee2bda8 bump panda for new USB VID 2024-12-17 11:18:41 -08: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
Adeeb Shihadeh
e317485200 tici: fix device types (#34269) 2024-12-16 19:44:43 -08:00
Shane Smiskol
3da346e2e4 AGNOS: fix update loop (#34268)
fix update loop
2024-12-16 18:30:08 -08:00
Adeeb Shihadeh
6c1314baf9 camerad: only build debayer kernel when necessary (#34267) 2024-12-16 17:22:59 -08:00
Maxime Desroches
71b02f8001 hardwared: non blocking read for touch events (#34263)
* slow

* slow

* non blocking

* 10

* try

* simple

* int

* test

* get

* try

* clean

* read all

* nested

* simpler

* indent

* cleanup
2024-12-16 17:10:47 -08:00
Jason Wen
a984903298 Hyundai: Allow controls with Sport and Manumatic Gears (#34113)
* Hyundai CAN: Explicitly parse gear shifter values for `EV, HEV, PHEV`

* for this pr

* more segments

* found 4.0!

* only print when spornt=4.0 is found

* new outputs

* bump opendbc

* Update selfdrive/car/car_specific.py

* delete notebook

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-12-16 16:51:04 -08:00
Jason Wen
c69cd934af Setup sunnypilot package (#483)
Setup sunnypilot as a package
2024-12-16 19:47:29 -05:00
Adeeb Shihadeh
bedbe6fd94 agnos 11.4 (#34250) 2024-12-16 16:46:03 -08:00
ZwX1616
7352e612a2 dmonitoringmodeld: use cl transform without tinygrad (#34266)
* merge

* why

* self.buf_size

* 0.05 more than with tg due to copy

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-12-16 16:29:06 -08:00
Jason Wen
35278ba63b ui: Allow Qt spinner/text/setup/reset/updater to build on macOS (#34265)
ui: Allow spinner/text/setup/reset/updater to build on macOS
2024-12-16 16:25:46 -08:00
Adeeb Shihadeh
a82116ac46 camerad: fix VisionBuf freeing (#34264)
Co-authored-by: Comma Device <device@comma.ai>
2024-12-16 15:12:17 -08:00
Adeeb Shihadeh
b2930682ff tici: only write eSIM connection once 2024-12-16 14:41:36 -08:00
Harald Schäfer
5018cf75ff North America Model (#34260)
* 0e1c9c12-0472-4a0c-8963-611ad240ec62/400

* rm outputs
2024-12-16 14:17:31 -08:00
Harald Schäfer
a98210aeec modeld: ort helpers (#34258)
* ort helpers

* import from ort helpers

* import that too

* linter

* linter

* linter
2024-12-16 13:10:00 -08:00
commaci-public
11fb0b95d2 [bot] Update Python packages (#34256)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-12-16 10:28:17 -08:00
Edward Wang
ea444ec340 Standardize ENV=* formatting in Dockerfiles (#34253)
fix ENV formatting
2024-12-16 09:47:32 -08:00
Mike Busuttil
cf4fae5464 CTF.md typo (#34257)
typo
2024-12-16 09:37:29 -08:00
commaci-public
833a67b019 [bot] Update Python packages (#34251)
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-12-15 21:05:29 -08:00
Adeeb Shihadeh
8558928864 add branch guide to the readme 2024-12-15 13:36:51 -08:00
Adeeb Shihadeh
df2bf83846 op/switch: more robust switching 2024-12-15 09:39:23 -08:00
Adeeb Shihadeh
d735db6113 rm cppcheck (#34248) 2024-12-14 23:17:45 -08:00
Adeeb Shihadeh
b6233838eb macOS: disable brew auto update (#34247) 2024-12-14 23:10:04 -08:00
Adeeb Shihadeh
ba0e7c4719 hardware: add helper for setting IR power (#34245)
* hardware: add helper for setting IR power

* fix
2024-12-14 13:50:25 -08:00
Maxime Desroches
70fa0ab4c1 debug: touch events plot (#34242)
* replay

* remove
2024-12-14 13:09:59 -08:00
Harald Schäfer
f6885dcbec Revert Tinygrad (#34243)
* Revert "dmonitoringmodeld: use cl transform (#34235)"

This reverts commit 684b0b9d4d.

* Revert "load model before calling convert_fp16_to_fp32"

This reverts commit 31606a7d15.

* Revert "bump tinygrad"

This reverts commit 44f58ff758.

* Revert "Tinygrad runner (#34171)"

This reverts commit 7b5a4fbb03.

* Allow init buffer

* typo
2024-12-14 12:15:36 -08:00
Adeeb Shihadeh
4c27878f67 camerad: prep for the BPS (#34244)
prep

Co-authored-by: Comma Device <device@comma.ai>
2024-12-14 11:50:49 -08:00
ZwX1616
684b0b9d4d dmonitoringmodeld: use cl transform (#34235)
* needs cleanup

* only if tici

* bump tinygrad

* check width

* base modelframe

* .

* need to be args

* more cleanup

* no _frame in base

* tici only

* its DrivingModelFrame

* .6 is fair

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-12-14 00:44:15 -08:00
Maxime Desroches
b3ad7ef24b add touch events to qlogs (#34236)
deci
2024-12-13 21:22:43 -08:00
Louis Velez
93a8d87b34 docs: glossary infra (#34231)
* feat: glossary infra

* fix static analysis error

* fix ruff linter error.

* updates docs.yaml to use ubuntu-24.04

* code review fixes
2024-12-13 20:28:01 -08:00
Harald Schäfer
8743bc4fe2 Null Pointer Model (#34111)
* e8cb7f27-e448-4c15-90c2-ac440cd5a042/400

* 0078ad07-4d46-4086-820f-23d61c90e07f/400

* 4bd74082-70af-47da-8156-e84ebf4d4812/400

* 2a074022-5c2c-4628-97f9-f54849a936a6/400

* 0660aa81-93c5-41b7-9cc2-dc8816a512cd/400

* Clip curvature to reasonable limits

* Better curvature and speed clips

* typo

* typo

* 31aa62c3-b373-4878-8f2e-5107305de187/400

* 384690ca-9b8a-41fe-9bcd-389b20fc6aa4/400

* ref commit

---------

Co-authored-by: Yassine <yassine.y10@gmail.com>
2024-12-13 19:14:21 -08:00
Maxime Desroches
e04ac10509 ci: fix cache key for test_models (#34230)
* fix this

* please rerun this my good ci friend

* thank you very much
2024-12-13 17:20:28 -08:00
Maxime Desroches
64db514d41 hardwared: log touch events (#34225)
* touch

* touch

* touch

* touch

* this

* valid

* better
2024-12-13 16:50:34 -08:00
Shane Smiskol
da2c70e097 Revert "LogReader: fix issue when your dns resolves all requests" (#34229)
Revert "LogReader: fix issue when your dns resolves all requests (#34089)"

This reverts commit 7fc5040ed9.
2024-12-13 15:11:30 -08:00
Shane Smiskol
d574513879 bump opendbc (#34227)
* bump

* update docs
2024-12-13 13:33:37 -08:00
mitchellgoffpc
31606a7d15 load model before calling convert_fp16_to_fp32 2024-12-12 15:04:54 -08:00
mitchellgoffpc
44f58ff758 bump tinygrad 2024-12-12 14:12:45 -08:00
Shane Smiskol
cd6d9fee3f Revert "athenad: fix thread safety issues in upload handing" (#34224)
Revert "athenad: fix thread safety issues in upload handing (#34199)"

This reverts commit dcb3113c4b.
2024-12-12 13:32:36 -08:00
Maxime Desroches
c1ae9eabf1 ci: skip simulator for external PRs (#34221)
* try

* try

* try

* try...

* skip

* cleanup
2024-12-12 11:17:50 -08:00
Harald Schäfer
7b5a4fbb03 Tinygrad runner (#34171)
* squash

* bump tg

* bump tg

* debump tinygrad

* bump tinygrad

* bump tg

* Skip init iteration

* fixes

* cleanups

* skip first test sample

* typos

* linter unhappy

* update cpu usage

* OPENCL just zeros for now

* imports

* Try printing

* Runs again, but slower

* unused import

* Allow more buffer with tg and all on gpu

* bump tinygrad

* seems ok

* stricter timings for driving looser for dm

* try llvm

* check nvidia

* More timeout for now

* make test pass

* Revert "try llvm"

This reverts commit ef136e478320101fea262bae3579e558da991902.

* small fixes

* whitespace

* revert test timeout

* No model runners

* Always CPU always fast

* No onnx runtime GPU

* more cores

* cleanup

* Is this faster

* Is this faster

* at least runs

* FP32 is faster than 16

* fix deps

* whitespace

* comment

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-12-11 23:15:20 -08:00
Adeeb Shihadeh
0cf04af227 timed: gate time setting on GPS fix (#34217) 2024-12-11 20:42:45 -08:00
Adeeb Shihadeh
7a2af78846 camerad: re-enable ISP debayer (#34212)
camerad: re-enable ISP debayer

Co-authored-by: Comma Device <device@comma.ai>
2024-12-11 20:04:40 -08:00
Adeeb Shihadeh
3328845be1 op/switch: fix ambiguous remote on checkout 2024-12-11 19:27:39 -08:00
Dean Lee
3a6db78601 camerad: pass std::vector by const reference (#34206)
pass std::vector by const reference
2024-12-11 14:09:37 -08:00
Jason Young
7202c5acb8 Webcam fixes (#34211)
* follow VIPC API change, add logging

* use full path for video devices
2024-12-11 14:03:40 -08:00
Maxime Desroches
216ebcaa50 Fix model runtime on PC (#34210)
exhaustive
2024-12-11 13:27:39 -08:00
Shane Smiskol
1dcdf57395 Toyota: raise max acceleration for TSS2 (#34201)
* bump

* Update ref_commit
2024-12-11 13:05:39 -08: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
Mike Busuttil
02976db472 Tools: simplified setup documentation (#34204)
platform agnostic setup script
2024-12-10 21:29:27 -08:00
Jason Wen
03cd00719c Tools: Update setup command for macOS native setup (#34202) 2024-12-10 19:05:09 -08: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
1260 changed files with 90369 additions and 23895 deletions

5
.codespellignore Normal file
View File

@@ -0,0 +1,5 @@
Wen
REGIST
PullRequest
cancelled
FOF

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

2
.gitattributes vendored
View File

@@ -11,8 +11,6 @@
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
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

View File

@@ -1,53 +0,0 @@
name: Car bug report
description: For issues with a particular car make or model
labels: ["car", "bug"]
body:
- type: markdown
attributes:
value: >
Before creating a **bug report**, please check the following:
* Ensure you're running the latest openpilot release.
* Ensure you're using officially supported hardware. Issues running on PCs have a different issue template.
* Ensure there isn't an existing issue for your bug. If there is, leave a comment on the existing issue.
* Ensure you're running stock openpilot. We cannot look into bug reports from forks.
If you're unsure whether you've hit a bug, check out the #installation-help channel in the [community Discord server](https://discord.comma.ai).
- type: textarea
attributes:
label: Describe the bug
description: Also include a description of how to reproduce the bug
validations:
required: true
- type: input
id: car
attributes:
label: Which car does this affect?
placeholder: Toyota Prius 2017
validations:
required: true
- type: input
id: route
attributes:
label: Provide a route where the issue occurs
description: Ensure the route is fully uploaded at https://useradmin.comma.ai
placeholder: 77611a1fac303767|2020-05-11--16-37-07
validations:
required: true
- type: input
id: version
attributes:
label: openpilot version
description: If you're not on release, provide the commit hash
placeholder: 0.8.10
validations:
required: true
- type: textarea
attributes:
label: Additional info

View File

@@ -1,9 +1,12 @@
blank_issues_enabled: false
contact_links:
- name: Car bug report
url: https://github.com/commaai/opendbc/issues/new
about: For issues with a particular car make or model
- name: Join the Discord
url: https://discord.comma.ai
about: The community Discord is for both openpilot development and experience discussion
- name: Report model bugs
- name: Report driving behavior feedback
url: https://discord.com/channels/469524606043160576/1254834193066623017
about: Feedback for the driving and driver monitoring models goes in the #driving-feedback in Discord
- name: Community Wiki

View File

@@ -1,15 +0,0 @@
---
name: Bug fix
about: For openpilot bug fixes
title: ''
labels: 'bugfix'
assignees: ''
---
**Description**
<!-- A description of the bug and the fix. Also link the issue if it exists. -->
**Verification**
<!-- Explain how you tested this bug fix. -->

View File

@@ -1,19 +0,0 @@
---
name: Car Bug fix
about: For vehicle/brand specific bug fixes
title: ''
labels: 'car bug fix'
assignees: ''
---
**Description**
<!-- A description of the bug and the fix. Also link the issue if it exists. -->
**Verification**
<!-- Explain how you tested this bug fix. -->
**Route**
Route: [a route with the bug fix]

View File

@@ -1,15 +0,0 @@
---
name: Car port
about: For new car ports
title: ''
labels: 'car port'
assignees: ''
---
**Checklist**
- [ ] added entry to CAR in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
- [ ] route with openpilot:
- [ ] route with stock system:
- [ ] car harness used (if comma doesn't sell it, put N/A):

View File

@@ -1,13 +0,0 @@
---
name: Fingerprint
about: For adding fingerprints to existing cars
title: ''
labels: 'fingerprint'
assignees: ''
---
**Car**
Which car (make, model, year) this fingerprint is for
**Route**
A route with the fingerprint

View File

@@ -1,15 +0,0 @@
---
name: Refactor
about: For code refactors
title: ''
labels: 'refactor'
assignees: ''
---
**Description**
<!-- A description of the refactor, including the goals it accomplishes. -->
**Verification**
<!-- Explain how you tested the refactor for regressions. -->

View File

@@ -1,31 +0,0 @@
---
name: Tuning
about: For openpilot tuning changes
title: ''
labels: 'tuning'
assignees: ''
---
**Description**
<!-- A description of what is wrong with the current tuning and how the PR addresses this. -->
**Verification**
<!-- To verify tuning, capture the following scenarios (broadly, not exactly), with current tune and this tune.
Use the PlotJuggler tuning layout to compare planned versus actual behavior.
Run ./juggle.py <route> --layout layouts/tuning.xml , screenshot the full tab of interest, and paste into this PR.
Longitudinal:
* Maintaining speed at 25, 40, 65mph
* Driving up and down hills
* Accelerating from a stop
* Decelerating to a stop
* Following large changes in set speed
* Coming to a stop behind a lead car
Lateral:
* Straight driving at ~25, ~45 and ~65mph
* Turns driving at ~25, ~45 and ~65mph
-->

30
.github/build.py vendored
View File

@@ -1,30 +0,0 @@
import pathlib
GITHUB_FOLDER = pathlib.Path(__file__).parent
PULL_REQUEST_TEMPLATES = (GITHUB_FOLDER / "PULL_REQUEST_TEMPLATE")
order = ["fingerprint", "car_bugfix", "bugfix", "car_port", "refactor"]
def create_pull_request_template():
with open(GITHUB_FOLDER / "pull_request_template.md", "w") as f:
f.write("<!-- Please copy and paste the relevant template -->\n\n")
for t in order:
template = PULL_REQUEST_TEMPLATES / f"{t}.md"
text = template.read_text()
# Remove metadata for GitHub
start = text.find("---")
end = text.find("---", start+1)
text = text[end + 4:]
# Remove comments
text = text.replace("<!-- ", "").replace("-->", "")
f.write(f"<!--- ***** Template: {template.stem.replace('_', ' ').title()} *****\n")
f.write(text)
f.write("\n\n")
f.write("-->\n\n")
create_pull_request_template()

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/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

@@ -12,7 +12,7 @@ inputs:
required: true
save:
description: 'whether to save the cache'
default: 'false'
default: 'true'
required: false
outputs:
cache-hit:

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,6 +9,7 @@ jobs:
permissions:
contents: read
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -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,15 +5,15 @@ on:
workflow_dispatch:
env:
BASE_IMAGE: openpilot-base
DOCKER_REGISTRY: ghcr.io/commaai
BASE_IMAGE: sunnypilot-base
DOCKER_REGISTRY: ghcr.io/sunnypilot
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
jobs:
badges:
name: create badges
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
permissions:
contents: write
steps:
@@ -29,7 +29,7 @@ jobs:
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,303 @@
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/docs.sunnypilot.ai2.git 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 < <(
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
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:
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/docs.sunnypilot.ai2.git 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/docs.sunnypilot.ai2.git 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,76 @@
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:
PYTHONWARNINGS: error
BASE_IMAGE: openpilot-base
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
jobs:
generate_cereal_artifact:
name: Generate cereal validation artifacts
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
- name: Generate the log file
run: |
${{ env.RUN }} "cereal/messaging/tests/validate_sp_cereal_upstream.py -g -f schema_instances.bin" && \
ls -la
ls -la cereal/messaging/tests
- 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:
- uses: actions/checkout@v4
with:
repository: 'commaai/openpilot'
submodules: true
ref: "refs/heads/master"
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc) cereal"
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: cereal_validations
path: cereal/messaging/tests/cereal_validations
- name: 'Run the validation'
run: |
chmod +x cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py
${{ env.RUN }} "cereal/messaging/tests/cereal_validations/validate_sp_cereal_upstream.py -r -f cereal/messaging/tests/cereal_validations/schema_instances.bin"

View File

@@ -15,7 +15,7 @@ env:
jobs:
setup:
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
runs-on: ubuntu-latest
outputs:
ci_runs: ${{ steps.ci_runs_setup.outputs.matrix }}
@@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.setup.outputs.ci_runs)}}
uses: commaai/openpilot/.github/workflows/ci_weekly_run.yaml@master
uses: sunnypilot/sunnypilot/.github/workflows/ci_weekly_run.yaml@master
with:
run_number: ${{ matrix.run_number }}

View File

@@ -12,6 +12,6 @@ concurrency:
jobs:
selfdrive_tests:
uses: commaai/openpilot/.github/workflows/selfdrive_tests.yaml@master
uses: sunnypilot/sunnypilot/.github/workflows/selfdrive_tests.yaml@master
with:
run_number: ${{ inputs.run_number }}

View File

@@ -18,7 +18,7 @@ concurrency:
jobs:
docs:
name: build docs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: commaai/timeout@v1
@@ -35,13 +35,13 @@ jobs:
# Push to docs.comma.ai
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
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

@@ -9,6 +9,9 @@ jobs:
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
@@ -43,3 +46,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@v7
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@v4
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
path: base
- run: git lfs pull
- run: cd base && git lfs pull
- run: pip install onnx
- name: scripts/reporter.py
id: report
run: |
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "## Model Review" >> $GITHUB_OUTPUT
MASTER_PATH=${{ github.workspace }}/base python scripts/reporter.py >> $GITHUB_OUTPUT
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

@@ -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 prebuilt
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
.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,15 +5,14 @@ on:
workflow_dispatch:
jobs:
build_masterci:
name: build master-ci
build___nightly:
name: build __nightly
env:
TARGET_DIR: /tmp/openpilot
ImageOS: ubuntu20
ImageOS: ubuntu24
container:
image: ghcr.io/commaai/openpilot-base:latest
image: ghcr.io/sunnypilot/sunnypilot-base:latest
runs-on: ubuntu-latest
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
permissions:
checks: read
contents: write
@@ -23,12 +22,12 @@ jobs:
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
@@ -39,16 +38,5 @@ jobs:
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=master-ci release/build_devel.sh
- name: Push __nightly
run: BRANCH=__nightly release/build_stripped.sh

View File

@@ -5,18 +5,45 @@ on:
- cron: "0 14 * * 1" # every Monday at 2am UTC (6am PST)
workflow_dispatch:
env:
BASE_IMAGE: sunnypilot-base
BUILD: release/ci/docker_build_sp.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
jobs:
update_translations:
runs-on: ubuntu-latest
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
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"
branch: "update-translations"
base: "master"
delete-branch: true
labels: bot
package_updates:
name: package_updates
runs-on: ubuntu-latest
container:
image: ghcr.io/commaai/openpilot-base:latest
if: github.repository == 'commaai/openpilot'
image: ghcr.io/sunnypilot/sunnypilot-base:latest
if: github.repository == 'sunnypilot/sunnypilot'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: uv lock
if: github.repository == 'commaai/openpilot'
run: |
python3 -m ensurepip --upgrade
pip3 install uv
@@ -24,18 +51,20 @@ jobs:
- name: bump submodules
run: |
git config --global --add safe.directory '*'
git -c submodule."tinygrad".update=none submodule update --remote
git config submodule.tinygrad.update none
git submodule update --remote
git add .
- name: update car docs
run: |
export PYTHONPATH="$PWD"
scons -j$(nproc) --minimal opendbc_repo
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
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

View File

@@ -19,22 +19,25 @@ concurrency:
env:
PYTHONWARNINGS: error
BASE_IMAGE: openpilot-base
BASE_IMAGE: sunnypilot-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
BUILD: release/ci/docker_build_sp.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
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'))) && '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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
env:
STRIPPED_DIR: /tmp/releasepilot
steps:
@@ -49,12 +52,8 @@ jobs:
command: git lfs pull
- name: Build devel
timeout-minutes: 1
run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
run: TARGET_DIR=$STRIPPED_DIR release/build_stripped.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: |
@@ -64,26 +63,41 @@ jobs:
timeout-minutes: 1
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "release/check-dirty.sh && \
MAX_EXAMPLES=5 $PYTEST -m 'not slow' selfdrive/car system/manager"
- name: Static analysis
timeout-minutes: 1
${{ env.RUN }} "release/check-dirty.sh"
- name: Check submodules
if: github.repository == 'sunnypilot/sunnypilot'
timeout-minutes: 3
run: |
cd $GITHUB_WORKSPACE
cp pyproject.toml $STRIPPED_DIR
cd $STRIPPED_DIR
${{ env.RUN }} "scripts/lint/lint.sh --skip check_added_large_files"
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:
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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["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'
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'sunnypilot/sunnypilot'
run: |
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
$DOCKER_LOGIN
@@ -93,34 +107,60 @@ jobs:
build_mac:
name: build macOS
runs-on: ${{ github.repository == 'commaai/openpilot' && 'namespace-profile-macos-8x14' || 'macos-latest' }}
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- name: Homebrew cache
uses: ./.github/workflows/auto-cache
if: false # disabling the cache for now because it is breaking macos builds...
with:
save: false # No need save here if we manually save it later conditionally
path: ~/Library/Caches/Homebrew
key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
brew-macos-${{ env.CACHE_COMMIT_DATE }}
brew-macos
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
# package install has DeprecationWarnings
PYTHONWARNINGS: default
PYTHONWARNINGS: default # package install has DeprecationWarnings
HOMEBREW_DISPLAY_INSTALL_TIMES: 1
- name: Save Homebrew cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/master'
with:
path: ~/Library/Caches/Homebrew
key: brew-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
- 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:
save: false # No need save here if we manually save it later conditionally
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}-macos
- name: Building openpilot
run: . .venv/bin/activate && scons -j$(nproc)
- name: Save scons cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/master'
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
env:
PYTHONWARNINGS: default
steps:
@@ -134,41 +174,46 @@ jobs:
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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
id: setup-step
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Run unit tests
timeout-minutes: ${{ contains(runner.name, 'nsc') && 1 || 20 }}
timeout-minutes: ${{ contains(runner.name, 'nsc') && ((steps.setup-step.outputs.duration < 18) && 1 || 2) || 999 }}
run: |
${{ env.RUN }} "$PYTEST --collect-only -m 'not slow' &> /dev/null && \
${{ env.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' && \
./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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
id: setup-step
- name: Cache test routes
id: dependency-cache
uses: actions/cache@v4
@@ -179,12 +224,10 @@ jobs:
run: |
${{ env.RUN }} "scons -j$(nproc)"
- name: Run replay
timeout-minutes: ${{ contains(runner.name, 'nsc') && (steps.dependency-cache.outputs.cache-hit == 'true') && 1 || 20 }}
timeout-minutes: ${{ contains(runner.name, 'nsc') && (steps.dependency-cache.outputs.cache-hit == 'true') && ((steps.setup-step.outputs.duration < 18) && 1 || 2) || 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"
${{ env.RUN }} "selfdrive/test/process_replay/test_processes.py -j$(nproc) && \
chmod -R 777 /tmp/comma_download_cache"
- name: Print diff
id: print-diff
if: always()
@@ -196,7 +239,7 @@ jobs:
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 != '' }}
if: false # TODO: move this to github instead of azure
run: |
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python3 selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
- name: Run regen
@@ -205,131 +248,42 @@ jobs:
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', 'selfdrive/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 || 20 }}
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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["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
id: setup-step
- name: Build openpilot
run: |
${{ env.RUN }} "scons -j$(nproc)"
- name: Driving test
timeout-minutes: 1
timeout-minutes: ${{ (steps.setup-step.outputs.duration < 18) && 1 || 2 }}
run: |
${{ env.RUN }} "source selfdrive/test/setup_xvfb.sh && \
source selfdrive/test/setup_vsound.sh && \
CI=1 pytest tools/sim/tests/test_metadrive_bridge.py"
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' }}
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", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
if: false # FIXME: FrameReader is broken on CI runners
steps:
- uses: actions/checkout@v4
with:
@@ -344,7 +298,7 @@ jobs:
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Create Test Report
timeout-minutes: ${{ ((steps.frames-cache.outputs.cache-hit == 'true') && 1 || 3) }}
timeout-minutes: ${{ ((steps.frames-cache.outputs.cache-hit == 'true') && 2 || 4) }}
run: >
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
source selfdrive/test/setup_xvfb.sh &&

View File

@@ -10,9 +10,17 @@ inputs:
required: false
default: 30
outputs:
duration:
description: 'Duration of the setup process in seconds'
value: ${{ steps.get_duration.outputs.duration }}
runs:
using: "composite"
steps:
- id: start_time
shell: bash
run: echo "START_TIME=$(date +%s)" >> $GITHUB_ENV
- id: setup1
uses: ./.github/workflows/setup
continue-on-error: true
@@ -35,3 +43,10 @@ runs:
uses: ./.github/workflows/setup
with:
is_retried: true
- id: get_duration
shell: bash
run: |
END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
echo "Total duration: $DURATION seconds"
echo "duration=$DURATION" >> $GITHUB_OUTPUT

View File

@@ -19,7 +19,7 @@ runs:
- shell: bash
name: No retries!
run: |
if [ "${{ github.run_attempt }}" -gt 1 ]; then
if [ "${{ github.run_attempt }}" -gt ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.author_association == 'NONE' && 2 || 1}} ]; then
echo -e "\033[0;31m##################################################"
echo -e "\033[0;31m Retries not allowed! Fix the flaky test! "
echo -e "\033[0;31m##################################################\033[0m"

View File

@@ -7,6 +7,7 @@ on:
env:
DAYS_BEFORE_PR_CLOSE: 2
DAYS_BEFORE_PR_STALE: 9
DAYS_BEFORE_PR_STALE_DRAFT: 30
jobs:
stale:
@@ -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@v9
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,219 @@
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
- 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"
QCOM=1 python3 "${{ env.MODELS_DIR }}/../get_model_metadata.py" "$onnx_file" || true
done
- name: Prepare Output
run: |
sudo rm -rf ${{ env.OUTPUT_DIR }}
mkdir -p ${{ env.OUTPUT_DIR }}
# Copy the model files
rsync -avm \
--include='*.dlc' \
--include='*.thneed' \
--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,357 @@
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 selfdrive_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 common/version.h | grep COMMA_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: selfdrive_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
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} \
--include='**/panda/board/' \
--include='**/panda/board/obj' \
--include='**/panda/board/obj/panda.bin.signed' \
--include='**/panda/board/obj/panda_h7.bin.signed' \
--include='**/panda/board/obj/bootstub.panda.bin' \
--include='**/panda/board/obj/bootstub.panda_h7.bin' \
--exclude='.sconsign.dblite' \
--exclude='*.a' \
--exclude='*.o' \
--exclude='*.os' \
--exclude='*.pyc' \
--exclude='moc_*' \
--exclude='*.cc' \
--exclude='Jenkinsfile' \
--exclude='supercombo.onnx' \
--exclude='**/panda/board/*' \
--exclude='**/panda/board/obj/**' \
--exclude='**/panda/certs/' \
--exclude='**/panda/crypto/' \
--exclude='**/release/' \
--exclude='**/.github/' \
--exclude='**/selfdrive/ui/replay/' \
--exclude='**/__pycache__/' \
--exclude='**/selfdrive/ui/*.h' \
--exclude='**/selfdrive/ui/**/*.h' \
--exclude='**/selfdrive/ui/qt/offroad/sunnypilot/' \
--exclude='${{env.SCONS_CACHE_DIR}}' \
--exclude='**/.git/' \
--exclude='**/SConstruct' \
--exclude='**/SConscript' \
--exclude='**/.venv/' \
--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: [ build, publish ]
runs-on: ubuntu-24.04
if: ${{ (always() && !cancelled() && !failure()) && needs.publish.result == 'success' && !failure() && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }}
steps:
- uses: actions/checkout@v4
- name: Setup Alpine Linux environment
uses: jirutka/setup-alpine@v1.2.0
with:
packages: 'jq gettext curl'
- name: Send Discord Notification
env:
DISCORD_WEBHOOK: ${{ contains(fromJSON(vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES), env.SOURCE_BRANCH) && secrets.DISCORD_DEV_FEEDBACK_CHANNEL_WEBHOOK || secrets.DISCORD_DEV_PRIVATE_CHANNEL_WEBHOOK }}
run: |
TEMPLATE='${{ vars.DISCORD_GENERAL_UPDATE_NOTICE }}'
export EXTRA_VERSION_IDENTIFIER="${{ needs.build.outputs.extra_version_identifier }}"
export VERSION="${{ needs.build.outputs.version }}"
export branch_name=${{ env.SOURCE_BRANCH }}
export new_branch=${{ needs.build.outputs.new_branch }}
export extra_version_identifier=${{ needs.build.outputs.extra_version_identifier || github.run_number}}
echo ${TEMPLATE} | envsubst | jq -c '.' | tee payload.json
curl -X POST -H "Content-Type: application/json" -d @payload.json $DISCORD_WEBHOOK
echo ""
echo "---- To update the list of branches that notify to dev-feedback -----"
echo ""
echo "1. Go to: ${{ github.server_url }}/${{ github.repository }}/settings/variables/actions/DEV_FEEDBACK_NOTIFICATION_BRANCHES"
echo "2. Current value: ${{ vars.DEV_FEEDBACK_NOTIFICATION_BRANCHES }}"
echo "3. Update as needed (JSON array with no spaces)"
shell: alpine.sh {0}
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,223 @@
name: Build dev
env:
DEFAULT_SOURCE_BRANCH: "master"
DEFAULT_TARGET_BRANCH: "master-dev"
PR_LABEL: "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 == 'dev' || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, 'dev'))))
)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches
token: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for Tests
uses: ./.github/workflows/wait-for-action # Path to where you place the action
if: (
(github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
|| (contains(github.event_name, 'pull_request') && ((github.event.action == 'labeled' && (github.event.label.name == 'dev' || github.event.label.name == 'trust-fork-pr') && contains(github.event.pull_request.labels.*.name, 'dev'))))
)
with:
workflow: selfdrive_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:100) {
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:${PR_LABEL},${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: Push changes if there are diffs
id: push-changes # Add an id so we can reference this step
run: |
TARGET_BRANCH="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
# 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
# If we get here, there are diffs, so push
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 selfdrive_tests.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
echo "Sleeping for 120s to give plenty of time for the action to start and then we wait"
sleep 120
echo "Getting latest run ID..."
RUN_ID=$(gh run list --workflow=selfdrive_tests.yaml --branch="${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}" --limit=1 --json databaseId --jq '.[0].databaseId')
echo "Watching run ID: $RUN_ID"
gh run watch "$RUN_ID"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger prebuilt workflow
if: success() && steps.push-changes.outputs.has_changes == 'true'
run: |
gh workflow run sunnypilot-build-prebuilt.yaml --ref "${{ inputs.target_branch || env.DEFAULT_TARGET_BRANCH }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -19,7 +19,7 @@ env:
jobs:
preview:
if: github.repository == 'commaai/openpilot'
if: github.repository == 'sunnypilot/sunnypilot'
name: preview
runs-on: ubuntu-latest
timeout-minutes: 20
@@ -58,7 +58,7 @@ jobs:
- name: Getting master ui
uses: actions/checkout@v4
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
@@ -82,9 +82,9 @@ jobs:
if: github.event_name == 'pull_request_target'
id: find_diff
run: >-
sudo apt-get install -y imagemagick
sudo apt-get update && sudo apt-get install -y imagemagick
scenes="homescreen settings_device settings_software settings_toggles settings_developer offroad_alert update_available prime onroad onroad_disengaged onroad_override onroad_sidebar onroad_wide onroad_wide_sidebar onroad_alert_small onroad_alert_mid onroad_alert_full driver_camera body keyboard"
scenes=$(find ${{ github.workspace }}/pr_ui/*.png -type f -printf "%f\n" | cut -d '.' -f 1 | grep -v 'pair_device')
A=($scenes)
DIFF=""
@@ -93,8 +93,20 @@ jobs:
for ((i=0; i<${#A[*]}; i=i+1));
do
# Check if the master file exists
if [ ! -f "${{ github.workspace }}/master_ui/${A[$i]}.png" ]; then
# This is a new file in PR UI that doesn't exist in master
DIFF="${DIFF}<details open>"
DIFF="${DIFF}<summary>${A[$i]} : \$\${\\color{cyan}\\text{NEW}}\$\$</summary>"
DIFF="${DIFF}<table>"
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
DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"
DIFF="${DIFF}</table>"
DIFF="${DIFF}</details>"
elif ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then
convert ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png -transparent black mask.png
composite mask.png ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png
convert -delay 100 ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png -loop 0 ${{ github.workspace }}/pr_ui/${A[$i]}_diff.gif
@@ -106,13 +118,13 @@ jobs:
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} <td> master <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"
DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> diff <img src=\"https://raw.githubusercontent.com/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} <td> diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.gif\"> </td>"
DIFF="${DIFF}</tr>"
DIFF="${DIFF}</table>"
@@ -125,7 +137,7 @@ jobs:
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>"
TABLE="${TABLE} <td> <img src=\"https://raw.githubusercontent.com/sunnypilot/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
if [[ $INDEX -eq 1 || $(($i + 1)) -eq ${#A[*]} ]]; then
TABLE="${TABLE}</tr>"
fi

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: 'selfdrive_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 }}

16
.gitignore vendored
View File

@@ -13,9 +13,11 @@ venv/
model2.png
a.out
.hypothesis
.cache/
/docs_site/
*.mp4
*.dylib
*.DSYM
*.d
@@ -36,6 +38,7 @@ a.out
*.pyxbldc
*.vcd
*.qm
*_pyx.cpp
config.json
clcache
compile_commands.json
@@ -46,10 +49,7 @@ 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
@@ -71,9 +71,10 @@ flycheck_*
cppcheck_report.txt
comma*.sh
selfdrive/modeld/thneed/compile
selfdrive/modeld/models/*.thneed
selfdrive/modeld/models/*.pkl
sunnypilot/modeld*/thneed/compile
sunnypilot/modeld*/models/*.thneed
sunnypilot/modeld*/models/*.pkl
*.bz2
*.zst
@@ -103,3 +104,8 @@ Pipfile
# Ignore all local history of files
.history
.ionide
### 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/sunnypilot/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/tinygrad/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>

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"
]
}
]
}

View File

@@ -1,9 +1,8 @@
FROM ghcr.io/commaai/openpilot-base:latest
ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1
ENV OPENPILOT_PATH /home/batman/openpilot
ENV PYTHONPATH ${OPENPILOT_PATH}:${PYTHONPATH}
ENV OPENPILOT_PATH=/home/batman/openpilot
RUN mkdir -p ${OPENPILOT_PATH}
WORKDIR ${OPENPILOT_PATH}

View File

@@ -1,16 +1,16 @@
FROM ubuntu:24.04
ENV PYTHONUNBUFFERED 1
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 && \
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
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 && \
@@ -55,11 +55,12 @@ RUN mkdir -p /tmp/opencl-driver-intel && \
cd / && \
rm -rf /tmp/opencl-driver-intel
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
ENV QTWEBENGINE_DISABLE_SANDBOX 1
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
ENV QTWEBENGINE_DISABLE_SANDBOX=1
RUN dbus-uuidgen > /etc/machine-id
RUN apt-get update && apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
ARG USER=batman
ARG USER_UID=1001

12
Dockerfile.sunnypilot Normal file
View File

@@ -0,0 +1,12 @@
FROM ghcr.io/sunnypilot/sunnypilot-base:latest
ENV PYTHONUNBUFFERED=1
ENV OPENPILOT_PATH=/home/batman/openpilot
RUN mkdir -p ${OPENPILOT_PATH}
WORKDIR ${OPENPILOT_PATH}
COPY . ${OPENPILOT_PATH}/
RUN scons --cache-readonly -j$(nproc)

View File

@@ -0,0 +1,83 @@
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 \
rsync \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/opencl-driver-intel && \
cd /tmp/opencl-driver-intel && \
wget https://github.com/intel/llvm/releases/download/2024-WW14/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-lin.tgz && \
mkdir -p /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
cd /opt/intel/oclcpuexp_2024.17.3.0.09_rel && \
tar -zxvf /tmp/opencl-driver-intel/oclcpuexp-2024.17.3.0.09_rel.tar.gz && \
mkdir -p /etc/OpenCL/vendors && \
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64/libintelocl.so > /etc/OpenCL/vendors/intel_expcpu.icd && \
cd /opt/intel && \
tar -zxvf /tmp/opencl-driver-intel/oneapi-tbb-2021.12.0-lin.tgz && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbb.so.12 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
ln -s /opt/intel/oneapi-tbb-2021.12.0/lib/intel64/gcc4.8/libtbbmalloc.so.2 /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 && \
mkdir -p /etc/ld.so.conf.d && \
echo /opt/intel/oclcpuexp_2024.17.3.0.09_rel/x64 > /etc/ld.so.conf.d/libintelopenclexp.conf && \
ldconfig -f /etc/ld.so.conf.d/libintelopenclexp.conf && \
cd / && \
rm -rf /tmp/opencl-driver-intel
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute
ENV QTWEBENGINE_DISABLE_SANDBOX=1
RUN dbus-uuidgen > /etc/machine-id
RUN apt-get update && apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
ARG USER=batman
ARG USER_UID=1001
RUN useradd -m -s /bin/bash -u $USER_UID $USER
RUN usermod -aG sudo $USER
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER
COPY --chown=$USER pyproject.toml uv.lock /home/$USER
COPY --chown=$USER tools/install_python_dependencies.sh /home/$USER/tools/
ENV VIRTUAL_ENV=/home/$USER/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN cd /home/$USER && \
tools/install_python_dependencies.sh && \
rm -rf tools/ pyproject.toml uv.lock .cache
USER root
RUN sudo git config --global --add safe.directory /tmp/openpilot

48
Jenkinsfile vendored
View File

@@ -31,7 +31,7 @@ export CI_ARTIFACTS_TOKEN=${env.CI_ARTIFACTS_TOKEN}
export GITHUB_COMMENTS_TOKEN=${env.GITHUB_COMMENTS_TOKEN}
export AZURE_TOKEN='${env.AZURE_TOKEN}'
# only use 1 thread for tici tests since most require HIL
export PYTEST_ADDOPTS="-n 0"
export PYTEST_ADDOPTS="-n0 -s"
export GIT_SSH_COMMAND="ssh -i /data/gitkey"
@@ -103,7 +103,7 @@ def deviceStage(String stageName, String deviceType, List extra_env, def steps)
def diffPaths = args.diffPaths ?: []
def cmdTimeout = args.timeout ?: 9999
if (branch != "master" && diffPaths && !hasPathChanged(gitDiff, diffPaths)) {
if (branch != "master" && !branch.contains("__jenkins_loop_") && diffPaths && !hasPathChanged(gitDiff, diffPaths)) {
println "Skipping ${name}: no changes in ${diffPaths}."
return
} else {
@@ -166,11 +166,11 @@ node {
env.GIT_BRANCH = checkout(scm).GIT_BRANCH
env.GIT_COMMIT = checkout(scm).GIT_COMMIT
def excludeBranches = ['master-ci', 'devel', 'devel-staging', 'release3', 'release3-staging',
'testing-closet*', 'hotfix-*']
def excludeBranches = ['__nightly', 'devel', 'devel-staging', 'release3', 'release3-staging',
'release-tici', 'testing-closet*', 'hotfix-*']
def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*')
if (env.BRANCH_NAME != 'master') {
if (env.BRANCH_NAME != 'master' && !env.BRANCH_NAME.contains('__jenkins_loop_')) {
properties([
disableConcurrentBuilds(abortPrevious: true)
])
@@ -178,20 +178,20 @@ node {
try {
if (env.BRANCH_NAME == 'devel-staging') {
deviceStage("build release3-staging", "tici-needs-can", [], [
deviceStage("build release3-staging", "tizi-needs-can", [], [
step("build release3-staging", "RELEASE_BRANCH=release3-staging $SOURCE_DIR/release/build_release.sh"),
])
}
if (env.BRANCH_NAME == 'master-ci') {
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,57 +200,50 @@ node {
if (!env.BRANCH_NAME.matches(excludeRegex)) {
parallel (
// tici tests
'onroad tests': {
deviceStage("onroad", "tici-needs-can", ["UNSAFE=1"], [
// TODO: ideally, this test runs in master-ci, but it takes 5+m to build it
//["build master-ci", "cd $SOURCE_DIR/release && TARGET_DIR=$TEST_DIR $SOURCE_DIR/scripts/retry.sh ./build_devel.sh"],
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]),
//["time to onroad", "pytest selfdrive/test/test_time_to_onroad.py"],
])
},
'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"], [
deviceStage("loopback", "tizi-loopback", ["UNSAFE=1"], [
step("build openpilot", "cd system/manager && ./build.py"),
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
])
},
'camerad': {
deviceStage("AR0231", "tici-ar0231", ["UNSAFE=1"], [
'camerad OX03C10': {
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"),
])
deviceStage("OX03C10", "tici-ox03c10", ["UNSAFE=1"], [
},
'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"),
])
},
'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"]]),
])
@@ -260,8 +253,9 @@ node {
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 spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"),
step("test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", [diffPaths: ["panda", "selfdrive/pandad/"]]),
step("test amp", "pytest system/hardware/tici/tests/test_amplifier.py"),
// TODO: enable once new AGNOS is available
// step("test esim", "pytest system/hardware/tici/tests/test_esim.py"),
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
])
},

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

180
README.md
View File

@@ -1,98 +1,132 @@
<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 Discord
Join the official sunnypilot Discord server to stay up to date with all the latest features and be a part of shaping the future of sunnypilot!
* https://discord.gg/sunnypilot
<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>
![](https://dcbadge.vercel.app/api/server/wRW3meAgtx?style=flat) ![Discord Shield](https://discordapp.com/api/guilds/880416502577266699/widget.png?style=shield)
Quick start: `bash <(curl -fsSL openpilot.comma.ai)`
## Documentation
https://docs.sunnypilot.ai/ is your one stop shop for everything from features to installation to FAQ about the sunnypilot
![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)
## 🚘 Running on a dedicated device in a car
* A supported device to run this software
* a [comma three](https://comma.ai/shop/products/three) or a [C3X](https://comma.ai/shop/comma-3x)
* This software
* One of [the 300+ supported cars](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, Ford and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run sunnypilot.
* A [car harness](https://comma.ai/shop/products/car-harness) to connect to your car
</div>
Detailed instructions for [how to mount the device in a car](https://comma.ai/setup).
<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>
## Installation
Please refer to [Recommended Branches](#-recommended-branches) to find your preferred/supported branch. This guide will assume you want to install the latest `staging-c3-new` branch.
To start using openpilot in a car
------
### If you want to use our newest branches (our rewrite)
> [!TIP]
>You can see the rewrite state on our [rewrite project board](https://github.com/orgs/sunnypilot/projects/2), and to install the new branches, you can use the following links
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.
* sunnypilot not installed or you installed a version before 0.8.17?
1. [Factory reset/uninstall](https://github.com/commaai/openpilot/wiki/FAQ#how-can-i-reset-the-device) the previous software if you have another software/fork installed.
2. After factory reset/uninstall and upon reboot, select `Custom Software` when given the option.
3. Input the installation URL per [Recommended Branches](#-recommended-branches). Example: ```https://staging-c3-new.sunnypilot.ai```.
4. Complete the rest of the installation following the onscreen instructions.
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.
* sunnypilot already installed and you installed a version after 0.8.17?
1. On the comma three, go to `Settings` ▶️ `Software`.
2. At the `Download` option, press `CHECK`. This will fetch the list of latest branches from sunnypilot.
3. At the `Target Branch` option, press `SELECT` to open the Target Branch selector.
4. Scroll to select the desired branch per Recommended Branches (see below). Example: `staging-c3-new`
To start developing openpilot
------
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).
| Branch | Installation URL |
|:----------------:|:---------------------------------------------:|
| `staging-c3-new` | `https://staging-c3-new.sunnypilot.ai` |
| `dev-c3-new` | `https://dev-c3-new.sunnypilot.ai` |
| `custom-branch` | `https://install.sunnypilot.ai/{branch_name}` |
| `release-c3-new` | **Not yet available**. |
* 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)
> [!TIP]
> You can use sunnypilot/targetbranch as an install URL. Example: 'sunnypilot/staging-c3-new'.
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.
> [!NOTE]
> Do you require further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
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.
<details>
Licensing
------
<summary>Older legacy branches</summary>
openpilot is released under the MIT license. Some parts of the software are released under other licenses as specified.
### If you want to use our older legacy branches (*not recommended*)
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.
> [**IMPORTANT**]
> It is recommended to [re-flash AGNOS](https://flash.comma.ai/) if you intend to downgrade from the new branches.
> You can still restore the latest sunnylink backup made on the old branches.
**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.**
| Branch | Installation URL |
|:------------:|:--------------------------------:|
| `release-c3` | https://release-c3.sunnypilot.ai |
| `staging-c3` | https://staging-c3.sunnypilot.ai |
| `dev-c3` | https://dev-c3.sunnypilot.ai |
User Data and comma Account
------
</details>
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.
## 🎆 Pull Requests
We welcome both pull requests and issues on GitHub. Bug fixes are encouraged.
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.
Pull requests should be against the most current `master` branch.
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.
## 📊 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.
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.
<h3>GitHub Sponsor</h3>
<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>
<h3>PayPal</h3>
<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>
Your continuous love and support are greatly appreciated! Enjoy 🥰
<span>-</span> Jason, Founder of sunnypilot

View File

@@ -1,16 +1,56 @@
Version 0.9.8 (2024-XX-XX)
Version 0.10.1 (2025-09-08)
========================
* New driving model
* Trained in brand new ML simulator
* Model now gates applying positive accel in Chill mode
* New driving monitoring model
* World Model: removed global localization inputs
* World Model: 2x the number of parameters
* World Model: trained on 4x the number of segments
* Driving Vision Model: trained on 4x the number of segments
* 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!
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!
* Lexus RC 2023 support thanks to nelsonjchen!
Version 0.9.8 (2025-02-28)
========================
* New driving model
* Model now gates applying positive acceleration in Chill mode
* New driver monitoring model
* Reduced false positives related to passengers
* Image processing pipeline moved to the ISP
* More GPU time for driving models
* Power draw reduced 0.5W, which means your device runs cooler
* More GPU time for bigger driving models
* Power draw reduced 0.5W, which means your device runs cooler
* Added toggle to enable driver monitoring even when openpilot is not engaged
* Localizer rewritten to remove GPS dependency at runtime
* Firehose Mode for maximizing your training data uploads
* Enable openpilot longitudinal control for Ford Q3 vehicles
* New Toyota TSS2 longitudinal tune
* Rivian R1S and R1T support thanks to lukasloetkolben!
* Ford F-150, F-150 Hybrid, Mach-E, and Ranger support
Version 0.9.7 (2024-06-13)
========================

View File

@@ -17,7 +17,7 @@ AGNOS = TICI
Decider('MD5-timestamp')
SetOption('num_jobs', int(os.cpu_count()/2))
SetOption('num_jobs', max(1, int(os.cpu_count()/2)))
AddOption('--kaitai',
action='store_true',
@@ -39,31 +39,18 @@ 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('--snpe',
action='store_true',
help='use SNPE on PC')
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')
@@ -74,6 +61,12 @@ AddOption('--minimal',
default=os.path.exists(File('#.lfsconfig').abspath), # minimal by default on release branch (where there's no LFS)
help='the minimum build to run openpilot. no tests, tools, etc.')
AddOption('--stock-ui',
action='store_true',
dest='stock_ui',
default=False,
help='Build stock openpilot UI instead of sunnypilot UI')
## Architecture name breakdown (arch)
## - larch64: linux tici aarch64
## - aarch64: linux pc aarch64
@@ -89,7 +82,6 @@ assert arch in ["larch64", "aarch64", "x86_64", "Darwin"]
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,
@@ -97,7 +89,7 @@ lenv = {
"TERA_PATH": Dir("#").abspath + f"/third_party/acados/{arch}/t_renderer"
}
rpath = lenv["LD_LIBRARY_PATH"].copy()
rpath = []
if arch == "larch64":
cpppath = [
@@ -140,7 +132,6 @@ else:
f"{brew_prefix}/include",
f"{brew_prefix}/opt/openssl@3.0/include",
]
lenv["DYLD_LIBRARY_PATH"] = lenv["LD_LIBRARY_PATH"]
# Linux
else:
libpath = [
@@ -172,6 +163,10 @@ else:
if arch != "Darwin":
ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"]
if not GetOption('stock_ui'):
cflags += ["-DSUNNYPILOT"]
cxxflags += ["-DSUNNYPILOT"]
ccflags_option = GetOption('ccflags')
if ccflags_option:
ccflags += ccflags_option.split(' ')
@@ -233,11 +228,11 @@ if arch == "Darwin":
darwin_rpath_link_flags = [f"-Wl,-rpath,{path}" for path in env["RPATH"]]
env["LINKFLAGS"] += darwin_rpath_link_flags
if GetOption('compile_db'):
env.CompilationDatabase('compile_commands.json')
env.CompilationDatabase('compile_commands.json')
# Setup cache dir
cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
default_cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'
cache_dir = ARGUMENTS.get('cache_dir', default_cache_dir)
CacheDir(cache_dir)
Clean(["."], cache_dir)
@@ -302,12 +297,7 @@ else:
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.Tool('qt3')
qt_env['CPPPATH'] += qt_dirs + ["#third_party/qrcode"]
qt_flags = [
@@ -354,7 +344,7 @@ SConscript(['opendbc_repo/SConscript'], exports={'env': env_swaglog})
SConscript(['cereal/SConscript'])
Import('socketmaster', 'msgq')
messaging = [socketmaster, msgq, 'zmq', 'capnp', 'kj',]
messaging = [socketmaster, msgq, 'capnp', 'kj',]
Export('messaging')
@@ -366,16 +356,9 @@ SConscript(['rednose/SConscript'])
# Build system services
SConscript([
'system/ui/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'])
@@ -385,6 +368,8 @@ SConscript(['third_party/SConscript'])
SConscript(['selfdrive/SConscript'])
SConscript(['sunnypilot/SConscript'])
if Dir('#tools/cabana/').exists() and GetOption('extras'):
SConscript(['tools/replay/SConscript'])
if arch != "larch64":

View File

@@ -29,6 +29,50 @@ then means breaking backwards-compatibility with all old logs of your fork. So w
[custom.capnp](custom.capnp) that we will leave empty in mainline cereal/openpilot. **If you only modify those, you can ensure your
fork will remain backwards-compatible with all versions of mainline openpilot and your fork.**
An example of compatible changes:
```diff
diff --git a/cereal/custom.capnp b/cereal/custom.capnp
index 3348e859e..3365c7b98 100644
--- a/cereal/custom.capnp
+++ b/cereal/custom.capnp
@@ -10,7 +10,11 @@ $Cxx.namespace("cereal");
# DO rename the structs
# DON'T change the identifier (e.g. @0x81c2f05a394cf4af)
-struct CustomReserved0 @0x81c2f05a394cf4af {
+struct SteeringInfo @0x81c2f05a394cf4af {
+ active @0 :Bool;
+ steeringAngleDeg @1 :Float32;
+ steeringRateDeg @2 :Float32;
+ steeringAccelDeg @3 :Float32;
}
struct CustomReserved1 @0xaedffd8f31e7b55d {
diff --git a/cereal/log.capnp b/cereal/log.capnp
index 1209f3fd9..b189f58b6 100644
--- a/cereal/log.capnp
+++ b/cereal/log.capnp
@@ -2558,14 +2558,14 @@ struct Event {
# DO change the name of the field
# DON'T change anything after the "@"
- customReservedRawData0 @124 :Data;
+ rawCanData @124 :Data;
customReservedRawData1 @125 :Data;
customReservedRawData2 @126 :Data;
# 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;
+ steeringInfo @107 :Custom.SteeringInfo;
customReserved1 @108 :Custom.CustomReserved1;
customReserved2 @109 :Custom.CustomReserved2;
customReserved3 @110 :Custom.CustomReserved3;
```
---
Example
---
```python

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

@@ -7,33 +7,443 @@ $Cxx.namespace("cereal");
# These structs are guaranteed to remain reserved and empty in mainline
# cereal, so use these if you want custom events in your fork.
# you can rename the struct, but don't change the identifier
struct CustomReserved0 @0x81c2f05a394cf4af {
# DO rename the structs
# DON'T change the identifier (e.g. @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;
}
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;
}
}
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;
accelPersonality @8 :AccelerationPersonality;
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;
}
enum AccelerationPersonality {
sport @0;
normal @1;
eco @2;
}
}
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 {
}
struct CustomReserved11 @0xc2243c65e0340384 {
}
struct CustomReserved12 @0x9ccdc8676701b412 {
}
struct CustomReserved13 @0xcd96dafb67a082d0 {
}
struct CustomReserved14 @0xb057204d7deadf3f {
}
struct CustomReserved15 @0xbd443b539493bc68 {
}
struct CustomReserved16 @0xfc6241ed8877b611 {
}
struct CustomReserved17 @0xa30662f84033036c {
}
struct CustomReserved18 @0xc86a3d38d13eb3ef {
}
struct CustomReserved19 @0xa4f1eb3323f5f582 {
}

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;
@@ -59,6 +60,7 @@ struct OnroadEvent @0xc4fa6047f024e718 {
pcmEnable @23;
pcmDisable @24;
radarFault @25;
radarTempUnavailable @93;
brakeHold @26;
parkBrake @27;
manualRestart @28;
@@ -125,6 +127,9 @@ struct OnroadEvent @0xc4fa6047f024e718 {
espActive @90;
personalityChanged @91;
aeb @92;
userBookmark @95;
excessiveActuation @96;
audioFeedback @97;
soundsUnavailableDEPRECATED @47;
}
@@ -151,6 +156,10 @@ struct InitData {
gitBranch @11 :Text;
gitRemote @13 :Text;
# this is source commit for prebuilt branches
gitSrcCommit @23 :Text;
gitSrcCommitDate @24 :Text;
androidProperties @16 :Map(Text, Text);
pandaInfo @8 :PandaInfo;
@@ -409,6 +418,7 @@ struct GpsLocationData {
speedAccuracy @12 :Float32;
hasFix @13 :Bool;
satelliteCount @14 :Int8;
enum SensorSource {
android @0;
@@ -482,8 +492,8 @@ 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;
@@ -559,6 +569,7 @@ struct DeviceState @0xa4d8b5af2aa492eb {
chargingDisabledDEPRECATED @18 :Bool;
usbOnlineDEPRECATED @12 :Bool;
ambientTempCDEPRECATED @30 :Float32;
nvmeTempCDEPRECATED @35 :List(Float32);
}
struct PandaState @0xa7649e2575e4591e {
@@ -574,9 +585,8 @@ 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;
@@ -703,6 +713,7 @@ struct PandaState @0xa7649e2575e4591e {
usbPowerModeDEPRECATED @12 :PeripheralState.UsbPowerModeDEPRECATED;
safetyParamDEPRECATED @20 :Int16;
safetyParam2DEPRECATED @26 :UInt32;
fanStallCountDEPRECATED @34 :UInt8;
}
struct PeripheralState {
@@ -723,7 +734,7 @@ struct PeripheralState {
struct RadarState @0x9a185389d6fdd05f {
mdMonoTime @6 :UInt64;
carStateMonoTime @11 :UInt64;
radarErrors @12 :List(Car.RadarData.Error);
radarErrors @13 :Car.RadarData.Error;
leadOne @3 :LeadData;
leadTwo @4 :LeadData;
@@ -757,6 +768,7 @@ struct RadarState @0x9a185389d6fdd05f {
calPercDEPRECATED @9 :Int8;
canMonoTimesDEPRECATED @10 :List(UInt64);
cumLagMsDEPRECATED @5 :Float32;
radarErrorsDEPRECATED @12 :List(Car.RadarData.ErrorDEPRECATED);
}
struct LiveCalibrationData {
@@ -1073,7 +1085,7 @@ struct ModelDataV2 {
confidence @23: ConfidenceClass;
# Model perceived motion
temporalPose @21 :Pose;
temporalPoseDEPRECATED @21 :Pose;
# e2e lateral planner
action @26: Action;
@@ -1167,6 +1179,8 @@ struct ModelDataV2 {
struct Action {
desiredCurvature @0 :Float32;
desiredAcceleration @1 :Float32;
shouldStop @2 :Bool;
}
}
@@ -1579,6 +1593,10 @@ struct UbloxGnss {
svId @0 :UInt8;
gnssId @1 :UInt8;
flagsBitfield @2 :UInt32;
cno @3 :UInt8;
elevationDeg @4 :Int8;
azimuthDeg @5 :Int16;
pseudorangeResidual @6 :Float32;
}
}
@@ -2237,6 +2255,11 @@ struct LiveParametersData {
roll @14 :Float32;
debugFilterState @16 :FilterState;
angleOffsetValid @17 :Bool = true;
angleOffsetAverageValid @18 :Bool = true;
steerRatioValid @19 :Bool = true;
stiffnessFactorValid @20 :Bool = true;
yawRateDEPRECATED @7 :Float32;
filterStateDEPRECATED @15 :LiveLocationKalman.Measurement;
@@ -2260,6 +2283,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 {
@@ -2428,16 +2469,35 @@ 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 {
sec @0 :Int64;
usec @1 :Int64;
type @2 :UInt8;
code @3 :Int32;
value @4 :Int32;
}
struct Event {
@@ -2484,6 +2544,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);
@@ -2508,7 +2569,8 @@ struct Event {
livestreamDriverEncodeIdx @119 :EncodeIndex;
# microphone data
microphone @103 :Microphone;
soundPressure @103 :SoundPressure;
rawAudioData @147 :AudioData;
# systems stuff
androidLog @20 :AndroidLogEntry;
@@ -2520,6 +2582,9 @@ struct Event {
logMessage @18 :Text;
errorLogMessage @85 :Text;
# touch frame
touch @135 :List(Touch);
# navigation
navInstruction @82 :NavInstruction;
navRoute @83 :NavRoute;
@@ -2527,9 +2592,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;
@@ -2542,21 +2611,37 @@ struct Event {
livestreamWideRoadEncodeData @121 :EncodeData;
livestreamDriverEncodeData @122 :EncodeData;
# *********** Custom: reserved for forks ***********
# DO change the name of the field
# DON'T change anything after the "@"
customReservedRawData0 @124 :Data;
customReservedRawData1 @125 :Data;
customReservedRawData2 @126 :Data;
# *********** Custom: reserved for forks ***********
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;
# 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
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;
customReserved13 @139 :Custom.CustomReserved13;
customReserved14 @140 :Custom.CustomReserved14;
customReserved15 @141 :Custom.CustomReserved15;
customReserved16 @142 :Custom.CustomReserved16;
customReserved17 @143 :Custom.CustomReserved17;
customReserved18 @144 :Custom.CustomReserved18;
customReserved19 @145 :Custom.CustomReserved19;
# *********** legacy + deprecated ***********
model @9 :Legacy.ModelData; # TODO: rename modelV2 and mark this as deprecated
@@ -2599,7 +2684,7 @@ 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);
}

View File

@@ -1,49 +0,0 @@
using Cxx = import "./include/c++.capnp";
$Cxx.namespace("cereal");
@0xa086df597ef5d7a0;
# Geometry
struct Point {
x @0: Float64;
y @1: Float64;
z @2: Float64;
}
struct PolyLine {
points @0: List(Point);
}
# Map features
struct Lane {
id @0 :Text;
leftBoundary @1 :LaneBoundary;
rightBoundary @2 :LaneBoundary;
leftAdjacentId @3 :Text;
rightAdjacentId @4 :Text;
inboundIds @5 :List(Text);
outboundIds @6 :List(Text);
struct LaneBoundary {
polyLine @0 :PolyLine;
startHeading @1 :Float32; # WRT north
}
}
# Map tiles
struct TileSummary {
version @0 :Text;
updatedAt @1 :UInt64; # Millis since epoch
level @2 :UInt8;
x @3 :UInt16;
y @4 :UInt16;
}
struct MapTile {
summary @0 :TileSummary;
lanes @1 :List(Lane);
}

View File

@@ -9,11 +9,11 @@ import os
import capnp
import time
from typing import Optional, List, Union, Dict, Deque
from collections import deque
from typing import Optional, List, Union, Dict
from cereal import log
from cereal.services import SERVICE_LIST
from openpilot.common.util import MovingAverage
NO_TRAVERSAL_LIMIT = 2**64-1
@@ -108,10 +108,8 @@ class FrequencyTracker:
self.min_freq = min_freq * 0.8
self.max_freq = max_freq * 1.2
self.recv_dts: Deque[float] = deque(maxlen=int(10 * freq))
self.recv_dts_sum = 0.0
self.recent_recv_dts: Deque[float] = deque(maxlen=int(freq))
self.recent_recv_dts_sum = 0.0
self.avg_dt = MovingAverage(int(10 * freq))
self.recent_avg_dt = MovingAverage(int(freq))
self.prev_time = 0.0
def record_recv_time(self, cur_time: float) -> None:
@@ -119,28 +117,21 @@ class FrequencyTracker:
if self.prev_time > 1e-5:
dt = cur_time - self.prev_time
if len(self.recv_dts) == self.recv_dts.maxlen:
self.recv_dts_sum -= self.recv_dts[0]
self.recv_dts.append(dt)
self.recv_dts_sum += dt
if len(self.recent_recv_dts) == self.recent_recv_dts.maxlen:
self.recent_recv_dts_sum -= self.recent_recv_dts[0]
self.recent_recv_dts.append(dt)
self.recent_recv_dts_sum += dt
self.avg_dt.add_value(dt)
self.recent_avg_dt.add_value(dt)
self.prev_time = cur_time
@property
def valid(self) -> bool:
if not self.recv_dts:
if self.avg_dt.count == 0:
return False
avg_freq = len(self.recv_dts) / self.recv_dts_sum
avg_freq = 1.0 / self.avg_dt.get_average()
if self.min_freq <= avg_freq <= self.max_freq:
return True
avg_freq_recent = len(self.recent_recv_dts) / self.recent_recv_dts_sum
avg_freq_recent = 1.0 / self.recent_avg_dt.get_average()
return self.min_freq <= avg_freq_recent <= self.max_freq
@@ -154,12 +145,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()
@@ -186,8 +181,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:
@@ -224,14 +217,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

@@ -6,12 +6,12 @@
ExitHandler do_exit;
static std::vector<std::string> get_services(std::string whitelist_str, bool zmq_to_msgq) {
static std::vector<std::string> get_services(const std::string &whitelist_str, bool zmq_to_msgq) {
std::vector<std::string> service_list;
for (const auto& it : services) {
std::string name = it.second.name;
bool in_whitelist = whitelist_str.find(name) != std::string::npos;
if (name == "plusFrame" || name == "uiLayoutState" || (zmq_to_msgq && !in_whitelist)) {
if (zmq_to_msgq && !in_whitelist) {
continue;
}
service_list.push_back(name);

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;

View File

@@ -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

@@ -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

@@ -22,6 +22,7 @@ _services: dict[str, tuple] = {
"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),
"selfdriveState": (True, 100., 10),
@@ -35,6 +36,7 @@ _services: dict[str, tuple] = {
"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),
@@ -52,7 +54,7 @@ _services: dict[str, tuple] = {
"livePose": (True, 20., 4),
"liveParameters": (True, 20., 5),
"cameraOdometry": (True, 20., 10),
"thumbnail": (True, 0.2, 1),
"thumbnail": (True, 1 / 60., 1),
"onroadEvents": (True, 1., 1),
"carParams": (True, 0.02, 1),
"roadCameraState": (True, 20., 20),
@@ -70,8 +72,24 @@ _services: dict[str, tuple] = {
"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),
# sunnypilot
"modelManagerSP": (False, 1., 1),
"backupManagerSP": (False, 1., 1),
"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.),
"liveLocationKalman": (True, 20.),
# debug
"uiDebug": (True, 0., 1),
@@ -104,12 +122,12 @@ 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; };\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' % \
h += ' { "%s", {"%s", %s, %f, %d}},\n' % \
(k, k, should_log, v.frequency, decimation)
h += "};\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,14 +4,10 @@ common_libs = [
'params.cc',
'swaglog.cc',
'util.cc',
'i2c.cc',
'watchdog.cc',
'ratekeeper.cc'
]
if arch != "Darwin":
common_libs.append('gpio.cc')
_common = env.Library('common', common_libs, LIBS="json11")
files = [

View File

@@ -1,46 +1,22 @@
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
from openpilot.common.api.comma_connect import CommaConnectApi
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()
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.request('GET', *args, **kwargs)
return self.service.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)
return self.service.post(*args, **kwargs)
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
return self.service.get_token(expiry_hours)
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)
return CommaConnectApi(None).api_get(endpoint, method, timeout, access_token, **params)

56
common/api/base.py Normal file
View File

@@ -0,0 +1,56 @@
import jwt
import requests
import unicodedata
from datetime import datetime, timedelta, UTC
from openpilot.system.hardware.hw import Paths
from openpilot.system.version import get_version
class BaseApi:
def __init__(self, dongle_id, api_host, user_agent="openpilot-"):
self.dongle_id = dongle_id
self.api_host = api_host
self.user_agent = user_agent
with open(f'{Paths.persist_root()}/comma/id_rsa') as f:
self.private_key = f.read()
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, 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
}
token = jwt.encode(payload, self.private_key, algorithm='RS256')
if isinstance(token, bytes):
token = token.decode('utf8')
return token
def get_token(self, expiry_hours=1):
return self._get_token(expiry_hours)
def remove_non_ascii_chars(self, text):
normalized_text = unicodedata.normalize('NFD', text)
ascii_encoded_text = normalized_text.encode('ascii', 'ignore')
return ascii_encoded_text.decode()
def api_get(self, endpoint, method='GET', timeout=None, access_token=None, json=None, **params):
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
return requests.request(method, f"{self.api_host}/{endpoint}", timeout=timeout, headers=headers, json=json, params=params)

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

@@ -79,6 +79,10 @@ 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);
}
@@ -92,109 +96,3 @@ cl_program cl_program_from_source(cl_context ctx, cl_device_id device_id, const
}
return prg;
}
cl_program cl_program_from_binary(cl_context ctx, cl_device_id device_id, const uint8_t* binary, size_t length, const char* args) {
cl_program prg = CL_CHECK_ERR(clCreateProgramWithBinary(ctx, 1, &device_id, &length, &binary, 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;
}
// Given a cl code and return a string representation
#define CL_ERR_TO_STR(err) case err: return #err
const char* cl_get_error_string(int err) {
switch (err) {
CL_ERR_TO_STR(CL_SUCCESS);
CL_ERR_TO_STR(CL_DEVICE_NOT_FOUND);
CL_ERR_TO_STR(CL_DEVICE_NOT_AVAILABLE);
CL_ERR_TO_STR(CL_COMPILER_NOT_AVAILABLE);
CL_ERR_TO_STR(CL_MEM_OBJECT_ALLOCATION_FAILURE);
CL_ERR_TO_STR(CL_OUT_OF_RESOURCES);
CL_ERR_TO_STR(CL_OUT_OF_HOST_MEMORY);
CL_ERR_TO_STR(CL_PROFILING_INFO_NOT_AVAILABLE);
CL_ERR_TO_STR(CL_MEM_COPY_OVERLAP);
CL_ERR_TO_STR(CL_IMAGE_FORMAT_MISMATCH);
CL_ERR_TO_STR(CL_IMAGE_FORMAT_NOT_SUPPORTED);
CL_ERR_TO_STR(CL_MAP_FAILURE);
CL_ERR_TO_STR(CL_MISALIGNED_SUB_BUFFER_OFFSET);
CL_ERR_TO_STR(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST);
CL_ERR_TO_STR(CL_COMPILE_PROGRAM_FAILURE);
CL_ERR_TO_STR(CL_LINKER_NOT_AVAILABLE);
CL_ERR_TO_STR(CL_LINK_PROGRAM_FAILURE);
CL_ERR_TO_STR(CL_DEVICE_PARTITION_FAILED);
CL_ERR_TO_STR(CL_KERNEL_ARG_INFO_NOT_AVAILABLE);
CL_ERR_TO_STR(CL_INVALID_VALUE);
CL_ERR_TO_STR(CL_INVALID_DEVICE_TYPE);
CL_ERR_TO_STR(CL_INVALID_PLATFORM);
CL_ERR_TO_STR(CL_INVALID_DEVICE);
CL_ERR_TO_STR(CL_INVALID_CONTEXT);
CL_ERR_TO_STR(CL_INVALID_QUEUE_PROPERTIES);
CL_ERR_TO_STR(CL_INVALID_COMMAND_QUEUE);
CL_ERR_TO_STR(CL_INVALID_HOST_PTR);
CL_ERR_TO_STR(CL_INVALID_MEM_OBJECT);
CL_ERR_TO_STR(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR);
CL_ERR_TO_STR(CL_INVALID_IMAGE_SIZE);
CL_ERR_TO_STR(CL_INVALID_SAMPLER);
CL_ERR_TO_STR(CL_INVALID_BINARY);
CL_ERR_TO_STR(CL_INVALID_BUILD_OPTIONS);
CL_ERR_TO_STR(CL_INVALID_PROGRAM);
CL_ERR_TO_STR(CL_INVALID_PROGRAM_EXECUTABLE);
CL_ERR_TO_STR(CL_INVALID_KERNEL_NAME);
CL_ERR_TO_STR(CL_INVALID_KERNEL_DEFINITION);
CL_ERR_TO_STR(CL_INVALID_KERNEL);
CL_ERR_TO_STR(CL_INVALID_ARG_INDEX);
CL_ERR_TO_STR(CL_INVALID_ARG_VALUE);
CL_ERR_TO_STR(CL_INVALID_ARG_SIZE);
CL_ERR_TO_STR(CL_INVALID_KERNEL_ARGS);
CL_ERR_TO_STR(CL_INVALID_WORK_DIMENSION);
CL_ERR_TO_STR(CL_INVALID_WORK_GROUP_SIZE);
CL_ERR_TO_STR(CL_INVALID_WORK_ITEM_SIZE);
CL_ERR_TO_STR(CL_INVALID_GLOBAL_OFFSET);
CL_ERR_TO_STR(CL_INVALID_EVENT_WAIT_LIST);
CL_ERR_TO_STR(CL_INVALID_EVENT);
CL_ERR_TO_STR(CL_INVALID_OPERATION);
CL_ERR_TO_STR(CL_INVALID_GL_OBJECT);
CL_ERR_TO_STR(CL_INVALID_BUFFER_SIZE);
CL_ERR_TO_STR(CL_INVALID_MIP_LEVEL);
CL_ERR_TO_STR(CL_INVALID_GLOBAL_WORK_SIZE);
CL_ERR_TO_STR(CL_INVALID_PROPERTY);
CL_ERR_TO_STR(CL_INVALID_IMAGE_DESCRIPTOR);
CL_ERR_TO_STR(CL_INVALID_COMPILER_OPTIONS);
CL_ERR_TO_STR(CL_INVALID_LINKER_OPTIONS);
CL_ERR_TO_STR(CL_INVALID_DEVICE_PARTITION_COUNT);
case -69: return "CL_INVALID_PIPE_SIZE";
case -70: return "CL_INVALID_DEVICE_QUEUE";
case -71: return "CL_INVALID_SPEC_ID";
case -72: return "CL_MAX_SIZE_RESTRICTION_EXCEEDED";
case -1002: return "CL_INVALID_D3D10_DEVICE_KHR";
case -1003: return "CL_INVALID_D3D10_RESOURCE_KHR";
case -1004: return "CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR";
case -1005: return "CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR";
case -1006: return "CL_INVALID_D3D11_DEVICE_KHR";
case -1007: return "CL_INVALID_D3D11_RESOURCE_KHR";
case -1008: return "CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR";
case -1009: return "CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR";
case -1010: return "CL_INVALID_DX9_MEDIA_ADAPTER_KHR";
case -1011: return "CL_INVALID_DX9_MEDIA_SURFACE_KHR";
case -1012: return "CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR";
case -1013: return "CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR";
case -1093: return "CL_INVALID_EGL_OBJECT_KHR";
case -1092: return "CL_EGL_RESOURCE_NOT_ACQUIRED_KHR";
case -1001: return "CL_PLATFORM_NOT_FOUND_KHR";
case -1057: return "CL_DEVICE_PARTITION_FAILED_EXT";
case -1058: return "CL_INVALID_PARTITION_COUNT_EXT";
case -1059: return "CL_INVALID_PARTITION_NAME_EXT";
case -1094: return "CL_INVALID_ACCELERATOR_INTEL";
case -1095: return "CL_INVALID_ACCELERATOR_TYPE_INTEL";
case -1096: return "CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL";
case -1097: return "CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL";
case -1000: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
case -1098: return "CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL";
case -1099: return "CL_INVALID_VA_API_MEDIA_SURFACE_INTEL";
case -1100: return "CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL";
case -1101: return "CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL";
default: return "CL_UNKNOWN_ERROR";
}
}

View File

@@ -23,7 +23,6 @@
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_binary(cl_context ctx, cl_device_id device_id, const uint8_t* binary, size_t length, const char* args = nullptr);
cl_program cl_program_from_file(cl_context ctx, cl_device_id device_id, const char* path, const char* args);
const char* cl_get_error_string(int err);

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,8 +0,0 @@
import platform
def suffix():
if platform.system() == "Darwin":
return ".dylib"
else:
return ".so"

View File

@@ -1,6 +1,10 @@
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:
@@ -35,3 +39,20 @@ def atomic_write_in_dir(path: str, mode: str = 'w', buffering: int = -1, encodin
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

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);
};

View File

@@ -8,6 +8,7 @@ import uuid
import socket
import logging
import traceback
import numpy as np
from threading import local
from collections import OrderedDict
from contextlib import contextmanager
@@ -15,6 +16,8 @@ from contextlib import contextmanager
LOG_TIMESTAMPS = "LOG_TIMESTAMPS" in os.environ
def json_handler(obj):
if isinstance(obj, np.bool_):
return bool(obj)
# if isinstance(obj, (datetime.date, datetime.time)):
# return obj.isoformat()
return repr(obj)
@@ -196,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

1
common/model.h Normal file
View File

@@ -0,0 +1 @@
#define DEFAULT_MODEL "Firehose (Default)"

View File

@@ -1,19 +0,0 @@
def clip(x, lo, hi):
return max(lo, min(hi, x))
def interp(x, xp, fp):
N = len(xp)
def get_interp(xv):
hi = 0
while hi < N and xv > xp[hi]:
hi += 1
low = hi - 1
return fp[-1] if hi == N and xv > xp[low] else (
fp[0] if hi == 0 else
(xv - xp[low]) * (fp[hi] - fp[low]) / (xp[hi] - xp[low]) + fp[low])
return [get_interp(v) for v in x] if hasattr(x, '__iter__') else get_interp(x)
def mean(x):
return sum(x) / len(x)

View File

@@ -8,6 +8,7 @@
#include <csignal>
#include <unordered_map>
#include "common/params_keys.h"
#include "common/queue.h"
#include "common/swaglog.h"
#include "common/util.h"
@@ -87,121 +88,6 @@ private:
int fd_ = -1;
};
std::unordered_map<std::string, uint32_t> keys = {
{"AccessToken", CLEAR_ON_MANAGER_START | DONT_LOG},
{"AlwaysOnDM", PERSISTENT},
{"ApiCache_Device", PERSISTENT},
{"AssistNowToken", PERSISTENT},
{"AthenadPid", PERSISTENT},
{"AthenadUploadQueue", PERSISTENT},
{"AthenadRecentlyViewedRoutes", PERSISTENT},
{"BootCount", PERSISTENT},
{"CalibrationParams", PERSISTENT},
{"CameraDebugExpGain", CLEAR_ON_MANAGER_START},
{"CameraDebugExpTime", CLEAR_ON_MANAGER_START},
{"CarBatteryCapacity", PERSISTENT},
{"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CarParamsCache", CLEAR_ON_MANAGER_START},
{"CarParamsPersistent", PERSISTENT},
{"CarParamsPrevRoute", PERSISTENT},
{"CompletedTrainingVersion", PERSISTENT},
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"CurrentBootlog", PERSISTENT},
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"DisablePowerDown", PERSISTENT},
{"DisableUpdates", PERSISTENT},
{"DisengageOnAccelerator", PERSISTENT},
{"DongleId", PERSISTENT},
{"DoReboot", CLEAR_ON_MANAGER_START},
{"DoShutdown", CLEAR_ON_MANAGER_START},
{"DoUninstall", CLEAR_ON_MANAGER_START},
{"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY},
{"ExperimentalMode", PERSISTENT},
{"ExperimentalModeConfirmed", PERSISTENT},
{"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ForcePowerDown", PERSISTENT},
{"GitBranch", PERSISTENT},
{"GitCommit", PERSISTENT},
{"GitCommitDate", PERSISTENT},
{"GitDiff", PERSISTENT},
{"GithubSshKeys", PERSISTENT},
{"GithubUsername", PERSISTENT},
{"GitRemote", PERSISTENT},
{"GsmApn", PERSISTENT},
{"GsmMetered", PERSISTENT},
{"GsmRoaming", PERSISTENT},
{"HardwareSerial", PERSISTENT},
{"HasAcceptedTerms", PERSISTENT},
{"IMEI", PERSISTENT},
{"InstallDate", PERSISTENT},
{"IsDriverViewEnabled", CLEAR_ON_MANAGER_START},
{"IsEngaged", PERSISTENT},
{"IsLdwEnabled", PERSISTENT},
{"IsMetric", PERSISTENT},
{"IsOffroad", CLEAR_ON_MANAGER_START},
{"IsOnroad", PERSISTENT},
{"IsRhdDetected", PERSISTENT},
{"IsReleaseBranch", CLEAR_ON_MANAGER_START},
{"IsTakingSnapshot", CLEAR_ON_MANAGER_START},
{"IsTestedBranch", CLEAR_ON_MANAGER_START},
{"JoystickDebugMode", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LanguageSetting", PERSISTENT},
{"LastAthenaPingTime", CLEAR_ON_MANAGER_START},
{"LastGPSPosition", PERSISTENT},
{"LastManagerExitReason", CLEAR_ON_MANAGER_START},
{"LastOffroadStatusPacket", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LastPowerDropDetected", CLEAR_ON_MANAGER_START},
{"LastUpdateException", CLEAR_ON_MANAGER_START},
{"LastUpdateTime", PERSISTENT},
{"LiveParameters", PERSISTENT},
{"LiveTorqueParameters", PERSISTENT | DONT_LOG},
{"LocationFilterInitialState", PERSISTENT},
{"LongitudinalManeuverMode", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"LongitudinalPersonality", PERSISTENT},
{"NetworkMetered", PERSISTENT},
{"ObdMultiplexingChanged", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ObdMultiplexingEnabled", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_BadNvme", CLEAR_ON_MANAGER_START},
{"Offroad_CarUnrecognized", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_ConnectivityNeeded", CLEAR_ON_MANAGER_START},
{"Offroad_ConnectivityNeededPrompt", CLEAR_ON_MANAGER_START},
{"Offroad_IsTakingSnapshot", CLEAR_ON_MANAGER_START},
{"Offroad_NeosUpdate", CLEAR_ON_MANAGER_START},
{"Offroad_NoFirmware", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_Recalibration", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"Offroad_StorageMissing", CLEAR_ON_MANAGER_START},
{"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START},
{"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START},
{"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START},
{"OpenpilotEnabledToggle", PERSISTENT},
{"PandaHeartbeatLost", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSomResetTriggered", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSignatures", CLEAR_ON_MANAGER_START},
{"PrimeType", PERSISTENT},
{"RecordFront", PERSISTENT},
{"RecordFrontLock", PERSISTENT}, // for the internal fleet
{"SecOCKey", PERSISTENT | DONT_LOG},
{"RouteCount", PERSISTENT},
{"SnoozeUpdate", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"SshEnabled", PERSISTENT},
{"TermsVersion", PERSISTENT},
{"TrainingVersion", PERSISTENT},
{"UbloxAvailable", PERSISTENT},
{"UpdateAvailable", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"UpdateFailedCount", CLEAR_ON_MANAGER_START},
{"UpdaterAvailableBranches", PERSISTENT},
{"UpdaterCurrentDescription", CLEAR_ON_MANAGER_START},
{"UpdaterCurrentReleaseNotes", CLEAR_ON_MANAGER_START},
{"UpdaterFetchAvailable", CLEAR_ON_MANAGER_START},
{"UpdaterNewDescription", CLEAR_ON_MANAGER_START},
{"UpdaterNewReleaseNotes", CLEAR_ON_MANAGER_START},
{"UpdaterState", CLEAR_ON_MANAGER_START},
{"UpdaterTargetBranch", CLEAR_ON_MANAGER_START},
{"UpdaterLastFetchTime", PERSISTENT},
{"Version", PERSISTENT},
};
} // namespace
@@ -217,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;
}
@@ -229,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) {
@@ -254,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");
@@ -309,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

263
common/params_keys.h Normal file
View File

@@ -0,0 +1,263 @@
#pragma once
#include <string>
#include <unordered_map>
#include "cereal/gen/cpp/log.capnp.h"
inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"AccessToken", {CLEAR_ON_MANAGER_START | DONT_LOG, STRING}},
{"AdbEnabled", {PERSISTENT | BACKUP, BOOL}},
{"AlwaysOnDM", {PERSISTENT | BACKUP, BOOL}},
{"ApiCache_Device", {PERSISTENT, STRING}},
{"ApiCache_FirehoseStats", {PERSISTENT, JSON}},
{"AssistNowToken", {PERSISTENT, STRING}},
{"AthenadPid", {PERSISTENT, INT}},
{"AthenadUploadQueue", {PERSISTENT, JSON}},
{"AthenadRecentlyViewedRoutes", {PERSISTENT, STRING}},
{"BootCount", {PERSISTENT, INT}},
{"CalibrationParams", {PERSISTENT, BYTES}},
{"CameraDebugExpGain", {CLEAR_ON_MANAGER_START, STRING}},
{"CameraDebugExpTime", {CLEAR_ON_MANAGER_START, STRING}},
{"CarBatteryCapacity", {PERSISTENT, INT}},
{"CarParams", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BYTES}},
{"CarParamsCache", {CLEAR_ON_MANAGER_START, BYTES}},
{"CarParamsPersistent", {PERSISTENT, BYTES}},
{"CarParamsPrevRoute", {PERSISTENT, BYTES}},
{"CompletedTrainingVersion", {PERSISTENT, STRING, "0"}},
{"ControlsReady", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"CurrentBootlog", {PERSISTENT, STRING}},
{"CurrentRoute", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"DisableLogging", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"DisablePowerDown", {PERSISTENT | BACKUP, BOOL}},
{"DisableUpdates", {PERSISTENT | BACKUP, BOOL, "0"}},
{"DisengageOnAccelerator", {PERSISTENT | BACKUP, BOOL, "0"}},
{"DongleId", {PERSISTENT, STRING}},
{"DoReboot", {CLEAR_ON_MANAGER_START, BOOL}},
{"DoShutdown", {CLEAR_ON_MANAGER_START, BOOL}},
{"DoUninstall", {CLEAR_ON_MANAGER_START, BOOL}},
{"DriverTooDistracted", {CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON, BOOL}},
{"AlphaLongitudinalEnabled", {PERSISTENT | DEVELOPMENT_ONLY | BACKUP, BOOL}},
{"ExperimentalMode", {PERSISTENT | BACKUP, BOOL}},
{"ExperimentalModeConfirmed", {PERSISTENT | BACKUP, BOOL}},
{"FirmwareQueryDone", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"ForcePowerDown", {PERSISTENT, BOOL}},
{"GitBranch", {PERSISTENT, STRING}},
{"GitCommit", {PERSISTENT, STRING}},
{"GitCommitDate", {PERSISTENT, STRING}},
{"GitDiff", {PERSISTENT, STRING}},
{"GithubSshKeys", {PERSISTENT | BACKUP, STRING}},
{"GithubUsername", {PERSISTENT | BACKUP, STRING}},
{"GitRemote", {PERSISTENT, STRING}},
{"GsmApn", {PERSISTENT | BACKUP, STRING}},
{"GsmMetered", {PERSISTENT | BACKUP, BOOL, "1"}},
{"GsmRoaming", {PERSISTENT | BACKUP, BOOL}},
{"HardwareSerial", {PERSISTENT, STRING}},
{"HasAcceptedTerms", {PERSISTENT, STRING, "0"}},
{"InstallDate", {PERSISTENT, TIME}},
{"IsDriverViewEnabled", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsEngaged", {PERSISTENT, BOOL}},
{"IsLdwEnabled", {PERSISTENT | BACKUP, BOOL}},
{"IsMetric", {PERSISTENT | BACKUP, BOOL}},
{"IsOffroad", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsOnroad", {PERSISTENT, BOOL}},
{"IsRhdDetected", {PERSISTENT, BOOL}},
{"IsReleaseBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsTakingSnapshot", {CLEAR_ON_MANAGER_START, BOOL}},
{"IsTestedBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"JoystickDebugMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"LanguageSetting", {PERSISTENT | BACKUP, STRING, "main_en"}},
{"LastAthenaPingTime", {CLEAR_ON_MANAGER_START, INT}},
{"LastGPSPosition", {PERSISTENT, STRING}},
{"LastManagerExitReason", {CLEAR_ON_MANAGER_START, STRING}},
{"LastOffroadStatusPacket", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, JSON}},
{"LastPowerDropDetected", {CLEAR_ON_MANAGER_START, STRING}},
{"LastUpdateException", {CLEAR_ON_MANAGER_START, STRING}},
{"LastUpdateRouteCount", {PERSISTENT, INT, "0"}},
{"LastUpdateTime", {PERSISTENT, TIME}},
{"LastUpdateUptimeOnroad", {PERSISTENT, FLOAT, "0.0"}},
{"LiveDelay", {PERSISTENT | BACKUP, BYTES}},
{"LiveParameters", {PERSISTENT, JSON}},
{"LiveParametersV2", {PERSISTENT, BYTES}},
{"LiveTorqueParameters", {PERSISTENT | DONT_LOG, BYTES}},
{"LocationFilterInitialState", {PERSISTENT, BYTES}},
{"LongitudinalManeuverMode", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"LongitudinalPersonality", {PERSISTENT | BACKUP, INT, std::to_string(static_cast<int>(cereal::LongitudinalPersonality::STANDARD))}},
{"NetworkMetered", {PERSISTENT | BACKUP, BOOL}},
{"ObdMultiplexingChanged", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"ObdMultiplexingEnabled", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"Offroad_CarUnrecognized", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_ConnectivityNeeded", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_ConnectivityNeededPrompt", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_ExcessiveActuation", {PERSISTENT, JSON}},
{"Offroad_IsTakingSnapshot", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_NeosUpdate", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_NoFirmware", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_Recalibration", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_TemperatureTooHigh", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_UnregisteredHardware", {CLEAR_ON_MANAGER_START, JSON}},
{"Offroad_UpdateFailed", {CLEAR_ON_MANAGER_START, JSON}},
{"OnroadCycleRequested", {CLEAR_ON_MANAGER_START, BOOL}},
{"OpenpilotEnabledToggle", {PERSISTENT | BACKUP, BOOL, "1"}},
{"PandaHeartbeatLost", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"PandaSomResetTriggered", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"PandaSignatures", {CLEAR_ON_MANAGER_START, BYTES}},
{"PrimeType", {PERSISTENT, INT}},
{"RecordAudio", {PERSISTENT | BACKUP, BOOL}},
{"RecordAudioFeedback", {PERSISTENT | BACKUP, BOOL, "0"}},
{"RecordFront", {PERSISTENT | BACKUP, BOOL}},
{"RecordFrontLock", {PERSISTENT, BOOL}}, // for the internal fleet
{"SecOCKey", {PERSISTENT | DONT_LOG | BACKUP, STRING}},
{"RouteCount", {PERSISTENT, INT, "0"}},
{"SnoozeUpdate", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL}},
{"SshEnabled", {PERSISTENT | BACKUP, BOOL}},
{"TermsVersion", {PERSISTENT, STRING}},
{"TrainingVersion", {PERSISTENT, STRING}},
{"UbloxAvailable", {PERSISTENT, BOOL}},
{"UpdateAvailable", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BOOL}},
{"UpdateFailedCount", {CLEAR_ON_MANAGER_START, INT}},
{"UpdaterAvailableBranches", {PERSISTENT, STRING}},
{"UpdaterCurrentDescription", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterCurrentReleaseNotes", {CLEAR_ON_MANAGER_START, BYTES}},
{"UpdaterFetchAvailable", {CLEAR_ON_MANAGER_START, BOOL}},
{"UpdaterNewDescription", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterNewReleaseNotes", {CLEAR_ON_MANAGER_START, BYTES}},
{"UpdaterState", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterTargetBranch", {CLEAR_ON_MANAGER_START, STRING}},
{"UpdaterLastFetchTime", {PERSISTENT, TIME}},
{"UptimeOffroad", {PERSISTENT, FLOAT, "0.0"}},
{"UptimeOnroad", {PERSISTENT, FLOAT, "0.0"}},
{"Version", {PERSISTENT, STRING}},
// --- sunnypilot params --- //
{"AccelPersonality", {PERSISTENT | BACKUP, INT, std::to_string(static_cast<int>(cereal::LongitudinalPlanSP::AccelerationPersonality::NORMAL))}},
{"ApiCache_DriveStats", {PERSISTENT, JSON}},
{"AutoLaneChangeBsmDelay", {PERSISTENT | BACKUP, BOOL, "0"}},
{"AutoLaneChangeTimer", {PERSISTENT | BACKUP, INT, "0"}},
{"BlinkerMinLateralControlSpeed", {PERSISTENT | BACKUP, INT, "20"}}, // MPH or km/h
{"BlinkerPauseLateralControl", {PERSISTENT | BACKUP, INT, "0"}},
{"Brightness", {PERSISTENT | BACKUP, INT, "0"}},
{"CarParamsSP", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, BYTES}},
{"CarParamsSPCache", {CLEAR_ON_MANAGER_START, BYTES}},
{"CarParamsSPPersistent", {PERSISTENT, BYTES}},
{"CarPlatformBundle", {PERSISTENT | BACKUP, JSON}},
{"ChevronInfo", {PERSISTENT | BACKUP, INT, "4"}},
{"CustomAccIncrementsEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"CustomAccLongPressIncrement", {PERSISTENT | BACKUP, INT, "5"}},
{"CustomAccShortPressIncrement", {PERSISTENT | BACKUP, INT, "1"}},
{"DeviceBootMode", {PERSISTENT | BACKUP, INT, "0"}},
{"DevUIInfo", {PERSISTENT | BACKUP, INT, "0"}},
{"EnableCopyparty", {PERSISTENT | BACKUP, BOOL}},
{"EnableGithubRunner", {PERSISTENT | BACKUP, BOOL}},
{"GreenLightAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
{"GithubRunnerSufficientVoltage", {CLEAR_ON_MANAGER_START , BOOL}},
{"HideVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}},
{"IntelligentCruiseButtonManagement", {PERSISTENT | BACKUP , BOOL}},
{"InteractivityTimeout", {PERSISTENT | BACKUP, INT, "0"}},
{"IsDevelopmentBranch", {CLEAR_ON_MANAGER_START, BOOL}},
{"LastGPSPositionLLK", {PERSISTENT, STRING}},
{"LeadDepartAlert", {PERSISTENT | BACKUP, BOOL, "0"}},
{"MaxTimeOffroad", {PERSISTENT | BACKUP, INT, "1800"}},
{"ModelRunnerTypeCache", {CLEAR_ON_ONROAD_TRANSITION, INT}},
{"OffroadMode", {CLEAR_ON_MANAGER_START, BOOL}},
{"Offroad_TiciSupport", {CLEAR_ON_MANAGER_START, JSON}},
{"OnroadScreenOffBrightness", {PERSISTENT | BACKUP, INT, "100"}},
{"OnroadScreenOffControl", {PERSISTENT | BACKUP, BOOL}},
{"OnroadScreenOffTimer", {PERSISTENT | BACKUP, INT, "0"}},
{"OnroadUploads", {PERSISTENT | BACKUP, BOOL, "1"}},
{"QuickBootToggle", {PERSISTENT | BACKUP, BOOL, "0"}},
{"QuietMode", {PERSISTENT | BACKUP, BOOL, "0"}},
{"RainbowMode", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ShowAdvancedControls", {PERSISTENT | BACKUP, BOOL, "0"}},
{"ShowTurnSignals", {PERSISTENT | BACKUP, BOOL, "0"}},
{"StandstillTimer", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TrueVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}},
{"VibePersonalityEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"VibeAccelPersonalityEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"VibeFollowPersonalityEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
// MADS params
{"Mads", {PERSISTENT | BACKUP, BOOL, "1"}},
{"MadsMainCruiseAllowed", {PERSISTENT | BACKUP, BOOL, "1"}},
{"MadsSteeringMode", {PERSISTENT | BACKUP, INT, "0"}},
{"MadsUnifiedEngagementMode", {PERSISTENT | BACKUP, BOOL, "1"}},
// Model Manager params
{"ModelManager_ActiveBundle", {PERSISTENT, JSON}},
{"ModelManager_ClearCache", {CLEAR_ON_MANAGER_START, BOOL}},
{"ModelManager_DownloadIndex", {CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION, INT, "0"}},
{"ModelManager_Favs", {PERSISTENT | BACKUP, STRING}},
{"ModelManager_LastSyncTime", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, INT, "0"}},
{"ModelManager_ModelsCache", {PERSISTENT | BACKUP, JSON}},
// Neural Network Lateral Control
{"NeuralNetworkLateralControl", {PERSISTENT | BACKUP, BOOL, "0"}},
// sunnylink params
{"EnableSunnylinkUploader", {PERSISTENT | BACKUP, BOOL}},
{"LastSunnylinkPingTime", {CLEAR_ON_MANAGER_START, INT}},
{"SunnylinkCache_Roles", {PERSISTENT, STRING}},
{"SunnylinkCache_Users", {PERSISTENT, STRING}},
{"SunnylinkDongleId", {PERSISTENT, STRING}},
{"SunnylinkdPid", {PERSISTENT, INT}},
{"SunnylinkEnabled", {PERSISTENT, BOOL, "1"}},
{"SunnylinkTempFault", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL, "0"}},
// Backup Manager params
{"BackupManager_CreateBackup", {PERSISTENT, BOOL}},
{"BackupManager_RestoreVersion", {PERSISTENT, STRING}},
// sunnypilot car specific params
{"HyundaiLongitudinalTuning", {PERSISTENT | BACKUP, INT, "0"}},
{"DynamicExperimentalControl", {PERSISTENT | BACKUP, BOOL, "0"}},
{"BlindSpot", {PERSISTENT | BACKUP, BOOL, "0"}},
// sunnypilot model params
{"LagdToggle", {PERSISTENT | BACKUP, BOOL, "1"}},
{"LagdToggleDelay", {PERSISTENT | BACKUP, FLOAT, "0.2"}},
{"LagdValueCache", {PERSISTENT, FLOAT, "0.2"}},
{"LaneTurnDesire", {PERSISTENT | BACKUP, BOOL, "0"}},
{"LaneTurnValue", {PERSISTENT | BACKUP, FLOAT, "19.0"}},
// mapd
{"MapAdvisorySpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, FLOAT}},
{"MapdVersion", {PERSISTENT, STRING}},
{"MapSpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, FLOAT, "0.0"}},
{"NextMapSpeedLimit", {CLEAR_ON_ONROAD_TRANSITION, JSON}},
{"Offroad_OSMUpdateRequired", {CLEAR_ON_MANAGER_START, JSON}},
{"OsmDbUpdatesCheck", {CLEAR_ON_MANAGER_START, BOOL}}, // mapd database update happens with device ON, reset on boot
{"OSMDownloadBounds", {PERSISTENT, STRING}},
{"OsmDownloadedDate", {PERSISTENT, STRING, "0.0"}},
{"OSMDownloadLocations", {PERSISTENT, JSON}},
{"OSMDownloadProgress", {CLEAR_ON_MANAGER_START, JSON}},
{"OsmLocal", {PERSISTENT, BOOL}},
{"OsmLocationName", {PERSISTENT, STRING}},
{"OsmLocationTitle", {PERSISTENT, STRING}},
{"OsmLocationUrl", {PERSISTENT, STRING}},
{"OsmStateName", {PERSISTENT, STRING, "All"}},
{"OsmStateTitle", {PERSISTENT, STRING}},
{"OsmWayTest", {PERSISTENT, STRING}},
{"RoadName", {CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"RoadNameToggle", {PERSISTENT, STRING}},
// Speed Limit
{"SpeedLimitMode", {PERSISTENT | BACKUP, INT, "1"}},
{"SpeedLimitOffsetType", {PERSISTENT | BACKUP, INT, "0"}},
{"SpeedLimitPolicy", {PERSISTENT | BACKUP, INT, "3"}},
{"SpeedLimitValueOffset", {PERSISTENT | BACKUP, INT, "0"}},
// Smart Cruise Control
{"MapTargetVelocities", {CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"SmartCruiseControlMap", {PERSISTENT | BACKUP, BOOL, "0"}},
{"SmartCruiseControlVision", {PERSISTENT | BACKUP, BOOL, "0"}},
// Torque lateral control custom params
{"CustomTorqueParams", {PERSISTENT | BACKUP , BOOL}},
{"EnforceTorqueControl", {PERSISTENT | BACKUP, BOOL}},
{"LiveTorqueParamsToggle", {PERSISTENT | BACKUP , BOOL}},
{"LiveTorqueParamsRelaxedToggle", {PERSISTENT | BACKUP , BOOL}},
{"TorqueParamsOverrideEnabled", {PERSISTENT | BACKUP, BOOL, "0"}},
{"TorqueParamsOverrideFriction", {PERSISTENT | BACKUP, FLOAT, "0.1"}},
{"TorqueParamsOverrideLatAccelFactor", {PERSISTENT | BACKUP, FLOAT, "2.5"}},
};

View File

@@ -1,18 +1,35 @@
# distutils: language = c++
# cython: language_level = 3
import builtins
import datetime
import json
from libcpp cimport bool
from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp.optional cimport optional
from openpilot.common.swaglog import cloudlog
cdef extern from "common/params.h":
cpdef enum ParamKeyType:
cpdef enum ParamKeyFlag:
PERSISTENT
CLEAR_ON_MANAGER_START
CLEAR_ON_ONROAD_TRANSITION
CLEAR_ON_OFFROAD_TRANSITION
DEVELOPMENT_ONLY
CLEAR_ON_IGNITION_ON
BACKUP
ALL
cpdef enum ParamKeyType:
STRING
BOOL
INT
FLOAT
TIME
JSON
BYTES
cdef cppclass c_Params "Params":
c_Params(string) except + nogil
string get(string, bool) nogil
@@ -23,10 +40,31 @@ cdef extern from "common/params.h":
void putBoolNonBlocking(string, bool) nogil
int putBool(string, bool) nogil
bool checkKey(string) nogil
ParamKeyType getKeyType(string) nogil
optional[string] getKeyDefaultValue(string) nogil
string getParamPath(string) nogil
void clearAll(ParamKeyType)
vector[string] allKeys()
void clearAll(ParamKeyFlag)
vector[string] allKeys(ParamKeyFlag)
PYTHON_2_CPP = {
(str, STRING): lambda v: v,
(builtins.bool, BOOL): lambda v: "1" if v else "0",
(int, INT): str,
(float, FLOAT): str,
(datetime.datetime, TIME): lambda v: v.isoformat(),
(dict, JSON): json.dumps,
(list, JSON): json.dumps,
(bytes, BYTES): lambda v: v,
}
CPP_2_PYTHON = {
STRING: lambda v: v.decode("utf-8"),
BOOL: lambda v: v == b"1",
INT: int,
FLOAT: float,
TIME: lambda v: datetime.datetime.fromisoformat(v.decode("utf-8")),
JSON: json.loads,
BYTES: lambda v: v,
}
def ensure_bytes(v):
return v.encode() if isinstance(v, str) else v
@@ -50,8 +88,8 @@ cdef class Params:
def __dealloc__(self):
del self.p
def clear_all(self, tx_type=ParamKeyType.ALL):
self.p.clearAll(tx_type)
def clear_all(self, tx_flag=ParamKeyFlag.ALL):
self.p.clearAll(tx_flag)
def check_key(self, key):
key = ensure_bytes(key)
@@ -59,21 +97,38 @@ cdef class Params:
raise UnknownKeyName(key)
return key
def get(self, key, bool block=False, encoding=None):
def python2cpp(self, proposed_type, expected_type, value, key):
cast = PYTHON_2_CPP.get((proposed_type, expected_type))
if cast:
return cast(value)
raise TypeError(f"Type mismatch while writing param {key}: {proposed_type=} {expected_type=} {value=}")
def _cpp2python(self, t, value, default, key):
if value is None:
return None
try:
return CPP_2_PYTHON[t](value)
except (KeyError, TypeError, ValueError):
cloudlog.warning(f"Failed to cast param {key} with {value=} from type {t=}")
return self._cpp2python(t, default, None, key)
def get(self, key, bool block=False, bool return_default=False):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
cdef optional[string] default = self.p.getKeyDefaultValue(k)
cdef string val
with nogil:
val = self.p.get(k, block)
default_val = (default.value() if default.has_value() else None) if return_default else None
if val == b"":
if block:
# If we got no value while running in blocked mode
# it means we got an interrupt while waiting
raise KeyboardInterrupt
else:
return None
return val if encoding is None else val.decode(encoding)
return self._cpp2python(t, default_val, None, key)
return self._cpp2python(t, val, default_val, key)
def get_bool(self, key, bool block=False):
cdef string k = self.check_key(key)
@@ -82,6 +137,11 @@ cdef class Params:
r = self.p.getBool(k, block)
return r
def _put_cast(self, key, dat):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
return ensure_bytes(self.python2cpp(type(dat), t, dat, key))
def put(self, key, dat):
"""
Warning: This function blocks until the param is written to disk!
@@ -90,7 +150,7 @@ cdef class Params:
in general try to avoid writing params as much as possible.
"""
cdef string k = self.check_key(key)
cdef string dat_bytes = ensure_bytes(dat)
cdef string dat_bytes = self._put_cast(key, dat)
with nogil:
self.p.put(k, dat_bytes)
@@ -101,7 +161,7 @@ cdef class Params:
def put_nonblocking(self, key, dat):
cdef string k = self.check_key(key)
cdef string dat_bytes = ensure_bytes(dat)
cdef string dat_bytes = self._put_cast(key, dat)
with nogil:
self.p.putNonBlocking(k, dat_bytes)
@@ -119,5 +179,19 @@ cdef class Params:
cdef string key_bytes = ensure_bytes(key)
return self.p.getParamPath(key_bytes).decode("utf-8")
def all_keys(self):
return self.p.allKeys()
def get_type(self, key):
return self.p.getKeyType(self.check_key(key))
def all_keys(self, flag=ParamKeyFlag.ALL):
return self.p.allKeys(flag)
def get_default_value(self, key):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
cdef optional[string] default = self.p.getKeyDefaultValue(k)
return self._cpp2python(t, default.value(), None, key) if default.has_value() else None
def cpp2python(self, key, value):
cdef string k = self.check_key(key)
cdef ParamKeyType t = self.p.getKeyType(k)
return self._cpp2python(t, value, None, key)

View File

@@ -1,9 +1,6 @@
import numpy as np
from numbers import Number
from openpilot.common.numpy_fast import clip, interp
class PIDController:
def __init__(self, k_p, k_i, k_f=0., k_d=0., pos_limit=1e308, neg_limit=-1e308, rate=100):
self._k_p = k_p
@@ -17,10 +14,8 @@ class PIDController:
if isinstance(self._k_d, Number):
self._k_d = [[0], [self._k_d]]
self.pos_limit = pos_limit
self.neg_limit = neg_limit
self.set_limits(pos_limit, neg_limit)
self.i_unwind_rate = 0.3 / rate
self.i_rate = 1.0 / rate
self.speed = 0.0
@@ -28,19 +23,15 @@ class PIDController:
@property
def k_p(self):
return interp(self.speed, self._k_p[0], self._k_p[1])
return np.interp(self.speed, self._k_p[0], self._k_p[1])
@property
def k_i(self):
return interp(self.speed, self._k_i[0], self._k_i[1])
return np.interp(self.speed, self._k_i[0], self._k_i[1])
@property
def k_d(self):
return interp(self.speed, self._k_d[0], self._k_d[1])
@property
def error_integral(self):
return self.i/self.k_i
return np.interp(self.speed, self._k_d[0], self._k_d[1])
def reset(self):
self.p = 0.0
@@ -49,25 +40,25 @@ class PIDController:
self.f = 0.0
self.control = 0
def update(self, error, error_rate=0.0, speed=0.0, override=False, feedforward=0., freeze_integrator=False):
self.speed = speed
def set_limits(self, pos_limit, neg_limit):
self.pos_limit = pos_limit
self.neg_limit = neg_limit
def update(self, error, error_rate=0.0, speed=0.0, feedforward=0., freeze_integrator=False):
self.speed = speed
self.p = float(error) * self.k_p
self.f = feedforward * self.k_f
self.d = error_rate * self.k_d
if override:
self.i -= self.i_unwind_rate * float(np.sign(self.i))
else:
if not freeze_integrator:
self.i = self.i + error * self.k_i * self.i_rate
if not freeze_integrator:
i = self.i + error * self.k_i * self.i_rate
# Clip i to prevent exceeding control limits
control_no_i = self.p + self.d + self.f
control_no_i = clip(control_no_i, self.neg_limit, self.pos_limit)
self.i = clip(self.i, self.neg_limit - control_no_i, self.pos_limit - control_no_i)
# Don't allow windup if already clipping
test_control = self.p + i + self.d + self.f
i_upperbound = self.i if test_control > self.pos_limit else self.pos_limit
i_lowerbound = self.i if test_control < self.neg_limit else self.neg_limit
self.i = np.clip(i, i_lowerbound, i_upperbound)
control = self.p + self.i + self.d + self.f
self.control = clip(control, self.neg_limit, self.pos_limit)
self.control = np.clip(control, self.neg_limit, self.pos_limit)
return self.control

View File

@@ -9,20 +9,19 @@ from openpilot.system.hardware.hw import Paths
from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT
class OpenpilotPrefix:
def __init__(self, prefix: str = None, clean_dirs_on_exit: bool = True, shared_download_cache: bool = False):
def __init__(self, prefix: str = None, create_dirs_on_enter: bool = True, clean_dirs_on_exit: bool = True, shared_download_cache: bool = False):
self.prefix = prefix if prefix else str(uuid.uuid4().hex[0:15])
self.msgq_path = os.path.join(Paths.shm_path(), self.prefix)
self.create_dirs_on_enter = create_dirs_on_enter
self.clean_dirs_on_exit = clean_dirs_on_exit
self.shared_download_cache = shared_download_cache
def __enter__(self):
self.original_prefix = os.environ.get('OPENPILOT_PREFIX', None)
os.environ['OPENPILOT_PREFIX'] = self.prefix
try:
os.mkdir(self.msgq_path)
except FileExistsError:
pass
os.makedirs(Paths.log_root(), exist_ok=True)
if self.create_dirs_on_enter:
self.create_dirs()
if self.shared_download_cache:
os.environ["COMMA_CACHE"] = DEFAULT_DOWNLOAD_CACHE_ROOT
@@ -40,6 +39,13 @@ class OpenpilotPrefix:
pass
return False
def create_dirs(self):
try:
os.mkdir(self.msgq_path)
except FileExistsError:
pass
os.makedirs(Paths.log_root(), exist_ok=True)
def clean_dirs(self):
symlink_path = Params().get_param_path()
if os.path.exists(symlink_path):

View File

@@ -1,11 +1,12 @@
"""Utilities for reading real time clocks and keeping soft real time constraints."""
import gc
import os
import sys
import time
from collections import deque
from setproctitle import getproctitle
from openpilot.common.util import MovingAverage
from openpilot.system.hardware import PC
@@ -27,19 +28,15 @@ class Priority:
CTRL_HIGH = 53
def set_realtime_priority(level: int) -> None:
if not PC:
os.sched_setscheduler(0, os.SCHED_FIFO, os.sched_param(level))
def set_core_affinity(cores: list[int]) -> None:
if not PC:
if sys.platform == 'linux' and not PC:
os.sched_setaffinity(0, cores)
def config_realtime_process(cores: int | list[int], priority: int) -> None:
gc.disable()
set_realtime_priority(priority)
if sys.platform == 'linux' and not PC:
os.sched_setscheduler(0, os.SCHED_FIFO, os.sched_param(priority))
c = cores if isinstance(cores, list) else [cores, ]
set_core_affinity(c)
@@ -52,10 +49,12 @@ class Ratekeeper:
self._frame = 0
self._remaining = 0.0
self._process_name = getproctitle()
self._dts = deque([self._interval], maxlen=100)
self._last_monitor_time = -1.
self._next_frame_time = -1.
self.avg_dt = MovingAverage(100)
self.avg_dt.add_value(self._interval)
@property
def frame(self) -> int:
return self._frame
@@ -66,9 +65,8 @@ class Ratekeeper:
@property
def lagging(self) -> bool:
avg_dt = sum(self._dts) / len(self._dts)
expected_dt = self._interval * (1 / 0.9)
return avg_dt > expected_dt
return self.avg_dt.get_average() > expected_dt
# Maintain loop rate by calling this at the end of each loop
def keep_time(self) -> bool:
@@ -85,7 +83,7 @@ class Ratekeeper:
prev = self._last_monitor_time
self._last_monitor_time = time.monotonic()
self._dts.append(self._last_monitor_time - prev)
self.avg_dt.add_value(self._last_monitor_time - prev)
lagged = False
remaining = self._next_frame_time - time.monotonic()

View File

@@ -1,4 +1,6 @@
import subprocess
from contextlib import contextmanager
from subprocess import Popen, PIPE, TimeoutExpired
def run_cmd(cmd: list[str], cwd=None, env=None) -> str:
@@ -11,3 +13,16 @@ def run_cmd_default(cmd: list[str], default: str = "", cwd=None, env=None) -> st
except subprocess.CalledProcessError:
return default
@contextmanager
def managed_proc(cmd: list[str], env: dict[str, str]):
proc = Popen(cmd, env=env, stdout=PIPE, stderr=PIPE)
try:
yield proc
finally:
if proc.poll() is None:
proc.terminate()
try:
proc.wait(timeout=5)
except TimeoutExpired:
proc.kill()

4
common/spinner.py Normal file → Executable file
View File

@@ -6,9 +6,9 @@ from openpilot.common.basedir import BASEDIR
class Spinner:
def __init__(self):
try:
self.spinner_proc = subprocess.Popen(["./spinner"],
self.spinner_proc = subprocess.Popen(["./spinner.py"],
stdin=subprocess.PIPE,
cwd=os.path.join(BASEDIR, "selfdrive", "ui"),
cwd=os.path.join(BASEDIR, "system", "ui"),
close_fds=True)
except OSError:
self.spinner_proc = None

View File

@@ -26,6 +26,9 @@ public:
zmq_setsockopt(sock, ZMQ_LINGER, &timeout, sizeof(timeout));
zmq_connect(sock, Path::swaglog_ipc().c_str());
// workaround for https://github.com/dropbox/json11/issues/38
setlocale(LC_NUMERIC, "C");
print_level = CLOUDLOG_WARNING;
if (const char* print_lvl = getenv("LOGPRINT")) {
if (strcmp(print_lvl, "debug") == 0) {

Some files were not shown because too many files have changed in this diff Show More