jbuski / arduino-tvout

Automatically exported from code.google.com/p/arduino-tvout
0 stars 0 forks source link

Defect in pollserial read() method #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Read characters from pollserial interface
2.
3.

What is the expected output? What do you see instead?
Every 64th character read is a random character that is not present in the data 
stream.

What version of the product are you using? On what operating system?
Beta 1

Please provide any additional information below.
The read() method simply doesn't roll back to the beginning of the buffer when 
it should.  It reads one character too far.

Line 119 in pollserial.c is:
    if (rxbuffer.tail == BUFFER_SIZE)
but I believe it should be:
    if (rxbuffer.tail == (BUFFER_SIZE-1))

Original issue reported on code.google.com by nootropi...@gmail.com on 21 Apr 2011 at 6:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have the same issue.

The fix above, solved it

Original comment by xalda...@googlemail.com on 24 Feb 2012 at 4:13

GoogleCodeExporter commented 8 years ago

Original comment by mdmetzle@gmail.com on 25 Jun 2012 at 1:37