aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2025-03-21 22:12:30 -0400
committerKevin O'Connor <kevin@koconnor.net>2025-05-12 20:15:03 -0400
commitae536b4786981e71e6377524ff546751887bfc64 (patch)
tree9ded1b3b86e5c56d92947674ef66abcaa625e290
parent8928c394cfc4ffd0ed7e495e5eefe2a89443e282 (diff)
downloadkutter-ae536b4786981e71e6377524ff546751887bfc64.tar.gz
kutter-ae536b4786981e71e6377524ff546751887bfc64.tar.xz
kutter-ae536b4786981e71e6377524ff546751887bfc64.zip
toolhead: Only alter XYZ coordinates on set_position() calls
It's not valid to alter the extruder position from a call to set_position(), so don't allow callers to attempt that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/toolhead.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index afb1ef0f..93c87331 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -459,7 +459,7 @@ class ToolHead:
ffi_main, ffi_lib = chelper.get_ffi()
ffi_lib.trapq_set_position(self.trapq, self.print_time,
newpos[0], newpos[1], newpos[2])
- self.commanded_pos[:] = newpos
+ self.commanded_pos[:3] = newpos[:3]
self.kin.set_position(newpos, homing_axes)
self.printer.send_event("toolhead:set_position")
def limit_next_junction_speed(self, speed):