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
Use CRLF line-endings #341
Conversation
firmware/stdio_wrap.c
Outdated
#endif | ||
puts(s); | ||
putchar('\r'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong here....
e95da84
to
8e77d90
Compare
@stefanor Any chance we could add something to the CI which prevents people accidently landing '\n\r' pattern in the C code? Is something as simple as if grep '\\n\\r' firmware/*.c firmware/*.h; then
echo "Should just use '\n' rather than '\n\r'"
exit 1
fi ? |
I was sceptical of that for a while, but what the hell, sure. This does really need a better test suite at some point... |
So that it goes to telnet too.
I don't think we ever compile them in
stdio_wrap translates LF to CR-LF is printed messages.
They will always be following a CR, that we already consumed. Without this, you can't turn "status on" because it'll see the LF and immediately turn it off, again.
"help" was causing telnet to disconnect
They go to the serial console only. And don't go through stdio_wrap, which expands LF to CRLF.
We noticed that it wasn't happening in tio
Most serial communication uses CRLF, so this is what serial terminals expect.