diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-09-04 11:41:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-09-04 11:41:57 -0400 |
commit | f6dd97b78443548c236038ce50a69c24866e156d (patch) | |
tree | d6903319195a312db946e610372727b6fcab2149 /klippy/extras/endstop_phase.py | |
parent | 1f3a160f47175c44722a3ce1e58e90c359b99c99 (diff) | |
download | kutter-f6dd97b78443548c236038ce50a69c24866e156d.tar.gz kutter-f6dd97b78443548c236038ce50a69c24866e156d.tar.xz kutter-f6dd97b78443548c236038ce50a69c24866e156d.zip |
homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/endstop_phase.py')
-rw-r--r-- | klippy/extras/endstop_phase.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py index 8cfea7fd..ae22720d 100644 --- a/klippy/extras/endstop_phase.py +++ b/klippy/extras/endstop_phase.py @@ -4,7 +4,6 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import math, logging -import homing TRINAMIC_DRIVERS = ["tmc2130", "tmc2208", "tmc2209", "tmc2660", "tmc5160"] @@ -81,7 +80,7 @@ class EndstopPhase: except Exception as e: msg = "Unable to get stepper %s phase: %s" % (self.name, str(e)) logging.exception(msg) - raise homing.EndstopError(msg) + raise self.printer.command_error(msg) if stepper.is_dir_inverted(): phase = (self.phases - 1) - phase else: @@ -95,7 +94,7 @@ class EndstopPhase: if delta >= self.phases - self.endstop_phase_accuracy: delta -= self.phases elif delta > self.endstop_phase_accuracy: - raise homing.EndstopError( + raise self.printer.command_error( "Endstop %s incorrect phase (got %d vs %d)" % ( self.name, phase, self.endstop_phase)) return delta * self.step_dist |