From dbb00812874175423637aeb6d60f09a688bba605 Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Tue, 8 Mar 2016 08:45:49 -0800 Subject: [PATCH] Split CODE128 into it's character sets --- escpos/constants.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/escpos/constants.py b/escpos/constants.py index dcac0d3..cf11333 100644 --- a/escpos/constants.py +++ b/escpos/constants.py @@ -149,7 +149,9 @@ BARCODE_B_CODE39 = _SET_BARCODE_TYPE(chr(69)) # Barcode type CODE39 BARCODE_B_ITF = _SET_BARCODE_TYPE(chr(70)) # Barcode type ITF BARCODE_B_NW7 = _SET_BARCODE_TYPE(chr(71)) # Barcode type NW7 BARCODE_B_CODE93 = _SET_BARCODE_TYPE(chr(72)) # Barcode type CODE93 -BARCODE_B_CODE128 = _SET_BARCODE_TYPE(chr(73)) # Barcode type CODE128 +BARCODE_B_CODE128A = _SET_BARCODE_TYPE(chr(73) + '{A') # Barcode type CODE128 character set A +BARCODE_B_CODE128B = _SET_BARCODE_TYPE(chr(73) + '{B') # Barcode type CODE128 character set B +BARCODE_B_CODE128C = _SET_BARCODE_TYPE(chr(73) + '{C') # Barcode type CODE128 character set C BARCODE_B_GS1_128 = _SET_BARCODE_TYPE(chr(74)) # Barcode type GS1-128 BARCODE_B_GS1_DATABAR_OMNI = _SET_BARCODE_TYPE(chr(75)) # Barcode type GS1 DataBar Omnidirectional BARCODE_B_GS1_DATABAR_TRUNC = _SET_BARCODE_TYPE(chr(76)) # Barcode type GS1 DataBar Truncated @@ -178,7 +180,9 @@ BARCODE_TYPE_B = { 'NW7': BARCODE_B_NW7, 'CODABAR': BARCODE_B_NW7, 'CODE93': BARCODE_B_CODE93, - 'CODE128': BARCODE_B_CODE128, + 'CODE128A': BARCODE_B_CODE128A, + 'CODE128B': BARCODE_B_CODE128B, + 'CODE128C': BARCODE_B_CODE128C, 'GS1-128': BARCODE_B_GS1_128, 'GS1 DATABAR OMNIDIRECTIONAL': BARCODE_B_GS1_DATABAR_OMNI, 'GS1 DATABAR TRUNCATED': BARCODE_B_GS1_DATABAR_TRUNC,