-
Notifications
You must be signed in to change notification settings - Fork 638
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
Confusing serial.readUntil
behaviour
#3355
Comments
@pelikhan can you answer this question? |
It only works with the first character of the string. |
Questions answered |
Sorry, but what does that mean? |
Only the first character of the delimiter string is used, the rest is ignored. |
How does that apply to the example I’ve given? I’m only using the colon character as a delimiter and it’s clearly not breaking at any consistent point |
Sorry i read the sample wrong. |
@pelikhan is this is a bug? |
Also curious to know what your basis for saying only the first delimiter character is used. It's not clear from the documentation about the |
I would assume anything with inconsistent behaviour is a bug, which is why I reported it. :) |
It's OK with V2 but not V1. I've created lancaster-university/microbit-dal#480 |
this is a dal external issue. |
Describe the bug
When using serial.readUntil to read delimited data, the returned string doesn't line up with the delimiters. I cannot figure out how it chooses what data to return. I have tried several different delimiters and the result is always the same.
To Reproduce
Steps to reproduce the behavior:
Load the following program:
Then using a terminal program, send the following text
ab:cd:ef:
Expected behavior
I should get back the following strings
||ab##
,||cd##
, and||ef##
.Screenshots
I get the following output in Termite:
The text was updated successfully, but these errors were encountered: