fixed changes of startup position

main
lars 10 years ago
parent 15b6a9b488
commit 3196747cd9
  1. 4
      gcode-tools/gcode-shifter/gcode_shift.py

@ -141,7 +141,7 @@ class GCodeFilter(object):
class PositionHandler(object):
def __init__(self):
self.pos = tuple([0] * len(AXIS))
self.pos = tuple([None] * len(AXIS))
self.stack = [tuple(self.pos)]
def push(self, position):
@ -160,6 +160,8 @@ class PositionHandler(object):
def get_changed_axes(self, position):
for i, axis in enumerate(AXIS):
if self.pos[i] is None:
continue
if position[i] != self.pos[i]:
yield (i, axis)

Loading…
Cancel
Save