'J' character added to print jobs and new lines #23
Description
When using the import stack called for in the tutorial, the uppercase letter 'J' is added before a new sequence of character or lines is written.
This will print a 'J' before the text:
`import serial
uart = serial.Serial("/dev/serial0", baudrate=19200, timeout=3000)
import adafruit_thermal_printer
ThermalPrinter = adafruit_thermal_printer.get_printer_class(2.16)
printer = ThermalPrinter(uart)
printer.print("IIII_\nhi hi\n")`
This will print a 'J' before the newlines:
`import serial
uart = serial.Serial("/dev/serial0", baudrate=19200, timeout=3000)
import adafruit_thermal_printer
ThermalPrinter = adafruit_thermal_printer.get_printer_class(2.16)
printer = ThermalPrinter(uart)
printer.feed(8)`
I am using:
Raspberry Pi 4, with RPi OS updated a few days ago
Normal size thermal printer (Model CSN-A2)
SelfTest tells me version 2.16.08, which throws an error in init, so I use 2.16, which calls thermal_printer_legacy.
Looking at the function calls and inspecting with print statements, these prints happen after ThermalPrinter.write_char is called. I.E. - if I tell it to write a character at the end of the function, the J is not printed yet, and will overwrite whatever character I have it print.
Also, it's worth noting, that using a higher version number like 2.17, that calls the other class, does not result in this problem.