Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
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
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
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
cl0cks4fe
639a634f7c Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dd9d5d4528
2024-05-17 11:01:44 -07: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
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
Adeeb Shihadeh
53e0f5eb49 pytest: use a clean environment for all tests (#29788)
* pytest: use a clean environment for all tests

* rm that

* fix pj

* put build back

* fix params

* fix that

* handle no key

* that was removed

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
old-commit-hash: 7b6afbc162
2023-09-05 18:52:40 -07:00
Adeeb Shihadeh
16ec56398c 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
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Dean Lee
3ff040d52c 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>
old-commit-hash: 10a1b8b7b1
2023-05-04 11:21:41 -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
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
Willem Melching
6f92abc815 Less open file permissions (#21922)
* Less open file permissions

* add test back

* remove params test for permissions

* remove umask

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dddab597bc
2021-08-28 18:25:05 -07: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
Adeeb Shihadeh
88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c1
2021-05-04 11:32:40 -07: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
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
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
Adeeb Shihadeh
86d9da50c5 add test for params permissions
old-commit-hash: 2ad9c50e36
2020-07-18 18:30:29 -07:00
Andy Haden
4abb80c9d6 Remove legacy AccessToken param
old-commit-hash: 538ca733c7
2020-03-23 00:22:41 -07:00
George Hotz
b1f13418e1 common folder
old-commit-hash: e8d888c45b
2020-01-17 10:28:44 -08:00