Virtual printer: Support debug commands while streaming
This commit is contained in:
1 parent
60be6349f5
commit
7073c12444
1 file changed
+7
-6
@@ -259,6 +259,13 @@ class VirtualPrinter(object):
|
||||
|
||||
data += "\n"
|
||||
|
||||
if data.startswith("!!DEBUG:") or data.strip() == "!!DEBUG":
|
||||
debug_command = ""
|
||||
if data.startswith("!!DEBUG:"):
|
||||
debug_command = data[len("!!DEBUG:"):].strip()
|
||||
self._debugTrigger(debug_command)
|
||||
continue
|
||||
|
||||
# shortcut for writing to SD
|
||||
if self._writingToSdHandle is not None and not "M29" in data:
|
||||
self._writingToSdHandle.write(data)
|
||||
@@ -269,12 +276,6 @@ class VirtualPrinter(object):
|
||||
from octoprint._version import get_versions
|
||||
self._send("OctoPrint VirtualPrinter v" + get_versions()["version"])
|
||||
continue
|
||||
elif data.startswith("!!DEBUG:") or data.strip() == "!!DEBUG":
|
||||
debug_command = ""
|
||||
if data.startswith("!!DEBUG:"):
|
||||
debug_command = data[len("!!DEBUG:"):].strip()
|
||||
self._debugTrigger(debug_command)
|
||||
continue
|
||||
|
||||
# if we are sending oks before command output, send it now
|
||||
if len(data.strip()) > 0 and self._okBeforeCommandOutput:
|
||||
|
||||
Reference in new issue
Block a user