def goto(self, x, y): print("gone to %f %f" % (x, y)) pass def up(self): pass def down(self): pass ACTUALLY_DRAW = True if ACTUALLY_DRAW: d = draw.Drawer() d.set_up_down(120, 113) d.start() d.up() else: d = Dummy() XWIDTH = 360 YBOTTOM = -580 YTOP = -125 YCENTER = -352.5 SCALE = 200 WHEE = True def xmap(x):
def simple_run(action, port="/dev/ttyUSB0"): d = draw.Drawer(port) d.start() action(d) d.serial_clear()