mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
z_thermal_adjust: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
53acdfd0a5
commit
2082300309
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user