Commit Graph

342 Commits

Author SHA1 Message Date
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Adeeb Shihadeh
d61f86d339 replace custom clock helpers with time module (#29499)
* replace custom clock stuff wtih time module

* fix double

* fix release

* bump cereal

* update type

* fix one more
2023-08-20 18:50:58 -07:00
Adeeb Shihadeh
2fa09a9ad7 common/gpio: fix warning on re-export (#29457) 2023-08-17 16:32:23 -07:00
Kacper Rączy
d8bda6feb4 replay: increase file descriptor limit macOS (#29346)
* Increase file descriptor limit for replay on macos

* Reword comment

* Move set_file_descriptor_limit to common/util.cc

* Include resource.h header
2023-08-15 00:05:27 +02:00
Dean Lee
37c3854623 util: fix typo in comment (#29392)
fix typo in comment
2023-08-14 12:05:38 -07:00
Dean Lee
22bc06fdaa common/util: move function random_int to util (#29388) 2023-08-14 09:37:16 -07:00
Adeeb Shihadeh
db287496d8 Fixes for PYTHONWARNINGS=error (#29381) 2023-08-13 17:22:56 -07:00
YassineYousfi
9858754a02 camera transformations: pass intrinsics to get_calib_from_vp (#29323) 2023-08-11 10:24:30 -07:00
Misophist
4cad0a035d util: random_string is now more entropic (#29312)
* random_string now returns a significantly higher entropy random string

sizeof(char*) is going to be 8 on a 64-bit system, not the length of the
string. Before, only strings of integer values [0-6] were being generated. Also
switched to C++ constructs for simplicity.

* Update common/util.cc

* maintain repo style

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-11 03:46:47 -07:00
Justin Newberry
8793cbff40 Ruff: enable flake8-builtins (#29315)
* enable flake8-builtins

* replace any with contains

* fix typo in pack

* fix type

* format is from the parent module, has to be enabled

* item_id

* fix item_id

* disable for id since that's what the remote server returns
2023-08-10 18:58:22 -07:00
Justin Newberry
af3ed37c5c Ruff: flake8 pie (misc lints) (#29318)
flake8 pie
2023-08-10 15:28:51 -07:00
Dean Lee
940954c13e swaglog: enable type-checked against format string (#29096)
* check&fix fmt

* bump rednose

* correct format string

* bump rednose

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-31 17:49:50 -07:00
Adeeb Shihadeh
7a5739c5a4 bump to 0.9.5 2023-07-27 15:30:37 -07:00
Maxime Desroches
922e27fa5a gpio_export return type (#29158)
return type
2023-07-26 16:01:26 -07:00
Maxime Desroches
eec99436c1 hardware: move gpio_export (#29154) 2023-07-26 15:12:01 -07:00
Vivek Aithal
92448012f0 [commabody] Support both self-balancing bodies and the wheeled bodies (#29118)
* add wheeled body support

* add WheeledBody param

* make movement less jerky
2023-07-24 19:49:51 -07:00
Adeeb Shihadeh
5831f9e5a0 common/gpio: switch to lru_cache for 3.8 compatiblity 2023-07-23 11:54:51 -07:00
Shane Smiskol
12ed894362 dmonitoringmodeld: initialize model first (#29080)
* hacky fix

* even better

* ordering

* clean up

* fix model replay

* add comment

* catch sigint
2023-07-23 09:28:22 -07:00
Adeeb Shihadeh
d92c9aef23 tici: speedup power save setting (#29100)
* speedup

* update type

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-07-22 17:15:58 -07:00
Dean Lee
269ceca27a common/swaglog: remove trailing semicolon from macros (#29042) 2023-07-19 19:46:42 -07:00
Robbe Derks
70bbb94dc5 Panda logs (#28511)
* log in pandaStates

* Revert "log in pandaStates"

This reverts commit 87ee283ac45c2eeed94d9a958927e3072ec4460f.

* log to param

* dumps datetime

* cloudlog instead

* add truncation

* fix

* try isotimestamp

* duh

* more fixes

* should be __class__

* add some time to account for log gathering

* use new fast interface

* Revert "add some time to account for log gathering"

This reverts commit 2c08ad48052dfc0546530059a0cda03b04c4939a.

* cleanup

* simple test

* fix wrong serial

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-19 14:24:57 -07:00
Justin Newberry
ce2708fa67 Updated: fix setting update time (#29004)
* sleep in launch

* set time loop

* log

* try longer delay + logging

* try longer delay + logging

* fix order of update

* fix order of update

* fix order of update

* revert panda

* also don't show connectivity error without failed checks

* slightly cleanup updated

* fix type error

* init overlay first

* minimal diff

* comment

* minimal diff

* minimal diff

* explicit parameter to make it clear

* explicit parameter to make it clear

* use finally

* dont use finally

* PR cleanup

* reduce frequency

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

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-18 21:26:05 -07:00
Dean Lee
32c5e6aafb modeldata.h: convert constants to uppercase (#28769) 2023-07-01 08:26:21 +01:00
ZwX1616
ce2dffe566 Modeld: send confidence class (#28625)
* 0.7

* magic

* faster magic

* more simple

* up

* empty

* more mid bits

* naive

* flatten

* dz

* that can stay

* this is fine

* what the

* what the

* giRevert "what the"

This reverts commit 1619ba68e6098dc581fe9b82e7ecb74562b619cc.

* Revert "what the"

This reverts commit 0037dd368290497a6d0009ca34adb2184b584d2e.

* 1x fine

* that was fine

* combined

* independent cum

* 0 is fine

* use metrics

* up cereal

* process and publish from modeld

* cleanup

* use s.output

* bg

* a greener approach

* dns

* serial

* update ref commit

* rebase

* ref

* cereal master

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-23 16:49:14 -07:00
Mitchell Goff
ae5bfcf248 Remove get_model_yuv_transform function (#28568)
* remove yuv_transform from update_calibration

* Remove get_model_yuv_transform entirely
2023-06-21 20:02:44 -07:00
James
e81515ba7f Sort parameter list alphabetically (#28594) 2023-06-19 15:26:52 -07:00
Adeeb Shihadeh
f332b4c7bb bump to 0.9.4 2023-06-16 10:56:17 -07:00
Adeeb Shihadeh
7d6897fa38 thermald: save last offroad status packet on onroad transition (#28563)
* thermald: save last offroad status packet on onroad transition

* update param

* write every time

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-15 15:04:22 -07:00
Adeeb Shihadeh
d96361970b thermald: common min date (#28457)
* thermald: common min date

* add to release files
2023-06-12 13:50:38 -07:00
Dean Lee
4ae0378f63 automatically detect available camera streams (#27640)
* remove WideCameraOnly

* check in set_initial_state

* no block

* remove try block

* apply reviews
2023-06-12 13:40:43 -07:00
Shane Smiskol
6bb61780ab params: make ForcePowerDown persistent (#28460) 2023-06-08 19:36:23 -07:00
Harald Schäfer
205c900742 Driving Personality setting (also changes follow distance) (#24742)
* Skeleton

* Adjustable follow parameter

* fix rebase

* long planner

* typo

* Add ui toggle

* Fix icon

* Improve text

* Better toggle position

* Im a UX engineer now

* add param reader

* CHange jerk to have same crash test performance

* Try reading param

* Unused comment

* translate ui text

* std stoi

* Parametrized buttons

* Empty strings are ints

* Move to generic

* Update translations

* Fix translation diffs

* Release notes

* update refs

* tweaks

* Misc fixes

* No param is standard
2023-06-05 22:17:41 -07:00
Cameron Clough
e875bcfaee UI: remove comma points (#28303)
* UI: remove comma points

* remove param
2023-05-30 18:18:47 -07:00
Shane Smiskol
21f88f997d Revert "ui: smooth wide cam transition" (#28298)
Revert "ui: smooth wide cam transition (#28277)"

This reverts commit 26064196d0.
2023-05-25 19:23:50 -07:00
Shane Smiskol
26064196d0 ui: smooth wide cam transition (#28277)
* horribly messy

* bit simpler

* is this right?

* simpler and should work?

* used to be int/frames, but added easing so treat as float

* end slow (start fast)

* little faster

* clean up

* not needed

* try ease in/ease out and fix

* remove debugging print

* fix

* revert to previous curve

* based on speed

* not right

* fix

* fix

* this kinda works

* Revert zoom by speed

Revert "this kinda works"

This reverts commit 48aa30b945148b8eb79fbe33eb58e3fc3a6a7009.

Revert "fix"

This reverts commit 4ff2d33486231727d7cd68d366342c2273e3a315.

Revert "fix"

This reverts commit 15b22f8e8284eb017000856abb05b5e8973a6c0e.

Revert "not right"

This reverts commit 378b9965e14250c57ed39e1976de60d89054c2c8.

Revert "based on speed"

This reverts commit 1f7bfa5d73a2dee3740096da64eda24b33288b51.

Revert "Revert "not right""

This reverts commit 1beeb402534a755208d19771eb4a2afdc69b8739.

* better curve

* revert

* use constants and fixes

* up here too

* feels more intuitive to make zoom_transition=1 be zoomed in

* rm line

* fix

* cmt

* better handling

* better name

* zoom if ANY other stream is requested

* Update selfdrive/ui/qt/widgets/cameraview.cc
2023-05-24 17:28:33 -07:00
Kacper Rączy
b43a875ba2 params: specify path using PARAMS_ROOT (#28257)
* Add PARAMS_ROOT env var

* Change getenv type signature

* Use getenv default_val
2023-05-23 19:02:22 +02:00
Cameron Clough
309126a527 logging: change event_name arg (#28232)
This doesn't change anything in practice, but makes it harder to write a bug where a kwarg with the name `event` would overwrite the event name.
2023-05-19 13:29:33 -07:00
Adeeb Shihadeh
a30a0c4b69 bump to 0.9.3 2023-05-18 16:23:14 -07:00
Adeeb Shihadeh
c192c92a4e calibrationd: add offroad alert when remount detected (#28073)
* calibrationd: add offroad alert for recalibration

* Update common/params.cc
2023-05-15 13:10:36 -07:00
Shane Smiskol
b8fa7f58ea onroad transition: clear params and start safety setter thread (#28151)
* rename from ignition to onroad/offroad

* forgot one

* clear in manager

* don't clear in boardd anymore

fix

* params isn't used here

* add comment

* Revert "add comment"

This reverts commit 54fb6660501679e5a989c3f06c0a438bdb04dc7e.

* write params in manager

* first part is self explanatory

* remove these from thermald now

* start safety setter thread with IsOnroad

* drivesss

* more

* less

* come back

* makes sense here
2023-05-09 21:25:23 -07:00
Dean Lee
10a1b8b7b1 params: cleanup old params that aren't defined (#28017)
* delete files that are not defined in the keys

* assert after create file

* remove util::remove_files_in_dir

* cleanup

* fix up test

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-05-04 11:21:41 -07:00
Adeeb Shihadeh
2adab40565 pre-commit: add check-toml + update hooks (#27906)
* pre-commit: add check-toml

* update

* fix typo
2023-04-13 21:45:12 -07:00
ntegan1
0b6f7be993 fix missing include <cstdarg> (#27831) 2023-04-07 11:00:57 -07:00
Adeeb Shihadeh
038d34aa7f tizi: affine IRQ by action instead of number (#27811)
* tizi: affine IRQ by action instead of number

* do camera irqs

* debug script

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-05 16:35:27 -07:00
Shane Smiskol
42449b482d boardd: ability to switch between ELM safety params (#27656)
* indecisive

* rename to generic FW query

* remove code and update comment

* we need this to start off, unless we set multiplexing immediately

* draft

* draft 2

* try that

* can't do this either, boardd might read Enabled after removing, but before setting new Request param

* this should work

* use one less param

* fix params

* match behavior (set all pandas to safety param of 1, disabling multiplexing for fingerprinting

* clean up (some tests may temp break)

* fix param name and sort

* time it

* yes it does matter

* add to hyundai's bus 5 query

* remove hyundai for now

* this should work

* clean up

* clean up

* flip argument around, clean up

* fix test_startup

* some clean up

* rm line

* comment makes more sense

* required typing

* clean up common type

* comments

* Update selfdrive/car/car_helpers.py

* line

* whoops, need to set before vin!

* fix debug

* annoying

* more debugging

* bug fix (needs both keys always)

* debuGG

debuGG

* Revert "debuGG"

This reverts commit 55b2f429324c0b92d5cfb2cabf8b20db1e166248.

* Revert "more debugging"

This reverts commit 02934c3403ad5270f03093508b704c151d1ccb2a.

* Revert "annoying"

This reverts commit 8b4e5e09989f9a0217e3ec1c0ba68735929b7366.

* clean that up

* bumpback

* bumpback

* every second write param

* flip

* stuff

* move up?

* fix timing out in CI

* rm
2023-03-23 00:14:31 -07:00
Adeeb Shihadeh
be659c976c log current bootlog (#27645)
* log current bootlog

* rm path

* mv that

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-21 17:28:38 -07:00
Harald Schäfer
38cb42f76a LaikaD new cache version (#27596) 2023-03-15 20:26:19 -07:00
Shane Smiskol
e729f5b763 Remove dashcam override param (#27509)
* remove dashcam override

* sort

* remove ford from segments
2023-03-06 15:36:39 -08:00
Kurt Nistelberger
6b4ac801e7 laikad: use new cache param (#27404)
* add backward compatibility

* rename laikad cache file

* rm and update

---------

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-02-22 14:11:04 -08:00
Adeeb Shihadeh
b9a01752fc bump version to 0.9.2 2023-02-17 14:13:22 -08:00