From 857eb01bfa4389e6e475bacfe506424f2a158d15 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 13 Sep 2017 10:50:52 -0400 Subject: homing: Move query_endstop() code from kinematic classes to homing.py Signed-off-by: Kevin O'Connor --- klippy/cartesian.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index bc5ead70..ede84af9 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -62,6 +62,8 @@ class CartKinematics: # Set final homed position coord[axis] = s.position_endstop + s.get_homed_offset() homing_state.set_homed_position(coord) + def query_endstops(self, print_time): + return homing.query_endstops(print_time, self.steppers) def motor_off(self, print_time): self.limits = [(1.0, -1.0)] * 3 for stepper in self.steppers: @@ -74,9 +76,6 @@ class CartKinematics: self.steppers[i].motor_enable(print_time, 1) need_motor_enable |= self.steppers[i].need_motor_enable self.need_motor_enable = need_motor_enable - def query_endstops(self, print_time): - endstops = [(s, s.query_endstop(print_time)) for s in self.steppers] - return [(s.name, es.query_endstop_wait()) for s, es in endstops] def _check_endstops(self, move): end_pos = move.end_pos for i in StepList: -- cgit v1.2.3-70-g09d2