Commit Graph

103 Commits

Author SHA1 Message Date
Adeeb Shihadeh 5221450f2d loggerd: another rotation test (#19742)
* another rotation test

* make encoder test fast

* fix pc

Co-authored-by: Comma Device <device@comma.ai>
2021-01-12 19:40:57 -08:00
Adeeb Shihadeh 92e4f04873 Loggerd for PC (#19730) 2021-01-12 16:28:22 -08:00
Adeeb Shihadeh a1c7f19fe4 Video Encoder abstraction (#19729) 2021-01-12 00:03:31 -08:00
Adeeb Shihadeh 87e8ef1fca loggerd: fix double encoder open (#19703)
* fix double encoder open/close

* simplify rotation

* clean up

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
2021-01-11 19:48:50 -08:00
Dean Lee 72bb55247c replace std::this_thread::sleep_for with util::sleep_fo (#19717) 2021-01-11 11:59:48 +01:00
Dean Lee 595830135b merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
Adeeb Shihadeh 6b0890f128 loggerd: fix use after free and memory leaks (#19695)
* fix use after free and memory leaks

* cleanup

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
2021-01-08 15:39:14 -08:00
Willem Melching fb496c692a 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
2021-01-08 14:54:25 +01:00
Adeeb Shihadeh 206d072bb4 loggerd cleanup (#19668) 2021-01-07 23:08:40 -08:00
Adeeb Shihadeh af81190cfc loggerd tests (#19671) 2021-01-06 19:18:35 -08:00
Adeeb Shihadeh e3d2f0c88c fix race condition with encoder thread 2021-01-05 23:09:46 -08:00
Dean Lee 86fe2d1697 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
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh 54679cea58 tici loggerd fixes (#19622)
* fix encoder exit when encoder is uninitialized

* cleanup

* more cleanup

* more cleanup

* little more

* ptr

Co-authored-by: Comma Device <device@comma.ai>
2021-01-05 16:35:05 -08:00
Dean Lee c1cf0882bd Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
2021-01-04 18:03:11 +01:00
Dean Lee 041fbbf725 refactor qlog_counter (#19626) 2021-01-04 11:33:35 +01:00
Adeeb Shihadeh 59d7c5e64a move to github container registry + CI speedup (#19621) 2020-12-31 14:57:01 -08:00
Adeeb Shihadeh ffa7e0cbdb manager tests + make all processes exit cleanly (#19595)
* manager tests

* logcatd exits cleanly

* sigint

* boardd

* multiple dbus connections hangs for some reason

* clocksd proclogd

* network type from thermal

* fix tests

* fix android logcatd

* fix mac

* fix mac proclogd

* move on device athena tests

* build first

* build first

Co-authored-by: Comma Device <device@comma.ai>
2020-12-29 22:32:03 -08:00
Adeeb Shihadeh 8674b023ba HW abstraction layer (#19530)
* start hw refactor

* move that

* pins

* put that back
2020-12-16 21:30:23 -08:00
Adeeb Shihadeh a2c6fdd14c Revert "Handle python-dbus not installed"
This reverts commit 25054cdc05.
2020-12-15 20:29:24 -08:00
ZwX1616 1c21fc100d qcom2 init hevc tier correctly (#19496)
* qcom2 init tier correctly

* need to cast

Co-authored-by: Comma Device <device@comma.ai>
2020-12-14 16:24:49 -08:00
Willem Melching 25054cdc05 Handle python-dbus not installed 2020-12-14 15:04:17 +01:00
Comma Device 44bedaa73b add LOGW 2020-12-11 21:12:51 -08:00
HoverB_SN_11 c6d68d5552 Revert "simplify"
cannot simplify.
2020-12-09 02:13:27 +00:00
ZwX1616 d25cc6f624 Fix random encoder lockups (#2707)
* gbk

* surrrely not

* finalize

* such nuance, such nuisance

* this is done automatically

* add back

* give back 0

* simplify

Co-authored-by: Comma Device <device@comma.ai>
2020-12-08 16:12:55 -08:00
Adeeb Shihadeh 56146d84ce remove raw logger (#2719)
* remove raw logger

* no raw_clips

* only remove raw clips

* cleanup
2020-12-08 15:23:06 -08:00
Willem Melching e7c182b0da Set correct HW type in initData (#2685)
* set hw types

* dont use c++ filesystem
2020-12-03 17:27:12 +01:00
ZwX1616 8d986c82d8 fix loggerd unittest 2020-11-22 15:40:51 -08:00
George Hotz 917eff8c30 New settings for governors, +30% memory bandwidth (#2590)
* new settings for governors, +30% memory bandwidth

* CPU waste is better

* warm up frame_drop

* optional CORE arg for rtshield

* back off priorities of processes not critical to driving

* if it doesn't drive, it's not realtime

* err, resource. this should have been included

* reverse order to not spike

Co-authored-by: Comma Device <device@comma.ai>
2020-11-20 19:25:12 -08:00
ZwX1616 f244b7c7e1 tici front/wide encodeIdx msgs (#2564)
* different msgs

* also add timestamps

* keep impatient log, remove the other

* meaningless
2020-11-19 16:12:02 -08:00
ZwX1616 e113a12702 remove duplicate enc_idx logging (#2562) 2020-11-18 16:02:19 -08:00
ZwX1616 cf21720e1a stop pc from spamming logs (#2544) 2020-11-13 16:26:30 -08:00
Adeeb Shihadeh d5a8444d6c only qcom 2020-11-12 16:19:28 -08:00
Adeeb Shihadeh e88775a224 remove old loggerd priority 2020-11-08 15:44:04 -08:00
Adeeb Shihadeh 8f44e69583 give loggerd min rt priority 2020-11-08 15:42:08 -08:00
Adeeb Shihadeh 6b4957cba1 Log last 1000 lines of tmux output in bootlog (#2149)
* log last 1000 lines of tmux output in bootlog

* add to bootlog

* fix tmux capture
2020-10-20 21:07:12 -07:00
Willem Melching 339d1967cb --std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-17 13:33:12 -07:00
Comma Device 4e2f9d915f fix encoder build 2020-10-15 11:23:42 +00: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
Willem Melching a4ccfcffe8 Remove czmq part 1 (#2332)
* remove czmq

* remove streaming mode from loggerd

* Add include for usleep
2020-10-13 16:01:07 +02:00
Adeeb Shihadeh ee37d03c1f remove hotspot exceptions in uploader (#2319)
* remove hotspot exceptions

* skip net check while onroad
2020-10-12 13:12:01 -07:00
Willem Melching b682ebc022 fix loggerd rotate (#2291) 2020-10-07 16:59:32 -07:00
ZwX1616 e29fd90058 loggerd does not need to babysit this 2020-10-06 18:46:22 -07:00
ZwX1616 55351859a7 transient considerations (#2276) 2020-10-05 15:41:17 -07:00
ZwX1616 2b974150c4 Refactor loggerd rotations (#2247)
* loggerd:refactor rotate encoder

* change notify_all to notify_one

* finish

* cancelWait

* start front_encoder_thread on need

* rebase master to resolve conflict

* tici qcam works, but

* ifs are ugly

* synced rotate off frame ids

* only start counting frames after modeld alive

* typo

* fix some bugs

* never over rotate

* works

* missing space

* zero frame count tolerance

* lol

* add back omx race protection

* not need that

* not to confuse different locks

* playing with locks is playing with fire

* tici now has qcam

* size is overrated

* make cppcheck happy

* fall back if no camera

* warn

* missing condition

* first is freestyle

* no stream id before connecting

* wait for increment

* first will be imperfect

* wait is futile

* block frames when writing state

* just log write time

* exit loops when exit

* tici qcamera

* fixed

* add atomics

* incl

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-03 07:56:16 -07:00
Adeeb Shihadeh 427d4a5a9e run loggerd tests in CI (#2241)
* run loggerd tests in jenkins

* fast

* check segs on the fly

* missing import

* wait for dir

* no thread

* relax FILE_SIZE_TOLERANCE

* cleanup

* unused

* set ci flag

* wait longer for first seg

* fix race condition with setting RecordFront

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-01 18:42:43 -07:00
Dean Lee 209e7aa471 fix resource leak when rotating encoder (#2141) 2020-09-29 13:53:32 -07:00
grekiki cf46de13d2 Uploader speedup (#2214)
* use caching for getxattr

* fix some git issues

* Scheduled network checks

* attempt optimization

* Delete speed_test.py

* Style fixes

* Fix styling

* fix spaces

* fix spaces

* fix naming

* Update uploader.py

* Update mark_all_uploaded.py

* Add file to release

* Update selfdrive/loggerd/tools/mark_all_uploaded.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-22 11:37:24 +02:00
Dean Lee 0e5a5efffc read bool param with read_db_bool (#2205)
* read bool param with read_db_bool

* Update selfdrive/loggerd/loggerd.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-09-21 18:17:35 +02:00
Dean Lee 272f60221c use MessageBuilder::toBytes (#2167) 2020-09-14 01:17:00 -07:00
Dean Lee 9fa56b4eab more messagebuilder (#2162)
* more messagebuilder

* little more

* revert

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-13 13:00:06 -07:00