commaai / panda

code powering the comma.ai panda
MIT License
1.5k stars 744 forks source link

clear stuck CAN messages before switching multiplexing #1967

Closed sshane closed 1 month ago

sshane commented 1 month ago

Potential fix for https://github.com/commaai/openpilot/issues/32070.

I was able to very easily reproduce:

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: https://github.com/commaai/panda/pull/1502