Open andrewteta opened 5 months ago
@andrewteta Thanks for the request!
I'll mark this as an enhancement and place it on the backlog. In the meantime, could you provide a screenshot of what this looks like in action so I can fully understand the request?
Here's an example for two input strings: "aabc\r" and "1234\r". The device returns a string terminated with "\r", in this case: "error\r".
VSCode Serial Monitor:
PuTTY with "Implicit LF in every CR" enabled:
In VSCode, the strings end up next to each other because there is no line feed ('\n') in the response. In PuTTY, the terminal is adding a '\n' after each received '\r' to properly display strings with '\r' delimiters on separate lines.
Now that I'm typing this out, I suppose the same thing could be accomplished by adding an expected line terminator for received strings. The options, CR, LF, and CRLF could be used to optionally display received chars on new lines. I'm not sure but a None option might make sense there too.
One more example that suggests the extension is just ignoring '\r' and '\n':
When the device emits "error\rtest\r" the extension displays:
Type: Feature Request
I'd like to have the option to display text with an implicit line feed '\n' for every carriage return '\r' or an implicit carriage return for every line feed. This is a feature in PuTTY that allows the terminal to display properly if a protocol only terminates with one or the other character.