mirror of https://github.com/Desuuuu/klipper.git
screws_tilt_adjust: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
01ab8267a6
commit
bcbdc983a8
|
@ -69,7 +69,7 @@ class ScrewsTiltAdjust:
|
||||||
or (not is_clockwise_thread and self.direction == 'CCW'))
|
or (not is_clockwise_thread and self.direction == 'CCW'))
|
||||||
min_or_max = max if use_max else min
|
min_or_max = max if use_max else min
|
||||||
i_base, z_base = min_or_max(
|
i_base, z_base = min_or_max(
|
||||||
enumerate([pos[2] for pos in positions]), key=lambda (i, z): z)
|
enumerate([pos[2] for pos in positions]), key=lambda v: v[1])
|
||||||
else:
|
else:
|
||||||
# First screw is the base position used for comparison
|
# First screw is the base position used for comparison
|
||||||
i_base, z_base = 0, positions[0][2]
|
i_base, z_base = 0, positions[0][2]
|
||||||
|
|
Loading…
Reference in New Issue