Commit Graph

169 Commits

Author SHA1 Message Date
Adeeb Shihadeh f4675fc260 Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
old-commit-hash: cb8885cffb313bea258c012c3026461a22bf8135
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: 72b52f8b7d74bf3ea6fe8bd4d59af1c44c83afdb
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: 6a48a7acef483907990e34e040deee70c689e700
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: 94b9972eb798408a3c412716b8d9eb8ddb9354bc
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: 489fbb74b0f532c738cf8c06afe1a5f9ce1e1651
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: d2eef1955c777ef6110c7a74d2a9ca9e4e1d958c
2022-05-12 14:59:00 +02:00
Comma Device b7a7843b8f faster modem restart
old-commit-hash: 5ac22d80de5c37e059768ad210bee91cc73e025c
2022-05-09 14:06:55 -07:00
Adeeb Shihadeh 7d12c9261a tici modem restart script
old-commit-hash: ce0cc1f228edc85e8a9153784dfb5475b8376fb3
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: ed3be29bfa975a4cbdb4abf85cda3726f64e3caf
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: c971061859e5f9ff571afb5b6ae7d8e9f2b0ef63
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: ee0021b86cc6ae6a9105d82798c34c5371992afb
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: 59134c05d65504edf03c2bf1199478927d683fb7
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: b88fb037aba5582a4c669fe972ddde17d0c4d9b6
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: 37dbc7be0c70adff2f002c1c77c277f7addddd81
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: b8b15d5cf1d2507c89bbe0e3b1de1ff043d9078e
2022-04-21 18:27:45 +02:00
George Hotz 6c70cfa0ce precise power measurement script
old-commit-hash: 3b2421baa04be3e2408e5177248a31689c244107
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: 5c48e7bc86a621dd35f4ff25da7a26ee506bac76
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: 9318e02a52a01655c3fe98e4437b1d54b36e4b92
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: c1388636a28b880e5c9b07bcaa8fbf867e23f02a
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: cf6c0ef19a20026c7cf3ac057e652b517ed82578
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: be35caca614c45f54d2e76f394b2fdecd841cb3f
2022-04-05 14:29:07 -07:00
Robbe Derks f6ebc8993b Add power usage stat (#24055)
old-commit-hash: 68f86d815ecd4573419b027df818a0a3f9442dbd
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: aeb98b39373135e224255f5869748cf0bb6dc336
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: 8af20af66ddaa6bc06d7f72f9134aa9afeed3ed8
2022-03-24 23:23:29 -07:00
Comma Device 460dd3cc9d cleanup tici_init in launch script
old-commit-hash: 03ac5bb4e3fd23176d5a1f9cb32a3e8f5fc95a59
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: 814741dafe6a591b87d23d3b0aa9662a01f61634
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: da5a0c41a00e4de076c2846ed54049c3dff3bc5a
2022-03-09 11:36:52 +01:00
Adeeb Shihadeh ccb2d2a6c4 AGNOS 4 (#23724)
old-commit-hash: a1b795cd78a00141d06a8bffdc4163ad8ab5fa51
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: 0d099e07aa1b16e2df5034835c1a6be3a721caa0
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: 4c766934bed739db19cf3e1c53305b4d70500f45
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: 4c406cdbe5c702d50a93410adf9d2d5b7f1b987a
2022-02-07 16:55:16 +01:00
Adeeb Shihadeh b4aa271d0b remove debug prints
old-commit-hash: 2372f4d6db1591f64def061dd66038d59e61046e
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: 62e0bd5f0d40b0ce1be171332d50de618ef5d51c
2022-02-04 22:54:12 -08:00
Adeeb Shihadeh 3aaf423dde NEOS 19 (#23586)
* NEOS 19

* prod manifest
old-commit-hash: 6a9514570cfeb2bf9b15929b2a6d3748ff2eb9a6
2022-01-21 00:12:33 -08:00
Adeeb Shihadeh 686a34fd32 androidd: track system_server too
old-commit-hash: a4f4d4c2cdd580917a0da5ce627e0a26feb56519
2022-01-20 14:37:15 -08:00
Adeeb Shihadeh 5a5ef1bf74 androidd cloudlogs are errors
old-commit-hash: fc8d402713f1b84b3e75067f09794236852f4f20
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: 22d43211d9bc828ea4e6bd6b84d865a597825eda
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: 610b99fd6821ba1f6010659f5d65bf4863d21e36
2022-01-13 22:40:35 -08:00
Willem Melching efc06c6290 thermald: track engaged state in param and kmsg (#23478)
* thermald: track engaged state in param

* write in kmsg

* format string

* move to python
old-commit-hash: 3ce4976db79fde95264f114b61d6be025aec9a71
2022-01-10 19:54:07 +01:00
Robbe Derks 08212107e8 C2 detection (#23439)
* two detection

* fix CI

* catch all

* gotta catch em all
old-commit-hash: 842ba8e5e6253d17d82a02d3d9994efbbbf2133e
2022-01-10 13:13:52 +01:00
George Hotz 86a39e838b Add More Types for mypy (#23268)
* mypy passes

* a few more

* a few in manager

* more types, will lint

* more

* simple types

* events type

* Update selfdrive/thermald/thermald.py

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dc96d4bee7b898172a6a15de4799af0e2d35605e
2021-12-28 18:07:00 +01:00
Willem Melching 686a38aea4 Abstract classes inherit from ABC (#23246)
old-commit-hash: 14bf834fefc136bec817a69e066c325055841474
2021-12-16 15:31:53 +01:00
Ewout ter Hoeven a962365292 Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f36f49da3896e687ac5530f40c1d150
2021-12-16 14:58:17 +01:00
Adeeb Shihadeh 0a43e415cc androidd: reduce cloudlog spam
old-commit-hash: 8a229826cf395cb2e8f7ab31a72738dc4abfbc4b
2021-12-13 17:42:15 -08:00
Adeeb Shihadeh 1d429f7e90 fix missing time import
old-commit-hash: 7c9fa91fb87d4ba2c97d6b08971e86827a6c38cf
2021-12-10 20:14:24 -08:00
Adeeb Shihadeh 72bf2bd452 AGNOS 3 (#23172)
* AGNOS 3

* always forget to do this

* update

* release manifest
old-commit-hash: 85b90883ad6aa20721ec60300a711849d6026c14
2021-12-08 19:24:40 -08:00
Adeeb Shihadeh b81a0ae865 tici: lower min volume
old-commit-hash: f71085484ddc67b712a1495cbc2f8846ee62a195
2021-12-08 18:54:16 -08:00
Adeeb Shihadeh 83a0271f2c tests for agnos manifest (#23176)
old-commit-hash: e4caaeb2d36ec83c12bc7b34f7b40a684898a711
2021-12-08 16:21:12 -08:00
Adeeb Shihadeh 37985cb592 tici: higher cpu freq while offroad (#23151)
old-commit-hash: c8e64b2c62b908fbbd78d8520d9277421e51d7b7
2021-12-07 21:44:35 -08:00
Adeeb Shihadeh 9c702c779e whole new family (#23157)
* family two

* more volume

* repeating dm sound

* update tests
old-commit-hash: 1501c2e3768bc3469b56a9eca846db9f971ec81d
2021-12-07 13:45:49 -08:00