Commit Graph

50 Commits (72bb55247cb82d9a1517b516dab535b9502864c4)

Author SHA1 Message Date
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
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
Comma Device 44bedaa73b add LOGW 2020-12-11 21:12:51 -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
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 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
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
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
Adeeb Shihadeh 4d5733924a
message builder (#2161)
* use custom MessageBuilder from cereal

* use MesageBuilder.toBytes

* bump cereal

* unused

* another one

* fix ui msg

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-09-12 21:48:15 -07:00
ZwX1616 6a8cd6e054
Fix loggerd not rotating encoder if dcamera upload disabled (#2133)
* should only count after the check

* include no dcam

* no need to copy

* run with both param

* independent idx

* not break test if no device

* remove unused

* EON D is half

* needs test for qcamera too

Co-authored-by: Comma Device <device@comma.ai>
2020-09-06 01:21:26 -07:00
Adeeb Shihadeh 45b4b6007a
lidar is a scam (#2094) 2020-08-28 16:21:05 -07:00
ZwX1616 3014280d1a
Fix OMX error on loggerd rotation when using multiple cameras (#1953)
* cherry pick from f8745d3002

* update cereal

* missed this line

* add enum

* Update selfdrive/loggerd/loggerd.cc

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

* Update selfdrive/loggerd/loggerd.cc

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

* use same logroot

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-26 15:02:51 -07:00
ZwX1616 87473fbc41
Loggerd rotation test (#2077)
* loggerd test

* delete afterwards

* add ccc

* fix pylint

* cleanup rotation test

* this works

* bump tolerance

* clear the data after test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-08-25 18:31:49 -07:00
Adeeb Shihadeh eb1aa3d831
Wunused (#1841)
* enable Wunused, first pass

* unused stuff in snpe model

* these are used on phone

* handle sigint and sigterm in modeld

* fix phone build

* camera qcom

* QCOM build works

* delete unused camerad vars

Co-authored-by: Comma Device <device@comma.ai>
2020-07-09 09:25:32 -07:00
Dean Lee 3754ddf9ba
remove duplicate calls to visionstream_destroy (#1843) 2020-07-08 21:47:22 -07:00
Dean Lee 90d97de74d
add function read_db_bytes (#1662) 2020-06-09 13:46:49 -07:00
Adeeb ab83e48ec4
Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
Willem Melching ab5af232b2
Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
robbederks 71bebc4fca
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
2020-05-08 19:39:18 -07:00
George Hotz d5ca841b0f Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit b225016628.
2020-05-04 09:54:05 -07:00
Dean Lee b225016628
Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
2020-05-01 19:21:00 -07:00
Dean Lee 2928c53e4f
cleanup visionipc when recovering from fault in dmonitoringd and loggerd (#1402) 2020-04-20 13:15:11 -07:00
Willem Melching 02e474580e
Release messaging sockets and context on shutdown (#1391)
* release resources when thread is done

* add white space

* add white space

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-04-17 16:37:34 -07:00
George Hotz cfcf3f9368
tici: fix loggerd (#1302)
* loggerd builds

* codec

* add frame_id cams

* working

* no qcam on tici

* pthread always

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 18:25:05 -07:00
Willem Melching 2f33e1e0b0 Fix qlog decimation 2020-02-14 13:51:24 -08:00
Adeeb 0ad5715255
use services.h in loggerd (#1056)
* loggerd: use services.h

* don't need yaml-cpp anymore

* forgot that
2020-02-06 10:56:01 -08:00
Willem Melching 393c4987c8 Fix junk data in initParams 2020-01-27 17:08:57 -08:00
George Hotz da079d47d7 logcatd, loggerd, mapd, modeld, proclogd 2020-01-17 11:20:17 -08:00