Commit Graph

45 Commits

Author SHA1 Message Date
Willem Melching
8b785f4744 store all files in /sys/fs/pstore in bootlog (#20875)
* store all files in /sys/fs/pstore in bootlog

* whitespace

* fix bootlog test
old-commit-hash: 4742f55749
2021-05-12 11:15:54 +02:00
Adeeb Shihadeh
8002b848b6 offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
old-commit-hash: b93ccc465d
2021-05-11 03:18:45 -07:00
Dean Lee
e333e4f189 Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7222d0f20d
2021-05-08 22:15:17 -07:00
Willem Melching
78bf4f5867 Replace ifdef with hw abstraction layer (#20843)
* Replace ifdefs with hardware abstraction layer (#20801)

* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error

* Fixes after ifdef clenaup (#20842)

* inheritance doesnt work with static

* fix debayer

* small cleanup

* Update selfdrive/camerad/cameras/camera_common.cc

* Update selfdrive/ui/qt/offroad/settings.cc

* Update selfdrive/common/modeldata.h

* flip conditions

* fix comment

Co-authored-by: Dean Lee <deanlee3@gmail.com>
old-commit-hash: ab319d4f54
2021-05-06 14:39:05 +02:00
Willem Melching
39c18d4c5a Revert "Replace ifdefs with hardware abstraction layer (#20801)"
This reverts commit 9f2ad462f39f4c880f283b71bffbc9248a2b577d.

old-commit-hash: 3a95d3ccaa
2021-05-06 12:29:30 +02:00
Willem Melching
f8608d2e7b Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit 59c31bac9a340f120ff40ed541ee377c31e7e85e.

old-commit-hash: d34647bbf7
2021-05-06 12:29:19 +02:00
Willem Melching
3cc799ecd8 Fixes after ifdef clenaup (#20842)
old-commit-hash: fd7c2b4adf
2021-05-06 11:58:35 +02:00
Dean Lee
e0282ced49 Replace ifdefs with hardware abstraction layer (#20801)
* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error
old-commit-hash: 757d2923d2
2021-05-06 11:41:46 +02: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
Dean Lee
8e7f4788d5 params.cc clarify conditional compilation(#20699)
old-commit-hash: 737d002d80
2021-04-19 12:16:30 +02:00
Willem Melching
85916f61e8 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>
old-commit-hash: 74aa6e29c9
2021-04-09 16:35:44 +02:00
Dean Lee
773f308ce7 Params: ensure path and symlink in constructor (#20538)
* ensure path and symlink in constructor

* better comments

* global Params g_params

* const params_path

* Revert "global Params g_params"

This reverts commit 3439894334d69a8c8c19516b9865f9a71ab163da.

* Revert "const params_path"

This reverts commit d3de2fc22ce0f32ffdcdba5595db9c35b21b84a1.

* cleanup

* add todo

* concat string

* add comment

* more robust

* cleanup
old-commit-hash: ef501afe97
2021-03-31 11:04:34 +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
4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135b
2021-01-10 14:57:32 -08:00
Adeeb Shihadeh
d89bb8b29c setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
old-commit-hash: 87950eb312
2021-01-05 12:50:23 -08:00
Dean Lee
bbfb751d69 Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
old-commit-hash: c1cf0882bd
2021-01-04 18:03:11 +01:00
grekiki
9f0611507e Qt Offroad stats (#19498)
* probably broke a lot, need the commit though

* finally works

* make it work...

* ...

* kind of works

* better styling

* all should work

* tiny cleanup

* temp

* looks nicer

* create JWT in C++

* kilometers -> km

* use correct free methods

* dont put code in assert statement

* Build JWT payload dynamically

* get dongle id once

* include cleanup

* Remove qDebug

* Update drive_stats.cc

Github is a nice editor :)

* swap week and all and fix sconscript

* install openssl

* openssl include dirs on mac

* is this where openssl is?

* It's here

* small cleanup

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5b26c97141
2020-12-18 13:29:20 +01:00
grekiki
2e07e45bed UI style improvements with improved keyboard (#2710)
* fix spaces and make spacebar dynamically sized

* some spaces and a comment

* more spaces

* const

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3e466aa528
2020-12-08 12:00:51 +01:00
Dean Lee
6f500ee98a fsync_dir: remove goto (#2498)
old-commit-hash: 1bd1c961ef
2020-11-09 01:21:48 -08:00
Adeeb Shihadeh
cbafcbcc3c remove unused params function
old-commit-hash: 94991d9319
2020-10-22 17:05:52 -07:00
Willem Melching
9ecc0d362e store params in ~/.comma on PC (#2369)
old-commit-hash: c0d92516cc
2020-10-20 13:18:21 +02:00
Willem Melching
8cc1d9f855 fix typo in params path on PC
old-commit-hash: d28f488ea5
2020-10-19 14:25:45 +02:00
Comma Device
b43b1ac567 need that one too
old-commit-hash: e4d2174a4e
2020-10-17 17:44:10 -07:00
Adeeb Shihadeh
d06d1d76dc fix params permissions for offroad (#2356)
* fix params permissions

* don't need that one
old-commit-hash: 20a6ca83c9
2020-10-17 17:07:40 -07: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
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
Adeeb Shihadeh
13a5f5737b fix params permissions after refactor
old-commit-hash: 6f307ea4c5
2020-10-13 19:14:51 -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
Dean Lee
63c8162fd3 close lock_fd if flock failed (#2231)
old-commit-hash: 9983389ffe
2020-09-28 11:47:38 +02:00
Dean Lee
f5ec24f42f Params: use a multiple-reader / single-writer flock to improve concurrency (#2207)
* improve concurrency: multiple readers, single writer locks

* remove lock in read_db_value
old-commit-hash: 4fba3408c4
2020-09-24 11:51:36 +02:00
Adeeb Shihadeh
91ac4efab2 driver monitoring cleanup (#2101)
* read rhd from param

* don't need that anymore

* fix build

* bump cereal

* read param from camerad too

* add read_db_bool helper

* bump model replay ref commit, IsRHD wasn't set
old-commit-hash: 349040d958
2020-08-29 17:16:00 -07:00
Dean Lee
5fb85ede56 add function read_db_bytes (#1662)
old-commit-hash: 90d97de74d
2020-06-09 13:46:49 -07:00
robbederks
5a12fc32e7 Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
old-commit-hash: 71bebc4fca
2020-05-08 19:39:18 -07:00
Andy Haden
4abb80c9d6 Remove legacy AccessToken param
old-commit-hash: 538ca733c7
2020-03-23 00:22:41 -07:00
George Hotz
189c815e8f selfdrive/common
old-commit-hash: 368a956b96
2020-01-17 11:01:02 -08:00
George Hotz
81dd5a50cf root commit
old-commit-hash: 6c33a5c1f3
2020-01-17 10:02:52 -08:00
Vehicle Researcher
fa4b6f33d1 openpilot v0.7.1 release
old-commit-hash: 8da8b6135c
2020-01-15 14:05:04 -08:00
Vehicle Researcher
b713eae9f8 openpilot v0.6.6 release
old-commit-hash: d7f0b402a8
2019-11-04 15:13:52 -08:00
Vehicle Researcher
89d1d84c70 openpilot v0.6.5 release
old-commit-hash: cf80f7a28b
2019-10-09 18:43:53 +00:00
Vehicle Researcher
3835061760 openpilot v0.6.2 release
old-commit-hash: e90c41c576
2019-07-30 02:27:48 +00:00
Vehicle Researcher
7062c6dcc4 openpilot v0.5.4 release
old-commit-hash: a422246dc3
2018-09-25 00:13:41 -07:00
Vehicle Researcher
e07d32c790 openpilot v0.5.3 release
old-commit-hash: 285c52eb69
2018-09-03 16:43:12 -07:00
Vehicle Researcher
2c0cc6103a openpilot v0.3.7 release
old-commit-hash: daf54ad54d
2017-09-30 19:05:03 -07:00