Commit Graph

27 Commits (87950eb3127e175f0f2b0bb42440f5350c679369)

Author SHA1 Message Date
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 37826c0032
should not break if poll timeout (#19578) 2021-01-04 10:17:52 +01:00
Dean Lee 9890f958d9
cameras: use common transform (#19552) 2020-12-20 17:21:46 -08:00
Adeeb Shihadeh c57ee16e86
Set GPU priorities + improved modeld priorities (#2691)
* give gpu threads rt priority

* modeld gets highest prio on core 2

* fix frame stream

* lower prio of cal thread

Co-authored-by: Comma Device <device@comma.ai>
2020-12-15 19:22:03 -08:00
Dean Lee d31a87cd21
qcom: make camera_process_frame more readable (#2765)
* more readable

* rgb_addr

* offset

* speed up if statement

* --self_recover

* rgb_addr_offset

* x_offset&y_offset

* static rgb_roi_buf & conv_result

* remove variables from struct

* simplify read sensorEvents

* use i for loop

* split to functions

* make it works

* y_offset should be ROI_Y_MAX-ROY_Y_MIN+1

* std::size is better than ARRAYSIZE

* rebase master

* shorter variable name

* Revert "shorter variable name"

This reverts commit 47612e3a74.

* std::fill_n

* reday for merge

* Revert "y_offset should be ROI_Y_MAX-ROY_Y_MIN+0"

This reverts commit 1f8526fb1c.
2020-12-15 16:39:38 -08:00
Dean Lee c1f3c3b2df
camera_qcom: read SensorEvents in op thread (#2764)
* get acceleration in op thread

* std::atomic last_sag_acc_z

* cleanup
2020-12-14 16:54:49 -08:00
Dean Lee 554ea8f54a
refactor imgproc/utils (#2766)
* refactor imgproc/utils

* const

* space

* return value
2020-12-14 15:33:40 -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
Dean Lee bd4f6650fa
simplify building capnp messages with arrays (#2617) 2020-11-30 12:08:52 +01: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 c630cd44da
send frame in packet on demand (#2567)
* focus lens helper2

* fix

* yes screen

* s

* new/del

* once

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
2020-11-18 13:39:50 -08:00
ZwX1616 4954db0381
use different SubMasters for driverState/sensorEvents (#2522)
* use different sms

* rename
2020-11-11 13:53:11 -08:00
George Hotz 4d5efb5789
Focus Actuator Comments (#2478)
* comments from DW9800W datasheet

* more comments
2020-11-03 07:45:16 -08:00
ZwX1616 b5617c17c8
just use the same (#2419) 2020-10-28 17:43:16 -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
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
ZwX1616 84e83e88a3
Fix dcamera inaccurate fps on OP3T and LP3 (#2305)
* fix op3t pclk

* fix leeco fps
2020-10-09 11:26:32 -07: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
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
Dean Lee f3fb406eee
camerad: protect concurrent access to shared variables and avoid race conditions (#1966)
* Protect concurrent access for shared resources

* fix
2020-08-11 11:40:11 -07:00
Dean Lee 55ece6991e
camerad: close ops_sock in camera_close (#1998) 2020-08-08 15:55:09 -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
ZwX1616 1036c68251
Reduce C2 dcamera noise at night (#1798) 2020-06-30 19:58:40 -07:00
ZwX1616 55aee68ca0
camerad: don't crash zmq if get interrupt from msgq (#1790)
* not crash zmq if get interrupt from msgq

* also filter eagain
2020-06-26 18:11:36 -07:00
ZwX1616 3aa99a01d7
recover EON/C2 AF (#1665) 2020-06-23 14:33:32 -07:00
Dean Lee b6d6f52032
camerad: move c-capnp to c++ (#1472)
* convert c-capnp to c++

change paramater type

* remove c-capnp header from commonmodel.c

* unsigned short -> uint16_t

* MSM_CAMERA_I2C_ADDR_TYPE_MAX->4
2020-05-07 20:14:30 -07:00