Dean Lee
97e9d55588
cpplint: build/include_what_you_use ( #29556 )
...
* include_what_you_use
* remove comments
* include <memory>
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: 2d99521e7500902070d0aacce69528bcfd8b9964
2023-08-23 13:25:17 -07:00
Adeeb Shihadeh
d6b8eed74d
boardd: misc cleanup ( #28969 )
...
* boardd cleanup
* no more front frame
* faster connect loop
* fix that on mac
old-commit-hash: c933fbb0748106bb8b1e4c1e875eb6c83b7e7b52
2023-07-15 23:39:21 -07:00
Dean Lee
69d7394e5c
boardd: check fw version when connecting ( #28823 )
...
* Check fw version when connecting
* apply reviews
* mv to boardd
* don't keep looping
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: b9cffac29c013b82c33d03710e294677cf50b395
2023-07-08 20:06:10 -07:00
Robbe Derks
edc8384d6f
fix typos
...
old-commit-hash: ede75c9e9b849505f2ea91d00abe9073ad0b3cd4
2023-06-01 21:37:10 +02:00
Comma Device
8a91f7cd30
boardd: only look for new usb pandas
...
old-commit-hash: 78df554217fc27211d1b0cb227421a0f3f2153cd
2023-05-25 19:35:57 -07:00
Adeeb Shihadeh
65df3f01d1
boardd: more logging ( #28051 )
...
old-commit-hash: a93f74a846ff21e4538d00c921bdeabc44f85d0d
2023-04-28 14:47:03 -07:00
Willem Melching
484eed0acf
cabana: support direct streaming from panda over USB ( #27936 )
...
* refactor livestream into devicestream
* add panda stream
* unused
* whitespace
* move logging to base class
* add cmdline args
* Update selfdrive/boardd/boardd.cc
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: 2a981f553162ff41dd50ed6921b90ac512efa3d2
2023-04-17 15:37:26 -07:00
Igor Biletskyy
7dfb32883a
boardd: fix uninitialized can_header ( #27685 )
...
old-commit-hash: d9487ab901763f310192bfeb0b8116daaa1cf540
2023-03-27 13:24:56 -07:00
Willem Melching
1ff9f69a57
panda.cc: fix possible heap overflow on wrong checksum ( #27151 )
...
* panda.cc: fix possible heap overflow on wrong checksum
* off by one
old-commit-hash: f17bca00ba6919bae309f0c68bad11b0f6b18607
2023-01-31 17:17:21 +01:00
martinl
0970d900a2
MacOS: build fixes ( #27143 )
...
* MacOS: exclude common/gpio.cc
* MacOS: no spi for boardd
* MacOS: loggerd: no v4l_encoder.cc
* MacOS: update libdbc path for cabana
old-commit-hash: fdc4a7f84cb68c63cc5013a052b49663ffb6881c
2023-01-29 13:55:17 -08:00
Adeeb Shihadeh
bf804f25bf
boardd: connect to SPI panda by UID ( #27035 )
...
* move list
* connect by serial
* cleanup hw serial
* little more
* rm excessive print
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: 66ff2de0a29438c80e8834ac78a696ca21b30601
2023-01-21 19:42:10 -08:00
Adeeb Shihadeh
bbee5e6367
boardd: include SPI panda in list ( #27018 )
...
* boardd: include SPI panda in list
* hexlify
* fix hexlify
* cleanup
* little more
Co-authored-by: Comma Device <device@comma.ai >
old-commit-hash: b8ec32103a4fab1ede5fc431eabc23118da82856
2023-01-20 13:03:02 -08:00
Robbe Derks
f2cab9a00c
No more magic for the can chunks ( #26861 )
...
* remove magic and add checksum
* add comms reset
* bump submodule
old-commit-hash: 3136985b950e79cf2943dafa2cea4db5ad0f528b
2023-01-13 15:01:55 -08:00
Adeeb Shihadeh
dda7913a33
boardd: misc spi fixes ( #26670 )
...
old-commit-hash: 9cc06e9ea658b74bf1504fa35c6c8729fb1f550f
2022-12-02 11:51:25 -08:00
Robbe Derks
d00e7ee24b
Simple CAN chunks ( #25373 )
...
* simple chunks
* more sizeofs
* fix unit tests
* bump panda
* bump panda
* don't fail for too little data
* bump panda
* bump panda
* bump panda
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: fee6f2efacf41d2bd964754d0e5e193e18e16f16
2022-12-01 09:12:16 -08:00
Adeeb Shihadeh
a6f2f2d751
boardd: cleanup defs from panda ( #26628 )
...
* more stuff
* bump pnada
old-commit-hash: c3e3047080cdcfd5fbe275534fdf6980903aebdf
2022-11-29 16:05:46 -08:00
Adeeb Shihadeh
1d152c074c
boardd: end peripheral panda discrimination
...
old-commit-hash: e9dcabcef73aaffeee8eaaeab29d48e8277d98a6
2022-11-21 23:13:41 -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
Adeeb Shihadeh
5c123f01b4
boardd: prep for SPI + factor out USB ( #26356 )
...
* merge origin/spi-panda
* just prep
* boardd: factor out USB comms
* fix those
* add to release files
* little more
old-commit-hash: 06be96cae29bb347da2a9df43976613f3f2cc025
2022-11-04 16:36:27 -07:00
Adeeb Shihadeh
a9e3d43246
boardd: remove canfd whitelist
...
old-commit-hash: 9a8c7f2453bcb917eb428704c1733f28e5d42d11
2022-11-03 15:51:14 -07:00
Greg Hogan
1d4e4197e2
add CAN-FD non-ISO mode support ( #25947 )
...
CAN FD non-ISO support
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: d5ef6f82e61794f384b541cfbe9f9a06ffc304c5
2022-10-12 15:40:19 -07:00
Igor Biletskyy
e39767b1cb
boardd: add CAN health to pandaStates ( #25800 )
...
* init
* try this
* mistake
* fix
* bump cereal
* make obvious
* fixes
* remove comment
* one helath header
* ..
* preallocate vectors
old-commit-hash: 53959082e7e3e200fb62e1c44219fa4e656eb8de
2022-09-20 12:39:12 -07:00
Igor Biletskyy
2e0bd5fe17
RPv2: fix data length check ( #25819 )
...
fix
old-commit-hash: e6ff301864b06d0b1dc14e007e1769d53234e38b
2022-09-16 14:22:19 -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
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
Shane Smiskol
121b708ba1
Change safetyParam to uint16_t ( #24376 )
...
* bump panda & cereal
* bump panda
* rest of references
* regen TOYOTA with safety param 578, TOYOTA2 with 329
* regen rest of routes
* update ref
* bump cereal
old-commit-hash: 4190d2608a536e1b28fb999a72bbf5b80810743d
2022-05-02 13:34:31 -07:00
Shane Smiskol
32075d4681
safety param: make uint16_t ( #24362 )
...
* only use half of the available bytes
* move to set_safety_model
* regen and update refs
* last two
* bump to master
old-commit-hash: 66dd8f934cc84cdbd3e48e7b49836ec95f82c23a
2022-04-28 17:56:34 -07:00
Shane Smiskol
ebec632ea2
Make safetyParam unsigned ( #24160 )
...
* bump panda & cereal
* make unsigned in boardd
* update health packet version
bump panda
* fix definition
* bump
* regen TOYOTA2 route
* upload route
* oh, ndog param wasn't being set
* regenerate routes with non-zero safety params
* update refs
* regen routes and update refs
* bump panda
* update refs
* update refs
* bump submodules to master
old-commit-hash: 6e62df65d722bf2013c42514bf56cbe5c838ad63
2022-04-21 00:01:05 -07:00
Shane Smiskol
4bbc197433
update unsafeMode to alternativeExperience ( #23995 )
...
* update unsafeMode to alternativeExperience
* fix
* fix
* bump submodules
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: e91613bc625dfac43e9d3c4135dec8a1757ade37
2022-03-24 14:59:16 -07:00
Gregor Kikelj
cd1ba97c07
Remove void argument ( #23928 )
...
old-commit-hash: 723560c20f18e9fc737f19b8f320ffe78b8f11cd
2022-03-08 14:51:27 -08:00
Igor Biletskyy
c60d1ca766
panda.cc: add panda deep sleep mode( #23911 )
...
* needed for panda deepsleep mode
* add set_deepsleep to panda.cc
* rename to enable_deepsleep
* remove void
* fix value
* bump panda
old-commit-hash: 0b64ddb678ff187b027583ec89525c08f415596a
2022-03-07 18:55:16 -08:00
Willem Melching
baebb2c932
handle usb error in reading panda state ( #23686 )
...
old-commit-hash: f2eb84eef063efcc0da1dde072fac0325d7d1eee
2022-02-10 13:52:24 +01:00
Igor Biletskyy
b294249932
Panda: check libusb_open status ( #23622 )
...
old-commit-hash: 703efb9275b80d62dc2cd2de7a192e39238a9aae
2022-01-26 11:50:05 -08:00
Igor Biletskyy
f532819faf
Revert "boardd: new class USBDevice ( #23015 )"
...
This reverts commit 6965aa0b903060ab38aace31c15fefdc7a0429eb.
old-commit-hash: 285addeef26d60fc7d263efae81d07defabb0171
2021-12-16 17:11:45 -08:00
Dean Lee
49c35a70b5
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 >
old-commit-hash: 4061f50da3dabff7a16e2a845d66efe00f9d7978
2021-12-16 16:53:48 -08:00
Adeeb Shihadeh
0386f99c1f
boardd: add controls heartbeat ( #23185 )
...
* boardd: add controls heartbeat
* bump panda
* bump again
* bump panda
old-commit-hash: a793b949bea7308051448924e0f3a97c396e39e8
2021-12-15 17:58:16 -08:00
Dean Lee
a0c6a65d09
panda: refactor can_send ( #22981 )
...
* refactor
* merge master
* fix
* move down
* space
* merge master
* remove struct PacketWriter, use function
* Update selfdrive/boardd/panda.cc
less violations
* Update selfdrive/boardd/panda.cc
comment
* Update selfdrive/boardd/panda.cc
add comment to counter
Co-authored-by: Igor Biletskyy <briskspirit@users.noreply.github.com >
old-commit-hash: 827fae8faa2c059cc833946dc3cc1414e8bc1f37
2021-12-06 20:04:25 -08:00
Igor Biletskyy
be3a376967
len_to_dlc make static ( #23120 )
...
old-commit-hash: e294e1620e1d23dfbe582230e829343406731efe
2021-12-03 16:37:17 -08:00
Dean Lee
15bac98ad4
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 >
old-commit-hash: 599c07e02793e64bfb5de97febe850992a1e73e8
2021-12-02 16:28:38 -08:00
Igor Biletskyy
ce565323fd
boardd: split usbprotocol unittest and fix paren order in data length assert ( #23065 )
...
old-commit-hash: 65ca9be82a18115a5dd0556c4b1f8cd9705743d9
2021-11-29 15:34:33 -08:00
Igor Biletskyy
9055f2df79
Extra check for tail_size length ( #23047 )
...
old-commit-hash: b2a018643fb3caa30e7baa5b6be61b8ec4b734f1
2021-11-27 12:22:54 -08:00
George Hotz
327767f93f
Revert "boardd: be careful with paren order in assert"
...
This reverts commit c221485bd1eebbab87f6b5a579e66e10767fcdf8.
old-commit-hash: c6f62ebc4f661c4b597e8bde971aa8617cfc5bcb
2021-11-27 00:57:30 -05:00
George Hotz
6475085095
boardd: be careful with paren order in assert
...
old-commit-hash: 50cd8588a27834bfd01d95ed452cf8ac247cb584
2021-11-27 00:28:33 -05:00
Dean Lee
a919e5721e
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
old-commit-hash: c77354009c61da8a322dc9aaaa4c1ecaec432449
2021-11-23 20:15:22 -08:00
Igor Biletskyy
989270ac56
fix chunk buffer size ( #22969 )
...
old-commit-hash: edaf7d76049d6807fe75238d33804420e0b15ee9
2021-11-18 14:15:06 -08:00
Dean Lee
1cf28894e6
panda: fix len_to_dlc always return 1 if len > 24 ( #22964 )
...
old-commit-hash: 57db99700c0ec41764d8645cec34a99a5b237135
2021-11-18 13:02:36 -08:00
Dean Lee
433add3a02
boardd/can_recv_thread: improve caching for can_frame ( #22944 )
...
* better cache
* use emplace to remove copy&realloc
* rebase master
old-commit-hash: 841fb93def3b52cc597d6e60a51f676002e6f3ac
2021-11-17 17:54:14 -08:00
Igor Biletskyy
8844b560d0
panda.cc: struct for CAN header, counter complexity, cleanup for readability ( #22956 )
...
* try struct
* can_send refactor
* cleanups
* Resize vector only when it is needed
* ...
* more cleanup
old-commit-hash: 47d0d717ebdef8a0b3c472bfc17b5cd1b401c5ed
2021-11-17 16:00:18 -08:00
Igor Biletskyy
34ad595349
panda.cc: add functions to set can and data speed ( #22920 )
...
old-commit-hash: 04e1a25881db89fd186b0a621299093b282dc47b
2021-11-15 16:10:39 -08:00
Adeeb Shihadeh
1896097480
boardd: apply bus offset in can recv
...
old-commit-hash: 5ffb3e4347d09500a761945bc2a4a5f93f072a6f
2021-11-13 17:11:25 -08:00