storing abc axis origin

This commit is contained in:
sanjayk03-dev
2024-12-03 15:40:10 +05:30
parent 817f4ab48b
commit fc30854006
2 changed files with 14 additions and 2 deletions

View File

@@ -245,12 +245,12 @@ class State(object):
# Loading origin from config after homing
if load_position and self.vars.get('cycle') == 'idle':
for axis in 'xyz':
for axis in 'xyzabc':
offset = self.ctrl.config.get('offset_' + axis)
if offset is not None and self.get('offset_'+ axis) == 0:
origin = offset if self.get('metric') == True else offset / 25.4
self.log.info('axis: {} offset: {} origin: {}'.format(axis, offset, origin))
self.ctrl.mach.set_position(axis,-origin)
self.ctrl.mach.set_position(axis, -origin)
def update(self, update):

View File

@@ -711,6 +711,18 @@
"offset_z": {
"type": "float",
"default": 0
},
"offset_a": {
"type": "float",
"default": 0
},
"offset_b": {
"type": "float",
"default": 0
},
"offset_c": {
"type": "float",
"default": 0
}
},