z_tilt: Improve python3 compatibility
Sort using comparison on only first item in list to avoid greater/less than comparison of stepper objects (which causes an error on Python3). Reported by discourse user salbang. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4671cf2d0e
commit
86acee6e8b
|
@ -41,7 +41,7 @@ class ZAdjustHelper:
|
|||
s.set_trapq(None)
|
||||
# Move each z stepper (sorted from lowest to highest) until they match
|
||||
positions = [(-a, s) for a, s in zip(adjustments, self.z_steppers)]
|
||||
positions.sort()
|
||||
positions.sort(key=(lambda k: k[0]))
|
||||
first_stepper_offset, first_stepper = positions[0]
|
||||
z_low = curpos[2] - first_stepper_offset
|
||||
for i in range(len(positions)-1):
|
||||
|
|
Loading…
Reference in New Issue