From c778f3fa237915ab3bc4ca6b15dd46facbecf0e7 Mon Sep 17 00:00:00 2001 From: Jim Duchek Date: Sun, 20 Mar 2022 07:14:55 -0600 Subject: [PATCH] Convert estimated time to int --- plugins/USBPrinting/USBPrinterOutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index d91be99f46..1155420b60 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -398,7 +398,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): line = line[:line.find(";")] line = line.strip() - + # Don't send empty lines. But we do have to send something, so send M105 instead. # Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause. if line == "" or line == "M0" or line == "M1": @@ -429,7 +429,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): print_job.updateTimeElapsed(elapsed_time) estimated_time = self._print_estimated_time if progress > .1: - estimated_time = self._print_estimated_time * (1 - progress) + elapsed_time + estimated_time = int(self._print_estimated_time * (1 - progress) + elapsed_time) print_job.updateTimeTotal(estimated_time) self._gcode_position += 1