Commit Graph

2745 Commits

Author SHA1 Message Date
Adeeb Shihadeh f660323969
PandaDFU: fix F2 detection (#1664)
Co-authored-by: Comma Device <device@comma.ai>
2023-09-14 13:50:42 -07:00
Adeeb Shihadeh bdecf82605
F2: fix flash sectors (#1663) 2023-09-14 12:58:56 -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 68a2000776
add mcu reference manuals to readme 2023-09-14 11:01:06 -07:00
Justin Newberry 90eb24bf19
Safety: assert that torque safety modes check the steering request bit (#1625)
* test the steering request bit

* not in the angle yet

* not angle yet

* fixes

* draft

* can do this

* adapting the 3 steer req mismatch tests might be too intricate

Revert "can do this"

This reverts commit 775abf877b.

* don't change safety and test the actual behavior

* add comment

* rm

* revert

* For example, now this caught

* "fix"

* Update tests/safety/common.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-13 01:08:37 -07:00
Adeeb Shihadeh d4b405f5f7
pre-commit: autoupdate hooks (#1660)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-09-12 20:05:03 -07:00
Adeeb Shihadeh 047d36398d
SPI flash dump + restore tools (#1654)
* dump

* restore

* fix

* update

* update

* cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-09-12 20:04:54 -07:00
Justin Newberry d4e63daf34
VW PQ: Check steer req bit (#1630)
* vw pq

* misra
2023-09-11 13:59:30 -07:00
Jason Wen 428b303e26
Hyundai CAN-FD: move HDA2 flag to common Hyundai safety (#1638) 2023-09-11 13:57:54 -07:00
Shane Smiskol 8e8aa5acf6
Hyundai CAN: utilize macros for common address checks (#1655)
* common addrs behind macros

* draft so far

* Revert "draft so far"

This reverts commit e41b796a00.

* MISRA

* use new SET_ADDR_CHECKS macro
2023-09-08 00:41:11 -07:00
Shane Smiskol e9a0987617
Hyundai CAN FD: utilize macros for common address checks (#1658)
* draft

* now clean up old comments

* no more special broken ice addr checks

* revert

* fix

* add test for ICE HDA1

* Revert "add test for ICE HDA1"

This reverts commit 76d2b0f066.

* can be separate

* macro for addr check struct

* add checks for alt buttons (fixes race condition)

* add macro for array len

* add comment

* misra

* comments to help separate

* can't put parenthesis around array item

* review suggestions

* no intermediary macros for making the structs (remove misra violation)

* Update board/safety/safety_hyundai_canfd.h

* single lines

* can avoid double checking hda2 since we have addr checks for it now
2023-09-07 23:52:27 -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 ee21517c77
CI: run each job only once (#1659) 2023-09-07 19:10:05 -07:00
Adeeb Shihadeh e98639b752 increase not booted log timeout 2023-09-07 16:33:36 -07:00
Justin Newberry cb0cd1bfaa
Subaru: add safety around cutting steer req bit (#1632)
* wip

* steer bit

* add tolerance

* increase a bit more

* test too

* Had that backwards

* Here too

* review suggestions

* minimal diff

* minimal diff

* add type hints

* spacing

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

* update test name

* add tolerance comment

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-06 20:34:24 -07:00
Justin Newberry c12cbc1b94
Safety: separate test for steer request bit cutting (#1653)
* common test for that

* canfd too

* we set this everywhere

* never none

* subclass

* Update tests/safety/common.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-06 19:35:54 -07:00
Igor Biletskyy 394b61cd16
H7: reset CAN core on bus off state (#1615)
* init

* misra

* merge
2023-09-06 09:50:13 -07:00
Jason Wen 39bc5a4886
Nissan Altima: add a param for alternate EPS bus (#1649)
* Nissan Altima: Specify panda flag for alt bus safety config

* test this safety mode

* test this safety mode

* rm

* nl

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-06 00:46:33 -07:00
Shane Smiskol 0b6adad9c8
Nissan: test alternate EPS bus param (#1651)
* test this safety mode

* test this safety mode

* use int

* clean up

* clean up
2023-09-06 00:36:25 -07:00
Justin Newberry 104d708547
Precommit: ensure executable bit is set (#1650)
* precommit ensure executable

* fix the violations

* the correct shebang
2023-09-05 15:32:44 -07:00
Igor Biletskyy 3ab4f43de0
enable red and green leds until USB/SPI init (#1647)
* init

* add green
2023-09-05 13:36:13 -07:00
Justin Newberry 72f1603a89
VW MQB: Check steer req bit (#1631)
vq mqb
2023-09-01 16:32:08 -07:00
Justin Newberry 62bb0c2e33
Subaru: gen2 long safety (#1594)
gen2 long safety
2023-09-01 13:08:04 -07:00
Jason Wen 579fff0c2f
Safety tests: Convert message addresses from decimal to hexadecimal (#1633) 2023-08-31 20:13:37 -07:00
Jason Wen afb241ab1c
Safety: Convert message addresses from decimal to hexadecimal (#1623)
* Safety: Convert message addresses from decimal to hexadecimal

* unit tests

* fix

* In another PR
2023-08-31 20:12:59 -07:00
Justin Newberry ef1a9338a1
Chrysler: check steer bit (#1628)
* chrysler

* misra
2023-08-31 16:01:16 -07:00
Justin Newberry fbe81a1753
GM: check steer req bit (#1629)
for gm
2023-08-31 16:01:05 -07:00
Justin Newberry f4d0904d94
Subaru: preglobal check steer req bit (#1626) 2023-08-31 14:26:51 -07:00
Igor Biletskyy 3efa31a804
F4: fix GMLAN clocks (#1624)
* init

* misra
2023-08-31 09:55:12 -07:00
Igor Biletskyy f89207328b
F4: fix wrong PCLK value (#1608)
* fix mistake

* clean
2023-08-31 09:35:25 -07:00
Adeeb Shihadeh 124a83c0bf disable forest while it's rebuilt 2023-08-30 11:18:40 -07:00
Adeeb Shihadeh a4fa40a713
python: show lib and fw versions in error (#1622)
* python: show lib and fw versions in error

* fix

* cleanup
2023-08-30 10:56:30 -07:00
Adeeb Shihadeh bc2f10da57 Revert "pre-commit: autoupdate hooks (#1618)"
This reverts commit 526588b3e9.
2023-08-30 10:38:12 -07:00
Justin Newberry e30ba9547c
Subaru: add steer req bit test (#1613)
add active bit test
2023-08-30 01:29:27 -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
Jason Wen e6c1648835
Hyundai CAN-FD: Alternate `LKAS` steering message (#1504)
* new steering message!

* fix

* check tx

* fix var

* allow all tx to test LFA suppression

* Attempt to block laneline information to suppress LFA

* Try 0x364

* Block all bus 2/6 messages

* Final test to block LFA

* Fix tx

* in another PR

* cleanup

* lint

* Add new tx to unit test

* linter

* Apply suggestions

* Revert to this

* Unnecessary

* clean up

* rename to hda2

* prototype

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-29 23:40:14 -07:00
Jason Wen 48632d9e0b
Hyundai CAN FD: fix boolean types in fwd hook (#1620)
* Safety: Utilize boolean values for message block checks in forward hooks

* Revert "Safety: Utilize boolean values for message block checks in forward hooks"

This reverts commit ee9809dbd3.

* others

* Revert "others"

This reverts commit f64cc1c76a.

* just do hyundai

* function to get steering address

* unclear if this is cleaner

Revert "function to get steering address"

This reverts commit 2a2b972a20.

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-29 20:23:41 -07:00
Igor Biletksyy d41a0abef6 H7: comments for RAM organization reasoning 2023-08-29 16:10:50 -07:00
Igor Biletskyy 91d457cbb1
H7: reorganize RAM (#1619)
init
2023-08-29 13:04:27 -07:00
Igor Biletskyy 687e9feeb1
H7: decrease FDCAN TX FIFOs to 1 (#1614)
init
2023-08-29 13:04:20 -07:00
Igor Biletskyy 267dd04537
Update README.md
change Mac OS gcc version
2023-08-29 12:34:44 -07:00
Shane Smiskol ca9d8675b9
Revert "Toyota: ACC message relay check (#1612)" (#1617)
This reverts commit 5a9d8cfaaf.
2023-08-28 23:18:42 -07:00
Shane Smiskol 1e41659aab
Revert "iso-tp: more checks (#1487)" (#1616)
* Revert "iso-tp: return if updated (#1610)"

This reverts commit 0eb04fae67.

* Revert "iso-tp: more sanity checks (#1487)"

This reverts commit 01db9e4a83.
2023-08-28 23:08:41 -07:00
Shane Smiskol 5a9d8cfaaf
Toyota: ACC message relay check (#1612)
* toyota: add safety for tester present

* block ACC_HUD

* check stock ECU

* clean up

* not this

* test new addr

* comment

* rm

* cmt
2023-08-27 15:43:59 -07:00
Shane Smiskol 0eb04fae67
iso-tp: return if updated (#1610)
return if updated

reverts some of https://github.com/commaai/panda/pull/1314
2023-08-26 06:45:46 -07:00
Shane Smiskol 01db9e4a83
iso-tp: more sanity checks (#1487)
* assert rx not done for single frame to be valid

* not sure if this is correct yet

* return if updated

reverts some of https://github.com/commaai/panda/pull/1314

* Revert "return if updated"

This reverts commit ba4c4f194a.
2023-08-26 06:35:34 -07:00
briskspirit f7a1daab74 jungle: force CAN core reset on bus off detection 2023-08-25 17:58:10 -07:00
Shane Smiskol cca252c8d4
Honda: match openpilot button enable check (#1607)
* NONE -> not BUTTON

* update test and fix safety

* cleaner
2023-08-25 16:11:08 -07:00
Igor Biletksyy 8ed82d3899 jungle: fix can_health update on request 2023-08-25 15:42:39 -07:00
Adeeb Shihadeh 09cd81752d
python lib: close USB context properly (#1606)
* python lib: close USB context properly

* fix jungle

* rm that

---------

Co-authored-by: Comma Device <device@comma.ai>
2023-08-24 19:15:37 -07:00