From 961f68629ab590c3111282907170ecded65230f1 Mon Sep 17 00:00:00 2001 From: kakou-fr Date: Sat, 21 Mar 2020 02:11:36 +0100 Subject: [PATCH] manual_stepper: Fix sensorless endstop for manual_stepper (#2621) Signed-off-by: Jeremy Briffaut --- klippy/extras/manual_stepper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/klippy/extras/manual_stepper.py b/klippy/extras/manual_stepper.py index 87e6515d..743c6e23 100644 --- a/klippy/extras/manual_stepper.py +++ b/klippy/extras/manual_stepper.py @@ -77,6 +77,10 @@ class ManualStepper: def do_homing_move(self, movepos, speed, accel, triggered, check_trigger): if not self.can_home: raise self.gcode.error("No endstop for this manual stepper") + # Notify start of homing/probing move + endstops = self.rail.get_endstops() + self.printer.send_event("homing:homing_move_begin", + [es for es, name in endstops]) # Start endstop checking self.sync_print_time() endstops = self.rail.get_endstops() @@ -94,6 +98,13 @@ class ManualStepper: did_trigger = mcu_endstop.home_wait(self.next_cmd_time) if not did_trigger and check_trigger and error is None: error = "Failed to home %s: Timeout during homing" % (name,) + # Signal homing/probing move complete + try: + self.printer.send_event("homing:homing_move_end", + [es for es, name in endstops]) + except CommandError as e: + if error is None: + error = str(e) self.sync_print_time() if error is not None: raise homing.CommandError(error)