Adjustments for low quality printers, timing, char limit, and ä -> ae#8
Adjustments for low quality printers, timing, char limit, and ä -> ae#8FaezerWasTaken wants to merge 2 commits intoUrbanCircles:mainfrom
Conversation
European localization
Orientation reliability
- Added ensureUpsideDown(): sends ESC { 1 to enforce 180° rotation.
- Called ensureUpsideDown() at the start of printReceipt() and printServerInfo().
- Added a priming newline right after ESC { 1 in initializePrinter() to prevent
the first command/character from being dropped on some printers.
Text input & web UI
- Increased form limit to 250 characters:
* <textarea maxlength="250">
* JS counter uses 250 and label shows “250 characters left”.
Encoding & umlauts (printer lacks Western codepages)
- Added replaceUmlauts(): ä→ae, ö→oe, ü→ue, Ä→Ae, Ö→Oe, Ü→Ue, ß→ss.
- Applied in printLine() and at the start of printWrappedUpsideDown().
- NOTE: This affects only printed output; Wi-Fi SSID/password and internal
values remain unchanged.
Newline handling & word wrapping
- Normalizes CRLF/CR to LF before processing.
- Splits text on '\n' first to preserve explicit user line breaks.
- Wraps each logical line by last space up to maxCharsPerLine; trims carry-over.
- Prints wrapped lines in reverse order to maintain upside-down final layout.
Tear-off ergonomics
- Inserts a blank line before the date header in printReceipt() for easier
paper tearing.
UNCHANGED (explicitly left as in the base sketch)
- Wi-Fi connect logic and credentials handling.
- NTP: non-blocking update pattern.
- Printer density/heat configuration.
- HTTP routes/endpoints and overall control flow.
|
I added extensive character replacements / resilience to my massively over-engineered hard fork of the Scribe project: https://github.com/Pharkie/scribe I went ahead based on encouragement from this original project "if you wish, you can go beyond this and make this human-machine/ human-computer interface truly your own. The hardware is capable, the design is easily adaptable, and the firmware is easy to develop/ scale in whichever direction your imagination leads you towards! I'm excited to see what you come up with!" If anyone wants to try out this new firmware, offer ideas and feedback etc, let me know! |
Would you be interested in showing me around your code? I was looking into remote controlling it anyway to send reminders home even when out of house. I'd love to discuss in a call in teamspeak or discord. |
|
Yeah, secure remote printing, via MQTT and a HTTP-MQTT bridge, was one of the first things I added. Before a lot of other stuff 🤪. It's got auto-discovery within a private network, based on who shares the MQTT server. Continuing to develop my version today. Yes, happy to discuss. Your profile is private so I can't msg, but msg me with your Discord or what days/times for a chat or something. |
|
Just released an alpha, happy to talk you through it if helpful. Love to hear how you get on if you have time to try it! |
Added european localization for parts in readme.
Code adjustments:
Orientation reliability
the first command/character from being dropped on some printers.
Text input & web UI
Encoding & umlauts (printer lacks Western codepages)
values remain unchanged.
Newline handling & word wrapping
Tear-off ergonomics
paper tearing.