Commit Graph

5 Commits

Author SHA1 Message Date
Igor Biletskyy
285addeef2 Revert "boardd: new class USBDevice (#23015)"
This reverts commit 4061f50da3.
2021-12-16 17:11:45 -08:00
Dean Lee
4061f50da3 boardd: new class USBDevice (#23015)
* USBDevice

* merge master

* rebase master

* add to fiels_common

* inline functions

* namespace

* init err

* remove nested if

* cleanup

* bump panda for branch

* change includes

* bump panda branch

* change name

* bump master panda

Co-authored-by: Igor Biletskyy <briskspirit@users.noreply.github.com>
Co-authored-by: Igor Biletskyy <bs@privacy.im>
2021-12-16 16:53:48 -08:00
Dean Lee
599c07e027 panda: refactor can_recv (#22977)
* refactor

* use macro

* rebase master

* fix incorrect chunk_len

* cleanup

* type fix

* lines

* while

Co-authored-by: Igor Biletksyy <bs@privacy.im>
2021-12-02 16:28:38 -08:00
Igor Biletskyy
65ca9be82a boardd: split usbprotocol unittest and fix paren order in data length assert (#23065) 2021-11-29 15:34:33 -08:00
Dean Lee
c77354009c panda: add unit tests for usb protocol (pack/unpack) (#22955)
* prepare for unit tests

* add to selfdrive_tests.yaml

* test header

* test chunk count

* rename test function

* continue

* don't check chunks count

* test recv_can

* continue

* small cleanup

* merge master

* cleanup

* rename functions

* test different packet size

* fix operator precedence problem

* refactor unpack_can_buffer

* cleanup test

* cleanup unpack_can_buffer

* add test for multiple pandas

* rename to test_panda

* restore test_boardd

* rename to test_boardd_usbprotocol

* fix typo

* bus_offset = [0,4]

* change src

* use USBPACKET_MAX_SIZE
2021-11-23 20:15:22 -08:00