pierremolinaro / acan2515

MCP2515 CAN Controller Driver for Arduino
MIT License
78 stars 30 forks source link

Fix value returned by transmitBufferPeakCount and receiveBufferPeakCount methods when buffer overflow #16

Closed Koryphon closed 4 years ago

Koryphon commented 4 years ago

Hi Pierre,

Currently the behavior of ACANBuffer16::append does not conform to the documentation. The documentation says transmitBufferPeakCount and receiveBufferPeakCount return the size of the buffer + 1 if the buffer overflown. This is not the case, it returns the size of the buffer. This PR fixes the problem.

Best regards