diff --git a/klippy/extras/pid_calibrate.py b/klippy/extras/pid_calibrate.py index a7768e57..a00f0a1b 100644 --- a/klippy/extras/pid_calibrate.py +++ b/klippy/extras/pid_calibrate.py @@ -130,7 +130,7 @@ class ControlAutoTune: def calc_final_pid(self): cycle_times = [(self.peaks[pos][1] - self.peaks[pos-2][1], pos) for pos in range(4, len(self.peaks))] - midpoint_pos = sorted(cycle_times)[len(cycle_times)/2][1] + midpoint_pos = sorted(cycle_times)[len(cycle_times)//2][1] return self.calc_pid(midpoint_pos) # Offline analysis helper def write_file(self, filename):