Commit Graph

289 Commits (master)

Author SHA1 Message Date
Adeeb Shihadeh b4447993c1
add CLEAR_ON_IGNITION param type (#20810) 2021-05-04 11:32:40 -07:00
Dean Lee 27d3f820bf
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>
2021-05-04 10:49:26 -07:00
Dean Lee 737d002d80
params.cc clarify conditional compilation(#20699) 2021-04-19 12:16:30 +02:00
Adeeb Shihadeh d90136c1d0 ate sets failbit on some platforms 2021-04-13 14:40:40 -07:00
Comma Device 6f21993915 fix reading procfs files 2021-04-13 13:56:08 -07:00
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
2021-04-13 11:43:43 -07:00
Dean Lee eb4666b38f
util.h: remove unused macro ALIGN (#20673) 2021-04-13 10:42:36 +02:00
Dean Lee cf80675369
Use std::size for element counts (#20654) 2021-04-12 12:22:22 +02:00
Willem Melching 74aa6e29c9
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>
2021-04-09 16:35:44 +02:00
Adeeb Shihadeh 015973474e
tici: fix GL linking (#20626)
* fix GL linking on tici

* gles

Co-authored-by: Comma Device <device@comma.ai>
2021-04-08 11:59:33 -07:00
Willem Melching 1fc7bcca43
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>
2021-04-07 19:12:35 +02:00
Willem Melching ae094042ad
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
2021-04-07 15:36:37 +02:00
Dean Lee ef501afe97
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
2021-03-31 11:04:34 +02:00
Adeeb Shihadeh 0adfc931b9 bump version to 0.8.4 2021-03-30 13:16:45 -07:00
Greg Hogan 0847cf6869
prevent corrupted log messages (#20530) 2021-03-30 11:29:26 -07:00
Dean Lee 98e55996f6
Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
2021-03-30 12:54:59 +02:00
Dean Lee 6db31b9a33
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
2021-03-30 12:09:06 +02:00
Adeeb Shihadeh 49748d5dc1
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>
2021-03-24 11:09:39 -07:00
Adeeb Shihadeh f1da1f9cb2
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
2021-03-22 19:51:44 -07:00
Dean Lee 4cce4385af
FrameBuffer: move the status,success variables closer to usage (#20308) 2021-03-11 15:02:35 +01:00
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>
2021-03-08 19:17:46 -08:00
Dean Lee 80cc0eefc9
modeldata.h: new function get_model_yuv_transform (#20257) 2021-03-08 10:10:13 +01:00
Dean Lee ae72d34a42
move intrinsic_matrix into modeldata.h, removed duplicate definitions. (#20051)
* move intrinsic_matrix into modeldata.h

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

* no SIGPWR on macos
2021-02-18 17:46:46 +01:00
Dean Lee 9a9641a296
OMXEncoder: remove pthread_mutex_t lock from member variables (#19948)
* remove mutex

* rebase master
2021-01-30 19:11:03 -08:00
Dean Lee e6783f4d9f
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
2021-01-28 15:12:45 +01:00
Dean Lee 6583206ed4
convert framebuffer to class (#19800)
* class FrameBuffer

* fix build error

* remove bootlog
2021-01-28 14:47:05 +01:00
Willem Melching 4f995b35d5 fix valgrind complaints about swaglog 2021-01-28 14:03:46 +01:00
Dean Lee c283be24d3
C++ swaglog (#19825)
* c++ swaglog

* dd

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

* remove is_eon

* str
2021-01-22 20:02:48 -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
Dean Lee 3381cd371c
clutil.h: remove extern C (#19809) 2021-01-18 15:04:37 +01:00
Dean Lee 53b9d35fda
swaglog: use std::mutex & remove extern C (#19817) 2021-01-18 13:35:11 +01:00
Dean Lee 210b52e622
gpio.h: remove extern "C" (#19799) 2021-01-17 15:51:05 -08:00
Dean Lee c5c9b6f712
text.c->text.cc (#19734) 2021-01-15 13:42:26 -08:00
HaraldSchafer 158210cde8
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>
2021-01-14 18:43:50 -08:00
Dean Lee cef469cbed
convert glutil.c to gltuil.cc & add class GLShader (#19720)
* c++ glutil

* function getUniformLocation

* rebase master
2021-01-12 15:43:34 +01:00
Dean Lee b3107e153c
Refactor image texture stuff into class (#19719)
* Refactor image texture stuff into class

* cleanup

* Update selfdrive/common/visionimg.cc

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-01-11 15:52:58 +01:00
Dean Lee 83bdd23a08
Fix build error after merge utilpp.h to util.h (#19714)
* fix std::atomic build error

* remove include util.h
2021-01-10 20:28:11 -08:00
Dean Lee 595830135b
merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
Willem Melching fb496c692a
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
2021-01-08 14:54:25 +01:00
Dean Lee 8c62b21df1
remove double semicolons (#19682) 2021-01-06 20:57:46 -08:00
Dean Lee 86fe2d1697
common exit handler (#19661)
* common signal handle

* fix typo

* rename to ExitHandler

* remove include signal.h

* remove include csignal

* rename variable exit to v

* rebase master
2021-01-05 20:19:53 -08:00
Adeeb Shihadeh 87950eb312
setup clang tidy (#19533)
* setup clang tidy

* config

* some cleanup

* little more

* remove that

* fix qcom build
2021-01-05 12:50:23 -08:00
Dean Lee c1cf0882bd
Replace usleep with util::sleep_for (#19643)
* replace usleep with sleep_for

* sleep microseconds

* sleep nanoseconds

* Trigger Build
2021-01-04 18:03:11 +01:00
Dean Lee a4afc03a73
UI: reducing CPU usage from 13% to 4% when offroad (#19575)
* Accurately control the UI frequency

* helper function sleep_for
2021-01-04 13:59:23 +01:00
Adeeb Shihadeh a4cec444eb bump version to 0.8.2 2020-12-18 12:23:59 -08:00
grekiki 5b26c97141
Qt Offroad stats (#19498)
* probably broke a lot, need the commit though

* finally works

* make it work...

* ...

* kind of works

* better styling

* all should work

* tiny cleanup

* temp

* looks nicer

* create JWT in C++

* kilometers -> km

* use correct free methods

* dont put code in assert statement

* Build JWT payload dynamically

* get dongle id once

* include cleanup

* Remove qDebug

* Update drive_stats.cc

Github is a nice editor :)

* swap week and all and fix sconscript

* install openssl

* openssl include dirs on mac

* is this where openssl is?

* It's here

* small cleanup

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-12-18 13:29:20 +01:00
Adeeb Shihadeh a96857f1aa
fix camerad not exiting cleanly (#2768)
Co-authored-by: Comma Device <device@comma.ai>
2020-12-12 13:55:24 -08:00
Dean Lee 3c08d0f1f7
clutil refactor (#2733)
* cleaup clutil.h

* clutil.c -> clutil.cc

* std::hash

* try simplify functions

* using namespace group help functions

* continue

* add function get_platform_info

* continue

* remove caching

* struct CLContext

* std::cout & CL_ERR_TO_STR

* remove CLU_NO_CACHE

* Revert "struct CLContext"

This reverts commit 882e413f22.

* cl_get_error_string : remove undefied error codes

* replace all printf with std::cout

* util::read_file

* cleanup

* revert CL_ERR_TO_STR

* simplify

* add macro CL_ERR_TO_STR

* cl_get_error_string: fix undeclared errors

* log_size should not +1

* use std::stirng log

* apply review
2020-12-11 13:05:32 +01:00
HaraldSchafer 630c7309a5
Test model refactor (#2720)
* template funcion fill_meta

* add function get_plan_max_idx

* add function get_mdn_max_idx

* remove temp builder variables

* get_mdn_max_idx->get_lead_data

* get_pan_max_idx->get_plan_data

* fill_lane_line

* combine fill_lane_line&fill_path into one function

* fill_lead_vw

* using unique_ptr

* prefer using constexpr

* more constexpr,remove duplicate defined TRAJECTORY_SIZE

* remove suffix _arr from variable name

* misc

* remove extern c

* refactor model_publish

* remove unused paramaters

* traffic_convention to c style array

* c style array:prev_desire&pulse_desire

* fix error&make easy for review

* const mat3 &transform

* move cl_command_queue into ModelState

* use maco LEAD_MHP_SELECTION

* move constexpr from .h to .cc

* remove #define MODEL_NAME

* modeldata.h: contexpr

* remove param temporal from model_init

* helper function get_best_data

* fix probs

* int

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-12-09 22:48:14 -08:00
grekiki 3e466aa528
UI style improvements with improved keyboard (#2710)
* fix spaces and make spacebar dynamically sized

* some spaces and a comment

* more spaces

* const

Co-authored-by: Comma Device <device@comma.ai>
2020-12-08 12:00:51 +01:00
Adeeb Shihadeh c80d9f132c bump version to 0.8.1 2020-11-30 09:30:57 -08:00
Dean Lee 42183d913f
Error checking macros for opencl (#2615)
* macro CL_CHECK&CL_CHECK_ERR

* trigger checks
2020-11-30 12:04:49 +01:00
ZwX1616 f244b7c7e1
tici front/wide encodeIdx msgs (#2564)
* different msgs

* also add timestamps

* keep impatient log, remove the other

* meaningless
2020-11-19 16:12:02 -08:00
robbederks c5c875bad9
Tici Focal (#2459)
* fix i2c

* fix libi2c (again?)

* qt 5.12.8

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-11-12 17:09:36 -08:00
Harald Schafer a991e8af9c a new dawn 2020-11-11 20:45:36 -08:00
HaraldSchafer 08846b5c0e
Torch model (#2452)
* refactor draw model

* rebase master

* correct valid_len

* rename function

* rename variables

* white space

* rebase to master

* e16c13ac-927d-455e-ae0a-81b482a2c787

* start rewriting

* save proress

* compiles!

* oops

* many fixes

* seems to work

* fix desires

* finally cleaned

* wrong std for ll

* dont pulse none

* compiles!

* ready to test

* WIP does not compile

* compiles

* various fixes

* does something!

* full 3d

* not needed

* draw up to 100m

* fix segfault

* wrong sign

* fix flicker

* add road edges

* finish v2 packet

* Added pytorch supercombo

* fix rebase

* no more keras

* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data

* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430

* fix hack

* Revert "fix hack"

This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.

* Removed axis permutation hack

* Folded padding layers into conv layers

* Removed the last pad layer from the dlc

* Revert "Removed the last pad layer from the dlc"

This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.

* Revert "Folded padding layers into conv layers"

This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.

* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780  temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430  with permute + pool opt

* fix ui drawing with clips

* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length

* std::clamp

* not sure how this compiled before

* 2895ace6-a296-47ac-86e6-17ea800a74e5/550

* db090195-8810-42de-ab38-bb835d775d87/601

* 5m is very little

* onnx runner

* add onnxruntime to pipfile

* run in real time without using the whole CPU

* bump cereal;

* add stds

* set road edge opacity based on stddev

* don't access the model packet in paint

* convert mat.h to a c++ header file (#2499)

* update tests

* safety first

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-11 20:31:46 -08:00
Willem Melching f2c8a6122d Revert "convert mat.h to a c++ header file (#2499)"
This reverts commit 519c043a63.
2020-11-09 01:41:36 -08:00
Dean Lee 1bd1c961ef
fsync_dir: remove goto (#2498) 2020-11-09 01:21:48 -08:00
Dean Lee 519c043a63
convert mat.h to a c++ header file (#2499) 2020-11-09 01:19:09 -08:00
Adeeb Shihadeh 6c86afee16
Qt spinner (#2494)
* move android spinner

* qt spinner

* rotation

* nothing by default

* spin spin

* fix rotate

* style

* spinner for all

* -2

* unused
2020-11-06 18:44:04 -08:00
Adeeb Shihadeh 818bd8a591 trim trailing whitespace 2020-11-05 14:11:41 -08:00
Adeeb Shihadeh f46ed718ba bump version to 0.7.11 2020-10-23 20:09:08 -07:00
Adeeb Shihadeh 94991d9319 remove unused params function 2020-10-22 17:05:52 -07:00
Willem Melching c0d92516cc
store params in ~/.comma on PC (#2369) 2020-10-20 13:18:21 +02:00
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>
2020-10-19 22:44:24 -07:00
Willem Melching d28f488ea5 fix typo in params path on PC 2020-10-19 14:25:45 +02:00
Comma Device e4d2174a4e need that one too 2020-10-17 17:44:10 -07:00
Adeeb Shihadeh 20a6ca83c9
fix params permissions for offroad (#2356)
* fix params permissions

* don't need that one
2020-10-17 17:07:40 -07:00
Willem Melching 339d1967cb
--std=c++17 (#2330)
* switch to c++17

* more 17

* 1z

* use std::clamp

* Fix types in clamp

* bump submodules

* bump laika

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-10-17 13:33:12 -07:00
Adeeb Shihadeh 96b637737b
fix build warnings (#2355)
* fix build warnings

* cython fixes

* cleanup transformations build

* little more
2020-10-17 12:40:01 -07:00
ZwX1616 6b020241c9
Clean up and test camerad refactor (#2310)
* refactor

add function get_camerabuf_by_type

remove cl_free

use camera_id

move front stuff into frontview_thread

bigger refactor

more

typo

rename camerabuf *c to *b

cleanup header files

remove wideview_thread

camera_qcom.c to c++

fix SConscript

camera_process_buf

space

sendrgb same with before

do autoexposure in processing_thread

correct sendrgb

add camera_common.cc

move yuv_transform to CameraBuf

* use C to keep consitent

* rebase master

* rebase master

* continue refactor

* refactor all camera related data&function out of main

 done

* cleanup

* -use buf.rgb_width&height

* remoe ,

* rebase master

* remove unused std::vector

* add func common_camera_process_front

* fix max

* fix sendrgb

* less crap being logged

* fix indents

* add back thumbnails

* thumbnail fixed on tici

* junk junk junk

* unify api

* fix ptr ref

* lol!

* cleanup

* more simplified

* typos

* remove terminate

* use standard polling

* ops_thread refactor, too much code!

* fix build

* ok

* assert

* listen

* incl more

* wq!

* fix more build

* macos

* fix exp targets

* front is different

* const

* bye

* remath

* remove irrelevant

* do ops in a thread

* fix init

* return null

* QCOM2 ops

* qcom2 build

* missing comma

Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-16 21:58:05 -07:00
Willem Melching 3dd9448981
Params path only in one place (#2344)
* fix params paths

* Qcom & qcom2

* This env variable is not used anywhere

* params path in only one place

* fix other PARAMS_PATH references

* absolute path is probably better
2020-10-15 13:15:22 +02:00
Adeeb Shihadeh 707a670f42
fix params on PC and when reading path from env (#2340)
* fix params when reading path from env

* fix pc
2020-10-14 13:45:24 -07:00
Adeeb Shihadeh 6f307ea4c5 fix params permissions after refactor 2020-10-13 19:14:51 -07:00
Willem Melching 2e182e5c57
Params refactor, simplified (#2300)
* always c++

* Create C++ params class

* get works

* tests hang now

* passes tests

* cleanup string formatting

* handle interrupt in blocking read

* fix memory leak

* remove unused constructor

* Use delete_db_value directly

* Rename put -> write_db_value

* filename cleanup

* no semicolons in cython

* Update common/SConscript

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

* add std::string version of delete_db_value

* This is handled

* cleanup encoding

* Add clear method to clear all

* add persistent params

* fix android build

* Should be called clear_all

* only import params when needed

* set params path on manager import

* recusrively create directories

* Fix function order

* cleanup mkdirp

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2020-10-13 16:23:23 +02:00
Adeeb Shihadeh 47a42ff432 bump version to 0.7.10 2020-10-03 14:51:47 -07:00
Dean Lee 9983389ffe
close lock_fd if flock failed (#2231) 2020-09-28 11:47:38 +02:00
Dean Lee 9f34d1ff66
camerad: close file descriptors (#2065)
* close file descriptors

* fix struct indent

* add some new lines
2020-09-24 13:39:27 -07:00
Dean Lee 4fba3408c4
Params: use a multiple-reader / single-writer flock to improve concurrency (#2207)
* improve concurrency: multiple readers, single writer locks

* remove lock in read_db_value
2020-09-24 11:51:36 +02:00
Dean Lee 6476207009
add function write_file() (#2181)
* add function write_file()

* handle EAGIN & EWOULDBLOCK

* don't  handle errno
2020-09-21 16:10:38 +02:00
Dean Lee 58e5223aba
touch.c:deleting useless function (#2208) 2020-09-21 11:43:54 +02:00
Adeeb Shihadeh 0ebc037be7
turn display on in spinner (#2148)
Co-authored-by: Comma Device <device@comma.ai>
2020-09-09 20:24:13 -07:00
Dean Lee f71467b450
release copy_q in visionbuf_free (#2121) 2020-09-02 21:11:25 -07:00
Willem Melching 5c058140ed
tici: fix set_realtime_priority (#2124)
* cleanup and pin modeld to core 5

* Unused import
2020-09-02 17:52:41 +02:00
Adeeb Shihadeh 349040d958
driver monitoring cleanup (#2101)
* read rhd from param

* don't need that anymore

* fix build

* bump cereal

* read param from camerad too

* add read_db_bool helper

* bump model replay ref commit, IsRHD wasn't set
2020-08-29 17:16:00 -07:00
robbederks 37d6472bfa
Tici camerad (#2048)
* fix camera config

* typos

* oops

* more typo

* lambless

* forget to send

* visualize hist

* more typo

* 0xC000

* simple

* data loss prevention, clean up later

* loggerd

* back up code

* backup

* fixed memory leak

* fix vsync

* upload ecam

* WB

* 3stream

* fix OMX crash on loggerd rotation

* rewritten debayer kernel

* update viewer

* improved AE

* no artifact lines/grids

* standard trigger

* cleanups

* CCM

* cleanups

* slight tweak

* upd push sock

* build all these

* update tele fl

* update cereal

* upd viewer

* DualCameraState -> MultiCameraState

* cameras_open

* disable frame zmq push by default

* more cleanup

* no apks

* fix submodule error

* wat

* clean up trash

* remove junk

* only build on qcom2

* no need to check these

* update cereal

* some more minor cleanup

* bump panda

* add todo

* minor typo

* Revert "minor typo"

This reverts commit 9233a1df7c.

* not care

* use consistent hdr

* some cleanup

* Update selfdrive/camerad/main.cc

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

* more cleanups

* remove irrelevant stuff

* this too

* cleanup

* rerun ci

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-26 19:59:56 -07:00
ZwX1616 3014280d1a
Fix OMX error on loggerd rotation when using multiple cameras (#1953)
* cherry pick from f8745d3002

* update cereal

* missed this line

* add enum

* Update selfdrive/loggerd/loggerd.cc

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

* Update selfdrive/loggerd/loggerd.cc

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

* use same logroot

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-08-26 15:02:51 -07:00
robbederks 622e42d504
Tici sensord (#2072)
* tici sensord: WIP

* add sensor constants

* rename files

* base class

* init sensors

* publish something

* dont leak memory

* try reading from accel

* Accel works

* add time and sensor source

* Update release files

* If we want low BW we want 125hz

* this should run gyro as well

* add filter on gyro

* also filter accel data

* Add i2c files

* cast makes macos unhappy

* Same outputs as android sensord

Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-08-26 11:30:30 +02:00
Dean Lee 71eedbce44
Remove unnecessary string copy (#2067) 2020-08-24 09:25:16 -07:00
Dean Lee 17dd07e751
visionstream: fix doube fd close (#2057)
* s->ipc_fd counld be closed twice

* white space
2020-08-24 14:07:27 +02:00
Dean Lee f8ab6bd009
ui: refactor model related functions (#2026)
* remove read_model

* remove structs for c-capnp

* remove duplicate #define from modeld

* add function fill_path_points

* fix Indentation

* use MODEL_PATH_DISTANCE instead of 192

* fix type

use validLen

* rename left_path_points&right_path_points to xxx_lane_points
2020-08-18 15:26:43 +02:00
Dean Lee 963c00db09
fd should be initialized as -1 (#2041) 2020-08-18 15:22:26 +02:00
Adeeb Shihadeh 86dc54b836 bump version to 0.7.9 2020-08-17 12:49:08 -07:00
Dean Lee d158837617
add function cl_get_device_id (#1948)
* add func cl_get_device_id

cleanup

* add fix from review
2020-08-17 11:24:39 +02:00
Willem Melching 502cc665e0
Pigeon abstraction layer (#1977)
* pigeon abstraction layer

* Fix string literals

* more generic pigeon class

* add TTYpigon

* nicer tty error handling

* close tty fd on pigeon delete

* pigeon receive return std::string

* use sizeof

* max receive size to prevent infinite loop

* remove namespace

* add unistd include for usleep

* fix is pigeon

* Handle tty error in opening

* fix printing binary strings with dump.py

* fix pigeon build on macos

* Handle errors seperately

Co-authored-by: Comma Device <device@comma.ai>
2020-08-13 10:10:50 +02:00
Dean Lee 681ff41261
remove selfdrive/common/visionstream.c (#1931) 2020-08-03 17:04:47 -07:00
Adeeb Shihadeh 2189fe8741 bump to 0.7.8 2020-07-20 11:47:26 -07:00
Adeeb Shihadeh eb1aa3d831
Wunused (#1841)
* enable Wunused, first pass

* unused stuff in snpe model

* these are used on phone

* handle sigint and sigterm in modeld

* fix phone build

* camera qcom

* QCOM build works

* delete unused camerad vars

Co-authored-by: Comma Device <device@comma.ai>
2020-07-09 09:25:32 -07:00
George Hotz b62da571b4
UI 10x speedup with hardware antialias (#1787)
* enable MSAA, disable nvg antialias

* less opaque and clean up

Co-authored-by: Comma Device <device@comma.ai>
2020-06-29 13:54:23 -07:00
George Hotz f1caed7299 0.8 is a lie 2020-06-24 16:02:03 -07:00
Dean Lee a64f0119e0
Fix resource leak in visionbuf_free (#1699)
* fix resource leak in visionbuf_free

* add mmap_len to VisionBuf
2020-06-22 11:29:18 -07:00
George Hotz 344a9a3699
Fixups for Mac, and a bunch for PC (#1654)
* fix mac nui

* fix cereal

* builds on mac without warnings

* ui swap shouldn't be instant on pc

* camerad builds on mac

* modeld, and now everything, builds on mac

* ui draws pictures on mac now

* fix camerad shutdown

* support ui looping on pc

* python3 on that

* SCNu64 should be cross platform

* bump cereal and new apk

* clean up

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-06-11 18:21:59 -07:00
Dean Lee b678449707
use malloc (#1674) 2020-06-11 18:06:47 -07:00
Willem Melching ceba6fc675 Set brightness takes an int 2020-06-10 12:42:00 -07:00
Willem Melching 431690be1e Move helper function definition to top of file 2020-06-10 11:41:45 -07:00
Dean Lee 8ad1135e80
add set_brightness in framebuffer.h (#1659) 2020-06-10 10:28:18 -07:00
Dean Lee 90d97de74d
add function read_db_bytes (#1662) 2020-06-09 13:46:49 -07:00
George Hotz 7770041f92
Getting PC openpilot working again (#1650)
* fixup keras_runner to work and be nicer

* truncate the lane lines based on the valid len
2020-06-05 17:40:56 -07:00
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>
2020-06-05 17:09:41 -04:00
Adeeb 7666d99694
Remove common/messaging.h (#1635)
* remove common/messaging.h

* release files
2020-06-05 12:46:49 -07:00
Adeeb Shihadeh 3463f1165e quick LGTM fixes 2020-06-05 11:29:09 -07:00
Willem Melching 63c8e8439b
Model + camerad test (#1622)
* kind of works

* move that

* hack to get camerad to reliably terminate

* not sure why SIGTERM wasn't working before

* compare bytes

* clean up some hacks

* gitignore

* fix that

* WIP

* no reboot

* comparison works

* pretty print

* fix build

* run in jenkins

* python path

* space

* raise timeout

* new eon

* skip the copy

* spinner

* spin less

* update model ref commit

* reenable that

* clean up

* fix jenkinsfile

* parallel

* wrap it in a stage

* fix linter

* better progress

* lower timeout

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-06-04 18:57:25 -07:00
George Hotz f19d25dd8d calloc an extra byte in read_file 2020-06-03 14:22:45 -07:00
Adeeb ab83e48ec4
Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07:00
Willem Melching 106cddb49a White panda no longer supported 2020-05-31 13:33:56 -07:00
Willem Melching ea74edf71b Bump version to 0.8.0 2020-05-31 13:31:44 -07:00
Willem Melching 69aacd9d17 bump version to 0.7.6 2020-05-13 16:13:38 -07:00
Dean Lee 3349b5b3be
use test_bit to determining if a device is a touchscreen (#1389) 2020-05-11 15:30:22 -07:00
robbederks 71bebc4fca
Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
2020-05-08 19:39:18 -07:00
Adeeb 46f3665279
Move swaglog to cpp + remove another lib (#1470) 2020-05-08 14:46:10 -07:00
George Hotz d5ca841b0f Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit b225016628.
2020-05-04 09:54:05 -07:00
George Hotz e568d3cadc
More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 20:00:41 -07:00
Dean Lee b225016628
Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
2020-05-01 19:21:00 -07:00
Dean Lee 35362965d6
cltuil.c:fix build warning (#1419) 2020-04-24 07:13:43 -07:00
Dean Lee 25ab2521ab
fixes the error with OpenCL depreciation warnings (#1394) 2020-04-19 14:04:33 -07:00
Dean Lee 2fc3247343
close file descriptor (#1353)
* close file descriptor

* check return value
2020-04-13 15:09:48 -07:00
George Hotz 8db0993663
tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 16:34:55 -07:00
Willem Melching 8abc0afe46 Bump version to 0.7.5 2020-03-30 12:33:25 -07:00
Andy Haden 538ca733c7 Remove legacy AccessToken param 2020-03-23 00:22:41 -07:00
Willem Melching e93649882c Bump version to 0.7.4 2020-02-20 16:24:48 -08:00
Willem Melching d7acd8b68f Bump version.h 2020-02-17 16:27:41 -08:00
George Hotz 811b3b7a9a
Fix ui on mac (#1044)
* remove line_shader dead code

* fix glfwCreateWindow

* don't assert on ipc socket failure

* window now appears on mac
2020-02-02 22:19:26 -08:00
George Hotz f72f78f2b9
Support scons build on Mac (#1034)
* fix clock and add Darwin sconstruct

* it builds, this changes should be simplifications too

* fix boardd build

* that's the real type of EGLClientBuffer

* remove extra lines

* ui needs opencl on phone
2020-02-01 23:36:50 -08:00
George Hotz 368a956b96 selfdrive/common 2020-01-17 11:01:02 -08:00