Commit Graph

5 Commits (master)

Author SHA1 Message Date
Willem Melching 74aa6e29c9
Params: new class FileLock (#20636)
* new class LockFile

* lock->try_lock

* rebase master

* close if fd_ >=0

* rename try_lock to lock

* keep tryring if flock() return EINTR

* throw exception on error

* keep trying if open() gets interrupted by a signal

* close fd_ before throw flock exception

* add macro HANDLE_EINTR

* HANDLE_EINTR for open & write

* add errno in exception

* add destructor

* don't throw exception,log err and return

* Revert "don't throw exception,log err and return"

This reverts commit 6e1ba4a1bd82de3d4d07db5238a82184fd2ec9b4.

* add lock file name in exception

* cleanup  exception text

* use lock_guard in function put

* anonymous namespace

* use do-while(0) instead of goto

* cleanup read_db_all

* cleanup FileLock

* remove fchmod 0666 for apks

* Revert "remove fchmod 0666 for apks"

This reverts commit b389c31762417c4465d73be2453efcf7bc693aee.

* log instead of runtime error

* keep libs

Co-authored-by: deanlee <deanlee3@gmail.com>
2021-04-09 16:35:44 +02:00
grekiki 9529764549
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>
2020-11-11 21:14:51 +01:00
Willem Melching 2e182e5c57
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>
2020-10-13 16:23:23 +02:00
Adeeb Shihadeh 165e14d103
Rebuild cython extensions when dependency version changes (#1886)
* rebuild cython extensions when python/cython/distutils version changes

* submodules and boardd

* kalman and transformations
2020-07-16 13:59:32 -07:00
George Hotz e8d888c45b common folder 2020-01-17 10:28:44 -08:00