diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py index fefedc3df5a4..598783a481a1 100644 --- a/klippy/extras/force_move.py +++ b/klippy/extras/force_move.py @@ -136,11 +136,8 @@ def cmd_SET_KINEMATIC_POSITION(self, gcmd): clear_axes = [axes.index(a) for a in axes if a in clear] logging.info("SET_KINEMATIC_POSITION pos=%.3f,%.3f,%.3f clear=%s", x, y, z, ','.join((axes[i] for i in clear_axes))) - toolhead.set_position( - [x, y, z, curpos[3]], - homing_axes=(0, 1, 2), - clear_axes=clear_axes - ) + toolhead.set_position([x, y, z, curpos[3]], homing_axes=(0, 1, 2)) + toolhead.get_kinematics().clear_homing_state(clear_axes) def load_config(config): return ForceMove(config) diff --git a/klippy/extras/manual_stepper.py b/klippy/extras/manual_stepper.py index 40db4a50316e..2ead11ebd58b 100644 --- a/klippy/extras/manual_stepper.py +++ b/klippy/extras/manual_stepper.py @@ -109,7 +109,7 @@ def flush_step_generation(self): self.sync_print_time() def get_position(self): return [self.rail.get_commanded_position(), 0., 0., 0.] - def set_position(self, newpos, homing_axes=()): + def set_position(self, newpos): self.do_set_position(newpos[0]) def get_last_move_time(self): self.sync_print_time() diff --git a/klippy/extras/safe_z_home.py b/klippy/extras/safe_z_home.py index b5b5244611c0..ca0756cfa710 100644 --- a/klippy/extras/safe_z_home.py +++ b/klippy/extras/safe_z_home.py @@ -40,8 +40,7 @@ def cmd_G28(self, gcmd): toolhead.set_position(pos, homing_axes=[2]) toolhead.manual_move([None, None, self.z_hop], self.z_hop_speed) - if hasattr(toolhead.get_kinematics(), "clear_homing_state"): - toolhead.get_kinematics().clear_homing_state((2,)) + toolhead.get_kinematics().clear_homing_state((2,)) elif pos[2] < self.z_hop: # If the Z axis is homed, and below z_hop, lift it to z_hop toolhead.manual_move([None, None, self.z_hop], diff --git a/klippy/toolhead.py b/klippy/toolhead.py index ed6a0e115972..256915daabf9 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -457,14 +457,13 @@ def _flush_handler(self, eventtime): # Movement commands def get_position(self): return list(self.commanded_pos) - def set_position(self, newpos, homing_axes=(), clear_axes=()): + def set_position(self, newpos, homing_axes=()): self.flush_step_generation() ffi_main, ffi_lib = chelper.get_ffi() ffi_lib.trapq_set_position(self.trapq, self.print_time, newpos[0], newpos[1], newpos[2]) self.commanded_pos[:] = newpos self.kin.set_position(newpos, homing_axes) - self.kin.clear_homing_state(clear_axes) self.printer.send_event("toolhead:set_position") def limit_next_junction_speed(self, speed): last_move = self.lookahead.get_last()