From 0d55b8b4406f3845ec32cc848827e1e193883b34 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 May 2018 12:04:00 +0200 Subject: [PATCH] Resume after pausing without waiting for next ok Previously the resume only worked because in the message receiving loop it would no longer ignore the next 'ok'. It doesn't actually send a message that would trigger an 'ok'. This only worked because we are polling every 2 seconds for the nozzle temperature which also happens to trigger an 'ok' response, which we interpret as a go-ahead for being able to send the next g-code line. Now it's no longer dependent on the fact that we happen to also poll the temperatures, so the code is more stable. And it also resumes immediately instead of waiting for up to 2 seconds. --- plugins/USBPrinting/USBPrinterOutputDevice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index dcc2387b07..00eb2f0b25 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -379,6 +379,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def resumePrint(self): self._paused = False + self._sendNextGcodeLine() #Send one line of g-code next so that we'll trigger an "ok" response loop even if we're not polling temperatures. def cancelPrint(self): self._gcode_position = 0