From 4b231470ed435c600266b474b3faf99cbaacbff0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 12 Jun 2020 10:04:13 -0400 Subject: [PATCH] delta_calibrate: Improve Python3 compatibility Signed-off-by: Kevin O'Connor --- klippy/extras/delta_calibrate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py index abea7cc6..f9af963a 100644 --- a/klippy/extras/delta_calibrate.py +++ b/klippy/extras/delta_calibrate.py @@ -52,7 +52,7 @@ def measurements_to_distances(measured_params, delta_params): for od, opw in zip(mp['OUTER_DISTS'], mp['OUTER_PILLAR_WIDTHS']) ] # Convert angles in degrees to an XY multiplier obj_angles = map(math.radians, MeasureAngles) - xy_angles = zip(map(math.cos, obj_angles), map(math.sin, obj_angles)) + xy_angles = list(zip(map(math.cos, obj_angles), map(math.sin, obj_angles))) # Calculate stable positions for center measurements inner_ridge = MeasureRidgeRadius * scale inner_pos = [(ax * inner_ridge, ay * inner_ridge, 0.) @@ -270,7 +270,7 @@ class DeltaCalibrate: if data is None: continue try: - parts = map(float, data.split(',')) + parts = list(map(float, data.split(','))) except: raise gcmd.error("Unable to parse parameter '%s'" % (name,)) if len(parts) != count: