loading origin only if offset is 0
This commit is contained in:
@@ -252,7 +252,7 @@ class State(object):
|
|||||||
if load_position and self.vars.get('cycle') == 'idle':
|
if load_position and self.vars.get('cycle') == 'idle':
|
||||||
for axis in 'xyz':
|
for axis in 'xyz':
|
||||||
offset = self.ctrl.config.get('offset_' + axis)
|
offset = self.ctrl.config.get('offset_' + axis)
|
||||||
if offset is not None:
|
if offset is not None and self.get('offset_'+ axis) == 0:
|
||||||
origin = offset if self.get('metric') == True else offset / 25.4
|
origin = offset if self.get('metric') == True else offset / 25.4
|
||||||
self.log.info('axis: {} offset: {} origin: {}'.format(axis, offset, origin))
|
self.log.info('axis: {} offset: {} origin: {}'.format(axis, offset, origin))
|
||||||
self.ctrl.mach.set_position(axis,-origin)
|
self.ctrl.mach.set_position(axis,-origin)
|
||||||
|
|||||||
Reference in New Issue
Block a user