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: add safety param for gas interceptor #1735

Merged
merged 54 commits into from Dec 14, 2023
Merged

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Nov 21, 2023

  • Tests that Honda Nidec switches from a PCM-enable car to button-enable car when it's using an interceptor
  • Tests that interceptor can't be used when Toyota is in stock long mode

todo:

  • Honda
  • Separate test class
  • Clean up detection (remove)
  • Make param common would take away useful slots from safety models which would never use it (for the time being)

The two possible scenarios where the param is set incorrectly should be fine:

  • set if no interceptor - addr checks prevent enabling
  • not set and there's an interceptor - panda will see openpilot gas as user gas and cancel long

@sshane sshane closed this Nov 22, 2023
@sshane sshane deleted the toyota-check-interceptor branch November 22, 2023 00:52
@sshane sshane restored the toyota-check-interceptor branch December 9, 2023 13:20
@sshane sshane changed the title Toyota: check interceptor counter and frequency safety: add gas interceptor param to check counter and frequency Dec 14, 2023
@sshane sshane changed the title safety: add gas interceptor param to check counter and frequency safety: add safety param for gas interceptor Dec 14, 2023
@sshane sshane marked this pull request as ready for review December 14, 2023 03:39
board/safety/safety_toyota.h Outdated Show resolved Hide resolved
Comment on lines +347 to +348
ret = enable_gas_interceptor ? BUILD_SAFETY_CFG(toyota_lta_interceptor_rx_checks, TOYOTA_INTERCEPTOR_TX_MSGS) : \
BUILD_SAFETY_CFG(toyota_lta_rx_checks, TOYOTA_TX_MSGS);
Copy link
Contributor Author

@sshane sshane Dec 14, 2023

Choose a reason for hiding this comment

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

we can not allow LTA, I just kept it because openpilot allows interceptor in any configuration

@sshane sshane merged commit bb75afc into master Dec 14, 2023
10 of 11 checks passed
@sshane sshane deleted the toyota-check-interceptor branch December 14, 2023 23:22
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 enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants