aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-18 14:35:31 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-18 14:39:48 -0500
commit7cf914537b34b1ecdd51fceefb8f89790cc0bb8d (patch)
tree83957d3595873a2bd7dbb303c05c20a548b8afe8 /klippy
parentab1972d1cfeb8581016a8322786df441876da368 (diff)
downloadkutter-7cf914537b34b1ecdd51fceefb8f89790cc0bb8d.tar.gz
kutter-7cf914537b34b1ecdd51fceefb8f89790cc0bb8d.tar.xz
kutter-7cf914537b34b1ecdd51fceefb8f89790cc0bb8d.zip
stepper: Raise an EndstopError if invalid phase found during homing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/stepper.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py
index 61a9d26a..2def4368 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -4,6 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import math, logging
+import homing
class PrinterStepper:
def __init__(self, printer, config, name):
@@ -97,7 +98,7 @@ class PrinterStepper:
if delta >= self.homing_stepper_phases - self.homing_endstop_accuracy:
delta -= self.homing_stepper_phases
elif delta > self.homing_endstop_accuracy:
- logging.error("Endstop %s incorrect phase (got %d vs %d)" % (
- self.config.section, pos, self.homing_endstop_phase))
- return 0
+ raise homing.EndstopError(
+ "Endstop %s incorrect phase (got %d vs %d)" % (
+ self.name, pos, self.homing_endstop_phase))
return delta