updated mach.py
This commit is contained in:
@@ -371,12 +371,9 @@ class Mach(Comm):
|
|||||||
|
|
||||||
# Set the absolute position both locally and via the AVR
|
# Set the absolute position both locally and via the AVR
|
||||||
target = position + state.get('offset_' + axis)
|
target = position + state.get('offset_' + axis)
|
||||||
json_data = config.copy()
|
json_data = config.values.copy()
|
||||||
axes = json_data.get('axes')
|
axes = json_data.setdefault('axes', {})
|
||||||
if axes:
|
axes[axis] = { 'abs' : target, 'off' : state.get('offset_' + axis)}
|
||||||
json_data['axes'][axis] = { "abs": target, "off": state.get('offset_' + axis) }
|
|
||||||
else:
|
|
||||||
json_data['axes'] = { axis: { "abs": target, "off": state.get('offset_' + axis) } }
|
|
||||||
config.save(json_data)
|
config.save(json_data)
|
||||||
state.set(axis + 'p', target)
|
state.set(axis + 'p', target)
|
||||||
super().queue_command(Cmd.set_axis(axis, target))
|
super().queue_command(Cmd.set_axis(axis, target))
|
||||||
|
|||||||
Reference in New Issue
Block a user