Skip to content

fix: Serial now outputs CRLF rather than just LF for better compatibility #353

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

Merged
merged 3 commits into from
Apr 13, 2025

Conversation

20kdc
Copy link
Contributor

@20kdc 20kdc commented Apr 9, 2025

This changes the (built-in) calls to Serial to now output CRLF rather than just LF for better compatibility with bare Unix terminals. Serial.println also does this, so it is the expected behaviour according to the Serial library.

Context is on Discord in the development channel (https://discord.com/channels/1078124408775901204/1159546859732348949/1359618488796319775)

Workarounds include -m INLCRNL to tio or sudo stty -F /dev/ttyACM0 inlcr.

This was tested on my personal board (which includes some other commits not present here).
The testing was not necessarily exhaustive and it is possible I missed some commands.

The buffer reserve changes were not checked (why is help buffered...?) but this isn't critical to functioning.

This may add more conflicts on some other existing PRs such as #319.

Copy link

changeset-bot bot commented Apr 9, 2025

🦋 Changeset detected

Latest commit: f4f3e88

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@hhvrc hhvrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like not all the newline cases have been touched, also try to keep the calls down if possible, but thats just a nitpick

@hhvrc hhvrc moved this from Todo to In Progress in Roadmap Apr 9, 2025
@hhvrc hhvrc added the in: serial Issues in serial communications label Apr 9, 2025
20kdc added 2 commits April 10, 2025 11:31
(please indicate if this should be squashed)
@hhvrc hhvrc moved this from In Progress to In Review in Roadmap Apr 13, 2025
@hhvrc hhvrc merged commit 5333d02 into OpenShock:develop Apr 13, 2025
37 of 38 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Roadmap Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: serial Issues in serial communications
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants