aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/endstop_phase.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/endstop_phase.py')
-rw-r--r--klippy/extras/endstop_phase.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py
index 20ddd340..c0408262 100644
--- a/klippy/extras/endstop_phase.py
+++ b/klippy/extras/endstop_phase.py
@@ -66,6 +66,8 @@ class EndstopPhase:
msg = "Unable to get stepper %s phase: %s" % (self.name, str(e))
logging.exception(msg)
raise homing.EndstopError(msg)
+ if stepper.is_dir_inverted():
+ phase = (self.phases - 1) - phase
else:
phase = stepper.get_mcu_position() % self.phases
self.phase_history[phase] += 1