From 8eef34ac4587630cfecbe6efee5f5f8123150c86 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 21 Jul 2016 10:30:22 +0200 Subject: [PATCH] USB printer connection is now reset when print is completed CURA-1822 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 6b5fe22fcf..7bd5b66cc2 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -502,6 +502,13 @@ class USBPrinterOutputDevice(PrinterOutputDevice): # It will be normalized (based on max_progress) to range 0 - 100 def setProgress(self, progress, max_progress = 100): self._progress = (progress / max_progress) * 100 # Convert to scale of 0-100 + if self._progress == 100: + # Printing is done, reset progress + self._gcode_position = 0 + self.setProgress(0) + self._is_printing = False + self._is_paused = False + self._updateJobState("ready") self.progressChanged.emit() ## Cancel the current print. Printer connection wil continue to listen.