Handle cases when fullCut or partCut not available
This commit is contained in:
parent
0f33d68f3a
commit
29cc8baab7
|
@ -23,3 +23,8 @@ src/escpos/version.py
|
||||||
|
|
||||||
# testing temporary directories
|
# testing temporary directories
|
||||||
test/test-cli-output/
|
test/test-cli-output/
|
||||||
|
|
||||||
|
# vim swap files
|
||||||
|
*.swp
|
||||||
|
*.swn
|
||||||
|
*.swo
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 31d2269651d4d10ca51f59799ee4d05b4c4a1625
|
Subproject commit b6220ee5c55b166f06d45a97f230312805b743b1
|
|
@ -578,9 +578,11 @@ class Escpos(object):
|
||||||
# Fix the size between last line and cut
|
# Fix the size between last line and cut
|
||||||
# TODO: handle this with a line feed
|
# TODO: handle this with a line feed
|
||||||
self._raw(b"\n\n\n\n\n\n")
|
self._raw(b"\n\n\n\n\n\n")
|
||||||
if mode.upper() == "PART":
|
|
||||||
|
if mode.upper() == "PART" and self.profile.supports('paperPartCut'):
|
||||||
self._raw(PAPER_PART_CUT)
|
self._raw(PAPER_PART_CUT)
|
||||||
else: # DEFAULT MODE: FULL CUT
|
elif mode.upper() != "PART" and self.profile.supports('paperFullCut'):
|
||||||
|
# DEFAULT MODE: FULL CUT
|
||||||
self._raw(PAPER_FULL_CUT)
|
self._raw(PAPER_FULL_CUT)
|
||||||
|
|
||||||
def cashdraw(self, pin):
|
def cashdraw(self, pin):
|
||||||
|
|
Loading…
Reference in New Issue