Commit Graph

2726 Commits

Author SHA1 Message Date
Shane Smiskol f3bdfdd435 Rename safety coverage flag 2023-10-30 11:43:56 -07:00
Shane Smiskol da66779b43
safety: coverage report (#1696)
* coverage report

* test script

* not needed

* option

* options

* re-build if file missing

* rename

* rename flag

* just always build

* cmt

* fix rebuild, panda.c is what does gens gcno

* clean up

* check coverage

* rename

* add skip flag

* Revert "add skip flag"

This reverts commit 6991c174ce.

* both do same thing

* clean up script

* don't test here

* Revert "don't test here"

This reverts commit 43fe4c961f.

* try running in CI

* nproc

* move

* Revert "try running in CI"

This reverts commit 912017c7fa.

* don't test here

* fix path

* re-compiling does this
2023-10-25 22:01:01 -07:00
Shane Smiskol f62d1723fd
Hyundai CAN: fix driver torque safety scaling (#1695)
* how does this/did that pass?!

* fix misra

* add comment

* we could do this

* or could do what eps torque does

* another pr

* not unused

* need this for special gm

* support testing integer torque

cmt

* there we go

* stash again

* Revert "stash again"

This reverts commit 4ecf6cc91c.

* this works!

* clean up

* cmt

* ugh this test was broken

* add some comments for this behemoth, and switch to rxing real msgs

* for now, no measurement test since we don't have any info about driver torque on can. for ex:

max value, factor on CAN, etc.

clean up

* more clean up

* just use it everywhere

* better cmt

* cmt
2023-10-24 23:20:33 -07:00
Shane Smiskol f8c2041a9c
safety tests: fix driver torque override test (#1698)
* this was failing for the wrong reason

* stash

* Revert "stash"

This reverts commit b29e09ca85.

* call it driver torque

* Revert "call it driver torque"

This reverts commit 1ed5ce5ebe.
2023-10-24 22:44:30 -07:00
Adeeb Shihadeh 1a0d5fac81
pre-commit: autoupdate hooks (#1697)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-10-24 14:38:00 -07:00
Shane Smiskol 331829bfac
safety tests: clean up measurement tests (#1694)
* hmm this works

* hyundai fix in another pr

* support testing integer torque

cmt

* there we go

* Revert "there we go"

This reverts commit 6c5a19aad8.

* Revert "support testing integer torque"

This reverts commit 2c381077d5.

* clean up

* Update tests/safety/common.py
2023-10-23 20:04:05 -07:00
Shane Smiskol 229107f120
replay drive: fix space formatting 2023-10-19 19:57:10 -07:00
Adeeb Shihadeh 8255ee81ab
pre-commit: autoupdate hooks (#1692)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-10-19 11:29:38 -07:00
Shane Smiskol 549fa32fc7
safety replay: support Toyota LTA angle control (#1693)
* safety replay: support toyota lta

* one line
2023-10-17 16:48:13 -07:00
shameer99 b496de2d08
Linkify `board/README.md` in panda/README.md, (#1691) 2023-10-13 22:34:43 -07:00
Adeeb Shihadeh 95c4449d96
pre-commit: autoupdate hooks (#1689)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-10-10 13:24:45 -07:00
Adeeb Shihadeh 7b323413d2
jenkins: run bootkick tests (#1688)
* jenkins: run bootkick tests

* flip that

* little longer

* increase

* disable can

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-10-09 21:52:15 -07:00
Adeeb Shihadeh aaa1172fa2
HITL bootkick tests (#1685)
* HITL bootkick tests

* both bootkick cases

* more

* som use gpio

* cleanup

* pretty reliable now
2023-10-06 13:38:35 -07:00
Adeeb Shihadeh ea826ccea6
CI: whitelist hitl jungles (#1687)
Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-10-05 18:27:33 -07:00
Adeeb Shihadeh f42b65ca32
skip flash if up to date (#1686)
* skip flash if up to date

* fix
2023-10-05 13:13:40 -07:00
Greg Hogan 0ca5ad773f
socketcan: usb bulk mode for rx (#584) 2023-10-03 17:44:10 -07:00
Igor Biletskyy 5778c0ae5d
H7: fix GMLAN bitbang timer (#1542)
* init

* move Adeeb's test

* bitbang expected to fail can_health
2023-10-03 13:14:14 -07:00
Adeeb Shihadeh 4ad2802e99
pre-commit: autoupdate hooks (#1682)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-10-03 11:34:15 -07:00
Shane Smiskol 43af1df79e
safety: sample_t is not fully reset on safety mode init (#1376)
* found another bug!

* update test

* why does toyota add 1 but not chrysler?!

* test/fix others

* clean up

* more

* global

* clean up

* one function to reset AND update

* without abs and only negative values: this is not caught (since negative error < 1)

* ugly draft

* clean up, tests work

* now only should use this function

* better cmt

* better loc

* constant in python too!

* actually duplicate comment
2023-10-03 03:15:16 -07:00
Shane Smiskol 846c807797
safety tests: fix measurement test (#1679)
* Update common.py

* without abs and only negative values: this is not caught (since negative error < 1)

* ugly draft

* this catches it

* draft

* draft

* draft

* works now!

* no blurry tests

* ugh subaru is like this too

* okay some can scaling makes it slightly off (wheel speeds)

* uncommont

* clean up
2023-10-03 02:46:58 -07:00
Shane Smiskol 635db84095
Subaru: consider true angle sign in safety (#1681)
* this fails

* this doesn't!
2023-10-03 02:18:10 -07:00
Shane Smiskol 9fd1b268b4
Nissan: consider true sign in safety (#1680)
* works

* simpler

* cmt again

* better
2023-10-03 01:50:37 -07:00
Jason Wen 7af336244c
Hyundai CAN-FD: Move CRC compute function to common Hyundai safety (#1634)
* HKG CAN-FD: Move CRC lookup function to common Hyundai safety

* cleanup

* declare in common

* Subaru: gen2 long safety (#1594)

gen2 long safety

* VW MQB: Check steer req bit (#1631)

vq mqb

* cleanup

* more cleanup

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-10-02 21:32:13 -07:00
Adeeb Shihadeh 6bf6ba773e
less dependencies (#1676) 2023-10-02 14:24:16 -07:00
Adeeb Shihadeh 43bed1aa47
jungle HITL tests setup (#1665)
* setup new zoo

* run

* fix

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-09-30 23:19:06 -07:00
Adeeb Shihadeh b6e37f25b6
Remove flash logging (#1674)
* Revert "Disable flash logging (#1667)"

This reverts commit 62db60595b.

* Revert "Faster log retrieval (#1484)"

This reverts commit 694aae9c26.

* Revert "Flash bounds checking outside of bootstub (#1459)"

This reverts commit 054344de6b.

* Revert "Logging (#1445)"

This reverts commit 0cc91a7f7b.

* cleanup

* cleanup
2023-09-30 12:49:46 -07:00
Adeeb Shihadeh 6d0ffd96ab
pre-commit: autoupdate hooks (#1672)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-09-26 14:10:30 -07:00
Igor Biletskyy b12b9b9c97
jungle v2: control power individually per port (#1669)
* init

* better api
2023-09-25 17:58:11 -07:00
Adeeb Shihadeh 62db60595b
Disable flash logging (#1667)
* disable logging to flash

* update tests

* fix hitl
2023-09-21 15:28:19 -07:00
Adeeb Shihadeh 38404c7d10
pre-commit: autoupdate hooks (#1666)
Update pre-commit hook versions

Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
2023-09-19 16:13:53 -07:00
Shane Smiskol 546087125f
GM: change ignition signal (#1662)
* GM: change ignition signal

* Update board/drivers/can_common.h
2023-09-15 02:04:51 -07:00
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