Commit Graph

1796 Commits

Author SHA1 Message Date
Greg Hogan ab693a22d5 UDS DTC number and status helpers 2022-04-04 17:55:11 -07:00
Shane Smiskol 6a4daee044
safety: disallow longitudinal actuation while gas is pressed (#884)
* test implemented for Toyota

* fix Toyota interceptor

* use hasattr

* do Honda (still need Nidec ACC_HUD safety)

* add longitudinal_allowed to ACC_HUD (Nidec w/ no pedal

* rx not needed

* add base test for longitudinal

* update name

* stash

* do GM

* use gas_pressed_prev

* do tesla safety

* add full tests

* add get_longitudinal_allowed for simpler tests

* remove unnecessary tests and revert honda/hyundai

* fix honda after revert

* make sure releasing gas allows longitudinal again

* clean up

* clean up

* Just check longitudinal allowed

* don't need to reset detection

* use prev and add brake detection

* only on gas

* make sure we don't change current_controls_allowed braking behavior

* clean up tests

* use current_controls_allowed for honda & GM

* this is pretty much tested in common

* fix up tests and move common tests

* revert

* better place

* add for body
2022-04-01 19:54:40 -07:00
Shane Smiskol f20682b640
use all cores (#898) 2022-04-01 19:15:04 -07:00
Shane Smiskol 94bfed6d28
safety tests: rename interceptor message functions (#900) 2022-04-01 19:14:41 -07:00
Adeeb Shihadeh 560bcc4063
body: add RX checks (#903)
* body: add RX checks

* add that
2022-03-31 15:58:54 -07:00
Igor Biletskyy 93863197dd
add safety mode for body (#901)
* safety mode for body

* move to 27

* dmm...

* misra..

* add faw to safety list

* missing safety modes in python lib

* dmm

* change address to 250

* add 0x1 addr for can flasehr

* whitespace
2022-03-31 12:02:19 -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 734efd96f3.

* common function to set up each test

fix honda

* Revert "common function to set up each test"

This reverts commit fe4e71b3c6.

* rename related function

* formatting

* consistent name

* revert this change
2022-03-28 13:13:27 -07:00
Shane Smiskol 31d70299ae
Tesla: add longitudinal controls allowed safety (#890)
* no long actuation if controls not allowed

* comment (bump)

* don't compare floats

* tesla longitudinal test

* clean up

* forgot all

* update constant

* fix
2022-03-28 13:03:07 -07:00
Adeeb Shihadeh c8f6cb0dd3 CI: add new dependencies for openpilot tools 2022-03-27 15:39:07 -07:00
Adeeb Shihadeh 7986b8b1e4 make safety replay nice 2022-03-25 20:00:44 -07:00
Shane Smiskol 8c7cb8c5b5
Honda Nidec: ACC_HUD safety (#889)
* Honda Nidec ACC_HUD safety

* probably what misra wants

* fix safety and add test
2022-03-25 14:29:18 -07:00
Shane Smiskol 7104818e14
rename unsafeMode to alternativeExperience (#878)
* alternative experiences

* not unsafe

* more renames

more renames

* not yet true

* I think we import from panda now

* update comments and test

* not needed

* bump health pkt version

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-24 14:31:31 -07:00
Adeeb Shihadeh e01c64574c
Toyota: increase torque rate limit (#887)
* Closer to HYUNDAI

* Change tests too

* Change MAX_RT_DELTA too

* Change test too

* Lower buffer to 20%

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-23 13:48:49 -07:00
Shane Smiskol 0591f68008
Honda: fix missing interceptor tests (#886)
* setUpClass never did anything

* oh, comments work as pass?

* pass

* Update tests/safety/test_honda.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-22 14:34:05 -07:00
Adeeb Shihadeh 991638a3df
Tesla: only allow cancel button (#880) 2022-03-20 22:00:19 -07:00
Adeeb Shihadeh 499906f324
Nissan + Tesla: don't exit controls allowed on blocked message (#877)
* Nissan + Tesla: don't exit controls allowed on blocked message

* update tests
2022-03-18 14:52:52 -07:00
Adeeb Shihadeh ba10911dbc
GM: enters controls on falling edge of button presses (#876)
* GM: enters controls on falling edge of button presses

* update test
2022-03-16 11:46:57 -07:00
Adeeb Shihadeh 868fd5386c
Hyundai: enter controls on falling edge of buttons (#875) 2022-03-16 10:37:48 -07:00
Adeeb Shihadeh 4acaebb62b
Honda: enter controls on falling edge of button presses (#874)
* Honda: enter controls on falling edge of button presses

* update tests

* little nicer with enum

* remove duplicate

* fix that

* reset on init

* add honda prefix
2022-03-15 21:42:41 -07:00
Adeeb Shihadeh e6722c7f99
Honda Nidec: match openpilot engagement behavior (#872)
* Honda Nidec: match openpilot engagement behavior

* update tests
2022-03-15 15:19:54 -07:00
Martynas Mickevičius a53528af22
Add more hints when troubleshooting panda (#864)
* Add more hints when troubleshooting panda

* mention different command for panda red
* mention panda paw

* Update board/README.md

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-14 12:02:08 -07:00
Adeeb Shihadeh 5a7af82f06
Hyundai: only allow cancel while cruise is enabled (#870) 2022-03-13 19:42:40 -07:00
Igor Biletskyy 891653fe31
Docker: bump openpilot and fix Toyota EPS scale factor for test (#869)
* new commit

* fix EPS scale for Toyota
2022-03-08 18:19:59 -08:00
Igor Biletksyy 234e436e93 rename to enable_deepsleep 2022-03-07 14:32:14 -08:00
Igor Biletskyy 860e5a4d21
Red Panda: auto switching to CAN FD with BRS (#868)
* add canfd autoenable

* add check to tests

* fix default speeds

* add autoswitch test
2022-03-07 14:25:19 -08:00
Igor Biletskyy 4f422ed5b9
C2: fix bootkick (#854) 2022-03-07 14:24:57 -08:00
Igor Biletskyy de7e1e7579
Deep sleep(stop) mode for pandas (#832)
* Add RTC with LSI for BP, GP, WP

* disable jenkins temporarily, REVERT!

* experiments

* cleanup is still needed

* cppcheck unused suppress

* raise deepsleep limit timeout to 120sec

* more experiments on usb_enumerated

* continue

* soft_disconnect

* almost done

* not enough

* no ignition

* still don't like it..

* rename to has_rtc_battery

* clock_source on the way!?

* delay 3 sec

* works on C3, needs test on C2

* And this is for C2

* disable bootkick

* misra 10.4

* ..

* ..

* set power state the right way

* change that

* seems don't need that? check on C2/C3

* partially works on RP...

* comments (will work after rebase)

* change fault name

* switch to manual activation mode

* Revert "disable jenkins temporarily, REVERT!"

This reverts commit 578d425fa7.

* my dear pedal!
2022-03-07 14:24:04 -08:00
Adeeb Shihadeh e8e9d8453c fix release script 2022-03-07 10:47:38 -08:00
Igor Biletskyy 51ccb9fbd2
HITL tests: change testing speeds (#862) 2022-02-24 14:36:53 -08:00
Igor Biletskyy 8435bda1d2
CAN FD: adjust bit timing settings to SAE specifications J2284-4 and J2284-5 (#861)
* try that

* revert to SAE and remove TDC

* add support for speed < 250kbps
2022-02-24 14:09:13 -08:00
Adeeb Shihadeh cb88a1756b
Honda: revert back to button enable for Nidec (#858) 2022-02-22 21:29:50 -08:00
Adeeb Shihadeh 2806eecea2 python: add safety param arg to set_safety_mode 2022-02-20 19:38:08 -08:00
Adeeb Shihadeh 9d27011ec2
misc CAN FD fixes (#856)
Co-authored-by: Comma Device <device@comma.ai>
2022-02-20 17:13:22 -08:00
Igor Biletskyy 0e79ab33ab
Fix USB enumeration detection for C2 (#853) 2022-02-14 14:31:16 -08:00
Igor Biletskyy f56ebf5b77
Revert "Split linker files for STMs F2 and F4 (#817)" (#852)
This reverts commit 5eddc180d5.
2022-02-10 19:25:25 -08:00
Igor Biletskyy c3d89ed780 Remove lefovers CLOCK_SOURCE_EXTERNAL_SYNC 2022-02-10 12:45:25 -08:00
Igor Biletskyy ffcba442c3
bug (#850) 2022-02-09 22:01:50 -08:00
Igor Biletskyy 14d7310784
Enable RTC for all pandas (#849)
* rename has_rtc and add rtc_init for panda boards

* change rtc_init
2022-02-09 15:36:37 -08:00
Igor Biletskyy 48f8c5f701
Remove CLOCK_SOURCE_MODE_EXTERNAL_SYNC (#847)
* remove CLOCK_SOURCE_MODE_EXTERNAL_SYNC

* remove from python lib
2022-02-09 07:42:44 -08:00
Igor Biletskyy 5eddc180d5
Split linker files for STMs F2 and F4 (#817)
* fix linkers
2022-02-07 16:21:18 -08:00
Shane Smiskol 3bd3ae885a
GM: change from brake threshold to Brake_Pressed bit (#846)
* GM: Use ECMEngineStatus.Brake_Pressed

* use get bit

Co-authored-by: Jason Shuler <jshuler@gmail.com>
2022-02-04 23:23:29 -08:00
Shane Smiskol ab10c977d2
Honda: match openpilot brake pressed check (#844)
* should be misra compliant

* no conflicts, but might as well

* remove old logic

* match style

* Update board/safety/safety_honda.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update board/safety/safety_honda.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update board/safety/safety_honda.h

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-02-04 13:36:23 -08:00
Shane Smiskol 2d96ef02df
GM ignition: remove signal with noise and false positives (#845) 2022-02-03 12:30:07 -08:00
Adeeb Shihadeh c89c8db650 libpandasafety: cleanup addr checks 2022-01-30 12:32:58 -08:00
Adeeb Shihadeh bdb591f5e6
Honda: fix controls mismatch for stock PCM configs (#840)
* Honda: fix controls mismatch for stock PCM configs

* start tests

* all tests

* fix pylint

* misra

* Update board/safety/safety_honda.h
2022-01-29 16:56:39 -08:00
Adeeb Shihadeh 293d3ee43d fix typo in libpandasafety_py.py 2022-01-28 15:41:54 -08:00
Adeeb Shihadeh 27aec867bd Honda: remove redundant check 2022-01-27 22:30:57 -08:00
Adeeb Shihadeh 3ddec2d221
move heatlh struct into header (#842) 2022-01-27 18:12:25 -08:00
Adeeb Shihadeh 00138a7f66
Add blocked message counter to health packet (#841)
* Add blocked message counter to health packet

* move that

* update python

* fix struct

Co-authored-by: Comma Device <device@comma.ai>
2022-01-27 17:46:24 -08:00
Jason Young 2c419de8b0
safety tests: better CAN address range scanning (#827)
* better CAN address range scanning

* minor cleanup
2022-01-26 11:46:25 -08:00