Commit Graph

740 Commits

Author SHA1 Message Date
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
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
Adeeb Shihadeh
5605c398a2 Revert "cereal: fixup build deps"
This reverts commit e9f917836b.
2025-06-01 12:37:12 -07:00
Adeeb Shihadeh
e9f917836b cereal: fixup build deps 2025-05-31 10:49:46 -07: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
Shane Smiskol
db855d56d3 Log Hexagon DSP temperature (#35166)
* add hexagon dsp temp

* log

* whoops
2025-05-09 15:18:52 -07: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
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
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
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
Kacper Rączy
5c4ceb7b39 liveDelay message (#34976)
Bring back the lag message
2025-04-02 19:12:54 +00: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
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
Robbe Derks
b8065d3138 Parse out more ublox sat info (#34947)
parse out more sat info
2025-03-28 10:26:37 +01: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
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
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
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
Adeeb Shihadeh
b35d86551d Revert "Remove EncodeIdx packets from qlog (#34590)"
This reverts commit 917b45afd0.
2025-02-19 13:17:44 -08:00
Adeeb Shihadeh
917b45afd0 Remove EncodeIdx packets from qlog (#34590) 2025-02-15 15:17:58 -08: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
26cedc5ff1 bridge: remove deprecated services check (#34463)
Remove deprecated services check from get_services
2025-01-24 10:24:20 -08: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
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
Adeeb Shihadeh
420d6f0d5e Quick GC pass heading into 2025 (#34330)
* first pass

* bye bye snpe
2025-01-05 15:10:24 -08:00
Maxime Desroches
b3ad7ef24b add touch events to qlogs (#34236)
deci
2024-12-13 21:22:43 -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
Adeeb Shihadeh
2e9540d2b1 system/hardware: refactor thermal config (#34177)
* system/hardware: refactor thermal config

* fix

* fixup

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-12-07 15:03:30 -08:00
Adeeb Shihadeh
34d62836fe hw: add fan intake and exhaust temps (#34156)
* hw: add fan intake and exhaust temps

* remove bat

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-12-04 19:24:21 -08:00
DevTekVE
8f7bbe4ee3 macos: use /tmp instead of /dev/shm (#34097)
* No /dev/shm on MacOS so we go to tmp instead given that the /dev/shm makes tests not really work fine on mac

* Cleanups

Fix cereal messaging tests

* keep msgq stock

More shm updates for macos

* typo

* fix return

* Semicolon...
2024-12-04 10:51:09 -08:00
Maxime Desroches
50aac48fba ci: faster unit_test (#34019)
* multiple

* CACHE

* ...

* cache

* now fast

* maybe

* bp

* vv

* slow

* fast

* fix

* faster

* ruff

* info

* timeout

* info

* more

* clean

* faster

* test

* collection time

* is this real?

* fix

* back

* clean

* just to make sure

* faster!
2024-11-13 21:27:23 -08:00
Maxime Desroches
4f9794097b ci: faster unit_tests (#33953)
* effect

* test

* no

* yes

* try some caching

* try

* 1

* try more 1

* just for fun

* 50 maybe????

* all for nothing

* fix

* add back

* back

* timeout

* clean

* try

* no

* less
2024-11-07 15:29:07 -08:00
Dean Lee
2f7d09bb01 bridge: improve message sending loop (#33810)
improve sending loop
2024-10-24 13:41:14 -07:00
Shane Smiskol
0440c3a83b Deprecate some controls fields (#33857)
* deprecate a field

* some more

* bump
2024-10-23 13:49:10 -07:00
Adeeb Shihadeh
7150c145ae selfdrived: remove redundant sound card check (#33767)
rm
2024-10-11 09:30:53 -07:00
Shane Smiskol
7556233cca Reapply "move car.capnp to opendbc (#33722)" (#33728)
* Reapply "move car.capnp to opendbc" (#33725)

This reverts commit 9d52a5b485.

* why can't i repro?!

* Revert "why can't i repro?!"

This reverts commit 0435d218f790faf7b7aaed27d05ab9ee67b087e6.

* does this cause card to try and read it?

* better place

* wtf

* Reapply "why can't i repro?!"

This reverts commit d24fd5a0abf454f47d5591e3b39039fdc4d0251c.

* also here
2024-10-03 22:47:03 -07:00
Shane Smiskol
9d52a5b485 Revert "move car.capnp to opendbc" (#33725)
Revert "move car.capnp to opendbc (#33722)"

This reverts commit 8149f7cb11.
2024-10-03 16:57:45 -07:00
Shane Smiskol
8149f7cb11 move car.capnp to opendbc (#33722)
* move car.capnp to opendbc

* bump

* do card

* fix some more tests

* rm helpers

* format fp

* more

* whoops

* bump

* bump to master
2024-10-03 16:40:24 -07:00
Shane Smiskol
af774d894e Deprecate car onroadEvents (#33687)
* new OnroadEvent struct

* and migrate python

* more forgotten

* re-index new OnroadEvent struct

* fix!

* more missing

* migrate onroadEvents

migrate onroadEvents

* migrate dm events

* hacks to get proc replay to say succeeded

* Revert "hacks to get proc replay to say succeeded"

This reverts commit 0bb8803e5755d606ae9f09da5395d9f50678c7c7.

* update refs
2024-10-03 15:20:58 -07:00
Shane Smiskol
aed1eaede5 Deprecate carState.events (#33693)
* add lkas bools

* switch these two over

* bump

* deprecate low speed lockout

* add lowSpeedAlert bool

bump

* GM vehicle speed is now signed!

* reimagine

* rm

* do event

* bump

* STASH

* comment

* bump

* no out!

* format

* move almost everything to selfdrived

* add back CC_prev for cruise initialization

* ok

* errors are passed to radarState as well as freq check

* deprecate!

* use selfdrived for test models events

* we only want noEntry from car events, not system, have to check pedalPressed

* no more events

* regen with buttonEvents set properly

* update refs
2024-10-02 21:32:56 -07:00
Shane Smiskol
6f0927011c CarState: add low speed alert field (#33712)
* clean up mazda steer speed alert

* bump
2024-10-02 15:10:33 -07:00
Shane Smiskol
98e1d840de CarState: add invalidLkasSetting (#33700)
* invalidLkasSetting

* clean up car specific a bit

* clean this up

* deprecate!

* bump

* this was just broken lol

* updaterefs
2024-10-01 23:06:57 -07:00
Shane Smiskol
aea6790e3c ButtonEvent: rename altButton3 to mainCruise 2024-10-01 21:36:14 -07:00
Shane Smiskol
516aa59ee6 Deprecate lowSpeedLockout alert (#33696)
* is an accFault

* bump

* bump to master

* remove from car specific
2024-10-01 20:16:25 -07:00
Jason Young
17edc5f660 support for SecOC cars (#33689)
* bump opendbc

* support for SecOC cars

* missed this

* bump opendbc

* un-nest SecOC params

* gate saved key retrieval on IsReleaseBranch false

* bump opendbc

* bump opendbc

* bump opendbc to point of SecOC merge

* bump opendbc
2024-10-01 20:22:46 -04:00
Dean Lee
3c456f5b8d submaster: improve avg frequency calculation for efficiency (#33516)
improve avg freq calculation for efficiency
2024-09-29 10:15:26 -07:00