Commit Graph

288 Commits (729b4db3697bc113098e009fe637fe62babf22bd)

Author SHA1 Message Date
Greg Hogan a3b95dc26d
hyundai: WHL_SPD11 checksum (#622)
* WHL_SPD11 checksum

* update comments
2021-03-31 18:39:13 -07:00
Jason Young 9108b82fb0
VW MQB: Updated message and signal data, round 1 (#632)
* EPS_01 -> LH_EPS_03

* Bump openpilot commit ref

* made echo test more stable

* update python to 3.8.5

* Revert "Bump openpilot commit ref"

This reverts commit 75ec1a0c

* Bump openpilot commit ref

* Bump openpilot commit ref

* Update Dockerfile.panda

* fixed torque signal name

* Signal naming fix, round 2

* fix CI

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-14 16:24:53 -07:00
Andre Volmensky 72d6b6de69
Nissan Altima port (#612)
* Nissan Altima port

* Added bus check for Cruise Enabled message
2020-12-11 13:41:12 +01:00
Adeeb Shihadeh 9fb584b20c
Hyundai: increase max torque (#602)
* increase max hyundai torque

* update test threshold
2020-10-01 12:03:23 -07:00
Andre Volmensky 3a8430b9d5
Updating X-Trail/Rogue gas_pressed threshold (#585) 2020-08-08 11:10:32 -07: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
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 abb229c9e7
Add gas signal for hyundai EV (#555) 2020-06-15 10:48:33 -07:00
Adeeb d0442fd1e4
add hyundai legacy safety mode (#554) 2020-06-12 18:03:31 -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 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
Adeeb Shihadeh 49ffbe99f6 disable non-universal checks in hyundai safety 2020-05-31 12:08:02 -07:00
Andre Volmensky 098f47a5b4
Fix leaf brake rx check (#547) 2020-05-30 16:43:53 -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
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
Adeeb Shihadeh a5802cdd15 Hyundai: remove unused message from RX checks 2020-05-26 14:36:44 -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 d4f3f15c33
Refactor addr check (#541)
* refactor addr checks

* re-enable that

* Willem comment
2020-05-26 11:24:33 -07:00
Adeeb 0657064594
Hyundai checksum (#540)
* 3/5 hyundai checksums done

* cleanup

* these 3 should be universal across all hkg

* fix tests

* fix misra
2020-05-22 14:40:51 -07:00
Adeeb Shihadeh 0610ed1e25 Hyundai wheel speed counter is actually 4 bits spread over two signals 2020-05-17 22:40:51 -07:00
Greg Hogan 0bd06c9e0b remove 0x1BE check (breaks some vehicles) 2020-05-14 15:44:38 -07:00
Greg Hogan c31b899a58 honda bosch longitudinal safety 2020-05-14 15:44:38 -07:00
Adeeb e4558c0737
Safety: message length check on RX and TX (#529) 2020-05-11 12:58:33 -07:00
Adeeb 869f123218
Hyundai: counter check (#530)
* hyundai counter check

* fix misra

* add counter to tests
2020-05-09 00:52:57 -07:00
Chris Souers 2299ecffc4
Block 0xe5 (Honda Bosch) at the panda/uno. Only allow static values. (#515)
* Safety for static 0xe5

Passes Misra test

* Add e5 to test.

* Readd
2020-04-28 14:13:00 -07:00
Adeeb 3517306113
Subaru: fix steer torque scaling (#501)
* Subaru: fix steer torque scaling

* fix legacy test
2020-04-28 10:47:26 -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 d9355c4148
Make cruise_engaged_prev a global + test case for it (#519)
* make cruise_engaged_prev a global

* test for cruise_engaged_prev
2020-04-27 22:13:30 -07:00
Adeeb 2115376412
Abstract sample speed test (#516)
* all cars move

* honda

* update comments

* vw
2020-04-27 21:36:56 -07:00
Adeeb e5a586eea9
Abstract gas interceptor tests (#517)
* abstract interceptor tests

* honda
2020-04-27 20:35:36 -07:00
robbederks 0336f625dc
Pedal gas pressed safety limits (#507)
* Fixed toyota pedal gas disengage and increased pedal limits to OP limits +5%

* Fix safety unit tests?

* Fix imports

* Fix imports #2
2020-04-16 14:52:59 -07:00
Willem Melching 715b1a1695
Hyundai-Kia-Genesis (HKG) (#503)
* update hkg steer torque message

* misra

* Get bus

* Allow sending LFA HDA message

* Add blacklisted addr

* Update safety replay

* Cleanup bus checks

* Update to new torque message
2020-04-15 19:33:41 -07:00
Adeeb 8cc3a35700
remove cadillac (#496) 2020-04-13 14:43:46 -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
Adeeb abce8f32b1
Safety Test Refactor: Toyota + support code (#491)
* bring over toyota + support code from safety-test-refactor

* old tests still use StdTest

* don't duplicate

* test fwd

* make linter happy

* fix indent

* fix ident

* fix order

* whitespace

* move some common tests

* cleanup

* unused

* comment
2020-04-10 13:45:55 -07:00
robbederks 500370aecd
Make sure relay faults make it to the health packet (#492)
* Added relay malfunction handling

* Bump version

* Fixed safety test

* set/reset

* fixed test again
2020-04-09 15:53:46 -07:00
Adeeb bc90b60f97
toyota: use universal gas pressed bit (#488)
* toyota: use universal gas pressed bit

* fix tests
2020-04-09 12:09:34 -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
Jason Young b9a9ea395f
Unsafe gas disengage mods, fix test compile warning (#481) 2020-04-01 14:03:13 -07:00
Jason Young 08ef92d585
Safety model for Volkswagen PQ35/PQ46/NMS (#474)
* Align with VW Community port 0.7.4-devel

* Import of PQ35/PQ46/NMS safety work

* Add safety replay drive for PQ35/PQ46/NMS

* Unwind community port hax for upstream, bump Panda ver

* Update comment

* Reduce whitespace diff

* Reduce whitespace diff

* Don't test the drive until it's uploaded

* Propitiate MISRA

* Ixnay on the VERSION LF

* Remove VERSION LF, update safety_replay with PQ drive

* Freshen cereal ref to include fields used in VW PQ test drive

* Remove superfluous return

* Bypass Docker caching issue
2020-04-01 12:38:27 -07:00
kegman 98503e8660
disable stock honda AEB in unsafe mode (#477)
* disable stock honda AEB in unsafe mode

for some Honda models when OP is engaged, stock AEB will activate in unexpected circumstances, such as when there are 2 lane highways when driving on a curve with opposing traffic.  When this occurs the car may brake unexpectedly (Honda Civic) or loss of gas pedal function may occur for a few seconds (Honda Pilot)

* Update safety_honda.h
2020-03-31 16:26:26 -07:00
Willem Melching de89fcdc4f
Nissan leaf (#473)
* use rear wheels for speed

* Add leaf gas message

* Add brake press check to safety

* Fix typo in comparison

* threshold on gas and brake pressed and add cruise enabled check

* Fix brake pressed result

* Use same message for cruise enabled detection

* Fix typo

* Fix tests

* Add RX checks

* Allow sending cancel from panda

* Add cancel command to TX messages in tests

* Remove angle limit

* Change speed factor

* Change speed factor in tests

* Remove max angle from tests

* Fix tests

* try cancel using seatbelt

* Try different cancel message

* Fix TX_MSGS in test

* Fix fwd test
2020-03-27 21:45:16 -07:00
rbiasini 0696730c14
Toyota: add missing offset from speed signal (#469)
* Toyota: add missing offset from speed signal

* Let's also define ABS value in macro
2020-03-11 17:30:30 -07:00
Andre Volmensky 5b1a8dc873
Filtering LKAS HUD messages (#468)
* Filtering LKAS HUD messages

* Added nissan test_fwd_hook()

* Added Nissan TX_MSGS safety test

Co-authored-by: rbiasini <riccardo.biasini@gmail.com>
2020-03-11 00:00:33 -07:00
rbiasini 0f21b19bb3
Cleanup pedal nomenclature (#467)
* consolidate gas and brake nomenclature

* fixes in code and tests
2020-03-08 23:48:00 -07:00
rbiasini 04809e1329
Hyundai brake check (#464)
* WIP: adding brake check

* Added Hyundai brake tests
2020-03-07 21:26:03 -08:00