Apply the cash drawer fix detailed in Issue 10 on the Google Code repo.

https://code.google.com/p/python-escpos/issues/detail?id=10
This commit is contained in:
Stephan Sokolow 2014-05-22 01:11:27 -04:00
parent 6e72d2778d
commit b6216403c4
1 changed files with 3 additions and 3 deletions

View File

@ -27,9 +27,9 @@ HW_RESET = ESC + '\x3f\x0a\x00' # Reset printer hardware
# (TODO: Where is this specified?)
#{ Cash Drawer (ESC p <pin> <on time: 2*ms> <off time: 2*ms>)
_CASH_DRAWER = lambda m, t1='', t2='': ESC + 'p' + m + t1 + t2
CD_KICK_2 = _CASH_DRAWER('\x00') # Sends a pulse to pin 2 []
CD_KICK_5 = _CASH_DRAWER('\x01') # Sends a pulse to pin 5 []
_CASH_DRAWER = lambda m, t1='', t2='': ESC + 'p' + m + chr(t1) + chr(t2)
CD_KICK_2 = _CASH_DRAWER('\x00', 50, 50) # Sends a pulse to pin 2 []
CD_KICK_5 = _CASH_DRAWER('\x01', 50, 50) # Sends a pulse to pin 5 []
#{ Paper Cutter
_CUT_PAPER = lambda m: GS + 'V' + m