Commit Graph

38 Commits

Author SHA1 Message Date
Shane Smiskol 1cbcc13c35
use and configure custom logger (#1994)
* prepare to log logs

* utils

* discoverability

* forgot
2024-08-05 14:51:56 -07:00
Adeeb Shihadeh 16bd1382df
reduce SPI timeouts in python lib (#1906)
* reduce SPI timeouts in python lib

* increase

* little more

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-03-20 19:36:42 -07:00
Cameron Clough 0c7d5f11d7
use pyupgrade to update syntax (#1889) 2024-02-24 13:56:28 -08:00
Adeeb Shihadeh c076a9f2f6
remove pedal fw (#1872)
* remove pedal fw

* little more

* one more

* and tests

* rest of it

* little more

* fix linter

* more fix
2024-02-16 22:58:01 -08:00
Adeeb Shihadeh 6bf6ba773e
less dependencies (#1676) 2023-10-02 14:24:16 -07:00
Adeeb Shihadeh a660e342fd
erase log flash sectors in DFU recovery (#1661)
* erase log flash sectors in DFU recovery

* always erase by sector

* erase all

* fix
2023-09-14 12:49:59 -07:00
Adeeb Shihadeh d87d33cb51
pre-commit: autoupdate hooks (#1639)
* Update pre-commit hook versions

* fix

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-09-07 19:10:30 -07:00
Adeeb Shihadeh bc2f10da57 Revert "pre-commit: autoupdate hooks (#1618)"
This reverts commit 526588b3e9.
2023-08-30 10:38:12 -07:00
Adeeb Shihadeh 526588b3e9
pre-commit: autoupdate hooks (#1618)
* Update pre-commit hook versions

* fix ranges

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-30 01:27:07 -07:00
Adeeb Shihadeh 3dc3b58e20
ruff: enable bugbear checks (#1565) 2023-08-06 14:59:22 -07:00
Adeeb Shihadeh dd78b2bf6c python lib: allow infinite timeout 2023-07-20 14:28:16 -07:00
Adeeb Shihadeh 8258d18e87 spi: bump version 2023-07-20 11:15:01 -07:00
Comma Device 5ca2d96b54 python lib: ensure full response is read in remaining 2023-07-18 01:06:37 -07:00
Adeeb Shihadeh 268f6bc2fb
python: lock hw device inside loop (#1522) 2023-07-18 00:03:17 -07:00
Adeeb Shihadeh 5d873444b2
SPI: connect by VERSION command (#1495)
* SPI: connect by VERSION command

* shorter timeout

* add exception

* simple test

* fallback

* bootstub check

* update comments

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-07-16 19:33:18 -07:00
Adeeb Shihadeh 70c7763124
SPI kernel driver (#1497)
* kernel driver

* fix checksum check

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-07-15 12:26:24 -07:00
Adeeb Shihadeh 14fd5ff5a3
SPI: send bootstub status in version request (#1492)
* mv first

* switch to crc8

* bootstub

* test

* cleanup

* little more

* misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-07-03 15:23:12 -07:00
Adeeb Shihadeh 5abb2b58da
SPI: add protcol version request (#1488)
* SPI: add protcol version request

* quick test

* fix linter

* misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-07-02 15:51:35 -07:00
Robbe Derks b563405904
Fix multiple resets due to not getting an ACK on reset (#1450)
* add send_once

* cleaner

* add debug log

* also in the USB one

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-09 16:25:49 +02:00
Adeeb Shihadeh 52f96bac68
spi: nack on can tx endpoint if buffer is full (#1426)
* spi: nack on can tx endpoint if buffer is full

* handle in python lib

* fix timeout

* fix timeout

* fix linter

* cleanup

* fix

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-19 22:43:34 -07:00
Adeeb Shihadeh a93bc954c5
SPI HITL tests + cleanup (#1417)
* start comms hitl tests

* pull that out

* revert that

* more test

* fix warnings

* fix linter

* another simple case

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-05-17 17:13:12 -07:00
Adeeb Shihadeh da7c577486
spi dfu: fast timeout for header (#1407) 2023-05-08 16:43:25 -07:00
Adeeb Shihadeh a5718ce5dd
spi: different ack dummy bytes for debugging (#1382)
different ack vals

Co-authored-by: Comma Device <device@comma.ai>
2023-05-01 19:31:13 -07:00
Adeeb Shihadeh cf307348af
CI: run HITL tests on tres (#1326)
* run on tres

* disable those for now

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-18 22:17:11 -07:00
Adeeb Shihadeh 9cd01ac263
PandaDFU: retry SPI comms (#1348)
* retry

* set exc

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-16 14:43:58 -07:00
Adeeb Shihadeh 2e8f27486f spi: bump up to 50MHz 2023-04-05 09:28:04 -07:00
Adeeb Shihadeh b231281c8b
python: check SPI response length (#1280)
* python: check SPI response length

* fix read bytes

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-07 20:12:23 -08:00
Adeeb Shihadeh deaad254d9
python: non-zero default timeout (#1279)
* non-zero default timeout

* respect timeout in spi
2023-03-07 14:44:10 -08:00
Adeeb Shihadeh efb36197bb
PandaDFU: SPI support (#1270)
* PandaDFU: SPI support

* get mcu type

* program bootstub

* little cleanup

* more cleanup

* connect by dfu serial

* time to remove that

* none

* fix linter

* little more

* catch

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-03-06 21:52:08 -08:00
Adeeb Shihadeh 6ec0c80754
python: common base handle for SPI + USB (#1231)
* base handle

* usb handle

* rm

* more types
2023-01-28 16:01:54 -08:00
Adeeb Shihadeh 6ae5212d6a
python lib: add SPI bootloader support (#1224)
* talk to spi bootloader

* flashing bootstub

* reset

* get mcu type

* little more

* pull out low level panda comms

* lint

* program app

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-01-28 00:32:07 -08:00
Adeeb Shihadeh 3048760737
SPI: connect by serial/UID (#1213)
* SPI: connect by serial/UID

* cleanup

* not everyone can have spi

* fix that

* move that

* mypy fix

Co-authored-by: Comma Device <device@comma.ai>
2023-01-15 23:30:24 -08:00
Willem Melching fa678e28fc
MacOS: no spidev package (#1211) 2023-01-15 12:51:22 -08:00
Adeeb Shihadeh e83b2189c1
lock spi device during transfers (#1207) 2023-01-14 23:32:17 -08:00
Adeeb Shihadeh 0b58cb9e3c lower spi ack timeout 2022-12-20 23:05:04 -08:00
Adeeb Shihadeh 5486eb3845
python lib: add SPI ACK timeout (#1199)
* python lib: add SPI ACK timeout

* fix that

Co-authored-by: Comma Device <device@comma.ai>
2022-12-20 22:07:24 -08:00
Adeeb Shihadeh 966f7e0539
SPI: fixes + fake bulk transfers (#1150)
* check spi checkusm

* ugh, fix control handler

* fake bulk xfer

* cleanup

* one more

* unused

* fix linter

* some typing

Co-authored-by: Comma Device <device@comma.ai>
2022-11-10 21:34:43 -08:00
Adeeb Shihadeh a42b104c35
SPI handle in python lib (#1131)
* SPI handle in python lib

* add spidev

* unify those

* clean up connect

* clean that up

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2022-11-03 22:18:12 -07:00