Commit Graph

49 Commits

Author SHA1 Message Date
JaSpa99 dc73e6e2aa
Make SimulatorBridge picklable (MacOS support) (#34023)
* remove unused

* make Params (un)serializable

* move initialization after spawn

_thread.lock objects can't be pickled
2024-11-14 10:25:50 -08:00
Milan Medić 284450400e add Cython static analysis (#31491)
* Adding pre-commit hook for cython static analysis

* Adding changes to cython files to pass static analysis

* Revert "Adding changes to cython files to pass static analysis"

This reverts commit 9a0eb73319.

* Adding ignore rule for indentation of 4 spaces (E111)

* Fixes for cython-lint static analysis

* Revert "Fixes for cython-lint static analysis"

This reverts commit 972741735b.

* Adding two new rules into ignore list (2 new lines after difinition of class)

* Adding fixes for cython static analysis
old-commit-hash: 69fb3c2ed5
2024-02-19 12:11:56 -08:00
Dean Lee 1d7d7b89b2 common/params: support nonblocking write (#29808)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

* pass prefix to asywriter

* move to params

* assert(queue.empty())

* add comment

* add todo

* test_power_monitoring: remove patch

* rm laikad.py

* fix import

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 3c4c4d1f7f
2023-12-13 20:36:01 -08:00
Adeeb Shihadeh 4394116e5b clear non-release params on startup (#30583)
old-commit-hash: 531e62fc03
2023-12-01 23:57:54 -08:00
Justin Newberry 3a7fb59234 Params: nogil at the end (#29983)
* nogil at the end

* Wrong pr

* Wrong pr
old-commit-hash: 206fab9b4e
2023-09-19 15:07:54 -07:00
Justin Newberry baa86681f7 Params: better error logging on constructor (#29954)
* ensure params path

* static anlysis

* revert that
old-commit-hash: 8aad9758cf
2023-09-18 16:50:44 -07:00
Adeeb Shihadeh 0010c9a986 Revert "params: safe and efficient async writing parameters (#25912)"
This reverts commit 780669c33fea1b2a14a0bd6e2eac82c9b8893aa5.

old-commit-hash: ec479322d3
2023-09-06 13:44:20 -07:00
Dean Lee 08e70aecb2 params: safe and efficient async writing parameters (#25912)
* Safe and efficient asynchronous writing parameters

* call putNonBlocking in locationd

* remove space

* ->AsyncWriter

* remove semicolon

* use member function

* asyc write multiple times

* add test case for AsyncWriter

* merge master

* add missing include

* public

* cleanup

* create once

* cleanup

* update that

* explicit waiting

* improve test case

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0d797f4e8b
2023-09-06 08:50:28 -07:00
Justin Newberry 3b91610c0b Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
old-commit-hash: 4e69937d0d
2023-09-05 16:33:26 -07:00
Shane Smiskol a14463cbe3 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 54fb666050.

* 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
old-commit-hash: b8fa7f58ea
2023-05-09 21:25:23 -07:00
Adeeb Shihadeh 3e2f436d4c auto-detect pigeon or quectel (#25991)
* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 01d05f66fe
2022-10-06 16:46:15 -07:00
Dean Lee dc0ad229cd Params: add new method to get all keys (#25779)
* allKeys

* cleanup and test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 85b433760a
2022-09-15 15:43:27 -07:00
Adeeb Shihadeh d9c279aea9 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
old-commit-hash: 90a4565eb2
2022-08-26 20:46:19 -07:00
ZwX1616 d500a25ab5 params: add put_bool_nonblocking (#25292)
* add bool flag

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1f087bceb4
2022-07-28 13:17:11 -07:00
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb
2022-05-18 14:11:57 -07:00
Lukas Petersson 6034c5414a params: expose getParamPath in python (#24572)
* params path

* cereal
old-commit-hash: 06b4466388
2022-05-17 16:48:48 -07:00
Willem Melching 6346a84060 thermald: remove panda disconnect logic (#23526)
* thermald: remove panda disconnect logic

* keep that
old-commit-hash: ed23177898
2022-01-14 14:13:18 +01:00
Dean Lee 40b2bb9f65 params: code cleanup (#22744)
* cleanup params

* apply review

* continue

* use c_str

* cleanup filelock

* don't check return code of close()

* remove call_once

* cleanup params_pyx

* cleanup comment
old-commit-hash: 2773ff5ace
2021-11-01 11:22:34 +01:00
Dean Lee 6f0377cf1a params: remove params_pxd.pxd (#22723)
old-commit-hash: 92682cb8e0
2021-10-28 19:10:55 +02:00
Dean Lee 29ec7b83bf params: remove persistent params (#21975)
* cleanup constructors

* remove persistent_param

* remove test_persist_params_put_and_get
old-commit-hash: 3b752a307f
2021-08-20 16:57:45 -07:00
Willem Melching 0fb755e425 Release GIL when calling C++ params functions (#21257)
* Release GIL when calling C++ params functions

* small cleanup
old-commit-hash: 2f759893ca
2021-06-15 12:36:01 +02:00
ShaneSmiskol ddff72ccea Add CLEAR_ON_IGNITION_OFF param type (#21121)
old-commit-hash: 36beaf0d68
2021-06-03 15:21:53 -07:00
Adeeb Shihadeh 88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c1
2021-05-04 11:32:40 -07:00
Dean Lee b12a444bdd Params: move keys from cython to cc (#20814)
* move keys from cython to cc

* consistency

* passes tests

* more consistency

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 27d3f820bf
2021-05-04 10:49:26 -07:00
Adeeb Shihadeh ec7913cbe5 delay controls start (#20761)
* delay controls start

* shouldn't need this stuff anymore

* only delay board

* bail after 2s

* fix loopback test

* fix process replay

* update refs

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: f9a961f6fb
2021-04-30 13:55:17 -07:00
Adeeb Shihadeh e5be410cd5 lte toggle (#20683)
old-commit-hash: 2eac604993
2021-04-14 21:19:06 -07:00
Willem Melching 00b19b6351 ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
old-commit-hash: 1fc7bcca43
2021-04-07 19:12:35 +02:00
Willem Melching 8f4a445171 add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
old-commit-hash: ae094042ad
2021-04-07 15:36:37 +02:00
Dean Lee 405df8b165 Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
old-commit-hash: 98e55996f6
2021-03-30 12:54:59 +02:00
Dean Lee c5194fcb85 Qt: show username for current SSH keys (#20508)
* Show username for current SSH keys

* Update ssh_keys.cc

* Update ssh_keys.cc

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

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

* rename param

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5cd676797a
2021-03-28 22:32:33 -07:00
Willem Melching 8c296312e3 Cache prime/points widget (#20497)
* cache prime status on homescreen

* use stacked widget

* add caching and clear on 404
old-commit-hash: d43d625610
2021-03-26 14:53:12 +01:00
Dean Lee ae8893a77f Qt: cache home screen state (#20395)
* cache drive stats

* don't parse response if it's the same as previous

* remove blank line

* cleanup

* update stats in place

* validate json

* add DriveStats to params.pyx

* cleanup

* cleanup

* remove //#include

* simplify

* add cache to RequestRepeater

* rename CachedDriveStats to ApiCacheDriveStats

* rename ApiCacheDriveStats to ApiCache_DriveStats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 80ae6a7e1b
2021-03-26 13:29:30 +01:00
Adeeb Shihadeh 0d5dec9276 updated: log git diff on overlay init (#20476)
* updated: log git diff on overlay init

* add git diff param

* params
old-commit-hash: bcb6879199
2021-03-25 16:16:12 -07:00
HaraldSchafer eae1fa481c New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7ee79c9923
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh 5cfc42911b Remove lane change toggle and default LDW to off (#20442)
* remove lane change toggle and default LDW to off

* update refs
old-commit-hash: 43ce7165c4
2021-03-22 20:55:57 -07:00
Adeeb Shihadeh 1a0ac978ec record front lock (#20400)
* record front lock

* only if set

* add to internal installer

* move that

* change that bck

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b60cd8d0a0
2021-03-18 20:15:51 -07:00
robbederks 0f73681f8d Fix tici powerdown and add support for forcing (#20132)
* also shutdown on tici

* force powerdown

* bump panda

* abstract out shutdown and thermal config

* add comment on tici shutdown

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8ad1c793d1
2021-02-23 17:04:10 +01:00
Adeeb Shihadeh 3ede01fb14 agnos 0.6 (#20077)
* updates for agnos 0.6

* timezone

* bump version
old-commit-hash: d169914674
2021-02-18 18:14:34 -08:00
Willem Melching 17d5446650 Timezoned (#19960)
* untested code

* add to manager

* whitespace

* only save on fix

* cleanup

* fix typo

* add to ignored processes

* import tici

* fix param name

* cleanup

* only run offroad

* use itertools

* wait for thermald

* simpler

* fall back to api call

* add param to override timezone

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4c04e220a1
2021-02-06 11:07:37 +01:00
Greg Hogan 09f27c5b8e vision-only radar toggle (#19849)
old-commit-hash: 767ada98c7
2021-01-27 14:15:59 +01:00
grekiki 0c141e45aa Qt offroad: pairing (#19675)
* kind of works now

* QR code is now on screen

* testing is needed

* works, waiting for server update

* reduce diff

* refactoring part1

* refactor part2

* refactor part3

* works on PC

* fix build, annoying bug though...

* git is annoying

* more classes, still crashes after a while

* better style

* clearer qr code

* less code and test new ssh key

* no more AA

* rename and collect garbage

* no pairing widget without the internet connection

* No network connection

* more logs

* refactor the network calls

* no more leaking

* works

* cleanup

* spaces

* works on device

* fix merge

* don't run if screen is off

* always initialized

* stats updating, not running without scrren

* formatting

* nicer QR code

* ensure the registration

* no qr code if no IMEI or no HWSerial

* all works

* refactor

* better networking

* all functionality seems to work

* small cleanup

* get serial once

* Small cleanup

* No internet text

* Don't crash if private key not found

* no network should say so

* new qr code every 30 minutes

* 20FPS sidebar

* more responsive networking and QR

* more logs

* no log spam

* fix merge

* no running onroad

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 10bd761cd6
2021-01-18 12:07:55 +01:00
grekiki 0b902a02c1 Scons builder for cython extensions (#2485)
* complie boardd without python

* not good, but don't want to lose the file, because it works

* clean a bit

* update dbc

* should build on CI

* not good, but don't want to lose the file, because it works

* clean a bit

* should build on CI

* remove unneeded path

* reorder paths

* reduce diff

* and now it works?!

* ... should work in CI

* add kj, 30% chance to fix macos

* pydebug

* new way to find path

* fix :)

* tested

* sanity check

* repl. MacOS flags

* hope it works

* need more logs

* need more logs2

* test if it works

* should work on CI

* correct python file

* should not work

* cleanup

* real cleanup

* more removals

* 50% of file

* transformations

* fixed a hardcoded variable

* more logs

* simpl.

* kalman

* all donw if it passes tests

* cleanup

* reduce code by 20 lines if this works

* fix bugs

* cleanup

* SharedLibrary

* cleanup

* ...

* remove unused

* CI fix maybe?

* add more valid path

* more logs

* ...:

* fix webcam CI

* remove WError flag

* deprecated is not an error

* more Wno things

* reduce diff, add Wno to env

* don't import nonexistent stuff

* SharedLibrary v2

* less custom env

* renaming, remove SharedLibs

* pack libs in envCython

* experiment

* better docker caching

* whitespace

* more docker caching

* improvement

* improvements

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9529764549
2020-11-11 21:14:51 +01:00
Adeeb Shihadeh f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f5
2020-11-03 19:56:25 -08:00
Willem Melching 9ecc0d362e store params in ~/.comma on PC (#2369)
old-commit-hash: c0d92516cc
2020-10-20 13:18:21 +02:00
Adeeb Shihadeh f92c30b164 fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
old-commit-hash: 96b637737b
2020-10-17 12:40:01 -07:00
Willem Melching 789d5176cb Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
old-commit-hash: 3dd9448981
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh 80078ac1b3 set default path for put_nonblocking helper
old-commit-hash: de833ecb06
2020-10-14 13:57:10 -07:00
Adeeb Shihadeh 31ea16e7fa fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
old-commit-hash: 707a670f42
2020-10-14 13:45:24 -07:00
Willem Melching 498ecbdf3c Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

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

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2e182e5c57
2020-10-13 16:23:23 +02:00