diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-01-16 18:58:41 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-01-28 12:19:26 -0500 |
commit | 1a679028582d7ae503d80a4bbc8ca233451633be (patch) | |
tree | a86f31c8b0269c762076520a6c04c7f4bc7a1ea6 /klippy/corexy.py | |
parent | 01bb4b291eb48a2556096ce0d56a212f52405985 (diff) | |
download | kutter-1a679028582d7ae503d80a4bbc8ca233451633be.tar.gz kutter-1a679028582d7ae503d80a4bbc8ca233451633be.tar.xz kutter-1a679028582d7ae503d80a4bbc8ca233451633be.zip |
homing_override: Allow moves prior to homing an axis
Add support for disabling homing checks via the homing_override
mechanism. This may be useful to move an axis prior to homing it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/corexy.py')
-rw-r--r-- | klippy/corexy.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/klippy/corexy.py b/klippy/corexy.py index 4b52f949..2777eade 100644 --- a/klippy/corexy.py +++ b/klippy/corexy.py @@ -40,15 +40,17 @@ class CoreXYKinematics: def get_position(self): pos = [s.mcu_stepper.get_commanded_position() for s in self.steppers] return [0.5 * (pos[0] + pos[1]), 0.5 * (pos[0] - pos[1]), pos[2]] - def set_position(self, newpos): + def set_position(self, newpos, homing_axes): pos = (newpos[0] + newpos[1], newpos[0] - newpos[1], newpos[2]) for i in StepList: - self.steppers[i].set_position(pos[i]) + s = self.steppers[i] + s.set_position(pos[i]) + if i in homing_axes: + self.limits[i] = (s.position_min, s.position_max) def home(self, homing_state): # Each axis is homed independently and in order for axis in homing_state.get_axes(): s = self.steppers[axis] - self.limits[axis] = (s.position_min, s.position_max) # Determine moves if s.homing_positive_dir: pos = s.position_endstop - 1.5*( |