Line terminators in serial output (stair stepped text)

20 views
Skip to first unread message

Jon Nall

unread,
Aug 9, 2025, 2:40:36 PMAug 9
to Enigma touch
Hi all,

I’m using macOS and primarily use the Serial 2 application for terminal interaction, but have also tried the following with the (macOS built-in) screen and minicom.

Currently lines in the USB serial output are terminated with 0x0A (a newline or linefeed ‘LF’ character). This results in stair stepped text for many terminal emulators. For example:

S O   Positions 01 02 20
                        S T   Positions 01 02 21

Certainly some apps (e.g., Serial 2) can be made to replace LF with CRLF which addresses the problem. Additionally, the miniterm.py application that ships with the Python pyserial module seems to perform this replacement out of the box.

However I suspect this might be confusing for users.

I’d like to suggest that the Enigma touch emit CRLF line terminations to avoid this.

Is there a downside to emitting CRLF that I might not be aware of?

Thanks,
nall.

Ronald Wells

unread,
Aug 9, 2025, 2:50:53 PMAug 9
to Enigma touch
I had this same issue with windows using MobaXterm.  I found a setting in the terminal that outputs LF when CR is encountered and also outputs CR when LF is encountered.  I probably only needed one of those, but didn't bother to figure out which one.

Ronald Wells

unread,
Aug 9, 2025, 2:52:12 PMAug 9
to Enigma touch
I meant to add that I also think updating to output CFLF would be nice.

On Saturday, August 9, 2025 at 1:40:36 PM UTC-5 jon....@gmail.com wrote:

Jürgen

unread,
Aug 9, 2025, 3:34:46 PMAug 9
to Enigma touch
Good point, thank you! Always sending CR+LF is easy to implement and should be the closest to a "universal" solution.

There must be some situations where CR already causes a carriage return + line feed, and then the LF introduces an empty line. But I'd hope that this style of automatic CR expansion is always configurable in the terminal program. And even if it's not properly configured, the resulting double-spaced lines are the least annoying artifact one can get -- much preferable to LF-only stair steps or CR-only lines overwriting each other.

So CR+LF it will be! I will collect further feedback on bugs and improvement ideas on firmware 4.10 for a week or two and follow up with an updated firmware version.


Reply all
Reply to author
Forward
0 new messages