From 20823003098748fe6808793fe5d0c01ae74d47f9 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 7 Apr 2025 20:37:03 -0400 Subject: [PATCH] z_thermal_adjust: Support toolhead positions with more than 4 axes Signed-off-by: Kevin O'Connor --- klippy/extras/z_thermal_adjust.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/z_thermal_adjust.py b/klippy/extras/z_thermal_adjust.py index 0fa0bff0..4cf3a669 100644 --- a/klippy/extras/z_thermal_adjust.py +++ b/klippy/extras/z_thermal_adjust.py @@ -110,12 +110,12 @@ class ZThermalAdjuster: # Apply Z adjustment new_z = pos[2] + self.z_adjust_mm self.last_z_adjust_mm = self.z_adjust_mm - return [pos[0], pos[1], new_z, pos[3]] + return [pos[0], pos[1], new_z] + pos[3:] def calc_unadjust(self, pos): 'Remove Z adjustment' unadjusted_z = pos[2] - self.z_adjust_mm - return [pos[0], pos[1], unadjusted_z, pos[3]] + return [pos[0], pos[1], unadjusted_z] + pos[3:] def get_position(self): position = self.calc_unadjust(self.next_transform.get_position())