Commit Graph

51 Commits

Author SHA1 Message Date
Shane Smiskol
19983f13b3 Chrysler: match openpilot standstill check (#1065)
* match openpilot standstill, and fix ram standstill parsing

* misra

* cmt
2022-09-13 13:52:44 -07:00
Adeeb Shihadeh
486af79503 Chrysler: add Ram HD support (#1010)
* ram hd safety

* bump opendbc

* dt prefix

* remove that
2022-08-11 14:41:46 -07:00
Adeeb Shihadeh
a1686ca3ca safety tests: use can packer for counters (#995)
* safety tests: use can packer for counters

* bump opendbc
2022-07-21 18:50:42 -07:00
Adeeb Shihadeh
baecd2ecc6 Chrysler: increase Ram rate limits (#981) 2022-07-11 15:01:35 -07:00
Adeeb Shihadeh
53466f0934 Chrysler: allow resume button (#980) 2022-07-06 23:43:56 -07:00
Adeeb Shihadeh
fae3ee2e81 Chrysler: Ram 1500 support (#969)
* RamInit

* Some fixes

* ram param

* cleanup steering

* invert

* couple fixups

* tests pass

* check that

* misra fixes

* same limits

* revert that

* remove those

Co-authored-by: Jonathan <jraycec@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-07-06 22:50:29 -07:00
Adeeb Shihadeh
6c0d0b43c2 Chrysler: update tests after DBC updates (#979)
* Chrysler: update tests after DBC updates

* lil cleanup
2022-07-05 16:33:12 -07:00
Shane Smiskol
4bc85ad40a Chrysler: use correct engaged bit (#973)
* use new engaged bit

* fix msg name

* update signal

* update opendbc ref
2022-06-22 14:46:25 -07:00
Shane Smiskol
515df2bb72 Chrysler: use universal gas and brake signals (#970)
* RamInit

* just gas and brake changes

* unsigned

* fix tests

* bump openpilot version (TEMP)

* misra

* system

Co-authored-by: Jonathan <jraycec@gmail.com>
2022-06-16 21:49:22 -07:00
Shane Smiskol
6117c381f2 safety tests: create classes for common torque steering tests (#951)
* Create base class for common steering tests (motor/driver)

* fix class name
2022-05-25 19:24:55 -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
Jason Young
a96615d253 Chrysler: remove standstill exception for gas disengage (#826)
* Chrysler: Normalize gas pedal handling

* revert CI test change
2022-01-13 16:04:40 -08:00
Adeeb Shihadeh
5b14945140 Abstract RX checks for gas, brakes, and relay malfunction (#556)
* abstract gas, brake, and relay RX checks

* toyota

* mazda

* vw and subaru

* gm, honda, nissan

* chrysler

* rename

* revert that
2020-06-16 02:01:00 -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
Adeeb Shihadeh
eba113cb67 backslash is redundant between brackets 2020-05-31 17:39:42 -07:00
Adeeb
9ebde2535c Reset state on safety mode init (#542)
* reset state on safety mode init

* more global state

* reset message seen too

* misra
2020-05-26 14:23:39 -07:00
Adeeb
c9102c00ee Chrysler: use can packer in safety tests (#522)
* Chrysler: use can packer in safety tests

* bump opendbc
2020-04-30 14:26:28 -07:00
Adeeb
9874e73350 Abstract steering safety tests for Toyota and Chrysler (#520)
* start abstracting torque steering tests

* remove duplicate

* chrysler

* remove that

* revert that for now

* fix toyota

* unused
2020-04-29 20:37:12 -07:00
Adeeb
0bc864b3d5 Make torque-based steering state global (#518)
* use generic steering state vars for toyota

* chrysler

* gm

* comment

* more unnecessary lines

* hyundai

* subaru

* vw

* fix mazda
2020-04-28 10:33:20 -07:00
Adeeb Shihadeh
bd98fe6031 safety tests: use shorter function name 2020-04-27 15:27:28 -07:00
Adeeb
884afa0ef7 Safety Test Refactor: Chrysler and Volkswagen PQ (#508)
* volkswagen pq

* chrysler

* cleanup
2020-04-17 13:34:23 -07:00
Adeeb
62e4d3c369 Chrysler: fix missing button signal on TX (#490)
* Chrysler: fix missing button signal on TX

* fix test
2020-04-10 13:48:41 -07:00
eFini
4e98bbe8c9 Apply unsafe allow gas mode to all cars. (#480)
Apply unsafe iso accel/decel limit to toyota.
2020-04-06 08:56:36 -07:00
rbiasini
ceff91d3c5 Standardize brake safety tests (#465)
* WIP: improve safety test format

* Fix tests
2020-03-07 23:22:47 -08:00
rbiasini
11ef24bc16 Improve tests (#456)
* much more thorough Honda-Bosch tests and better test inheritance. Also fix counter test bug

* Fixed other counters too

* remove unnecessary function
2020-02-29 09:00:29 -08:00
rbiasini
dad5858b8c Chrysler: add brakepress cancellation (#451) 2020-02-26 18:19:18 -08:00
rbiasini
d7f1195d1e Chrysler Checksum/counter (#450)
* abstract crc function

* counter-checksum for chrysler

* also adding checksum to tests
2020-02-24 16:36:46 -08:00
rbiasini
b2ffaae60e Chrysler: disengage on gas press (#442)
* add gas cancellation for chrysler
* added regr test too
* also add bus checks to chrysler. SHould have been there already
2020-02-19 23:46:38 -08:00
Riccardo
4f9c879696 remove abunch of lines from safety regression tests by using common make_msg function 2019-11-19 11:29:04 -08:00
Riccardo
212d336b3d Safety Chrysler: Added cancel spam button check 2019-11-17 22:32:13 -08:00
rbiasini
6249a183d6 tx_hook shall have a white-list of messages (#381)
* Started whitelisting messages

* Also toyota and cadilalc fix

* bug fixes and better checks. Need to figure out a solution for honda

* Whitelist also for subaru

* Added Chrysler as well to whitelist

* And Hyundai too

* now all supported cars should have a whitelist of messages

* Fix linter

* This should fix process replay

* Honda too is now whitelisted

* struct typedef

* Had forgot GM

* had a wrong addr for GM whitelist

* This should fix all the tests

* bump panda
2019-11-17 00:24:19 -08:00
Riccardo
e74ed93640 safety tests a bit more simplified 2019-11-15 01:12:54 -08:00
Riccardo
2027765bd0 relay malfunction test centralized 2019-11-15 01:03:34 -08:00
Riccardo
8af1a01ac6 clean up safety tests 2019-11-15 00:52:34 -08:00
rbiasini
cfcce8f06b WIP: Relay malfunction (#384)
* relay malfunction handling. WIP

* more cars to relay_malfunctions

* fixed safety tests

* minor change

* Fix linter

* all cars now have a relay_malfunction safety check

* added relay_malfunction safety test for fwd hooks

* added proper regression tests for relay malfunction to all cars

* temp patch to not fail regression in honda bosch

* also addr 0x194 is some nidec honda is steer control

* proper relay check for honda bosch too
2019-11-15 00:32:45 -08:00
Riccardo
e8d7ed1d90 Rename function name to not confuse safety_set_mode and set_safety_mode 2019-11-06 14:30:22 -08:00
rbiasini
fce38a91d7 Linter python (#299)
* Added pyflakes and Pylint for python

* Actually run linter in CI

* some simple pyflakes changes

* Add flake8 to panda reqs for linter test

* flake8 errors are fixed

* run flake8 in regression tests

* meant to run flake8

* hack to ignore unused import

* bug

* fix bugs in tucan_loopback

* Another fix by using set_safety_mode

* added pylintrc file

* more fixes and enabled pylint as well

* Fix pylint in circleci

* added linter to readme
2019-10-15 14:03:31 -07:00
rbiasini
70219d7bb2 match safety enum in cereal (#285)
* match safety enum in cereal

* removing tons of hardcoding

* add pythonpath to safety test

* Fix safety test in Docker
2019-10-02 18:20:32 -07:00
Riccardo
0de9ef73cc Revert "Final 2to3 on the whole repo"
This reverts commit c92fd3bc90.
2019-09-25 17:01:13 -07:00
Riccardo
c92fd3bc90 Final 2to3 on the whole repo 2019-09-25 16:58:56 -07:00
Riccardo
2dc34096a0 2to3 applied 2019-09-24 22:33:46 -07:00
Riccardo
1e2412a297 env python -> env python3 2019-09-24 17:50:53 -07:00
Riccardo
133269a1a4 Added fwd test coverage for Toyota, Hyundai and Chrysler too. Removed replay tools for Chrysler, as a generic replay tool has been recently added 2019-06-11 19:24:08 -07:00
quillford
cd20d123c4 refactor tests/safety to use generic hooks (#208)
* refactor tests/safety to use generic hooks

* cleanup refactor

* removed dead code
2019-06-11 01:31:00 -07:00
Drew Hintz
7b504d2f88 panda safety test that replays drives of saved CAN messages (#151)
* panda safety test that replays drives of saved CAN messages

* utility to trim Cabana CSV logs to just messages relevant for panda safety testing

* when trimming, only output the same line once even if it matches both criteria
2019-02-21 13:35:04 -08:00
Riccardo
be0061dccb Chrysler: safety now based on motor torque 2019-01-02 21:53:07 -08:00
Riccardo Biasini
039d1834b6 Chrysler: fixed regression test 2019-01-01 20:00:11 -08:00
Riccardo
cf3ecd629d Chrysler safety: re-using hyundai framework 2018-12-28 19:20:57 -08:00