Skip to content

Remove carriage returns when parsing received data#200

Merged
alex-spataru merged 4 commits intoSerial-Studio:masterfrom
recursivenomad-forks:fix/199-carriage-return
Aug 7, 2024
Merged

Remove carriage returns when parsing received data#200
alex-spataru merged 4 commits intoSerial-Studio:masterfrom
recursivenomad-forks:fix/199-carriage-return

Conversation

@recursivenomad
Copy link
Contributor

Fixes #199

Don't merge this yet, might try a sneaky switch case first

@recursivenomad
Copy link
Contributor Author

I think modifying this PR to use an Ignore CR toggle box next to Show timestamp instead of the current switch case would be a better approach, as the line ending parsing would then be decoupled from the outgoing data line ending format. But alas, I am out of my depth to implement a new UI element...

Also a boolean value to ignore CR would preserve the use case here when set to false.

@recursivenomad
Copy link
Contributor Author

recursivenomad commented Aug 7, 2024

Okay, this "works on my machine" 😉

It definitely warrants a review by more familiar eyes in case I missed something important when setting up a persistant variable.

Documentation of a reproducible example to follow in #199 (might be a few days if it's left up to me). Haven't yet added the \n\r coverage suggested by @alex-spataru (wasn't sure if you'd like to add that yourself, as it was your idea!)

@alex-spataru
Copy link
Member

Hi, looks good to me! I think that this is the most elegant solution for this issue without breaking support for \r. Thank you very much! Merging...

@alex-spataru alex-spataru merged commit a7a98fe into Serial-Studio:master Aug 7, 2024
@recursivenomad recursivenomad deleted the fix/199-carriage-return branch September 5, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Receiving CRLF produces occasional spurious empty line in certain environments

2 participants