Commit Graph

210 Commits

Author SHA1 Message Date
Adeeb Shihadeh 3776051148 bump version to 0.8.5
old-commit-hash: 0b39e0353c3a3076f80ff91e7773bd4e26b3baca
2021-05-15 17:09:41 -07:00
Dean Lee badc577e1d read_files_in_dir: closedir before return (#20903)
old-commit-hash: c08ee575f82b1040d99e90e44449bbb83307d8a5
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: 4742f55749e59f565192589b318841f2133260ed
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: b93ccc465dbc8b847b65f7d062182465344dac4d
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: 7222d0f20dc8edfe0d2f3417d1ce7c84fbd32805
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: ab319d4f54a53e1a0aa1c2c0d94d56a9acef8362
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: 3a95d3ccaae7168073410cd7d392a9564d9d45ba
2021-05-06 12:29:30 +02:00
Willem Melching f8608d2e7b Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit 59c31bac9a340f120ff40ed541ee377c31e7e85e.

old-commit-hash: d34647bbf7f877f56bacaab04a2a0dc8a332fc6a
2021-05-06 12:29:19 +02:00
Willem Melching 3cc799ecd8 Fixes after ifdef clenaup (#20842)
old-commit-hash: fd7c2b4adf3844e8fc15b6b371cedf33438bbc22
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: 757d2923d2bfcda620b252e21a348ac3f87f3a63
2021-05-06 11:41:46 +02:00
Adeeb Shihadeh 88434dc9e4 add CLEAR_ON_IGNITION param type (#20810)
old-commit-hash: b4447993c10b36628cb72b58dba8104c9060bb7f
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: 27d3f820bf4d34bbc799cfc7ce5f9e006f0fe774
2021-05-04 10:49:26 -07:00
Dean Lee 8e7f4788d5 params.cc clarify conditional compilation(#20699)
old-commit-hash: 737d002d801230e60a2bdd31476bb77a014f13f5
2021-04-19 12:16:30 +02:00
Adeeb Shihadeh 829afdfb87 ate sets failbit on some platforms
old-commit-hash: d90136c1d055369024b1223b0ead520f5aad5913
2021-04-13 14:40:40 -07:00
Comma Device 6f27d70605 fix reading procfs files
old-commit-hash: 6f21993915dd64ac145ec8a17686b62d909fc8f1
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: fe2f63849ae467fee70c72d18fa52a184c056331
2021-04-13 11:43:43 -07:00
Dean Lee ba58b382e2 util.h: remove unused macro ALIGN (#20673)
old-commit-hash: eb4666b38fd390d8d83152b90c2f52bfbb465bc0
2021-04-13 10:42:36 +02:00
Dean Lee 7d5a53ccbe Use std::size for element counts (#20654)
old-commit-hash: cf8067536928aca45aea850698e085d3170be7a6
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: 74aa6e29c992900db6956535a87259e77d9c51a1
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: 015973474e0ff72f9704d979966e2d59e69ede30
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: 1fc7bcca43e9ef75d95ae8689e3b1cd8c4f8041e
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: ae094042ade44815fdba50196c15ba552bbf33d7
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: ef501afe9718e9f7bda1d4f9d3e8202e466c1dfc
2021-03-31 11:04:34 +02:00
Adeeb Shihadeh 2c382a7c6d bump version to 0.8.4
old-commit-hash: 0adfc931b9d8280af8fe195c6825143dfc96d5d0
2021-03-30 13:16:45 -07:00
Greg Hogan a8e5cb1220 prevent corrupted log messages (#20530)
old-commit-hash: 0847cf686931eb3992791e7db5239e6bfe697c1c
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: 98e55996f67aaaf715c941d417ae4d3b0187f388
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: 6db31b9a33e6caab06645be898957e2414a6dedc
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: 49748d5dc109322f73b2abcbe6d5efa60a394750
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: f1da1f9cb2731f5dc762e7780d79146e2a8f8e20
2021-03-22 19:51:44 -07:00
Dean Lee 1cef96b8a9 FrameBuffer: move the status,success variables closer to usage (#20308)
old-commit-hash: 4cce4385afa5c4526fb56d7159fc9e1b0cec568b
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: a94ba4fb8b704a5462352af4501290f63c987754
2021-03-08 19:17:46 -08:00
Dean Lee bca42582d9 modeldata.h: new function get_model_yuv_transform (#20257)
old-commit-hash: 80cc0eefc9f132590e3baad595fdd3c01e85c406
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: ae72d34a42f23e9b295641e1b0f50515434d6d1f
2021-03-03 11:47:48 +01:00
Adeeb Shihadeh 38c70c5a13 bump version to 0.8.3
old-commit-hash: 2525a628a155efc93a7ca703ab6e3112d9070a96
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: d3dfb47d0e8fef18171a393005da76c98e941419
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: 9a9641a296dcc0887d902412214510f0ff912fa2
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: e6783f4d9f10a256a4c301eb1d1843d9e2a17ab6
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: 6583206ed41c9277bb7509bcb66b7d5e058ea5fe
2021-01-28 14:47:05 +01:00
Willem Melching 62f9992129 fix valgrind complaints about swaglog
old-commit-hash: 4f995b35d5d84508fda0a3d203dd8d3d35f8d2b2
2021-01-28 14:03:46 +01:00
Dean Lee 694b81e129 C++ swaglog (#19825)
* c++ swaglog

* dd

* continue
old-commit-hash: c283be24d38d688eb9a0009d79d33262ee542822
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: 316f475544f4c28808933b593616da1080429e6d
2021-01-27 12:10:03 +01:00
Dean Lee 6af18c1c7c util.h: use const reference for std::string parameter (#19885)
old-commit-hash: c688461e11f085427b2ebfd7227f2837ceb4f17c
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: c9679222aebfcbf0dcce7ac00d2e03d19101a81f
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: f973c56a3695525442ac6c3e89c644b27cbeb384
2021-01-19 12:16:12 -08:00
Dean Lee 5f6337f949 clutil.h: remove extern C (#19809)
old-commit-hash: 3381cd371c03393df5d01bc5a10b24105711ad89
2021-01-18 15:04:37 +01:00
Dean Lee 0e1c994980 swaglog: use std::mutex & remove extern C (#19817)
old-commit-hash: 53b9d35fdab96888ac76e902304ce86dbedea736
2021-01-18 13:35:11 +01:00
Dean Lee e59584fe7c gpio.h: remove extern "C" (#19799)
old-commit-hash: 210b52e622e5d326dbbf02b3706955cb8b71c4c6
2021-01-17 15:51:05 -08:00
Dean Lee c3043515d8 text.c->text.cc (#19734)
old-commit-hash: c5c9b6f7123e573f6c3171c5d5843fcfc8af5dcd
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: 158210cde8e689daa04bcaa1e502727cf7bfddb6
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: cef469cbed1d835e70e952d06e1fd8b4eabca450
2021-01-12 15:43:34 +01:00