What steps will reproduce the problem?
1. Know that a ring buffer witn N byte arrays can store at most N-1 bytes
(unless some kind of full-or-empty flag is added)
2. Look at FastSerial::txspace(void) : return ((_txBuffer->mask+1) -
((_txBuffer->head - _txBuffer->tail) & _txBuffer->mask));
3. Realize this may return N = _txBuffer->mask+1 if the buffer is empty. This
is one too many.
What is the expected output? What do you see instead?
No effects observed but the last byte in a chunk of data might occasinally get
lost.
What version of the product are you using? On what operating system?
ArduPilot 2.68
Original issue reported on code.google.com by Soren.Kuula@gmail.com on 5 Dec 2012 at 10:03
Original issue reported on code.google.com by
Soren.Kuula@gmail.com
on 5 Dec 2012 at 10:03