You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #12. Follow-up to #115, which added CAN bus health for ESP TWAI and PC (SocketCAN) buses only.
MCP2515 buses don't count what they receive. As a result they have no 5 s RX log on the serial console, and they don't appear in SystemState.can_bus_health, so the app shows nothing for them. They were left out because there was no MCP2515 hardware to test with.
To do
In the MCP2515 RX loop (boards/esp/src/can.rs), count received frames and how many matched the vehicle filters in a core_interface::CanRxCounts.
Read the EFLG register:
RX0OVR/RX1OVR count as overruns; clear them afterwards.
TXBO counts as a bus-off.
The RX warning and error-passive flags, or the REC counter, count as RX errors.
Every 5 s (and right after a bus-off), log the same info line as TWAI. Then call report_can_bus_window(bus_id, &counts, Some(listen_only)), the same way TWAI's end_rx_window does.
Keep the counting in plain helpers that host tests can cover.
Update docs/can.md: remove the "MCP2515 buses don't have this log or the bus health yet" notes.
Activity