mirror of
git://soft.sys114.com/klipper
synced 2026-02-11 19:20:26 +09:00
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 <kevin@koconnor.net>
This commit is contained in:
@@ -22,8 +22,6 @@ class PolarKinematics:
|
||||
for s in self.get_steppers():
|
||||
s.set_trapq(toolhead.get_trapq())
|
||||
toolhead.register_step_generator(s.generate_steps)
|
||||
config.get_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(
|
||||
@@ -88,8 +86,6 @@ class PolarKinematics:
|
||||
self._home_axis(homing_state, 0, self.rails[0])
|
||||
if home_z:
|
||||
self._home_axis(homing_state, 2, self.rails[1])
|
||||
def _motor_off(self, print_time):
|
||||
self.clear_homing_state((0, 1, 2))
|
||||
def check_move(self, move):
|
||||
end_pos = move.end_pos
|
||||
xy2 = end_pos[0]**2 + end_pos[1]**2
|
||||
|
||||
Reference in New Issue
Block a user