Dear developers
The Z-Uno implementation of SoftwareSerial::read() has two problems
1.
If the buffer is empty, read() returns 0
whereas the Arduino implementation returns -1.
2.
read() will return data beyond the end pointer of the buffer and wrap around to previously read data.
I think many would appreciate the implemention to be changed to match the standard implentation.
The neccessary changes in the source code are minimal.
Cheers
Sebastian
SoftwareSerial::read()
SoftwareSerial::read()
Last edited by bastibart on 16 Dec 2018 17:02, edited 1 time in total.
Re: SoftwareSerial::read()
Thank you for your feedback. We will add it to our list
Re: SoftwareSerial::read()
Great - thanks.
I made a huge mistake in my initial post.
read() returns of course -1 when the buffer is empty. I edited my post.
I made a huge mistake in my initial post.
read() returns of course -1 when the buffer is empty. I edited my post.