Commit Graph

22 Commits (master)

Author SHA1 Message Date
Adeeb Shihadeh 3243d1a81e
move lock clearing to uploader (#23826)
* move lock clearing to uploader

* test case
2022-02-22 22:30:11 -08:00
Willem Melching a2f32fd3e1
Clear loggerd locks once on boot (#23060)
* add test for clear_locks

* move to bootlog

* simplify test
2021-11-29 12:30:28 +01:00
Dean Lee 652c42da2c
util: add safe write functions (#22160)
* add safe write functions

* log error

* bzfile safe_fopen&safe_flush

* update test_case

* trigger ci

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-29 13:23:31 +02:00
Dean Lee 1f39d8cee6
util: add new function create_directories with unit tests (#21871)
* util::create_directories

* check bool ret

* don't assume mask

* rename with_umask to no_umask

* remove umask

* rebase master

* rebase master

* 0755
2021-10-29 12:27:35 +02:00
Dean Lee 935cbd3139
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
2021-08-30 17:12:09 -07:00
Dean Lee b66e8adbef
BZFile: handle EINTR on BZ2_bzWrite (#21949) 2021-08-18 12:08:07 +02:00
Dean Lee fefc70b4ca
hw.h: move Hardware-related paths to namespace Path (#21826)
* refactor getenv and path

* apply review
2021-08-04 13:29:03 +02:00
Adeeb Shihadeh 4a1aec27ef
segment regen (#21148)
* start seg regen

* send vipc

* fix up some paths

* set fp

* fix no entries

* engages

* seperate camera procs

* send real frames

* regen test routes

* nice argparser

* fix valgrind test

* move that

* fix that
2021-06-28 21:44:40 -07:00
Dean Lee c53cb5d570
Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
Dean Lee 65e0b1e699
Cleanup util.h (#20849)
* cleanup util.h

* fix build error:omx_encoder.cc:408: undefined reference to do_exit

* fix build error

* rebase master

* move helper functions back to util

* ExitHandleHelper->ExitHandlerHelper

* std::clamp

* struct ExitHandlerHelper to class

* rebase master

* cleanup

* restore ExitHandler

* prefer cassert
2021-06-01 16:53:12 +02:00
Willem Melching 6e22f16ddb
loggerd: put signal in end of route sentinel (#21025) 2021-05-25 17:34:40 +02:00
Dean Lee 7222d0f20d
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>
2021-05-08 22:15:17 -07:00
Willem Melching ab319d4f54
Replace ifdef with hw abstraction layer (#20843)
* Replace ifdefs with hardware abstraction layer (#20801)

* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error

* Fixes after ifdef clenaup (#20842)

* inheritance doesnt work with static

* fix debayer

* small cleanup

* Update selfdrive/camerad/cameras/camera_common.cc

* Update selfdrive/ui/qt/offroad/settings.cc

* Update selfdrive/common/modeldata.h

* flip conditions

* fix comment

Co-authored-by: Dean Lee <deanlee3@gmail.com>
2021-05-06 14:39:05 +02:00
Willem Melching 3a95d3ccaa Revert "Replace ifdefs with hardware abstraction layer (#20801)"
This reverts commit 757d2923d2.
2021-05-06 12:29:30 +02:00
Dean Lee 757d2923d2
Replace ifdefs with hardware abstraction layer (#20801)
* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error
2021-05-06 11:41:46 +02:00
Dean Lee 1588a6f0ac
Logger: added function logger_get_route_name (#19995)
* added function logger_get_route_name

* remove empty line
2021-02-02 12:09:27 +01:00
Dean Lee 678c149246
mv logger_build_boot to bootlog.cc (#19996) 2021-02-02 12:07:52 +01:00
Dean Lee ef6d1aeaaa
Logger: new class BZFile (#19959)
* add class BZFile

* inline

* cleanup includes

* stack bzfile

* log first error

* remove assert

* rename log_err to err_logged

* assert in destructor

* LOGE

* don't assert statement

* assert error of fclose
2021-02-01 21:00:42 -08:00
Dean Lee 79e05965c4
bootlog: fix dangling pointer problem in logger_build_boot (#19942)
* fix  dangling pointer problem

* logger_build_init_data() has same problem

* return kj::Array<capnp::byte>

* Revert "return kj::Array<capnp::byte>"

This reverts commit 4df4685bfc.

* Empty commit,trigger Build

* fix each segment in a route having a different initial logMonoTime
2021-01-28 13:34:07 +01:00
Willem Melching 87119aebe2
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
2021-01-27 13:36:40 -08:00
Dean Lee f973c56a36
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 18a587023d.

* add bootlog to .gitignore

* use s->has_qlog instead of true

* add blank lines & remove extern C
2021-01-19 12:16:12 -08:00
George Hotz da079d47d7 logcatd, loggerd, mapd, modeld, proclogd 2020-01-17 11:20:17 -08:00