Commit Graph

488 Commits

Author SHA1 Message Date
Adeeb Shihadeh
dc07975446 python: fast reconnect (#1558) 2023-08-04 23:52:18 -07:00
Adeeb Shihadeh
d7120be904 panda jungle (#1547)
* mv jungle

* match pedal style

* fix linter

* fix fw path

* fix paths

* safety!
2023-08-03 23:55:13 -07:00
Adeeb Shihadeh
e7894e6770 Move CanHandle to python/ (#1550) 2023-08-03 23:10:16 -07:00
Robbe Derks
a945053ade Force relay drive (#1539)
force drive

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 16:33:34 -07:00
Adeeb Shihadeh
7f1944cf43 debug endpoint for custom clock source period (#1538)
* debug endpoint for custom clock source period

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 16:17:42 -07:00
Adeeb Shihadeh
1b706040cd pre-commit: autoupdate hooks (#1536)
* Update pre-commit hook versions

* fix

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-08-01 11:14:27 -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
Shane Smiskol
05e0f4a944 IsoTpMessage: fix length mask for single frames (#1523)
* Update uds.py

* this was completely broken

* wait nevermind
2023-07-18 12:05:14 -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
Cameron Clough
0c33554624 Ford CAN FD safety (#1455) 2023-07-16 15:09:37 +01: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
Adeeb Shihadeh
5285eec35a pre-commit: autoupdate hooks (#1347)
* Update pre-commit hook versions

* fix that

---------

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-07-01 18:03:53 -07:00
Adeeb Shihadeh
21843092ff bump to python 3.11.4 (#1481)
* bump to python 3.11.4

* Update .pre-commit-config.yaml

* lint

* import

* no | yet

* rm ignores

* Update tests/libpanda/libpanda_py.py

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2023-07-01 17:43:34 -07:00
Robbe Derks
694aae9c26 Faster log retrieval (#1484)
improve get_logs
2023-06-30 17:26:39 +02:00
Igor Biletskyy
a35e9a1edb CAN health: add IRQ call and core reset counters (#1453)
* initial

* old method

* comment
2023-06-28 14:40:00 -07:00
Shane Smiskol
7af22677f7 CanClient: check invalid sub-addresses (#1483)
* check/catch invalid sub-addresses

* clean up

* break to next addr on first receipt of bad subaddr
2023-06-23 16:33:12 -07:00
Shane Smiskol
bcd8c57a70 uds: fix TypeError for invalid subfunctions (#1474)
fix TypeError
2023-06-20 23:17:57 -07:00
Igor Biletskyy
0f4e8f79f5 add IRQ rate helper function (#1471)
init
2023-06-20 11:47:43 -07:00
Robbe Derks
0cc91a7f7b Logging (#1445)
* try 1

* some fixes

* fix some misra

* first poc working

* more things

* more misra fixes

* fix misra

* add rate limiting

* fix misra

* add some unit tests through libpanda

* add more tests and fix some stuff

* fix misra again

* add startup log hitl test

* list

* don't fail on wrong timestamps

* improvements

* fix tests

* expected logs test?

* not sure why this passed

* oh, it doesn't reset

* only show last few

* guess at expected logs

* needs this

* ugh

* reduce compiler warnings

* adjust expected logs

* this is correct

* is it really 1?

* min max

* reduce spam in SPI test

* some cleanup
2023-06-13 17:00:56 +02:00
Adeeb Shihadeh
4850b13797 python: move wait into connect() (#1456)
* python: move wait into connect()

* cleanup

* set that

* add that back

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-06-11 19:06:46 -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
1a9a94c519 python: add helper to wait until panda comes up (#1447)
Co-authored-by: Comma Device <device@comma.ai>
2023-06-07 19:43:43 -07:00
Adeeb Shihadeh
a29ee424bc python: remove duplicate enter_bootloader (#1442) 2023-06-04 14:54:40 -07:00
Bruce Wayne
00c2689487 dfu: fix small writes 2023-05-24 16:23:37 -07:00
Adeeb Shihadeh
2da9b8d173 python: wait on any DFU panda (#1435) 2023-05-23 20:50:09 -07:00
Adeeb Shihadeh
4dd2735e38 cleanup fw filename conventions (#1434)
* cleanup fn

* import os

* fix path
2023-05-21 21:19:19 -07:00
Adeeb Shihadeh
4d7abcc2e6 PandaDFU: don't reset in program_bootstub (#1433) 2023-05-21 20:05:21 -07: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
Shane Smiskol
14bd994f83 Ford: add longitudinal safety (#1359)
* add ACCDATA msg

* ford long safety

* long flag

* split stock and op long tests

* use accel limits for brake

* add comment

* fix acceleration limits

fix acceleration limits

* fix gas limits

* temp bug

* fix min gas, allow -0.5 (engine braking?)

* fix test

* fix tests

* yay it caught this

* pylint

* base name

* typing

* Revert "typing"

This reverts commit 7fb5e304cb8eb6c9afff9fbe4266bc0a67f49c68.

* temp fix

* rm line

* this is handled by PandaSafetyTest

* revert

* move

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-05-18 00:21:29 -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
Justin Newberry
0a738b7ee8 Subaru: rename legacy to preglobal (#1415)
* rename

* missing some variables

* fix find/replace error
2023-05-15 17:22:40 -07:00
Shane Smiskol
675b1e847f iso-tp: revert CAN frame length check (#1411)
revert
2023-05-12 22:14:23 -07:00
Adeeb Shihadeh
da7c577486 spi dfu: fast timeout for header (#1407) 2023-05-08 16:43:25 -07:00
Robbe Derks
2c937656cf Continuous harness detection (#1402)
* read in mV and make threshold board-dependent

* refactor and add SBU voltages to health

* refactor relay driving

* more refactoring and readout lock

* avoid race condition

* fix misra

* continuous detection

* 1Hz is fine

* another race condition

* use harness detection to trigger bootkick

* update orientation detection test

* more in-depth harness tests

* fix ignition

* fix

* raise threshold
2023-05-08 13:30:23 +02:00
Adeeb Shihadeh
ba5c2948e4 python: default to 60s timeout for recover() (#1394) 2023-05-03 14:15:34 -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
3c75a8bc00 add fan stall count to health (#1355)
* add fan stall count to health

* fix misra

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-04-20 13:30:56 -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
Robbe Derks
237ffedcb3 Dos fan fix (#1335)
* hitl fan test

* enable cooldown on dos as well

* small cleanup

* get expected RPM from panda class

* fix

* overshoot test

* fix max RPM getting

* fix percentage

* revert cooldown fix

* add cooldown for dos fan as well

* remove feedforward from the fan controller to eliminate overshoot

* update clip

* cleanup

* add that back

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-04-18 14:15:06 -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
878e0077ac add tres to internal devices 2023-04-06 20:52:09 -07:00
Adeeb Shihadeh
6f852b44a9 SPI: log checksum errors in health (#1334)
* SPI: log checksum errors in health

* actually send it

* check in hitl teardown

* check that

* fix misra
2023-04-05 22:05:14 -07:00
Adeeb Shihadeh
2e8f27486f spi: bump up to 50MHz 2023-04-05 09:28:04 -07:00
Adeeb Shihadeh
b6c378ad02 CI: set PYTHONWARNINGS=error (#1323)
* CI: set PYTHONWARNINGS=error

* update resetter

* fix build warnings

* bump jungle

* fix one more

* fix linter

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-04-02 09:33:35 -07:00
Adeeb Shihadeh
3e89b7127a python: fix libusb deprecation warning (#1302)
* update list

* this one too

* update dfu
2023-04-01 23:09:12 -07:00