Commit Graph

77 Commits (528b87473a81122f6ab361fb1dab1c032cd38876)

Author SHA1 Message Date
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
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
Adeeb Shihadeh 82f40f6ff5 small uploader cleanup 2020-08-27 14:22:59 -07:00
robbederks 37d6472bfa
Tici camerad (#2048)
* fix camera config

* typos

* oops

* more typo

* lambless

* forget to send

* visualize hist

* more typo

* 0xC000

* simple

* data loss prevention, clean up later

* loggerd

* back up code

* backup

* fixed memory leak

* fix vsync

* upload ecam

* WB

* 3stream

* fix OMX crash on loggerd rotation

* rewritten debayer kernel

* update viewer

* improved AE

* no artifact lines/grids

* standard trigger

* cleanups

* CCM

* cleanups

* slight tweak

* upd push sock

* build all these

* update tele fl

* update cereal

* upd viewer

* DualCameraState -> MultiCameraState

* cameras_open

* disable frame zmq push by default

* more cleanup

* no apks

* fix submodule error

* wat

* clean up trash

* remove junk

* only build on qcom2

* no need to check these

* update cereal

* some more minor cleanup

* bump panda

* add todo

* minor typo

* Revert "minor typo"

This reverts commit 9233a1df7c.

* not care

* use consistent hdr

* some cleanup

* Update selfdrive/camerad/main.cc

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

* more cleanups

* remove irrelevant stuff

* this too

* cleanup

* rerun ci

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-26 19:59:56 -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
Adeeb Shihadeh 7bee1dbdbf missing two f's, loggerd should really work on pc 2020-08-26 13:48:54 -07:00
Adeeb Shihadeh ff5d98f85f add frame count check to loggerd rotation test 2020-08-26 13:06:32 -07:00
Willem Melching c7152d5419
Hardware abstraction class (#2080)
* hardware abstraction class

* De Morgan

* Rename pc hardware class

* Fix sound card in controlsd

* Pc get sim info

* fix hardware in test

* two more

* No more random imei on android

* no randomness on android

* Need to return something that looks like imei for registration to work

* Return proper network strength

* Unused import

* Bug fixes + gpsd is only android
2020-08-26 14:57:17 +02:00
ZwX1616 521b6688ea
wait longer for tici camerad startup 2020-08-25 21:07:50 -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 c8f880665a
Disable raw upload while onroad (#1894)
* disable raw upload while onroad

* fix tests
2020-07-20 15:21:39 +02: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
Willem Melching f4e8df7ee6
slow down upload check when offroad (#1634) 2020-06-03 19:28:41 -07:00
Adeeb ab83e48ec4
Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
Willem Melching 843a64c72f
Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Adeeb Shihadeh efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Adeeb d9bf9f0a40
Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
Willem Melching bd06434243
pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Willem Melching 50f3f1d335
-Werror (#1567)
* werror

* -Wno-inconsistent-missing-override

* Silence ffmpeg deprecation warnings

* add some more pragmas to ignore warnings

Co-authored-by: Comma Device <device@comma.ai>
2020-05-26 13:27:01 -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
Adeeb Shihadeh 9670f8fb9f these don't need json 2020-05-04 23:37:07 -07:00