Commit Graph

2990 Commits

Author SHA1 Message Date
martinl
c55e84bf56 Change Subaru safety test to use generated dbc (#575)
* Change Subaru test to use generated dbc

* update openpilot pinned commit
2020-07-23 13:06:11 -07:00
bkralik
52583dc289 Warning of disabled safety modes (#574)
Several safety modes are available only with ALLOW_DEBUG flag. This is not noted in docs...
2020-07-22 10:38:08 +02:00
Andre Volmensky
4b576ab13d Bugfix: Fix harness error when starting car (#572)
* Bugfix: Fix harness error when starting car

* fix misra violation

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-07-18 23:08:21 -07:00
Greg Hogan
b3e278755c J2534 iso14230 (#563)
* ISO14230

* ISO9141 (excluding 5 baud init)

* j2534 5 baud init

* disable unsupported pin select protocols

* update README for new installer

* cleanup

* cleanup

* J2534 windows registry ISO9141 flag

* make it easier to select dev J2534 driver

* update README with new installer
2020-07-10 14:43:31 -07:00
Greg Hogan
390b8bce81 k-line 5 baud init (#565)
* k-line slow init

* k-line slow init LED bit blink

* fix misra violations

* better names for k-line methods

* debug prints match names

* switch to timer

* use TIM4 until I figure out TIM5

* tickle faster

* fix bit bug and add stop bit

* TIM5 working

* USB return after addr sent

* fix l-line reset

* fix misra violations

* blink for the ones instead of the zeros

* k-line 5 baud fault type

* lin check

* use TIM5 or wakeup

* better names
2020-07-10 14:18:24 -07:00
robbederks
2fab502cad Increased pullup delay significantly to maybe improve board detection stability. 10 loops was only tens of ns. (#567) 2020-07-02 23:07:27 +02:00
robbederks
387fd681dd USB enumeration detection fix (#566)
* testing

* Looks fixed now

* Cleanup
2020-07-02 00:23:12 +02:00
Adeeb Shihadeh
ca12a1c660 enable flake8 F error codes 2020-06-22 14:02:18 -07:00
Adeeb Shihadeh
0d97b6d4eb Safety Test: ensure TX msgs for other cars are blocked (#521) 2020-06-21 23:25:54 -07:00
Greg Hogan
31f8a0d862 K line fix (#559)
* enable UART RX interrupts

* update debug prints for python3

* improve kline functions and fix checksum

* k-line wake-up conforming to KWP2000 fast init

* fix timing

* toggle k and l line together by default

* k-line wakeup using timer

* k and l were flipped

* fix misra compliance
2020-06-18 11:17:00 -07:00
Adeeb Shihadeh
1e6854eb8f Fix GM ignition logic (#561) 2020-06-18 11:12:20 -07: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
Adeeb Shihadeh
e13774ba8c remove unused TX msg for toyota safety 2020-06-15 20:06:56 -07:00
Adeeb Shihadeh
086be906d7 Add test routes for Hyundai legacy and Subaru legacy safety modes (#558)
* add subaru legacy route to safety replay

* hyundai legacy routet push
2020-06-15 18:15:49 -07:00
Adeeb Shihadeh
abb229c9e7 Add gas signal for hyundai EV (#555) 2020-06-15 10:48:33 -07:00
Greg Hogan
63fe9f73c3 kline_ll_recv return bytes 2020-06-14 09:22:39 -07:00
Adeeb
d0442fd1e4 add hyundai legacy safety mode (#554) 2020-06-12 18:03:31 -07:00
robbederks
d6668fe4ef Turn on fan if panda is enumerated but not receiving heartbeat (#553)
* fix linter

* Turn on fan if panda is enumerated but not receiving heartbeat

* Upped to 50%
2020-06-11 18:14:41 -07:00
Adeeb Shihadeh
abeafb6256 fix linter 2020-06-11 17:06:53 -07:00
Robbe
5d6fcbb422 gmlan harness test 2020-06-11 16:44:37 -07:00
openpilot laptop
74c607f79a isotp_send fix bus and add slow mode 2020-06-11 16:42:21 -07:00
Adeeb Shihadeh
d9e32986c2 update dockerhub token 2020-06-11 16:25:11 -07:00
martinl
b2c86eb66b Subaru safety refactoring (#532)
* Update subaru safety tx messages

* Add Subaru preglobal driver torque limits

* fix preglobal desired_torque

* fix subaru preglobal torque rate limit and tx messages

* readability update for desired_torque

* fix preglobal tests

* Subaru safety refactoring, added missing legacy checks and updated test

* Remove subaru_global check from tests

* Reorder legacy constants, remove subaru_init

* Update Subaru legacy safety and tests to match dbc scaling factors

* remove scaling factor from torque_driver

* Change preglobal driver torque scaling factor

* Change driver torque factor to 10

* Fix preglobal dbc name

* Fix Subaru legacy safety test

* update openpilot commit

* init valid with one line
2020-06-11 15:51:05 -07:00
Adeeb Shihadeh
76f347165f gate subaru legacy and vw pq safety modes behind debug flag 2020-06-11 15:31:57 -07:00
Adeeb Shihadeh
f993e66b99 tools dependencies 2020-06-09 16:57:26 -07:00
Adeeb Shihadeh
9eee6ca556 update safety tests after DBC changes 2020-06-09 16:51:08 -07:00
Adeeb Shihadeh
70e39040b4 only push to docker registry from master 2020-06-07 21:47:39 -07:00
Adeeb
35bff5db51 Speed up misra test in CI (#552) 2020-06-07 21:42:23 -07:00
Adeeb Shihadeh
6848c7576b use same flake8 config as openpilot 2020-06-03 16:22:30 -07:00
Adeeb
20eb68b179 Add pre-commit hooks (#551)
* add more pre-commit hooks

* revert misra coverage table

* fix coverage table exclusion
2020-06-03 15:08:57 -07:00
Willem Melching
e0a706e4f0 Stricter pylint (#550)
* stricter pylint

* Add as argument
2020-06-02 16:27:07 -07:00
robbederks
a38925a0a4 this fixes the fw on newer compilers. haven't figured out why it broke yet (#549) 2020-06-02 14:21:41 -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
3d5a7179b0 fix whitespace after opening bracket 2020-05-31 21:36:34 -07:00
Adeeb Shihadeh
f70ef291f9 whitespace fix 2020-05-31 17:49:37 -07:00
Adeeb Shihadeh
eba113cb67 backslash is redundant between brackets 2020-05-31 17:39:42 -07:00
Adeeb Shihadeh
8039638482 fix linter complaint about unexpected spaces around keyword / parameter equals 2020-05-31 17:34:34 -07:00
Adeeb Shihadeh
275e76c2b2 fix linter complaint about too many blank lines 2020-05-31 17:20:47 -07:00
Adeeb Shihadeh
9102c16118 two spaces before inline comment 2020-05-31 14:07:01 -07:00
Adeeb Shihadeh
49ffbe99f6 disable non-universal checks in hyundai safety 2020-05-31 12:08:02 -07:00
Adeeb Shihadeh
3a85f4c25c use whole route when running safety replay from CLI 2020-05-30 21:31:18 -07:00
Andre Volmensky
098f47a5b4 Fix leaf brake rx check (#547) 2020-05-30 16:43:53 -07:00
Willem Melching
b8267341a1 Add pre commit checks + CI (#545)
* Add pre commit checks

* untested but should work

* fix typo in dockerfile

* add sqlite

* add pylintrc to ignore usb1 members

* Typo in stage name

* Move to requirements
2020-05-29 11:52:03 -07:00
Alice Knag
339976c3ca document tx message addresses better (#543)
* document tx message addresses better

* comment out scc messages for now
2020-05-28 19:59:14 -07:00
Willem Melching
a618e64d1a fix typing errors 2020-05-28 14:06:13 -07:00
Adeeb Shihadeh
9bece64e8f use mazda init 2020-05-28 13:20:46 -07:00
Adeeb Shihadeh
08db086d58 mazda cleanup 2020-05-28 13:15:04 -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
Andre Volmensky
bdec1398e5 Fix length of 0x20b in NISSAN_TX_MSGS, wasn't cancelling ACC (#544) 2020-05-27 12:41:19 -07:00
robbederks
b48c74c2e9 Adding UNO to automated tests (#538)
* Added UNO to automated tests

* Longer wait for uno while resetting?

* Increased wrong timeout

* this fixes it locally
2020-05-26 15:35:51 -07:00