Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defect in pollserial read() method #34

Open
GoogleCodeExporter opened this issue Oct 28, 2015 · 3 comments
Open

Defect in pollserial read() method #34

GoogleCodeExporter opened this issue Oct 28, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I have the same issue.

The fix above, solved it

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

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant