KevinOConnor / can2040

Software CAN bus implementation for rp2040 micro-controllers
GNU General Public License v3.0
667 stars 66 forks source link

Reschedule tx if previous tx unexpectedly finished transmit #16

Closed KevinOConnor closed 1 year ago

KevinOConnor commented 1 year ago

If a transmitted message is fully sent, but the parsing state does not detect that transmission for some reason (eg, due to a temporary failure of the local transceiver) then the transmit queue could get stuck. Check for a fully transmitted messages when scheduling the next transmit message to avoid this issue.

This is a follow up to PR #15 and the issue reported in #14. Although both this PR and PR #15 should resolve the stuck tx issue, the intent is to commit both this PR and #15, as they address different "corner cases" that might occur.

-Kevin