aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/cartesian.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-01-16 18:58:41 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-01-28 12:19:26 -0500
commit1a679028582d7ae503d80a4bbc8ca233451633be (patch)
treea86f31c8b0269c762076520a6c04c7f4bc7a1ea6 /klippy/cartesian.py
parent01bb4b291eb48a2556096ce0d56a212f52405985 (diff)
downloadkutter-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/cartesian.py')
-rw-r--r--klippy/cartesian.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/klippy/cartesian.py b/klippy/cartesian.py
index ff4d8b44..7e4ee95c 100644
--- a/klippy/cartesian.py
+++ b/klippy/cartesian.py
@@ -32,14 +32,16 @@ class CartKinematics:
return list(self.steppers)
def get_position(self):
return [s.mcu_stepper.get_commanded_position() for s in self.steppers]
- def set_position(self, newpos):
+ def set_position(self, newpos, homing_axes):
for i in StepList:
- self.steppers[i].set_position(newpos[i])
+ s = self.steppers[i]
+ s.set_position(newpos[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*(