homing: Directly interact with the kinematic class on query_endstops()

Move the query_endstop logic out of toolhead.py and into homing.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-12-06 10:13:58 -05:00
parent 8d9ca6f2dd
commit f6d4284d5c
6 changed files with 15 additions and 21 deletions

View file

@ -26,6 +26,8 @@ class CartKinematics:
self.steppers[1].set_max_jerk(max_halt_velocity, max_accel)
self.steppers[2].set_max_jerk(
min(max_halt_velocity, self.max_z_velocity), max_accel)
def get_steppers(self):
return list(self.steppers)
def set_position(self, newpos):
for i in StepList:
self.steppers[i].set_position(newpos[i])
@ -62,8 +64,6 @@ 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, query_flags):
return homing.query_endstops(print_time, query_flags, self.steppers)
def motor_off(self, print_time):
self.limits = [(1.0, -1.0)] * 3
for stepper in self.steppers: