Commit Graph

45 Commits

Author SHA1 Message Date
Justin Newberry
3a7fb59234 Params: nogil at the end (#29983)
* nogil at the end

* Wrong pr

* Wrong pr
old-commit-hash: 206fab9b4e98fa0ec3026cb2037bffddf7f25949
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: 8aad9758cf901bb141724a4363e67da5fb044a7d
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: ec479322d3d8d789290bee68919d14b040481d53
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: 0d797f4e8b2552192669d0329c14849f0a970066
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: 4e69937d0d3fbdc7d1d42cbc18d7ccf8ddb115f1
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 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
old-commit-hash: b8fa7f58ea8db77d2f7a9e70d139019b24a29da7
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: 01d05f66fe5a189209538650dce319b2f7e192ee
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: 85b433760a2c1a139062a40040e096b9de880e33
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: 90a4565eb29fe95fc83acf6e4f0ea0851c284d61
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: 1f087bceb4a6f569a2f703f348f70048c010ef04
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: cb8885cffb313bea258c012c3026461a22bf8135
2022-05-18 14:11:57 -07:00
Lukas Petersson
6034c5414a params: expose getParamPath in python (#24572)
* params path

* cereal
old-commit-hash: 06b4466388beafc1b043e850d14b341a8e918f5f
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: ed231778982a2f8087c3eb378a6dec0fdbc09266
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: 2773ff5aceb8874a9319c819ec3707705a00604d
2021-11-01 11:22:34 +01:00
Dean Lee
6f0377cf1a params: remove params_pxd.pxd (#22723)
old-commit-hash: 92682cb8e0396373c2ee82add96f70eb7d80964b
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: 3b752a307f167ad536eb53cceac76f7034f2faf9
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: 2f759893ca09aeecf37821cea64957fd507004ce
2021-06-15 12:36:01 +02:00
ShaneSmiskol
ddff72ccea Add CLEAR_ON_IGNITION_OFF param type (#21121)
old-commit-hash: 36beaf0d6895c9d69d05c3a25eab21a4d9dbb692
2021-06-03 15:21:53 -07:00
Adeeb Shihadeh
88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c10b36628cb72b58dba8104c9060bb7f
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: 27d3f820bf4d34bbc799cfc7ce5f9e006f0fe774
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: f9a961f6fb69f36f8a113246920b2d71e6af8ae1
2021-04-30 13:55:17 -07:00
Adeeb Shihadeh
e5be410cd5 lte toggle (#20683)
old-commit-hash: 2eac604993530fab8e10d9d546bcbb7fe0c0374c
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: 1fc7bcca43e9ef75d95ae8689e3b1cd8c4f8041e
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: ae094042ade44815fdba50196c15ba552bbf33d7
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: 98e55996f67aaaf715c941d417ae4d3b0187f388
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: 5cd676797a21215dcf574d545f38ec2e1a0b14f0
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: d43d62561063c4d3f8b10b08d7bde9ed8bd0f395
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: 80ae6a7e1b1d1ec231c4719b677fd08b22818ce1
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: bcb6879199948c21f1ebef9afc2a63f433309c00
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: 7ee79c99236f749d02a6779b006ee1ab187e0612
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: 43ce7165c4eee9af167a650decdb8c3f11195d8d
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: b60cd8d0a0a03b3c1f9f06cba1650a9afe8eb772
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: 8ad1c793d1c4fbb37d763b40750561ad3aca137e
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: d169914674f428f0355c0ec456ed9336fce500a1
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: 4c04e220a15c013c86d2d1695764fc339b82c2bc
2021-02-06 11:07:37 +01:00
Greg Hogan
09f27c5b8e vision-only radar toggle (#19849)
old-commit-hash: 767ada98c750a4d2bf2bbf36dc6dbc869123090f
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: 10bd761cd6fb59f8113f88cc4dc764fbc4f5abf2
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: 9529764549b8c59f7cf141ff3d2d9613ab53beab
2020-11-11 21:14:51 +01:00
Adeeb Shihadeh
f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00
Willem Melching
9ecc0d362e store params in ~/.comma on PC (#2369)
old-commit-hash: c0d92516ccf4dcb8a09c972815a6e08326b59105
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: 96b637737bd42b334bffb188d278766bd0abe6c6
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: 3dd944898183be0ecf985f389d462e53c3feb8e5
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh
80078ac1b3 set default path for put_nonblocking helper
old-commit-hash: de833ecb067d84b7427710832a99186647b4d579
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: 707a670f42dc87c322c6d27eb147ba260b149e23
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: 2e182e5c574ea1468678b5fd8d0597e34ed5898d
2020-10-13 16:23:23 +02:00