Adeeb Shihadeh
d96361970b
thermald: common min date ( #28457 )
...
* thermald: common min date
* add to release files
2 years ago
Kacper Rączy
b43a875ba2
params: specify path using PARAMS_ROOT ( #28257 )
...
* Add PARAMS_ROOT env var
* Change getenv type signature
* Use getenv default_val
2 years ago
Dean Lee
10a1b8b7b1
params: cleanup old params that aren't defined ( #28017 )
...
* delete files that are not defined in the keys
* assert after create file
* remove util::remove_files_in_dir
* cleanup
* fix up test
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2 years ago
Dean Lee
0d8254e959
common: add new class OpenPilotPrefix ( #26753 )
...
* new class OpenPilotPrefix
* move random_string to util
* rename file
* style
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2 years ago
Adeeb Shihadeh
8ba9a5107b
boardd: SPI support ( #26374 )
...
* spi handle
* put usb back
* handle eintr
Co-authored-by: Comma Device <device@comma.ai>
2 years ago
Dean Lee
8dbb25e683
params: remove all files if call clearAll with the ParamKeyType.ALL key. ( #26000 )
...
* remove all files in dir
* fix test case name
3 years ago
Adeeb Shihadeh
cb8885cffb
Merge common/ and selfdrive/common ( #24556 )
...
* Merge common/ and selfdrive/common
* fix that
* fix version
* fix unit tests
3 years ago
Dean Lee
9decd3d8a2
util: move all functions into util namespace ( #23203 )
3 years ago
Willem Melching
fa0cbe5d40
Put journal and nvme stats in bootlog ( #22849 )
...
* Run commands and put output in bootlog
* log nvme
* fix indent
* cereal without event
* use regular array
4 years ago
Dean Lee
ff33ca3413
util: remove function to_hex ( #22792 )
4 years ago
Dean Lee
8da3cd3cdd
util:: remove unused funtion base_name ( #22759 )
4 years ago
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>
4 years ago
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
4 years ago
Adeeb Shihadeh
84de248fa7
tici: affine loggerd to efficiency cores ( #22581 )
4 years ago
Dean Lee
83710b14ee
fix: util::read_files_in_dir does not always return a correct result ( #21883 )
...
* fix bug
* use de->d_type==DT_REG
* Revert "use de->d_type==DT_REG"
This reverts commit ecb38c8230
.
4 years ago
Dean Lee
f02c8d0e2c
Handle EINTR for all syscalls that can return it ( #21948 )
4 years ago
Dean Lee
3a7959b5ff
fix: util::file_exists will return false on no permissions ( #21880 )
...
* fix bug
* add test case
4 years ago
Dean Lee
fefc70b4ca
hw.h: move Hardware-related paths to namespace Path ( #21826 )
...
* refactor getenv and path
* apply review
4 years ago
Dean Lee
073b96e5d1
qt/util: new function getDongleId ( #21810 )
...
* new function getDongleId
* return std::optional
4 years ago
Dean Lee
11ffbc6936
util/read_files_in_dir: return map by value ( #21815 )
4 years ago
Willem Melching
86630effcf
bump date in time_valid check
4 years ago
Dean Lee
ac71384a28
util.cc: refactor read_file ( #21350 )
4 years ago
Adeeb Shihadeh
d90d9b2280
util::read_file: fix reading from sysfs and add test case ( #21325 )
...
* add sysfs test case
* Revert "util.cc: refactor read_file (#21321 )"
This reverts commit 8d5c61eefe
.
4 years ago
Dean Lee
8d5c61eefe
util.cc: refactor read_file ( #21321 )
...
* mode read & open once
* change return statement for better readibility
* apply reviews
* can't open with ate flag
4 years ago
Adeeb Shihadeh
7dec206437
Revert "util.cc: refactor read_file ( #21295 )"
...
This reverts commit 190a845505
.
4 years ago
Dean Lee
190a845505
util.cc: refactor read_file ( #21295 )
...
* mode read & open once
* change return statement for better readibility
* apply reviews
* Update selfdrive/common/util.cc
* fix
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
4 years ago
Dean Lee
a873a23e0d
common/util.cc: add unit test, fix bug in util::read_file ( #21251 )
...
* add test case for util
* fix bug in read_file
* gitignore test_util
* better test
* referer
* more
* more test
* REQUIRE size
* apply reviews
* only test binary
* simplify the test
* read non-permission
* debug print
* remove /etc/shadow
* test read directory
* Update selfdrive/common/tests/test_util.cc
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
4 years ago
Willem Melching
e85fa7f1c9
UI: check if dongle id is valid before calling API ( #21275 )
4 years ago
Dean Lee
e4e669bb0f
add space after function name and if statement ( #21225 )
4 years ago
Dean Lee
ee46672d3c
Passing arguments by reference ( #21205 )
4 years ago
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
4 years ago
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
4 years ago
Dean Lee
c08ee575f8
read_files_in_dir: closedir before return ( #20903 )
4 years ago
Willem Melching
4742f55749
store all files in /sys/fs/pstore in bootlog ( #20875 )
...
* store all files in /sys/fs/pstore in bootlog
* whitespace
* fix bootlog test
4 years ago
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>
4 years ago
Adeeb Shihadeh
d90136c1d0
ate sets failbit on some platforms
4 years ago
Comma Device
6f21993915
fix reading procfs files
4 years ago
Dean Lee
fe2f63849a
util.cc: reduce two read_file functions into one ( #20655 )
...
* no need to malloc one extra byte
* combine two read_file into a faster one
* cleanup #include
* use resize
* apply suggestions from review
* space
* rebase master
4 years ago
Willem Melching
a94ba4fb8b
Add watchdog check to manager ( #20277 )
...
* this should work but doesnt
* Only offroad
* works
* make it work offorad
* reduce diff
* cleanup
* need util
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
4 years ago
Dean Lee
595830135b
merge utilpp.h into util.h ( #19710 )
4 years ago
Dean Lee
0bbd080a04
fix build warning ( #2365 )
...
* fix build warning
* Update selfdrive/common/util.c
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
5 years ago
Adeeb Shihadeh
96b637737b
fix build warnings ( #2355 )
...
* fix build warnings
* cython fixes
* cleanup transformations build
* little more
5 years ago
Dean Lee
6476207009
add function write_file() ( #2181 )
...
* add function write_file()
* handle EAGIN & EWOULDBLOCK
* don't handle errno
5 years ago
Willem Melching
5c058140ed
tici: fix set_realtime_priority ( #2124 )
...
* cleanup and pin modeld to core 5
* Unused import
5 years ago
Dean Lee
b678449707
use malloc ( #1674 )
5 years ago
Jason Young
68531b071c
Reduce scheduler latency for realtime processes ( #1638 )
...
* WIP: reduce boardd and other lags
* Copypasta fault
* Silence spurious startup warning
Co-authored-by: Comma Device <device@comma.ai>
5 years ago
George Hotz
f19d25dd8d
calloc an extra byte in read_file
5 years ago
George Hotz
368a956b96
selfdrive/common
5 years ago