Virtual: add long running pseudo G33

Useful for testing busy protocol on commands.
This commit is contained in:
Gina Häußge committed 2018-09-21 18:25:58 +02:00
1 parent d2ecb0a28f
commit f3cfe2ba48
1 file changed
+13
@@ -647,6 +647,19 @@ class VirtualPrinter(object):
else:
time.sleep(_timeout)
def _gcode_G33(self, data):
self._send("G33 Auto Calibrate")
self._send("Will take ~60s")
timeout = 60
if self._sendBusy and self._busyInterval > 0:
until = time.time() + timeout
while time.time() < until:
time.sleep(self._busyInterval)
self._send("busy:processing")
else:
time.sleep(timeout)
##~~ further helpers
def _calculate_checksum(self, line):