diff options
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r-- | klippy/gcode.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py index 97f88563..5262676a 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -250,14 +250,15 @@ class GCodeParser: axes.append(self.axis2pos[axis]) if not axes: axes = [0, 1, 2] - busy_handler = self.toolhead.home(axes) - def axes_update(axes): + homing_state = homing.Homing(self.toolhead, axes) + self.toolhead.home(homing_state) + def axes_update(homing_state): newpos = self.toolhead.get_position() - for axis in axes: + for axis in homing_state.get_axes(): self.last_position[axis] = newpos[axis] self.base_position[axis] = -self.homing_add[axis] - busy_handler.plan_axes_update(axes_update) - self.set_busy(busy_handler) + homing_state.plan_axes_update(axes_update) + self.set_busy(homing_state) def cmd_G90(self, params): # Use absolute coordinates self.absolutecoord = True |