REVrobotics / CANBridge

Generic CAN Bridge emulating FRC netcomm CAN driver for connecting a PC to the CAN Bus with WPILib 2020+ and SPARK MAX (FW 1.5.0 or higher) or other drivers, currently only supported in Windows.
Other
11 stars 5 forks source link

Make ReceiveMessage() return the most recent matching message #22

Closed NoahAndrews closed 10 months ago

NoahAndrews commented 10 months ago

Without this PR, ReceiveMessage() is only guaranteed to return the most recent matching CAN frame if the mask is all 1s (0x1FFFFFFF). Otherwise, it will pick the most recent frame for whichever of the fully-matching arbitration IDs it happens to iterate to first.

This PR is needed to make https://github.com/REVrobotics/Desktop-Factory-Tester/pull/45 work correctly under all circumstances.