AdvancedSerial
AdvancedSerial copied to clipboard
What happens when <CRLN> is sent as logging data?
for example first value = 0x0D (decimal 13) and second valule =0x0A (10 decimal). Is the data stream the cut off at this location?
Thanks for the useful lib Sebastian
All data is read into a buffer until CRLF is found.
Line 62 of the code is what is looking for carriage return line feed.
if ((buffer[ReadBuffPos] == '\n')&&(buffer[ReadBuffPos-1] == '\r'))
This is looking for specifically Carriage Return '\r' (0x0d) followed by Line Feed '\n' (0x0a). After this sequence is detected, it will process the buffer and read the messages. Any following messages will go into the buffer until another subsequent CRLF. Does that answer your question?
Thanks Nick, but what happens when the logging data itself contains this CLFR data (same bytes) ? Is the asi stream then cutoff at this position?
Ahh I see your question. Yes I believe that Would happen. I built this to be compatible with arduinos aerial terminal which I believe is terminated by crlf characters.
I don’t see any reason this can’t be an enhancement of the tool to allow this to be configurable though. I don’t think at something I would work on in short term though unfortunately.