1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-10-23 09:30:00 +00:00

modernize and cleanup documentation (#542)

* disable system packages on rtd

* install pycups on rtd

* enable cups binding in documentation

* document CupsPrinter

* fix formatting

* revise methods and installation

* revise user/printers

* revise raspi section

* further revise
This commit is contained in:
Patrick Kanzler
2023-08-10 01:38:47 +02:00
committed by GitHub
parent 4c2dcdfac6
commit 2b62c8e28d
18 changed files with 174 additions and 103 deletions

View File

@@ -45,6 +45,8 @@ HW_RESET = ESC + b"\x3f\x0a\x00" # Reset printer hardware
_CASH_DRAWER = (
lambda m, t1="", t2="": ESC + b"p" + m + six.int2byte(t1) + six.int2byte(t2)
)
#: decimal cash drawer kick sequence
CD_KICK_DEC_SEQUENCE = (
lambda esc, p, m, t1=50, t2=50: six.int2byte(esc)
+ six.int2byte(p)
@@ -52,8 +54,10 @@ CD_KICK_DEC_SEQUENCE = (
+ six.int2byte(t1)
+ six.int2byte(t2)
)
CD_KICK_2 = _CASH_DRAWER(b"\x00", 50, 50) # Sends a pulse to pin 2 []
CD_KICK_5 = _CASH_DRAWER(b"\x01", 50, 50) # Sends a pulse to pin 5 []
#: Sends a pulse to pin 2 []
CD_KICK_2 = _CASH_DRAWER(b"\x00", 50, 50)
#: Sends a pulse to pin 5 []
CD_KICK_5 = _CASH_DRAWER(b"\x01", 50, 50)
# Paper Cutter
_CUT_PAPER = lambda m: GS + b"V" + m