This repository was archived by the owner on May 16, 2023. It is now read-only.
This repository was archived by the owner on May 16, 2023. It is now read-only.
ThermalPrinter.warm_up() leaves artifacts in printer buffer #18
Closed
Description
Printer model: CSN-A2L
Version: GV2.16.08 20180627_U
After executing
self.send_command("\x1B7\x0B{0}\x28".format(chr(heat_time)))
(line 288 in thermal_printer.py)
and
self.send_command("\x12#{0}".format(chr(dc2_value)))
(line 298 in thermal_printer.py)
characters for "heat_time" "\x28" and "dc2_value" are printed on paper for next print.
Those parts default to \x78, \x28, \x4a which leads to string "x(J" being printed with first print command.
I tried changing line 288 to
self.send_command("\x1B\x37\x0B\x78\x28")
and another way
command = bytearray([0x1b, 0x37, heat_time, 0x28])
with sending it with
self._uart.write(command)
both methods lead to the same string "x(J" appearing with first print.
Any idea what is happening there and how to fix it?