diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-11-18 11:27:16 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-11-18 14:04:09 -0500 |
commit | 781cf608d778798c976d3cb4edb6ea6b028b66e1 (patch) | |
tree | e445d528351148788e634c907740fe944a2a0fa1 /klippy/cartesian.py | |
parent | 9e1059afb46c9df439211d21590da987b32e2963 (diff) | |
download | kutter-781cf608d778798c976d3cb4edb6ea6b028b66e1.tar.gz kutter-781cf608d778798c976d3cb4edb6ea6b028b66e1.tar.xz kutter-781cf608d778798c976d3cb4edb6ea6b028b66e1.zip |
homing: Create Homing class from gcode
Create the Homing class in the gcode handler instead of in the
kinematic classes. This will make it easier to pass error messages
back to the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/cartesian.py')
-rw-r--r-- | klippy/cartesian.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/klippy/cartesian.py b/klippy/cartesian.py index b7b4a9ab..c1cddc7d 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -31,10 +31,9 @@ class CartKinematics: def get_homed_position(self): return [s.position_endstop + s.get_homed_offset()*s.step_dist for s in self.steppers] - def home(self, toolhead, axes): + def home(self, homing_state): # Each axis is homed independently and in order - homing_state = homing.Homing(toolhead, axes) - for axis in axes: + for axis in homing_state.get_axes(): s = self.steppers[axis] self.limits[axis] = (s.position_min, s.position_max) # Determine moves @@ -60,7 +59,6 @@ class CartKinematics: # Home again coord[axis] = r2pos homing_state.plan_home(list(coord), homepos, [s], s.homing_speed/2.0) - return homing_state def motor_off(self, move_time): self.limits = [(1.0, -1.0)] * 3 for stepper in self.steppers: |