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

clear stuck CAN messages before switching multiplexing #1967

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Jun 4, 2024

Potential fix for commaai/openpilot#32070.

I was able to very easily reproduce:

  • send a query to the OBD port while comma power is unplugged
  • get a returned CAN message from the can core (?!) which we log as if it actually sent
  • wait 5s, then switch away from the OBD port/to the powertrain bus 1
  • message still in the can core gets sent with no returned can packet

this then puts the ECU into either one of two states, both are bad:

  1. it's waiting for our flow control continue while we're sending another single frame, so it doesn't respond
  2. the gateway sends the flow control continue for us and we end up skipping the first few consecutive frames

If I understand this correctly, we already had a fix for this, but might have not have always triggered: #1502

@sshane sshane merged commit 77ecf51 into master Jun 5, 2024
10 checks passed
@sshane sshane deleted the clear-hw-txq branch June 5, 2024 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant