mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
USB printer connection is now reset when print is completed
CURA-1822
This commit is contained in:
parent
33313ddb70
commit
8eef34ac45
1 changed files with 7 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue