From b6216403c45b25e7b172d5822aaac134eb3fc709 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 22 May 2014 01:11:27 -0400 Subject: [PATCH] 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 --- escpos/constants.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/escpos/constants.py b/escpos/constants.py index 487befa..da13f98 100644 --- a/escpos/constants.py +++ b/escpos/constants.py @@ -27,9 +27,9 @@ HW_RESET = ESC + '\x3f\x0a\x00' # Reset printer hardware # (TODO: Where is this specified?) #{ Cash Drawer (ESC p ) -_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