29 Commits

Author SHA1 Message Date
Jason Wen
c7780b18e8 Merge branch 'upstream/opendbc/master' into sync-20251114
# Conflicts:
#	SConstruct
#	opendbc/car/tests/routes.py
#	opendbc/car/toyota/carcontroller.py
#	opendbc/car/toyota/carstate.py
#	opendbc/safety/lateral.h
#	opendbc/safety/modes/subaru.h
#	opendbc/safety/modes/subaru_preglobal.h
#	opendbc/safety/modes/toyota.h
#	opendbc/safety/tests/common.py
#	opendbc/safety/tests/libsafety/safety_helpers.h
#	opendbc/safety/tests/libsafety/safety_helpers.py
#	opendbc/safety/tests/misra/main.c
#	opendbc/safety/tests/test_chrysler.py
#	opendbc/safety/tests/test_honda.py
#	opendbc/safety/tests/test_hyundai.py
#	opendbc/safety/tests/test_hyundai_canfd.py
#	opendbc/safety/tests/test_toyota.py
2025-11-14 02:05:19 -05:00
Adeeb Shihadeh
8a2b629d41 safety: cleanup remaining panda bits (#2807)
* remove can_declarations

* rm faults

* rm drivers

* rm checksum thing

* renames

* remove ST timer

* last renames

* lil more
2025-09-27 15:58:50 -07:00
Jason Wen
1e143668d6 Merge branch 'upstream/opendbc/master' into sync-20250809
# Conflicts:
#	opendbc/car/chrysler/chryslercan.py
#	opendbc/car/hyundai/hyundaican.py
#	opendbc/car/hyundai/hyundaicanfd.py
#	opendbc/safety/tests/libsafety/safety_helpers.py
#	opendbc/safety/tests/safety_replay/replay_drive.py
#	opendbc/safety/tests/test_chrysler.py
#	opendbc/safety/tests/test_hyundai.py
2025-08-10 01:45:49 -04:00
Jason Wen
d265070bd5 Merge branch 'upstream/opendbc/master' into sync-20250422
# Conflicts:
#	opendbc/car/car_helpers.py
#	opendbc/car/tests/test_car_interfaces.py
#	opendbc/safety/safety.h
#	opendbc/safety/safety/safety_chrysler.h
#	opendbc/safety/safety/safety_toyota.h
#	opendbc/safety/tests/test_chrysler.py
2025-04-22 14:36:48 -04:00
Shane Smiskol
0bd26684da safety: move Hyundai CAN FD to msg block config (#2107)
* not there yet

* can remove this

* and this

* rm more

* not here

* and that!

* siiiiiick
2025-04-10 17:46:40 -07:00
Jason Wen
605b2bdaea Merge branch 'upstream/opendbc/master' into sync-20250331
# Conflicts:
#	.github/workflows/tests.yml
#	opendbc/safety/safety.h
2025-03-31 21:42:43 -04:00
Shane Smiskol
af36d8316e safety: support dynamic max torque from speed (#2047)
* do it

* prepare Rivian since we need coverage

* not yet

* best

* test speed w/ these two

* no todo

* better
2025-03-25 20:34:43 -07:00
Shane Smiskol
30da907846 safety tests: remove steer bit rt limit param (#2025)
* remove another rt param we can just calculate

* tests

* only tests

* Update opendbc/safety/tests/common.py
2025-03-21 20:16:13 -07:00
Shane Smiskol
676b9c12f7 safety: remove rt interval param (#2024)
* rm

* whops

* back

* misra

* Update opendbc/safety/safety_declarations.h
2025-03-21 19:40:45 -07:00
Jason Wen
c5efd32c69 Merge branch 'upstream/opendbc/master' into sync-20250312
# Conflicts:
#	opendbc/car/hyundai/carcontroller.py
#	opendbc/safety/safety/safety_chrysler.h
#	opendbc/safety/safety/safety_gm.h
#	opendbc/safety/safety/safety_hyundai.h
#	opendbc/safety/safety/safety_hyundai_canfd.h
#	opendbc/safety/safety/safety_nissan.h
#	opendbc/safety/safety/safety_toyota.h
#	opendbc/safety/tests/test_hyundai.py
2025-03-13 00:30:30 -04:00
Shane Smiskol
cf41673e4d Hyundai CAN FD safety: replace alt buttons live detection with param (#1985)
* alt buttons needs to be checked with the param

* flip

* do tests
2025-03-11 23:15:32 -07:00
Shane Smiskol
9f6e50a3d2 Hyundai CANFD safety tests: common safety param combinations (#1987)
clean this up
2025-03-11 22:43:49 -07:00
Shane Smiskol
29a6703d97 safety tests: remove redundant test skips (#1983)
remove useless skiptests
2025-03-11 17:03:00 -07:00
DevTekVE
353a2d3562 SP fixes for sync-20250309 (#72)
* Fix get_params_for_docs call to use correct parameters

Updated the function call to match the required arguments by removing the redundant 'model' parameter. This ensures compatibility with the function definition and prevents potential errors.

* Add _tx_acc_state_msg method and standardize PT_BUS usage

Introduce the _tx_acc_state_msg method in Hyundai safety tests to handle ACC state messaging. Replace hardcoded bus values with the self.PT_BUS variable for consistency and maintainability across SCC_CONTROL messages.

* Add MADS heartbeat engaged state validation test

Introduce a new test function `test_heartbeat_engaged_mads_check` to verify the behavior of MADS heartbeat engagement logic under varying conditions. This ensures correct state transitions and validates robustness against mismatched heartbeat signals.

* Increase timeout for safety mutation tests to 60 minutes

Extended the timeout for the entire safety mutation tests workflow and its individual steps from 20 and 10 minutes respectively to 60 minutes. This change ensures that longer-running tests complete successfully without premature termination.
2025-03-09 11:23:20 +01:00
DevTekVE
e37120452d Merge branch 'master-0efdb71b8f2440ee51a806d057f20a553b849a3a' into master-new
# Conflicts:
#	opendbc/car/hyundai/hyundaicanfd.py
#	opendbc/car/rivian/carcontroller.py
#	opendbc/safety/tests/common.py
#	opendbc/safety/tests/test_chrysler.py
#	opendbc/safety/tests/test_hyundai_canfd.py
2025-03-09 08:41:32 +01:00
DevTekVE
c44f9424c4 Migrate MADS car safety to opendbc
This commit introduces various safety features required for the SunnyPilot project into the car safety interfaces. A significant change is the addition of "safety_mads.h" file which includes the necessary declarations and definitions for maintaining safety in car operations, such as updating the button state and controlling the vehicle based on current conditions. The "safety_mads.h" file is then included in safety.h. Code related to the lateral control of the vehicle, handling of button presses, and car safety checks for different car models are updated to accommodate these new safety features. Furthermore, updates are made to ensure vehicle control remains safe and transitions between control states happen correctly. This not only enhances the safety functions of the system but also enables greater connectivity with the SunnyPilot system.
2025-03-08 22:46:51 -05:00
Shane Smiskol
5c5273a7ab safety tests: common attrs (#1948)
* set FWD_BUS_LOOKUP to most common

* this is always assumed to be a number, test models tests mismatches

* clean up

* and this
2025-03-07 16:28:15 -08:00
Shane Smiskol
3612798be0 Hyundai CAN FD: test ACC cancel (#1898)
* debug

* remove debugging

* huh
2025-03-02 23:56:14 -08:00
Shane Smiskol
52f89f135e Revert "Hyundai CAN FD: ADAS steering API updates" (#1888)
Revert "Hyundai CAN FD: ADAS steering API updates (#1873)"

This reverts commit 2a758069f5.
2025-02-28 21:19:20 -08:00
Jason Wen
2a758069f5 Hyundai CAN FD: ADAS steering API updates (#1873)
* Hyundai CAN FD: Steering API updates

* comments

* comments

* keep it for now

* not used

* should use DBC spec

* consistent

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-28 16:05:41 -08:00
Jason Wen
8289d1e066 Hyundai CAN-FD Safety: Update wheel speed signal parsing (#1850)
* reimplement

* use average wheel speed

* fix factor with eEgoRaw

* Revert "fix factor with eEgoRaw"

This reverts commit 35f3624b614fc7179952714829ee6833775f4914.

* Revert "use average wheel speed"

This reverts commit ec4e9c165796139d529d0ef2ec50ee7d00ef98d1.

* revert to previous

* mutation again ugh

* mutation you got to be kidding me

* nice, this passes test models now

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-28 02:40:39 -08:00
Jason Young
79e55f34fd HKG: Revert wheel speed safety changes (#1846)
* Revert "Hyundai CAN-FD Safety: Update vehicle speed conversion accuracy (#1845)"

This reverts commit a289e79055.

* Revert "Hyundai CAN-FD: Update wheel speed signal parsing (#1844)"

This reverts commit 402b4139d0.
2025-02-25 06:56:15 -05:00
Jason Wen
402b4139d0 Hyundai CAN-FD: Update wheel speed signal parsing (#1844)
* Hyundai CAN-FD: Update wheel speed signal parsing

* unsigned

* use all wheel speeds

* mutation ugh!

* use average of wheel speeds
2025-02-25 03:25:31 -05:00
Jason Wen
6720c230ca Hyundai CAN-FD Longitudinal: Enable for radar-based SCC platforms (non-HDA2) (#1283)
* Hyundai CAN-FD Longitudinal: Enable for radar-based SCC platforms (non-HDA2)

* port safety to opendbc

* fix tests?

* more

* fix tests

* more

* add condition to radar disable tests

* simplify

* more explicit tx checks

* deleted for some reason, caused some models to fail tests

* merge them
2025-02-25 02:12:52 -05:00
Jason Wen
ba82d74e9f Hyundai: Common DBC for CAN and CAN-FD Platforms (#1269)
* HKG: DBC for Hyundai Palisade and Kia Telluride 2023-24 (HDA2)

* do not include in git

* update name

* rename

* new dbc

* more

* update tests

* fix file name
2025-02-22 23:52:18 -08:00
Jason Wen
fe1690d48d Hyundai CAN-FD: Refactor HDA2 with available steering types (#1782)
* Hyundai CAN-FD: Refactor HDA2 with available steering types

* add comments
2025-02-22 01:07:42 -08:00
Shane Smiskol
1a5e908833 Safety flags: remove redundant namespace (#1778)
remove triple namespace
2025-02-20 22:02:38 -08:00
Adeeb Shihadeh
d68ad22371 Remove duplicate safety mode definition (#1776)
* Remove duplicate safety mode definition

* lil more

* lil more
2025-02-20 21:53:25 -08:00
Shane Smiskol
6f83fdf9b9 Move car safety modes to opendbc (#1713)
* move safety tests

* move libsafety

* move safety

* rename imports

* copy over needed (minimalized) board and driver code

* dont test safety here

* add new job for safety tests

fix

* try fix

* ubsan

* ?

?

* missing cffi

* should be final fix

* mac fix

* no mac

* use setup script

* no cd

* this is the correct way to do it

* add misra

* misra fixes

* run

* setup misra

* add missing files

* is this used?

* add that

* Revert "is this used?"

This reverts commit 2f34762dfa65821e1ee398675bf62d1a256ebec8.

* need this

* misra mutation test

* fix

* no race conditions

* test

* cache cppcheck

fix

* setup

* good timeouts

* mutation test

* fix

* no

* Revert "no"

This reverts commit 39e10a045a4a5411a64de791ae463461f8a5f37b.

* already tested

* move Safety Model readme section to opendbc

* fix

* fix

* disable mutation tests for merge

* namespace

* test no cache

* 1m

1m
2025-02-19 17:19:31 -08:00