Commit Graph

181 Commits

Author SHA1 Message Date
Adeeb Shihadeh
9a45a3b99b Move selfdrive/hardware/ to system/ (#24725)
* move hardware to system/

* fix mypy
old-commit-hash: 1139fe507b
2022-06-11 16:38:24 -07:00
ZwX1616
c73d4e5fc6 Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit ce7daabc8847d18ba46e5d1879f5a6958d04ccc7.

* Revert "fullframe DM model (#24762)"

This reverts commit 817be81fb19004f4873881f6b29dcdfffbe7e3a8.

* revert cereal
old-commit-hash: c646eeee0a
2022-06-10 16:16:46 -07:00
ZwX1616
02f0f39b52 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: d6c07a6b15
2022-06-08 20:13:46 -07:00
Adeeb Shihadeh
f21897ee14 AGNOS 5.1 (#24741)
old-commit-hash: bee5531816
2022-06-03 19:38:34 -07:00
Adeeb Shihadeh
081fd73d45 fix camera power draw test (#24739)
* fix camera power draw test

* update modeld

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0ee647df3a
2022-06-03 14:03:49 -07:00
Adeeb Shihadeh
127f5858ae AGNOS 5 (#24692)
* AGNOS 5

* some more stuff
old-commit-hash: 38cd340922
2022-06-02 17:09:09 -07:00
Willem Melching
753045c73d less TICI when not needed (#24698)
* less TICI when not needed

* fix process replay

* move reading voltages into hw abstraction layer

* Update selfdrive/hardware/tici/hardware.h

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

* Update selfdrive/hardware/hw.h

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

* Update selfdrive/hardware/base.h

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

* rename init function

* Update selfdrive/athena/athenad.py

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

* Update selfdrive/boardd/boardd.cc

* Apply suggestions from code review

* Update selfdrive/thermald/thermald.py

* update ref

* fix alert width if all cameras are bad

* add ecam to test_loggerd

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
old-commit-hash: f49a9c9fd2
2022-06-02 15:20:51 +02:00
George Hotz
2a6ffaf71d nv12: encoderd avoids a full frame copy (#24519)
* rgb to nv12

* nv12 works (w memcpy)

* correct now

* no copy

* fix nv12 with fast debayer

* reverts of unused stuff

* ui use nv12

* comment out thumbnails for now

* rebase fix

* dm read nv12

* model read nv12

* fix ffmpeg encoder

* thumbnails from nv12

* replay to nv12

* python framereader support nv12

* remove hardcoded frame/buffer sizes

* fix build

* ffmpeg encoder fix buffers

* small cleanup

* reduce power usage test

* fix cpu usage test

* fix snapshot

* fix loggerd test

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: ea5b8cdfb1
2022-06-01 17:18:28 +02:00
Adeeb Shihadeh
b9453b2280 tici: always configure modem as data-centric (#24663)
According to the Quectel docs, this is how it should be configured
for both AT&T and T-Mobile (and likely any other carriers).
old-commit-hash: 5f00c6eca7
2022-05-26 17:13:43 -07:00
Comma Device
4f34fdf649 update modem restart script
old-commit-hash: 13b2c551c9
2022-05-25 16:37:56 -07:00
George Hotz
3ece7be044 camerad: pixclk 88mhz but frame time the same (#24587)
* pixclk 88mhz but frame time the same

* scale integration time

* 22.8 ms

* 15.18 ms

* fix exposure

* fix glitching, 18.9 ms

* set both to min

* faster pixclk = more power

* should pass CI

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 7c74ab8992
2022-05-24 09:54:46 -07:00
Adeeb Shihadeh
18a2f8dfed affine aux panda IRQ to boardd core (#24600)
old-commit-hash: 4ef94a436f
2022-05-20 10:16:56 -07:00
Adeeb Shihadeh
f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb
2022-05-18 14:11:57 -07:00
George Hotz
3ee5b1bf07 make debayer faster (#24557)
* remove local caching

* remove local caching

* reduce camerad power

* break stupid imx390 black level support

* handle edges

* now 13ms, vignetting is 'slightly' less correct

* halfs->floats and inlines, down to 12.9ms

* oops, fix float

* val from 12 is ushort

* don't decide vignetting in the debayer kernel

* 7.77 ms

* adding back black level support was free

* Revert "adding back black level support was free"

This reverts commit a841d17727886807a040dcf856ab22480fa93eff.

* minor

* rip out unused gain and black level, remove print

* save 150mW

* fix replay test

* fix top/bottom rows

* lame left right edge fix

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com>
old-commit-hash: 72b52f8b7d
2022-05-17 10:18:36 -07:00
Adeeb Shihadeh
5659b6e6ce more comma two cleanup (#24300)
* more comma two cleanup

* fix up power monitoring
old-commit-hash: 6a48a7acef
2022-05-15 17:55:22 -07:00
George Hotz
a053d070be encoderd: enable (#24492)
* enable encoderd

* correct enable line

* fix loggerd tests

* fix power draw and cpu tests

* correct cpu for encoderd

* fix a bug, video_writer is shared

* fix issue with not recording dcam

* add recording state

* wooo tests pass. encode id keeps counting

* core 3

* loggerd then encoderd

* stop loggerd first

* core 3 always online

* see the camera when we see encoder packet

* encoderd on small core uses 37%

* remove encoder logic from loggerd

* delete unit test that doesn't really make sense anymore

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 94b9972eb7
2022-05-13 17:56:02 -07:00
Joost Wooning
da6d0d878a camerad: combine debayering and rgb_to_yuv opencl kernels (#24452)
* camerad: combine debayering and rgb_to_yuv opencl kernels

* fix border

* fix snapshot

* rename function

* update camerad cpu usage

* update camerad power draw

* vignetting equal to previously

* test other local worksize

* use less floats

* reduce amount of code

* move barrier back

* make faster

* fix corners

* cleanup

* cleanup

* allow more jitter on driverState timing

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 489fbb74b0
2022-05-13 16:49:31 +02:00
Dylan Herman
2dfba97175 add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: d2eef1955c
2022-05-12 14:59:00 +02:00
Comma Device
b7a7843b8f faster modem restart
old-commit-hash: 5ac22d80de
2022-05-09 14:06:55 -07:00
Adeeb Shihadeh
7d12c9261a tici modem restart script
old-commit-hash: ce0cc1f228
2022-05-08 19:18:07 -07:00
George Hotz
7ebca5b349 no encoder throttle (#24457)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ed3be29bfa
2022-05-06 16:31:21 -07:00
Adeeb Shihadeh
d2e7af9fe5 power draw test improvements (#24368)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c971061859
2022-04-29 10:56:39 -07:00
Dylan Herman
a8910d9d43 Add --warn-redundant-casts to mypy checks (#24304)
* add mypy checks for redundant-casts and unused-ignores

* revert unnecessary changes

* ignore

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ee0021b86c
2022-04-27 12:07:53 -07:00
Adeeb Shihadeh
1056784a95 pandad: better handling of internal panda failures (#23755)
* reset internal panda

* recover

* internal dfu

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 59134c05d6
2022-04-26 11:02:40 -07:00
Adeeb Shihadeh
4fa266c035 tici downclock (#24088)
* tici downclock

* fix that

* gp ref

* lower that a bit

* that was a scam

* perf

* update power

* increase that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b88fb037ab
2022-04-22 14:14:59 -07:00
Adeeb Shihadeh
16c40a5f7c CI: power draw test (#24292)
* CI: power draw test

* initialize hardware

* try this

* fix that

* happy linter

* actually happy

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 37dbc7be0c
2022-04-21 23:13:20 -07:00
grekiki
cc943ac9a5 mypy: enable --warn-unreachable (#24282)
* Optional solves mypy assuming None is always None

* oops

* spaces

* Update registration.py

* fix local error

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b8b15d5cf1
2022-04-21 18:27:45 +02:00
George Hotz
6c70cfa0ce precise power measurement script
old-commit-hash: 3b2421baa0
2022-04-20 12:15:11 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
George Hotz
6d99a37d6f Power draw test (#24196)
* power draw test

* power draw measure

* fix cam power draw

* no star import

* fix static

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 9318e02a52
2022-04-12 15:33:27 -07:00
Adeeb Shihadeh
ad8e58c250 comma three: correctly set initial EPS bearer settings for AT&T sim cards (#24175)
* 3g sunset

* only for blue prime

* pass

* full att code

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c1388636a2
2022-04-11 15:33:58 -07:00
Adeeb Shihadeh
9ce9e38cf7 tici IRQ tuning (#24170)
* first pass

* move that back

* move that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: cf6c0ef19a
2022-04-11 10:49:27 -07:00
Willem Melching
9cd2f5a7a3 Log modem version and some NV values (#24137)
* add back modem version number logging

* tici only

* log nv

* make event

* str cast
old-commit-hash: be35caca61
2022-04-05 14:29:07 -07:00
Robbe Derks
f6ebc8993b Add power usage stat (#24055)
old-commit-hash: 68f86d815e
2022-03-29 11:30:13 +02:00
Adeeb Shihadeh
c00256ca1d bunch of gpu config (#23932)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: aeb98b3937
2022-03-25 13:46:36 -07:00
Adeeb Shihadeh
bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66d
2022-03-24 23:23:29 -07:00
Comma Device
460dd3cc9d cleanup tici_init in launch script
old-commit-hash: 03ac5bb4e3
2022-03-21 16:45:24 -07:00
George Hotz
2621c00ec1 thermald: use named thermal zones (#23936)
* thermald: use named thermal zones

* remove print

* and for c2

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 814741dafe
2022-03-14 14:45:50 -07:00
Willem Melching
2eded18267 C3: detect metered Android hotspot (#23734)
* C3: detect metered networks

* show in ui

* fix text layout

* bump cereal

* revert ui changes

* set networkMetered

* add athena method

* add metered logging to uploader

* use in athena uploader

* remove param

* use networkmanager properties to set cell to unmetered

* fix indentation

* no need to check

* bump cereal

* review

* bump cereal
old-commit-hash: da5a0c41a0
2022-03-09 11:36:52 +01:00
Adeeb Shihadeh
ccb2d2a6c4 AGNOS 4 (#23724)
old-commit-hash: a1b795cd78
2022-02-08 19:48:14 -08:00
Willem Melching
db3eef978f athena: add suport for download bandwith setting (#23727)
* athena: add suport for download bandwith setting

* clean ingress rules
old-commit-hash: 0d099e07aa
2022-02-08 12:07:11 +01:00
Adeeb Shihadeh
8343e21ea7 reduce shutdownd CPU usage (#23723)
* reduce shutdownd CPU usage

* sync

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4c766934be
2022-02-07 18:50:54 -08:00
Willem Melching
fb18d7b789 Add setUploadLimit method to athena (#23693)
* Add setUploadLimit method to athena

* add comments

* move to hw abstraction layer

* move to hw

* better errors
old-commit-hash: 4c406cdbe5
2022-02-07 16:55:16 +01:00
Adeeb Shihadeh
b4aa271d0b remove debug prints
old-commit-hash: 2372f4d6db
2022-02-04 23:32:39 -08:00
Adeeb Shihadeh
949ff0b921 NEOS 19.1 (#23707)
* NEOS 19.1

* add logging

* new manifest

* prod bucket

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 62e0bd5f0d
2022-02-04 22:54:12 -08:00
Adeeb Shihadeh
3aaf423dde NEOS 19 (#23586)
* NEOS 19

* prod manifest
old-commit-hash: 6a9514570c
2022-01-21 00:12:33 -08:00
Adeeb Shihadeh
686a34fd32 androidd: track system_server too
old-commit-hash: a4f4d4c2cd
2022-01-20 14:37:15 -08:00
Adeeb Shihadeh
5a5ef1bf74 androidd cloudlogs are errors
old-commit-hash: fc8d402713
2022-01-19 23:48:02 -08:00
Dean Lee
75a22388c7 loggerd: make test_loggerd.py run on PC (#23574)
* run on PC

* set frameId

* remove todo

* rawlogger: remove suffix mkv

* remove unused import PC

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 22d43211d9
2022-01-19 13:55:02 -08:00
Adeeb Shihadeh
2f87bde2ff Log android system shutdown to param (#23520)
* Log android system shutdown to param

* comment

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 610b99fd68
2022-01-13 22:40:35 -08:00