From 8d9ca6f2dd96e5b1c71999fb8497487fcb091493 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 6 Dec 2017 09:59:00 -0500 Subject: homing: Directly interact with the kinematic class when homing Move the homing logic out of toolhead.py and into homing.py. This simplifies the toolhead logic and centralizes the homing code. Signed-off-by: Kevin O'Connor --- klippy/toolhead.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'klippy/toolhead.py') diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 3a73bb26..e258f473 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -327,12 +327,6 @@ class ToolHead: self.move_queue.add_move(move) if self.print_time > self.need_check_stall: self._check_stall() - def home(self, homing_state): - try: - self.kin.home(homing_state) - except homing.EndstopError as e: - self.motor_off() - raise def dwell(self, delay, check_stall=True): self.get_last_move_time() self.update_move_time(delay) @@ -382,6 +376,8 @@ class ToolHead: self.reset_print_time() except: logging.exception("Exception in do_shutdown") + def get_kinematics(self): + return self.kin def get_max_velocity(self): return self.max_velocity, self.max_accel def get_max_axis_halt(self): -- cgit v1.2.3-70-g09d2