From c72d73ec450119b5fbe13d98409037a21ae97101 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 10 Jan 2025 11:31:14 -0500 Subject: stepper_enable: Directly call clear_homing_state() on motor off event Call clear_homing_state() on each motor off event. This simplifies the kinematic classes as they no longer need to register and handle the motor_off event. Signed-off-by: Kevin O'Connor --- klippy/kinematics/cartesian.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'klippy/kinematics/cartesian.py') diff --git a/klippy/kinematics/cartesian.py b/klippy/kinematics/cartesian.py index 2715d172..1db40f4f 100644 --- a/klippy/kinematics/cartesian.py +++ b/klippy/kinematics/cartesian.py @@ -40,8 +40,6 @@ class CartKinematics: for s in self.get_steppers(): s.set_trapq(toolhead.get_trapq()) toolhead.register_step_generator(s.generate_steps) - self.printer.register_event_handler("stepper_enable:motor_off", - self._motor_off) # Setup boundary checks max_velocity, max_accel = toolhead.get_max_velocity() self.max_z_velocity = config.getfloat('max_z_velocity', max_velocity, @@ -97,8 +95,6 @@ class CartKinematics: self.dc_module.home(homing_state) else: self.home_axis(homing_state, axis, self.rails[axis]) - def _motor_off(self, print_time): - self.clear_homing_state((0, 1, 2)) def _check_endstops(self, move): end_pos = move.end_pos for i in (0, 1, 2): -- cgit v1.2.3-70-g09d2