Commit Graph

200 Commits

Author SHA1 Message Date
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
Dean Lee 8e7f4788d5 params.cc clarify conditional compilation(#20699)
old-commit-hash: 737d002d801230e60a2bdd31476bb77a014f13f5
2021-04-19 12:16:30 +02:00
Adeeb Shihadeh 829afdfb87 ate sets failbit on some platforms
old-commit-hash: d90136c1d055369024b1223b0ead520f5aad5913
2021-04-13 14:40:40 -07:00
Comma Device 6f27d70605 fix reading procfs files
old-commit-hash: 6f21993915dd64ac145ec8a17686b62d909fc8f1
2021-04-13 13:56:08 -07:00
Dean Lee 7534abdd50 util.cc: reduce two read_file functions into one (#20655)
* no need to malloc one extra byte

* combine two read_file into a faster one

* cleanup #include

* use resize

* apply suggestions from review

* space

* rebase master
old-commit-hash: fe2f63849ae467fee70c72d18fa52a184c056331
2021-04-13 11:43:43 -07:00
Dean Lee ba58b382e2 util.h: remove unused macro ALIGN (#20673)
old-commit-hash: eb4666b38fd390d8d83152b90c2f52bfbb465bc0
2021-04-13 10:42:36 +02:00
Dean Lee 7d5a53ccbe Use std::size for element counts (#20654)
old-commit-hash: cf8067536928aca45aea850698e085d3170be7a6
2021-04-12 12:22:22 +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: 74aa6e29c992900db6956535a87259e77d9c51a1
2021-04-09 16:35:44 +02:00
Adeeb Shihadeh 530b8eb26d tici: fix GL linking (#20626)
* fix GL linking on tici

* gles

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 015973474e0ff72f9704d979966e2d59e69ede30
2021-04-08 11:59:33 -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 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: ef501afe9718e9f7bda1d4f9d3e8202e466c1dfc
2021-03-31 11:04:34 +02:00
Adeeb Shihadeh 2c382a7c6d bump version to 0.8.4
old-commit-hash: 0adfc931b9d8280af8fe195c6825143dfc96d5d0
2021-03-30 13:16:45 -07:00
Greg Hogan a8e5cb1220 prevent corrupted log messages (#20530)
old-commit-hash: 0847cf686931eb3992791e7db5239e6bfe697c1c
2021-03-30 11:29:26 -07: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 aa1474467e Added new util class FirstOrderFilter (#20303)
* new class FirstOrderFilter

* flick face icon

* revert ui_draw_vision_face

* new function reset()

* reset after update

* use filter to update brightness
old-commit-hash: 6db31b9a33e6caab06645be898957e2414a6dedc
2021-03-30 12:09:06 +02:00
Adeeb Shihadeh 5fc14c8db3 Qt UI: power saving (#20456)
* c2 power saving

* clean that up

* that works

* add to hw

* set power

* release files

* add that

* include hw base

* pc joins the party

* util

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 49748d5dc109322f73b2abcbe6d5efa60a394750
2021-03-24 11:09:39 -07:00
Adeeb Shihadeh 2298d8f8f9 Qt UI: scale volume with speed (#20441)
* Qt UI: scale volume with speed

* for all hw

* way too loud for tici

* set volume

* volume

* swap
old-commit-hash: f1da1f9cb2731f5dc762e7780d79146e2a8f8e20
2021-03-22 19:51:44 -07:00
Dean Lee 1cef96b8a9 FrameBuffer: move the status,success variables closer to usage (#20308)
old-commit-hash: 4cce4385afa5c4526fb56d7159fc9e1b0cec568b
2021-03-11 15:02:35 +01:00
Willem Melching 4d6c98aa6b Add watchdog check to manager (#20277)
* this should work but doesnt

* Only offroad

* works

* make it work offorad

* reduce diff

* cleanup

* need util

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: a94ba4fb8b704a5462352af4501290f63c987754
2021-03-08 19:17:46 -08:00
Dean Lee bca42582d9 modeldata.h: new function get_model_yuv_transform (#20257)
old-commit-hash: 80cc0eefc9f132590e3baad595fdd3c01e85c406
2021-03-08 10:10:13 +01:00
Dean Lee 5e19cdb0d3 move intrinsic_matrix into modeldata.h, removed duplicate definitions. (#20051)
* move intrinsic_matrix into modeldata.h

* def __cplusplus
old-commit-hash: ae72d34a42f23e9b295641e1b0f50515434d6d1f
2021-03-03 11:47:48 +01:00
Adeeb Shihadeh 38c70c5a13 bump version to 0.8.3
old-commit-hash: 2525a628a155efc93a7ca703ab6e3112d9070a96
2021-02-27 21:14:14 -08:00
Willem Melching a98a06c1f8 loggerd: clean exit on SIGPWR (#20100)
* loggerd: clean exit on SIGPRW

* no SIGPWR on macos
old-commit-hash: d3dfb47d0e8fef18171a393005da76c98e941419
2021-02-18 17:46:46 +01:00
Dean Lee 06ac698691 OMXEncoder: remove pthread_mutex_t lock from member variables (#19948)
* remove mutex

* rebase master
old-commit-hash: 9a9641a296dcc0887d902412214510f0ff912fa2
2021-01-30 19:11:03 -08:00
Dean Lee da9b0e8baa remove cqueue, use class SafeQueue (#19774)
* class SafeQueue

* cleanup includes

* space

* add timeout

use try_poll

* add function empty() & size()

* class SafeQueue

* add timeout

use try_poll

* add function empty() & size()

* rebase master

* rebase master

* for loop

* fix bug
old-commit-hash: e6783f4d9f10a256a4c301eb1d1843d9e2a17ab6
2021-01-28 15:12:45 +01:00
Dean Lee 7a086b3f3d convert framebuffer to class (#19800)
* class FrameBuffer

* fix build error

* remove bootlog
old-commit-hash: 6583206ed41c9277bb7509bcb66b7d5e058ea5fe
2021-01-28 14:47:05 +01:00
Willem Melching 62f9992129 fix valgrind complaints about swaglog
old-commit-hash: 4f995b35d5d84508fda0a3d203dd8d3d35f8d2b2
2021-01-28 14:03:46 +01:00
Dean Lee 694b81e129 C++ swaglog (#19825)
* c++ swaglog

* dd

* continue
old-commit-hash: c283be24d38d688eb9a0009d79d33262ee542822
2021-01-28 13:52:18 +01:00
Dean Lee 9abfacf182 util.h: re-indent function string_format and use const std::string & for read_file (#19931)
old-commit-hash: 316f475544f4c28808933b593616da1080429e6d
2021-01-27 12:10:03 +01:00
Dean Lee 6af18c1c7c util.h: use const reference for std::string parameter (#19885)
old-commit-hash: c688461e11f085427b2ebfd7227f2837ceb4f17c
2021-01-23 13:47:09 -08:00
Adeeb Shihadeh 43d680c9c5 add device type to clouglog ctx (#19890)
* add device type to clouglog ctx

* remove is_eon

* str
old-commit-hash: c9679222aebfcbf0dcce7ac00d2e03d19101a81f
2021-01-22 20:02:48 -08:00
Dean Lee 57b1b4c456 loggerd: split bootlog to a separate program (#19831)
* bootlog

* blank lines

* move file_exists to util.h

* src = ['loggerd.cc']

* log_init_data

* Revert "src = ['loggerd.cc']"

This reverts commit 18a587023d75b3a3a54f1ceaf9cb31a51640a067.

* add bootlog to .gitignore

* use s->has_qlog instead of true

* add blank lines & remove extern C
old-commit-hash: f973c56a3695525442ac6c3e89c644b27cbeb384
2021-01-19 12:16:12 -08:00
Dean Lee 5f6337f949 clutil.h: remove extern C (#19809)
old-commit-hash: 3381cd371c03393df5d01bc5a10b24105711ad89
2021-01-18 15:04:37 +01:00
Dean Lee 0e1c994980 swaglog: use std::mutex & remove extern C (#19817)
old-commit-hash: 53b9d35fdab96888ac76e902304ce86dbedea736
2021-01-18 13:35:11 +01:00
Dean Lee e59584fe7c gpio.h: remove extern "C" (#19799)
old-commit-hash: 210b52e622e5d326dbbf02b3706955cb8b71c4c6
2021-01-17 15:51:05 -08:00
Dean Lee c3043515d8 text.c->text.cc (#19734)
old-commit-hash: c5c9b6f7123e573f6c3171c5d5843fcfc8af5dcd
2021-01-15 13:42:26 -08:00
HaraldSchafer c6d9b9565a Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 158210cde8e689daa04bcaa1e502727cf7bfddb6
2021-01-14 18:43:50 -08:00
Dean Lee 74dc639515 convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
old-commit-hash: cef469cbed1d835e70e952d06e1fd8b4eabca450
2021-01-12 15:43:34 +01:00
Dean Lee 4b15f8a12d Refactor image texture stuff into class (#19719)
* Refactor image texture stuff into class

* cleanup

* Update selfdrive/common/visionimg.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b3107e153cca4aa98b623b80fdd13b8446f76d1c
2021-01-11 15:52:58 +01:00
Dean Lee 4069b2c414 Fix build error after merge utilpp.h to util.h (#19714)
* fix std::atomic build error

* remove include util.h
old-commit-hash: 83bdd23a08cbfda17f0020f58e9227db1acd5470
2021-01-10 20:28:11 -08:00
Dean Lee 4c1919f41e merge utilpp.h into util.h (#19710)
old-commit-hash: 595830135bb79c8b23eb8339ae768ca7b6a822f8
2021-01-10 14:57:32 -08:00
Willem Melching 3f950832b9 VisionIPC 2.0 (#19641)
* Squashed vipc

* Update release files

* Remove else

* add visionipc to release files

* use poller in vipc receive

* opencl framework instead of lib on macos

* Fix camera webcam

* Fix opencl on mac in ui

* more webcam fixes

* typo in ui sconsfile

* Use cur_yuv_buf

* visionbuf c++ class

* Camera qcom was still using visionbuf_allocate

* Turn loggerd back on

* fix snapshot

* No build needed

* update test camerad

* no more release callback

* make encoder c++

* Revert "no more release callback"

This reverts commit e5707b07002fee665d0483d90713154efc2d70d4.

* fix exit handlers

* No need to check errno

* move release callback call

* s/VIPCBufExtra/VisionIpcBufExtra/g

* use non blocking connect

* ui use non blocking connect

* Lower condition variable wait time

* Snapshot cleanup

* bump cereal

* bump cereal
old-commit-hash: fb496c692a9ebdcda15069a8d4eb95734b587d68
2021-01-08 14:54:25 +01:00
Dean Lee bc5449d328 remove double semicolons (#19682)
old-commit-hash: 8c62b21df113a8c361635e063087b755837cd06c
2021-01-06 20:57:46 -08:00
Dean Lee 5e557ed96d common exit handler (#19661)
* common signal handle

* fix typo

* rename to ExitHandler

* remove include signal.h

* remove include csignal

* rename variable exit to v

* rebase master
old-commit-hash: 86fe2d1697531bebdf5d0d83609e91ed4006f54b
2021-01-05 20:19:53 -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: 87950eb3127e175f0f2b0bb42440f5350c679369
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: c1cf0882bd4e0fce5e1a581536f6a0e7afb640e6
2021-01-04 18:03:11 +01:00
Dean Lee 5e30b23c58 UI: reducing CPU usage from 13% to 4% when offroad (#19575)
* Accurately control the UI frequency

* helper function sleep_for
old-commit-hash: a4afc03a732ab6438a72bda22911bf4532e9e4cd
2021-01-04 13:59:23 +01:00
Adeeb Shihadeh 1dae511b5b bump version to 0.8.2
old-commit-hash: a4cec444eb3b158176f0650b414090197e7610d4
2020-12-18 12:23:59 -08:00