You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #78, if I am not misunderstanding the ESP-IDF uart_driver, calling Serial::read_line() when 2 lines are in the RX buffer causes the pattern position for the second line to be incorrect.
As far as I could see, the pattern positions are not updated when the RX buffer in the uart buffer gets partly read.
As Example:
The pattern is "\n"
The uart RX buffer was empty (aswell as the pattern queue) and was filled with: test 1\ntest2\n
without any reads inbetween.
The driver would have the following pattern positions in queue: 6, 12
When Serial::read_line() is called, it retrieves the data up to the first pattern in the queue. After read_line, the buffer and pattern pos queue should be: test 2\n 12
If Serial::read_line() gets called again, we retrieve parts of the next message that gets put into the buffer.
Do note:
I have not yet been able to confirm that this is actually the case.
Kind regards
The text was updated successfully, but these errors were encountered:
Hello,
As mentioned in #78, if I am not misunderstanding the ESP-IDF uart_driver, calling Serial::read_line() when 2 lines are in the RX buffer causes the pattern position for the second line to be incorrect.
As far as I could see, the pattern positions are not updated when the RX buffer in the uart buffer gets partly read.
As Example:
The pattern is "\n"
The uart RX buffer was empty (aswell as the pattern queue) and was filled with:
test 1\ntest2\n
without any reads inbetween.
The driver would have the following pattern positions in queue:
6, 12
When Serial::read_line() is called, it retrieves the data up to the first pattern in the queue. After read_line, the buffer and pattern pos queue should be:
test 2\n
12
If Serial::read_line() gets called again, we retrieve parts of the next message that gets put into the buffer.
Do note:
I have not yet been able to confirm that this is actually the case.
Kind regards
The text was updated successfully, but these errors were encountered: