Commit Graph

76 Commits

Author SHA1 Message Date
Adeeb Shihadeh 5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
2022-04-18 17:55:23 -07:00
Adeeb Shihadeh bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66ddaa6bc06d7f72f9134aa9afeed3ed8
2022-03-24 23:23:29 -07:00
Adeeb Shihadeh ef2106ebd2 move lock clearing to uploader (#23826)
* move lock clearing to uploader

* test case
old-commit-hash: 3243d1a81e5cfdf687ee406d92903ee44fe781d3
2022-02-22 22:30:11 -08:00
Dean Lee 75a22388c7 loggerd: make test_loggerd.py run on PC (#23574)
* run on PC

* set frameId

* remove todo

* rawlogger: remove suffix mkv

* remove unused import PC

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 22d43211d9bc828ea4e6bd6b84d865a597825eda
2022-01-19 13:55:02 -08:00
Ewout ter Hoeven f206ebd054 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
old-commit-hash: 332f568a8241fba9459cb70c76840b9670e6993a
2021-12-24 11:18:39 -08:00
Willem Melching e7bf88f29f Remove Raw Upload toggle (#23143)
* Remove Raw Upload toggle

* fix tests
old-commit-hash: 2e0c73fc0cbac64e442085390dd22e6b408d0478
2021-12-07 11:25:40 +01:00
grekiki 9e4cc1f7ff Python: Replace more lists with generators (#23116)
* Replace lists with generators v2

* Replace set with {}

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

* Replace more set() with {}

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 6951b3271d1770297cb6bd53878463035ec0bf43
2021-12-03 22:57:19 -08:00
Willem Melching 28dd415759 Do not run code on version.py import (#23063)
* Do not run code on version.py import

* fix athena
old-commit-hash: f7c46c694985456e569ce2313b29e43607c62a12
2021-11-29 19:38:55 +01:00
Willem Melching 3b8daea061 Clear loggerd locks once on boot (#23060)
* add test for clear_locks

* move to bootlog

* simplify test
old-commit-hash: a2f32fd3e18455ca2750f4a0a940ced2ca933163
2021-11-29 12:30:28 +01:00
Dean Lee 7f0beef092 loggerd: add test case for trigger_rotate (#23038)
* test rotate

* remove global LoggerdState
old-commit-hash: 1d323e0fd6e6050180bdf1b0a9793a4f52c47e9a
2021-11-26 14:53:09 +01:00
Dean Lee c1ef2b7493 loggerd: add test case for sync_encoders (#23020)
old-commit-hash: b5eb02181c84285ecc89c4cfe0292ca866354985
2021-11-24 13:34:16 -08:00
Adeeb Shihadeh 44568de155 faster jenkins (#22973)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e13630dfee49dd4439d70d932ea89ba5af74c82f
2021-11-18 23:43:09 -08:00
Willem Melching 425349a55c swaglog.py: respect LOGPRINT env variable (#22950)
* swaglog.py: respect LOGPRINT env variable

* only change handler that prints

* keep usefull manager prints

* only print running list

* revert process changes

* fix test
old-commit-hash: 77b334a698300d6f763bfcc0210c32b6f2ae6f63
2021-11-18 16:05:06 +01:00
Adeeb Shihadeh 35bfdce477 loggerd: trigger rotate on frame id instead of frame count (#22848)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ea761cbbd5103a589915ec3766b4d6056293cba6
2021-11-13 15:38:10 -08:00
Mayfield 43e1903073 enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 5246f0231e6bfa572c0dd89c60e538910817faa2
2021-11-02 17:08:53 +01:00
Dean Lee a031b938b0 replay: improve segment download and merge (#22654)
* no-cache mode

* fix test cases build error

* space

* don't create cache dir in no-cache mode

* fix errors in test cases

* no_local_cache_

* set the number of connections by chunk_size

* use size_t instead of int64_t

* add test case for no-cache mode

* rename variables

* fix SIGSEGV

* cleanup

* faster decompressBZ2

* always decompress bz2

* add test cases

* prepare for python interface

* fix test cases build error

* continue

* camera_replay: cache remote file

* protected inheritance

* single option name

* TODO

* test_case for LogReader&FrameReader

* fix wrong require

* test case for FileReader

* cleanup test

* test:fix wrong filename

* check cached file's checksum

* fix mkdir permissions err

cleanup filereader

* remove initialize libav network libraries.

dd

* abort all loading if one failed

* cleanup tests

* use threadpool to limit concurrent downloads

* cache more segments

* merge 3 segments for replay

* one segment uses about 100M of memory

* use segments_need_merge.size()

* shutdown

* fix stuck if exit replay  before keyboard thread started

* load one segment at a time

* small cleanup

* cleanup filereader

* space

* tiny cleanup

* merge master

* cleanup test cases

* use util:create_directories

* cleanup framereader
old-commit-hash: 2b4a477fbc8fc02da5876aee4f955194916f19a3
2021-11-01 11:55:56 +01:00
Willem Melching 0f77dd4506 loggerd: set encodeIdx.valid if frame id is correct (#22634)
* loggerd: set encodeIdx.valid if frame id is correct

* check valid flag in test

* test cleanup

* bump cereal
old-commit-hash: 89f311714cf3606c386fd1de52b27e24780b8174
2021-10-26 16:00:43 +02:00
Dean Lee 66ca3985c9 replay : move utility functions into separate file (#22414)
* move functions into util

* read bz2 into stream

* pre-decompress log in the download thread

* cleanup logreader

* cache sha256 path

* use readBZ2file in test_logger

* Revert "cache sha256 path"

This reverts commit 60459d3ea09a2c80f4560cf95b1ce7d6af59f06d.

* use macro

* use ostringstream

* cleanup readBZ2File

* move precise_nano_sleep into util
old-commit-hash: d28b98c60244e2bb9e32810e881ea445a912606c
2021-10-04 15:39:59 +02:00
Dean Lee 2dac83c02b loggerd: remove obsolete testraw.cc (#22138)
old-commit-hash: 5a8ca8b449fb3418d31ca325fb38d393413d83b8
2021-09-06 12:10:12 -07:00
Willem Melching 60e7e09127 Ensure that first segment starts with all cameras on the same frameId (#22096)
* test that segment starts with the same frame id

* improve test

* add sync logic

* atomic max

* review comments
old-commit-hash: a93271a518b466cd83699acd8598a0361ee9a02b
2021-09-01 14:28:50 -07:00
Dean Lee 0fac38e34f LoggerState: test cases (#21855)
* test multiple threads writing to log

* fix typo

* use util::getenv

* check INIT_DATA and SENTINEL

* test END_OF_SEGMENT

* add comment

* test multiple threads logging and rotation

* cleanup

* update

* LoggerHandle:quick fix

* cleanup

* revert test_loggerd.py

* refactor test case

* check lock file

* check refcnt after close

* test_runner.cc

d

* int eixt_signal
old-commit-hash: 935cbd3139993eac84f7936dfdb191deb86114f1
2021-08-30 17:12:09 -07:00
Willem Melching ae4f3c98d5 refactor loggerd: trigger rotate in encoder thread (#21860)
* trigger rotate in eoncode thread

* rotate in time

* lgtm

* dcam trigger rotate on C3

* check trigger rotate field

* Use >=

* add rotator thread

* set cnt to 0

* test encodeIdx is increasing across segments

* test both segmentId and encodeId

* fix encodeIdx

* no thread needed

* add log for failed to encode

* stricter C3 test, dont check start encodeId on C2 dcam

* only update last_camera_seen_tms when considered for rotate

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: a39873872de5b2239e4b89119974e5aa961eba48
2021-08-06 11:10:33 +02:00
Adeeb Shihadeh db62739c00 fix loggerd test failure when camerad is slow to start
old-commit-hash: d748b44f48f6d8d4e2b1ce6195363bded06ba377
2021-08-02 09:10:29 -07:00
Adeeb Shihadeh dc0c4bd99b debug msg for loggerd tests
old-commit-hash: 48652db706c7070bb336fc40be7acdc5c2a6e97a
2021-07-28 14:01:27 -07:00
Adeeb Shihadeh 255dfffd7f fix qlog decimation calculation in loggerd tests
old-commit-hash: d8411e7a62a8e3c3df9fe8a7406849b83e927a3d
2021-07-10 23:20:15 -07:00
Adeeb Shihadeh 19bc1b7397 fast jenkins (#21472)
* speed up setup

* speedup onroad test

* .git doesn't like inplace

* tici2

* no inplace

* revert

* fix

* that one too
old-commit-hash: 0bfd994f73a73b321f0ac45e1f3f5d1e907e6962
2021-07-02 16:29:57 -07:00
Adeeb Shihadeh 61d3b1f177 disable uploading raw by default (#21128)
old-commit-hash: c76c30fa2d37d471d065e908739c69f06b43ccfe
2021-06-03 15:24:30 -07:00
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: 4742f55749e59f565192589b318841f2133260ed
2021-05-12 11:15:54 +02: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: 7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805
2021-05-08 22:15:17 -07:00
Adeeb Shihadeh 3e4eb2e343 handle unregistered devices (#20728)
* handle unregistered devices

* cleanup

* no uploader or athena

* clean up
old-commit-hash: 1786d042396bcc079be5de33ed900f48effcec17
2021-04-22 21:03:57 -07:00
Willem Melching badae8669a More encoder test cleanup (#20623)
* more encode test cleanup

* fix check at end of function
old-commit-hash: c4e2d374c9c15988e92ca00f40863cd4713db9c2
2021-04-08 17:48:57 +02:00
Willem Melching 9f84ff75cc check encodeIdx in loggerd test (#20621)
old-commit-hash: ec5465ffd5c87b08b9b86d094bbee13e5c979993
2021-04-08 16:50:48 +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
Willem Melching c0098cec09 Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

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

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5a3b51130649356b14b24e3c82e014b3a0be95a8
2021-03-05 11:03:23 +01:00
Willem Melching c1606b60fd test loggerd: limit samples to number of services
old-commit-hash: 6e26403cee2d2d46b5eda922413db856fc6e8219
2021-02-23 16:45:08 +01:00
ZwX1616 46840807fa up tici hevc bitrate (#20093)
* 2x tici bitrate

* update test

* clean up
old-commit-hash: e2044ca5a2fab66de9b341a5eea2a6c994a45572
2021-02-22 09:15:56 -08:00
Greg Hogan d59a13e22a adjust qcamera quality (#20066)
* better ts

* fix test
old-commit-hash: 1cd9105e96c37ef5365aa34aa52c7ede6afd0567
2021-02-11 17:55:00 -08:00
Adeeb Shihadeh bfa5674d4f fix up encoder test for tici rotation (#19941)
* fix encoder test

* revert for c2

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0411015103d593fe5aac408e70d558c890815842
2021-01-27 14:20:48 -08:00
Willem Melching 4fd576e7f7 Put bootlog in own folder (#19939)
* put bootlog in own folder

* fix uploader

* remove print statements

* update test

* remove comment

* also write initddata

* remove sentinels from test
old-commit-hash: 87119aebe2e7051df49f6f2be9c29d2af4737656
2021-01-27 13:36:40 -08:00
Adeeb Shihadeh 46877afa24 make loggerd rotation test more reliable
old-commit-hash: 9f2088e2c3ec261e58ccdb44a938455c8596461a
2021-01-24 19:38:20 -08:00
Adeeb Shihadeh edd881fa16 more tici tests in jenkins (#19908)
* run loggerd tests on tici

* boardd loopback

* fix up seg length

* this doesn't add more coverage
old-commit-hash: 810ed30cab46baa737abcc8986ba7b2c69cad355
2021-01-24 17:54:03 -08:00
Adeeb Shihadeh cfdeda3393 OMX encoder stability (#19758)
* cleanup test first

* wait for other encoder threads

* fixes initial crash

* no print

* unused

* fix up tests

* need that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d4489fbf91588ea609041bc6bb2899c7de0a3c3c
2021-01-21 10:40:08 -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
Adeeb Shihadeh eaa1489093 loggerd: another rotation test (#19742)
* another rotation test

* make encoder test fast

* fix pc

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 5221450f2da5aee400bfbf764e5acdea878a585a
2021-01-12 19:40:57 -08:00
Adeeb Shihadeh 65a624db68 Loggerd for PC (#19730)
old-commit-hash: 92e4f0487315fc623f54a864ba489cf2102ad085
2021-01-12 16:28:22 -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
Adeeb Shihadeh 1c2560352c loggerd cleanup (#19668)
old-commit-hash: 206d072bb4df0187b97c808f0a0478cbb9223976
2021-01-07 23:08:40 -08:00
Adeeb Shihadeh 0d895ad82a loggerd tests (#19671)
old-commit-hash: af81190cfcf96201f59b0461cc3fdd80cf8651a3
2021-01-06 19:18:35 -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