Open rjhelms opened 3 years ago
Pollserial is returning invalid data every 65th byte. It seems like the logic is not wrapping the tail around correctly when the end of the buffer is reached:
https://github.com/Avamander/arduino-tvout/blob/74e6853fbb45dc0ec7cd3cb22eced14673d739da/pollserial/pollserial.cpp#L119-L122
This should likely increment the tail and then wrap if needed, something like:
if (rxbuffer.tail == BUFFER_SIZE) rxbuffer.tail = 0; else rxbuffer.tail++;
Hi!
This is my solution:
if (rxbuffer.tail == BUFFER_SIZE-1) rxbuffer.tail = 0; else rxbuffer.tail++; return c;
Best regards!
Pollserial is returning invalid data every 65th byte. It seems like the logic is not wrapping the tail around correctly when the end of the buffer is reached:
https://github.com/Avamander/arduino-tvout/blob/74e6853fbb45dc0ec7cd3cb22eced14673d739da/pollserial/pollserial.cpp#L119-L122
This should likely increment the tail and then wrap if needed, something like: