Commit Graph

210 Commits

Author SHA1 Message Date
Adeeb Shihadeh 3776051148 bump version to 0.8.5
old-commit-hash: 0b39e0353c
2021-05-15 17:09:41 -07:00
Dean Lee badc577e1d read_files_in_dir: closedir before return (#20903)
old-commit-hash: c08ee575f8
2021-05-14 17:33:46 -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: 4742f55749
2021-05-12 11:15:54 +02:00
Adeeb Shihadeh 8002b848b6 offroad alert for unregistered devices (#20870)
* offroad alert for unregistered devices

* update tests

* add param

* fix stretch
old-commit-hash: b93ccc465d
2021-05-11 03:18:45 -07: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: 7222d0f20d
2021-05-08 22:15:17 -07:00
Willem Melching 78bf4f5867 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>
old-commit-hash: ab319d4f54
2021-05-06 14:39:05 +02:00
Willem Melching 39c18d4c5a Revert "Replace ifdefs with hardware abstraction layer (#20801)"
This reverts commit 9f2ad462f39f4c880f283b71bffbc9248a2b577d.

old-commit-hash: 3a95d3ccaa
2021-05-06 12:29:30 +02:00
Willem Melching f8608d2e7b Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit 59c31bac9a340f120ff40ed541ee377c31e7e85e.

old-commit-hash: d34647bbf7
2021-05-06 12:29:19 +02:00
Willem Melching 3cc799ecd8 Fixes after ifdef clenaup (#20842)
old-commit-hash: fd7c2b4adf
2021-05-06 11:58:35 +02:00
Dean Lee e0282ced49 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
old-commit-hash: 757d2923d2
2021-05-06 11:41:46 +02:00
Adeeb Shihadeh 88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c1
2021-05-04 11:32:40 -07:00
Dean Lee b12a444bdd Params: move keys from cython to cc (#20814)
* move keys from cython to cc

* consistency

* passes tests

* more consistency

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 27d3f820bf
2021-05-04 10:49:26 -07:00
Dean Lee 8e7f4788d5 params.cc clarify conditional compilation(#20699)
old-commit-hash: 737d002d80
2021-04-19 12:16:30 +02:00
Adeeb Shihadeh 829afdfb87 ate sets failbit on some platforms
old-commit-hash: d90136c1d0
2021-04-13 14:40:40 -07:00
Comma Device 6f27d70605 fix reading procfs files
old-commit-hash: 6f21993915
2021-04-13 13:56:08 -07:00
Dean Lee 7534abdd50 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
old-commit-hash: fe2f63849a
2021-04-13 11:43:43 -07:00
Dean Lee ba58b382e2 util.h: remove unused macro ALIGN (#20673)
old-commit-hash: eb4666b38f
2021-04-13 10:42:36 +02:00
Dean Lee 7d5a53ccbe Use std::size for element counts (#20654)
old-commit-hash: cf80675369
2021-04-12 12:22:22 +02:00
Willem Melching 85916f61e8 Params: new class FileLock (#20636)
* new class LockFile

* lock->try_lock

* rebase master

* close if fd_ >=0

* rename try_lock to lock

* keep tryring if flock() return EINTR

* throw exception on error

* keep trying if open() gets interrupted by a signal

* close fd_ before throw flock exception

* add macro HANDLE_EINTR

* HANDLE_EINTR for open & write

* add errno in exception

* add destructor

* don't throw exception,log err and return

* Revert "don't throw exception,log err and return"

This reverts commit 6e1ba4a1bd82de3d4d07db5238a82184fd2ec9b4.

* add lock file name in exception

* cleanup  exception text

* use lock_guard in function put

* anonymous namespace

* use do-while(0) instead of goto

* cleanup read_db_all

* cleanup FileLock

* remove fchmod 0666 for apks

* Revert "remove fchmod 0666 for apks"

This reverts commit b389c31762417c4465d73be2453efcf7bc693aee.

* log instead of runtime error

* keep libs

Co-authored-by: deanlee <deanlee3@gmail.com>
old-commit-hash: 74aa6e29c9
2021-04-09 16:35:44 +02:00
Adeeb Shihadeh 530b8eb26d tici: fix GL linking (#20626)
* fix GL linking on tici

* gles

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 015973474e
2021-04-08 11:59:33 -07:00
Willem Melching 00b19b6351 ecam toggle (#20597)
* use ecam in ui

* needs reboot

* use in modeld

* typo

* effective FL is longer in center

* normalize zoom by focal dist

* read param before init

* make 2x as wide

* review comments

* more explicit

* fix camera offset

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
old-commit-hash: 1fc7bcca43
2021-04-07 19:12:35 +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: ae094042ad
2021-04-07 15:36:37 +02:00
Dean Lee 773f308ce7 Params: ensure path and symlink in constructor (#20538)
* ensure path and symlink in constructor

* better comments

* global Params g_params

* const params_path

* Revert "global Params g_params"

This reverts commit 3439894334d69a8c8c19516b9865f9a71ab163da.

* Revert "const params_path"

This reverts commit d3de2fc22ce0f32ffdcdba5595db9c35b21b84a1.

* cleanup

* add todo

* concat string

* add comment

* more robust

* cleanup
old-commit-hash: ef501afe97
2021-03-31 11:04:34 +02:00
Adeeb Shihadeh 2c382a7c6d bump version to 0.8.4
old-commit-hash: 0adfc931b9
2021-03-30 13:16:45 -07:00
Greg Hogan a8e5cb1220 prevent corrupted log messages (#20530)
old-commit-hash: 0847cf6869
2021-03-30 11:29:26 -07:00
Dean Lee 405df8b165 Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
old-commit-hash: 98e55996f6
2021-03-30 12:54:59 +02:00
Dean Lee aa1474467e Added new util class FirstOrderFilter (#20303)
* new class FirstOrderFilter

* flick face icon

* revert ui_draw_vision_face

* new function reset()

* reset after update

* use filter to update brightness
old-commit-hash: 6db31b9a33
2021-03-30 12:09:06 +02:00
Adeeb Shihadeh 5fc14c8db3 Qt UI: power saving (#20456)
* c2 power saving

* clean that up

* that works

* add to hw

* set power

* release files

* add that

* include hw base

* pc joins the party

* util

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 49748d5dc1
2021-03-24 11:09:39 -07:00
Adeeb Shihadeh 2298d8f8f9 Qt UI: scale volume with speed (#20441)
* Qt UI: scale volume with speed

* for all hw

* way too loud for tici

* set volume

* volume

* swap
old-commit-hash: f1da1f9cb2
2021-03-22 19:51:44 -07:00
Dean Lee 1cef96b8a9 FrameBuffer: move the status,success variables closer to usage (#20308)
old-commit-hash: 4cce4385af
2021-03-11 15:02:35 +01:00
Willem Melching 4d6c98aa6b 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>
old-commit-hash: a94ba4fb8b
2021-03-08 19:17:46 -08:00
Dean Lee bca42582d9 modeldata.h: new function get_model_yuv_transform (#20257)
old-commit-hash: 80cc0eefc9
2021-03-08 10:10:13 +01:00
Dean Lee 5e19cdb0d3 move intrinsic_matrix into modeldata.h, removed duplicate definitions. (#20051)
* move intrinsic_matrix into modeldata.h

* def __cplusplus
old-commit-hash: ae72d34a42
2021-03-03 11:47:48 +01:00
Adeeb Shihadeh 38c70c5a13 bump version to 0.8.3
old-commit-hash: 2525a628a1
2021-02-27 21:14:14 -08:00
Willem Melching a98a06c1f8 loggerd: clean exit on SIGPWR (#20100)
* loggerd: clean exit on SIGPRW

* no SIGPWR on macos
old-commit-hash: d3dfb47d0e
2021-02-18 17:46:46 +01:00
Dean Lee 06ac698691 OMXEncoder: remove pthread_mutex_t lock from member variables (#19948)
* remove mutex

* rebase master
old-commit-hash: 9a9641a296
2021-01-30 19:11:03 -08:00
Dean Lee da9b0e8baa remove cqueue, use class SafeQueue (#19774)
* class SafeQueue

* cleanup includes

* space

* add timeout

use try_poll

* add function empty() & size()

* class SafeQueue

* add timeout

use try_poll

* add function empty() & size()

* rebase master

* rebase master

* for loop

* fix bug
old-commit-hash: e6783f4d9f
2021-01-28 15:12:45 +01:00
Dean Lee 7a086b3f3d convert framebuffer to class (#19800)
* class FrameBuffer

* fix build error

* remove bootlog
old-commit-hash: 6583206ed4
2021-01-28 14:47:05 +01:00
Willem Melching 62f9992129 fix valgrind complaints about swaglog
old-commit-hash: 4f995b35d5
2021-01-28 14:03:46 +01:00
Dean Lee 694b81e129 C++ swaglog (#19825)
* c++ swaglog

* dd

* continue
old-commit-hash: c283be24d3
2021-01-28 13:52:18 +01:00
Dean Lee 9abfacf182 util.h: re-indent function string_format and use const std::string & for read_file (#19931)
old-commit-hash: 316f475544
2021-01-27 12:10:03 +01:00
Dean Lee 6af18c1c7c util.h: use const reference for std::string parameter (#19885)
old-commit-hash: c688461e11
2021-01-23 13:47:09 -08:00
Adeeb Shihadeh 43d680c9c5 add device type to clouglog ctx (#19890)
* add device type to clouglog ctx

* remove is_eon

* str
old-commit-hash: c9679222ae
2021-01-22 20:02:48 -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: f973c56a36
2021-01-19 12:16:12 -08:00
Dean Lee 5f6337f949 clutil.h: remove extern C (#19809)
old-commit-hash: 3381cd371c
2021-01-18 15:04:37 +01:00
Dean Lee 0e1c994980 swaglog: use std::mutex & remove extern C (#19817)
old-commit-hash: 53b9d35fda
2021-01-18 13:35:11 +01:00
Dean Lee e59584fe7c gpio.h: remove extern "C" (#19799)
old-commit-hash: 210b52e622
2021-01-17 15:51:05 -08:00
Dean Lee c3043515d8 text.c->text.cc (#19734)
old-commit-hash: c5c9b6f712
2021-01-15 13:42:26 -08:00
HaraldSchafer c6d9b9565a Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 158210cde8
2021-01-14 18:43:50 -08:00
Dean Lee 74dc639515 convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
old-commit-hash: cef469cbed
2021-01-12 15:43:34 +01:00