From bd81c147c5fcdcbddc70d2e768df6f19d781ad58 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Tue, 03 May 2016 17:13:42 +0000 Subject: [PATCH] Add marginLeft method --- axiohm.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/axiohm.py b/axiohm.py index b287b57..1dba9ed 100644 --- a/axiohm.py +++ b/axiohm.py @@ -232,7 +232,7 @@ # PRINT POSITION - def moveAbsolute(self, dots): + def moveAbsolute(self, dots = 0): self.serial.write("\x1b\x24" + chr(dots % 256) + chr(int(dots/256))) def moveAbsoluteInches(self, inches): @@ -250,6 +250,7 @@ def moveRelative(self, dots): if dots < 0: dots = 65536 + dots + self.serial.write("\x1b\x5c" + chr(dots % 256) + chr(int(dots/256))) def moveRelativeInches(self, inches): @@ -264,6 +265,9 @@ else: self.moveRelative(int(milimeters * 576 / 72)) + def marginLeft(self, dots = 0): + self.serial.write("\x1d\x4c" + chr(dots % 256) + chr(int(dots/256))) + # PRINTING def printUnicode(self, line=""): -- Gitblit v1.9.1