Commit Graph

10 Commits

Author SHA1 Message Date
Shane Smiskol
583d3a0c7b Mazda: fix steering safety and add tests (#952)
* fix steering safety and add tests for mazda

* fix steering safety and add tests for mazda
2022-05-25 22:19:18 -07:00
Shane Smiskol
36ccbd56fa Toyota: check STEER_REQUEST bit (#940)
* check steer_req

* think this is clearer on first glance

* add test

* also test recovery

* Update tests/safety/test_toyota.py

* Update tests/safety/test_toyota.py

* move
2022-05-16 12:20:31 -07:00
Shane Smiskol
79145f9e5f safety tests: rename gas/brake message functions (#893)
* _brake_msg and _gas_msg were confusing

* use class inheritance to define test specific safety variables

* Revert "use class inheritance to define test specific safety variables"

This reverts commit 734efd96f3f66c2cff62674a6510c1c4b08f22cd.

* common function to set up each test

fix honda

* Revert "common function to set up each test"

This reverts commit fe4e71b3c64c6dd9717ea4f188abef7114cbfce8.

* rename related function

* formatting

* consistent name

* revert this change
2022-03-28 13:13:27 -07:00
Adeeb Shihadeh
bf77a0b20c Mazda: only allow cancel while controls not allowed (#757) 2021-10-30 12:38:26 -07:00
Adeeb Shihadeh
da4efd21c4 Mazda: allow sending HUD alerts (#754) 2021-10-29 23:39:38 -07:00
Adeeb Shihadeh
0d4e98f605 Mazda: only check ACC state for controls allowed (#753) 2021-10-29 12:12:53 -07:00
Adeeb Shihadeh
9eee6ca556 update safety tests after DBC changes 2020-06-09 16:51:08 -07:00
Willem Melching
e0a706e4f0 Stricter pylint (#550)
* stricter pylint

* Add as argument
2020-06-02 16:27:07 -07:00
Adeeb
d7f7b14118 Enable almost all Flake8 checks (#548)
* fix W391

* E262

* E703

* W293

* some E

* E231

* some more E

* E225

* more E

* E252

* no tabs

* more tabs

* E701

* uds.py

* almost all of them

* only e265 left

* not sure why this is triggering on commented out code

* ignore esptool
2020-06-01 01:49:26 -07:00
Jafar Al-Gharaibeh
89658d0bde Mazda: safety tests add missing safety checks (#525)
* Mazda: add safety test

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update mazda safety to capture more events

    * gas press
    * brake press
    * speed - lkas on/off

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Customize safety tests

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add RX checks

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Format

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Set lkas enable speed at 52 kph

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Test case when speed<enable_lkas_speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Be consistent with names in other places

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Add test case for lkas on when speed dips below lkas enable speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Make sure lkas disabled

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Use car's speed signal instead of wheel speed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Allow acc cancel msg

  When gas is pressed OP disenages stock cruise doesn't get disengaged.
panda needs to know when OP engages again. OP re-enageges on cruise button
presses. This commit uses the same re-enage logic in panda.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* rebase

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* allow acc_cancel in safety tests

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* rename variable, fix comment

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2020-05-28 13:09:54 -07:00