Skip to content
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
zapa1928 opened this issue Apr 20, 2020 · 1 comment
Closed

ThermalPrinter.warm_up() leaves artifacts in printer buffer #18

zapa1928 opened this issue Apr 20, 2020 · 1 comment
Labels

Comments

@zapa1928
Copy link

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?

@kattni kattni added the bug label May 4, 2020
@greg-elmi
Copy link
Contributor

greg-elmi commented Sep 3, 2020

Ok. I've exchanged some email with Cashino (producer of the printer) and it turns out that there is newer user manual (from 2017) (as opposed to available on Adafruit in version v4.0 from 2015 ). I also don't know if there is difference for A2 and A2L version.
The newer manual lacks command controlling darkness so those two i had problem with are in this category.

So ultimately it`s not a bug but version discrepancy.

In free time I can try implement support for the new version of printer/firmware

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants