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.
This commit is contained in:
Ghostkeeper 2018-05-25 12:04:00 +02:00
parent 7c0eb43a23
commit 0d55b8b440
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -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