From 10e11950ae86dd72a892614a92e6ab293652bcfa Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 6 Nov 2017 18:03:10 -0500 Subject: [PATCH] stepper: get_homed_offset() should return a float Signed-off-by: Kevin O'Connor --- klippy/stepper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/stepper.py b/klippy/stepper.py index 0574c4bf..7d365f5f 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -128,13 +128,13 @@ class PrinterHomingStepper(PrinterStepper): return dist_ticks / ticks_per_step def get_homed_offset(self): if not self.homing_stepper_phases or self.need_motor_enable: - return 0 + return 0. pos = self.mcu_stepper.get_mcu_position() pos %= self.homing_stepper_phases if self.homing_endstop_phase is None: logging.info("Setting %s endstop phase to %d", self.name, pos) self.homing_endstop_phase = pos - return 0 + return 0. delta = (pos - self.homing_endstop_phase) % self.homing_stepper_phases if delta >= self.homing_stepper_phases - self.homing_endstop_accuracy: delta -= self.homing_stepper_phases