andreisperid / E-TKT

open source embossed label maker
https://andreisperid.github.io/E-TKT/
MIT License
398 stars 19 forks source link

Printer sometimes misprints "J" as the first letter of a label #18

Closed sabeechen closed 1 year ago

sabeechen commented 1 year ago

The printer will sometimes print "J" incorrectly as the first letter of a print. After some debugging I've identified it happens any time the previous print ends with the same letter that the following print starts with. for example printing "HI THERE" followed by "EARTH" will result in "HI THERE" being correctly printed but then "JARTH".

This appears to be because the printer uses the "prevChar" variable to avoid moving the carousel between sequential identical letters. It doesn't get reset during a home, so the when the printer homes at the start of a print and moves to "J" prev char is still set to the last letter of the previous print.

Its a simple fix, I'll make a PR.

andreisperid commented 1 year ago

You solved the most annoying bug, thank you @sabeechen ! 👏

Duplicate of #1