Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safety: fwd hook config #1954

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

safety: fwd hook config #1954

wants to merge 39 commits into from

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Mar 8, 2025

Closes #1950

v2 of #1785

removes turing completeness

haven't checked all cases, but we might be able to just do the relay malfunction part of #1903 with nothing more than blocked and a few more lines (plus checking a bunch more addresses automatically)!

@github-actions github-actions bot added the car safety vehicle-specific safety code label Mar 8, 2025
@sshane
Copy link
Contributor Author

sshane commented Mar 8, 2025

blockers:

  • Hyundai CAN FD: needs clean up, and we forward/block when bus is 1?
  • Subaru: clean up, some long messages that we either block or don't block are in common (they're used for canceling)
  • Honda: dynamic AEB fwding
  • Tesla: dynamic AEB fwding and soon Autopark/Summon

@@ -49,8 +52,14 @@ typedef struct {
int addr;
int bus;
int len;
bool blocked;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool blocked;
bool block_fwding; // or no_fwding

makes this more clear

Copy link
Contributor

@adeebshihadeh adeebshihadeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@@ -151,6 +160,7 @@ typedef struct {
int rx_checks_len;
const CanMsg *tx_msgs;
int tx_msgs_len;
bool block_fwding;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call this enable_forwarding or disable_forwarding

sshane added a commit that referenced this pull request Mar 10, 2025
sshane added a commit that referenced this pull request Mar 11, 2025
* Do Toyota relay malfunction config

* clean up

* not needed

* rm this

* rm

* fix

* great name (rename after #1954)

* do gm

* need this since we will dynamically block it

* subie

* some more brands

* Ford

* Chrysler

* Hyundai

* huge oof hyundai

* toyota & vw

* fix

* tesla

* 0x194 isn't on Honda Bosch

* Honda: we can check bus 1 for 0xe4

* misra

* static

* ugh need this

* correct

* nl

* like

* space
chrispypatt pushed a commit to chrispypatt/opendbc that referenced this pull request Mar 12, 2025
* Do Toyota relay malfunction config

* clean up

* not needed

* rm this

* rm

* fix

* great name (rename after commaai#1954)

* do gm

* need this since we will dynamically block it

* subie

* some more brands

* Ford

* Chrysler

* Hyundai

* huge oof hyundai

* toyota & vw

* fix

* tesla

* 0x194 isn't on Honda Bosch

* Honda: we can check bus 1 for 0xe4

* misra

* static

* ugh need this

* correct

* nl

* like

* space
@sshane sshane force-pushed the fwd-config branch 2 times, most recently from da484a8 to 0753240 Compare March 14, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car safety vehicle-specific safety code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

safety fwd hook should be a config/struct
2 participants