Commit Graph

16 Commits

Author SHA1 Message Date
Jason Wen
2faae4b627 Revert "MADS: Steering Mode on Brake Pedal Press (#92)" (#114)
This reverts commit a26ea1e3ee.
2025-04-04 22:27:54 -04:00
Jason Wen
a26ea1e3ee MADS: Steering Mode on Brake Pedal Press (#92)
* reimplement

* add replay

* fix safety helpers
2025-03-19 17:48:27 -04:00
Jason Wen
c00137782e Revert "MADS: Steering Mode on Brake Pedal Press (#89)" (#90)
This reverts commit e670860afd.
2025-03-19 16:01:41 -04:00
Jason Wen
e670860afd MADS: Steering Mode on Brake Pedal Press (#89) 2025-03-19 08:52:23 -04: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
29a6703d97 safety tests: remove redundant test skips (#1983)
remove useless skiptests
2025-03-11 17:03:00 -07:00
Shane Smiskol
60062fcdb5 Ford safety: only check relevant LKAS addresses (#1971)
Fix Ford test
2025-03-10 16:04:03 -07: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
46fa666ecc Ford Q4: limit max curvature from vehicle speed (#1852)
* curvature safety: limit to ISO max

* .

* cmt

* implement in carcontroller

* MISRAAAAAA

* use ~average road roll

* stash

* clean up

* compiles

* fix safety replay for ford can fd

* always init

* stash

* fix replay

* fix that

* safety doesn't consider rate limits when clipping max curvature

consider: at the max curvature limit and user gas overrides heavily, max curvature limit might drop quicker than the safet rate limit will allow for

* don't limit for CAN

* do tests (need to clean up)

* stash

* rm

* clean up tests

* fix that

* smaller

* fix capnp error

* because we allow tolerance on the error limiting, we need the same type of tolerance on the max accel curvature to not block

* fix a test

* fix another

* consistent naming

* debugging

* debug

* remove

* stash

* clean up

* clean up

* minor

* and this

* space

* misra

* doesn't matter here

* safety mutation test fix

* misra false positive?

* rename

* ah good catch, these are equivalent

* comment

* clean up

* rename like safety

* fix

* simpler

* not needed
2025-03-02 22:43:20 -08:00
Shane Smiskol
811dc6a448 Ford: simplify curvature error safety (#1864)
* stash

* stash

* finally pass

* fixes

* and

* simplify into two ifs

* simplify and add comment

* clean up safety

* not here

* probably a misra thng

* TODO

* clean up

* consistent

* fix one safety mutation case, good catch!

* no down

* fix

* misra

* fix a mutation case

* forgot test

* fix two more mutations:

/home/runner/work/opendbc/opendbc/opendbc/safety/safety.h:722:47: warning: Survived: Replaced >= with > [cxx_ge_to_gt]
        const int delta = (desired_angle_last >= 0) ? delta_angle_down_relaxed : delta_angle_up_relaxed;

* i mean this works but it's much less clear

* this isn't entirely correct anyway

* stash

* Revert "stash"

This reverts commit 27f6a64fdc224459658f9b85691abfe8c5821d0a.

* clean up

* more

* more clear

* nop

* more

* to allow

* this sucks

* can also try this

* nope

* ?

* Revert "?"

This reverts commit e9b16857bc582ee78eaad995447bade0e409cb85.
2025-02-27 04:58:54 -08:00
Shane Smiskol
866a755568 Ford: combine lateral test (#1868)
* combine test for simplicity

* rm

* trigger mutation tests

* test down limit behavior

* undo

* now we can do this
2025-02-27 02:19:06 -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