Commit Graph

55 Commits

Author SHA1 Message Date
Adeeb Shihadeh
29eb4d3a35 pandad: wait for internal panda to come up (#27705)
* pandad: wait for internal panda to come up

* test

* more checks
old-commit-hash: f832a71038f5d50f991d36d7860bfc0ef912794e
2023-04-14 14:18:13 -07:00
Adeeb Shihadeh
9ab3f160fb tizi: enable fan for shutdown (#27890)
* tizi: enable fan for shutdown

* Update system/hardware/tici/hardware.py

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8f1753aaab70f5498a57c430393cd0f84693306b
2023-04-13 15:35:07 -07:00
Adeeb Shihadeh
7b329bcc59 tizi: retry amp comms (#27735)
* tizi: retry amp comms

* ensure all config is written together

* simple test

* check errors

* test shutdown

* a tici exclusive

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 767ed4295f9924a98df5dcd79b8bd71d73511d73
2023-04-06 23:38:16 -07:00
Adeeb Shihadeh
57f3632aa1 update manifest path in test
old-commit-hash: 9eda72d8712d3bd2a56b66d61ae99c1952c97272
2023-04-05 22:39:57 -07:00
Adeeb Shihadeh
827ebdacaf tici: move tests to tests/
old-commit-hash: 39a1a917e78280ce654135944bb342ca923d8bc3
2023-04-05 22:17:57 -07:00
Adeeb Shihadeh
119c910a36 tizi: only affine panda USB IRQ when it's used (#27816)
only affine panda USB IRQ when it's used

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: fdb3488f6bbe34500e1694abd56160168937e5e3
2023-04-05 21:08:14 -07:00
Adeeb Shihadeh
3d9dfbf2bd tizi: affine IRQ by action instead of number (#27811)
* tizi: affine IRQ by action instead of number

* do camera irqs

* debug script

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 038d34aa7f25bff127d1265f6b1446cf40fe414b
2023-04-05 16:35:27 -07:00
Adeeb Shihadeh
aa5aeb3ba3 tici: turn off fan after boot (#27680)
* tici: turn off fan after boot

* tmp if

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: c25ce02639a86f6627314ecd3b3c101d82d7498f
2023-03-24 16:48:07 -07:00
Adeeb Shihadeh
7bd3d642aa allow running amp config script standalone (#27587)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2749205b4a8d87b18051d3fa8c680b2e9a849a33
2023-03-14 20:55:41 -07:00
Harald Schäfer
6d6137ef5a Update amplifier config (#27443)
* update tizi amplifier

* Update attenuation
old-commit-hash: 75eaca3cf360614dcc86a7028921bbf022e30fa9
2023-03-09 11:12:42 -08:00
Adeeb Shihadeh
37af774ab0 test_power_draw: add header to output table (#27511)
* test_power_draw: add header to output table

* units
old-commit-hash: ebd25b8a7de29542be7c6a213c578bc363999857
2023-03-06 16:13:29 -08:00
George Hotz
2fe836f158 tinygrad: bump to 0.5 (#27505)
* bump tinygrad to 0.5

* update release files

* ref commit + bump tinygrad

* save 220 mW

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3892c6098085ad05878f78aef0afefac55e38306
2023-03-06 15:50:28 -08:00
Cameron Clough
0276badcc0 setup: add serial to request headers (#27237)
* setup: add dongle ID to request headers

* rename openpilot

* fix str

* hardware: get_serial

* set serial instead

* fix typo

* static

* fixes
old-commit-hash: 6fb5661abba34971e547941e0f6a6625bef3b75a
2023-02-06 20:02:30 -08:00
Adeeb Shihadeh
4641431306 tici: remove hardcoded max brightness (#26859)
* tici: remove hardcoded max brightness

* fix that one

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 922bedaf47effb448c056a1844c13ecd7a26a244
2023-01-01 19:47:02 -08:00
Adeeb Shihadeh
82a91d59c4 alt amp config (#26858)
* alt amp config

* fix

* not executable

* comment

* consistency

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 3d44b6b3ac6d1f207e01d4cbf225bd929255ca1e
2023-01-01 19:15:44 -08:00
Shane Smiskol
16859211f5 micd: revert check playing sound (high cpu usage) (#26672)
* don't use hardware

* check micd proc

* use pactl package

* cleanup

* Revert "cleanup"

This reverts commit baf9887e2d3e7dce8c24a93e970bb5a2d3609d50.

* Revert "use pactl package"

This reverts commit 0c1f3a4b865e44052affa57323ae4a21d274d6e3.

* Revert "micd: don't update filtered sound level if playing sound (#26652)"

This reverts commit 6703f6fa0297ad587ce80fcf1af432c402ba4e7e.

* Revert "check micd proc"

This reverts commit 9ebbe2aa42bdfd2f7f8bf226978a518d984fb154.

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 060b69ee2f5148140ec696cbc950b83f700fd671
2022-12-02 15:25:34 -08:00
Cameron Clough
8242a86d96 micd: don't update filtered sound level if playing sound (#26652)
* add is_sound_playing to hardware.py

* micd: don't update filtered sound level if playing sound
old-commit-hash: 86cd919a57be22fa0ccf324a8767999309df60e4
2022-12-01 12:52:06 -08:00
Cameron Clough
9bcf83f493 micd: scale sound volume with ambient noise level (#26399)
* test changing sound volume

* test changing sound volume

* create system/hardware/pc/hardware.h

* implement Hardware::set_volume using pactl

* soundd: use Hardware::set_volume

* add sounddevice dependency

* sounddevice example

* simple micd

* cleanup

* remove this

* fix process config

* add to release files

* hardware: get sound input device

* no more offroad

* debug

* calculate volume from all measurements since last update

* use microphone noise level to update sound volume

* fix scale

* mute microphone during alerts

* log raw noise level

* hardware: reduce tici min volume

* improve scale

* add package

* clear measurements on muted

* change default to min volume and respond quicker

* fixes

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* logarithmic scaling

* fix

* respond quicker

* fixes

* tweak scaling

* specify default device

* Revert "hardware: get sound input device"

This reverts commit 50f594f7a3bab005023482bc793147a8c8dae5d7.

* tuning

* forgot to update submaster

* tuning

* don't mute microphone, and clip measurement

* remove submaster

* fixes

* tuning

* implement Hardware::set_volume using pactl

* Revert "test changing sound volume"

This reverts commit 4bbd870746ec86d1c9871a6175def96cf7f751a6.

* draft

* draft

* calculate sound pressure level in dB

* fix setting

* faster filter

* start at initial value

* don't run command in background

* pactl: use default sink

* use sound pressure db

* tuning

* bump up max volume threshold

* update filter slower

* fix divide by zero

* bump cereal

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 108ff15f5dc16f79a36a2d33397b36dba42d70cf
2022-11-30 21:56:03 -08:00
Cameron Clough
303b5532ad soundd: change system sound mixer volume (#26633)
* test changing sound volume

* create system/hardware/pc/hardware.h

* soundd: use Hardware::set_volume

* implement Hardware::set_volume using pactl

* Revert "test changing sound volume"

This reverts commit 4bbd870746ec86d1c9871a6175def96cf7f751a6.

* don't run command in background

* pactl: use default sink
old-commit-hash: 02b5b6fe1f9f919f0cafea3efc6be2403a3f7139
2022-11-30 15:36:25 -08:00
Adeeb Shihadeh
5bf27eff97 spi goes on boardd core
old-commit-hash: 4478241bea02cb673983aa6b97428702a54dd1c2
2022-11-21 17:17:36 -08:00
Adeeb Shihadeh
d87ea66802 agnos 6.2 (#26441)
* agnos 6.2

* staging manifest

* production
old-commit-hash: b549e8174e4f8ccd2be3c324e47333e721db3914
2022-11-10 21:10:34 -08:00
Adeeb Shihadeh
461206de1c boardd: SPI support (#26374)
* spi handle

* put usb back

* handle eintr

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8ba9a5107b353cc0fc5ab3bbab589b70c2fe9aaa
2022-11-08 13:21:07 -08:00
ZwX1616
426286f24f DM: add use of e2e preds (#26078)
* try ml

* de56

* j914ef75a

* jd1124586

* jd1124586

* d112

* oops

* set

* update ref

* use offset

* bump DM power usage

* new ref
old-commit-hash: d522492ba0b80928adc475c1f37b995834c31a90
2022-10-17 19:40:06 -07:00
Adeeb Shihadeh
c31c77668f safer modem manager commands (#25999)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1f5187892f0854bbc6a7d7799fa0d9ca2284714a
2022-10-07 10:39:11 -07:00
Adeeb Shihadeh
c18d23c8be CI: re-enable power draw test (#25988)
* CI: re-enable power draw test

* adjust for ngrl
old-commit-hash: 9e6265ce2188ac48442b07a77e86ca4fd3eba06b
2022-10-06 15:01:57 -07:00
Adeeb Shihadeh
fa3e33b8e8 agnos 6.1 (#25973)
* agnos 6.1

* staging manifest

* no casync

* prod manifest
old-commit-hash: ef24c0b2ce8a4cf1dbc82886b806079889adf97b
2022-10-05 16:40:39 -07:00
Adeeb Shihadeh
497bc99c27 agnos updater: set timeout on download (#25927)
old-commit-hash: 74f741d0be89c9a03573d47b00d59be964884d5f
2022-09-29 13:18:01 -07:00
Cameron Clough
23a4e66b17 configure mypy outside of pre-commit environment (#25892)
* add mypy config matching precommit

* use local mypy, add files to config

* excludes too

* fix config

* pylint is sad now... did it get updated?

* fix typing hints

* ignore

* this should be a regexp

* mypy doesn't like Deque despite inheriting MutableSequence

* more excludes

* Revert "pylint is sad now... did it get updated?"

This reverts commit 250c632f18ecb3d33ffb931e15425f9314a0964b.
old-commit-hash: 4e310b807fb1ccdde4b2078468fab46e5324dfa2
2022-09-27 20:43:05 -07:00
Adeeb Shihadeh
a8a9f16845 agnos 6 (#25864)
* agnos 6

* new agnos

* no casync for now
old-commit-hash: dc65f8a60a8a20cb0c93386ef4c6537dce2fbc58
2022-09-22 15:56:17 -07:00
Willem Melching
7451db46cf sensord: use interrupts to improve LSM6DS3 timing accuracy (#24525)
* change LSM6DS3TR(-c) gyroscope  and accelerometer to interrupt

* add pthread for linking

* add interrupt collector thread to fetch in parallel to non interrupt based sensors

* change get_event interface to return true on successful read

* fetch sensor interrupts via gpiochip

* avoid sending empty messages (interrupt only, non interupt magn can leave a gap in the orphan block)

* add verifier script to sensor interrupts (sensor_data_to_hist.py)

* add/update sensord testsweet (test_sensord.py)

* add poll timed out check

* unexport interrupt gpio pins

* gpiochip on both edges, but skip falling edge if rising edge is detected, this is handled in the sensor as the status flag is checked if new data is availble

* add test to sensord to verify 100Hz interrupt frequency

* add sensor shutdown/low power mode functionality on sensord exit

* relax test, will be readded in the splitup PR

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>
old-commit-hash: 84a3c355e5fdb7bb2f50847f925e894eecfa8918
2022-09-12 22:29:31 -07:00
Adeeb Shihadeh
caac56b92e USB power mode cleanup (#25619)
* first pass at usb power mode cleanup

* fix build

* a sneaky one

* little more

* fix build

* bump pnada

* remove that

* power monitoring cleanup

* fix tests

* bump submodules
old-commit-hash: 28cb1897cb8be80b35b1ce7573066fb36b01d2d7
2022-08-31 21:13:53 -07:00
Adeeb Shihadeh
0325a33752 add pyside2 package (#25602)
old-commit-hash: c6b749fb96b3b6332fd850e733140357f84d53a4
2022-08-30 15:10:52 -07:00
Adeeb Shihadeh
35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93baedb2e1c5267b4f191f8e20fcd1d2
2022-08-30 11:20:55 -07:00
HaraldSchafer
f7d1aad21e Update model replay commit for calib change (#25357)
* Update model replay commit for calib test

* more reliable baseline

* update docker login

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9fbbefbc94f8c672e0b1c79333e34366e19f96cf
2022-08-03 22:35:03 -07:00
Adeeb Shihadeh
70d4f03b9a power monitor: fix missing numpy import
old-commit-hash: e7b3ebdb17c1bb931af704f2c36defdc8874ac28
2022-08-01 20:02:53 -07:00
Comma Device
6ef3ae8918 update tici power monitor
old-commit-hash: 82fbd1414428f9c4cb9b7542a55858ea5cdcd3b0
2022-08-01 19:25:35 -07:00
Willem Melching
dfcd3a2910 casync unittests (#25306)
* simple extract test

* add test with loopback

* test for chunk reuse

* test seeding

* add instructions

* cleanup

* install casync

* make more tests work without a loopback
old-commit-hash: 753f4c7fab565234e455f19e3ca123e44171e042
2022-07-29 17:46:19 +02:00
Willem Melching
8b39650d99 thermald: log modem data usage (#25298)
* thermald: log modem data usage

* add to deviceState

* add cast

* set refresh rate

* bump cereal

* cereal master
old-commit-hash: b2c1098cd80ff53544c2b65b77c145a5d4af80ad
2022-07-28 14:58:23 +02:00
Adeeb Shihadeh
e2734a6157 Revert "Revert "remove casync from agnos manifest for now""
This reverts commit c64c00fd5d49d4e0bda48bcf4e476655073c70a5.

old-commit-hash: 15846435fe16505fbb5a1e397dd87b47527ad33d
2022-07-22 10:01:08 -07:00
Adeeb Shihadeh
4523108a02 Revert "remove casync from agnos manifest for now"
This reverts commit 7c34965678fada52c65250d32819ab04980afaa5.

old-commit-hash: 0c5668d96e714334a7d6c79678ee8577e6f6739b
2022-07-21 21:05:52 -07:00
Willem Melching
54bbb9332e casync: only when run from updater (#25130)
* casync: only when run from updater

* also here
old-commit-hash: 906a8a912cbd39863f43582677f2435f11ecb904
2022-07-12 19:28:48 -07:00
Willem Melching
76ef2d83d4 casync: manifest compare script (#25129)
* casync compare script

* typo

* cleanup output
old-commit-hash: 205f6f7414f502248082949addac25a215c73d59
2022-07-12 16:09:21 +02:00
Adeeb Shihadeh
5fd0c500a1 remove casync from agnos manifest for now
old-commit-hash: 8ea982264ec4ba7aa47a3228236f943e76a911c5
2022-07-08 13:05:25 -07:00
Willem Melching
32da08eb11 casync: increase chunk download timeout
old-commit-hash: 35c8c0e600746e092bb236dabd05491d8be1078a
2022-07-08 19:19:57 +02:00
Willem Melching
e737b50c2d casync: handle hash failure (#25081)
* casync: handle hashing failure due to IO errors

* fix comment

* all exceptions

* fix typo

* Update system/hardware/tici/agnos.py
old-commit-hash: b6df0cd2422d63eb58cc6abaa9968954feff2ccb
2022-07-08 15:44:16 +02:00
Adeeb Shihadeh
0b0e11827d AGNOS 5.2 (#25011)
* AGNOS 5.2

* casync manifest
old-commit-hash: c9fa5ef11a6d47a886b30f65b2064b2d6ae05807
2022-07-08 00:23:46 -07:00
Willem Melching
5dc7f22545 casync: compute seed caibx url on the fly (#25046)
* compute seed hash on the fly

* more logging

* partition name in url

* fix comment
old-commit-hash: 4080f729bea6092813331fb6d92c80e2f4c4f928
2022-07-06 13:04:25 +02:00
Willem Melching
e3c24c5cc4 casync: reuse requests session in RemoteChunkReader (#25045)
old-commit-hash: 50434d612ee7becc09aef762a6c8fb8d8111af6d
2022-07-06 12:08:51 +02:00
Willem Melching
0f37257d29 casync: build_chunk_dict optimize for resuming (#25038)
old-commit-hash: 06a8ac627c0b8cf00b3bd4ea7186f5c876f71561
2022-07-05 18:06:08 +02:00
Willem Melching
3230474724 add casync support to agnos updater (#23654)
* add casync option to agnos updater

* open if necessary

* add python implementation

* last chunk can be small

* check flags

* cleaner check

* add remote and file stores

* remote caibx file

* print stats

* use python implementation

* clean up imports

* add progress

* fix logging

* fix duplicate chunks

* add comments

* json stats

* cleanup tmp

* normal image is still sparse

* Update system/hardware/tici/agnos.py

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

* Update system/hardware/tici/agnos.py

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

* add some types

* remove comment

* create Chunk type

* make readers a class

* try agnos 5.2

* add download retries

* catch all exceptions

* sleep between retry

* revert agnos.json changes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 39007810927faa309d06e6ad9586302341547f64
2022-07-05 16:55:32 +02:00