Smoothie compat fix: Only wait for ok's after GCODE commands

Any unknown commands should just be piped through and not use up an acknowledgement. This
new behaviour can be overridden via the new feature flag "unknownCommandsNeedAck", which will
restore the former behaviour causing even unknown commands to use up an "ok".

Also no line numbering or checksumming will happen. Shouldn't usually be of relevance for other
firmwares, but in case of any compatibility issues introduced by this also added a new feature
flag "sendChecksumWithNonGcode" that causes even unknown commands to be sent with a
checksum if necessary.
This commit is contained in:
Gina Häußge committed 2015-04-27 17:24:34 +02:00
1 parent 5765180462
commit 4ea6bcd1de
4 files changed
+29 -7

No files matched your search

@@ -149,6 +149,11 @@ class VirtualPrinter():
self._sendOk()
continue
if data.strip() == "version":
from octoprint._version import get_versions
self.outgoing.put("OctoPrint VirtualPrinter v" + get_versions()["version"])
continue
if len(data.strip()) > 0 and self._okBeforeCommandOutput:
self._sendOk()
@@ -394,7 +399,6 @@ class VirtualPrinter():
pass
if tool >= settings().getInt(["devel", "virtualPrinter", "numExtruders"]):
self._sendOk()
return
try:
@@ -406,7 +410,6 @@ class VirtualPrinter():
self._waitForHeatup("tool%d" % tool)
if settings().getBoolean(["devel", "virtualPrinter", "repetierStyleTargetTemperature"]):
self.outgoing.put("TargetExtr%d:%d" % (tool, self.targetTemp[tool]))
self._sendOk()
def _parseBedCommand(self, line):
try:
@@ -418,7 +421,6 @@ class VirtualPrinter():
self._waitForHeatup("bed")
if settings().getBoolean(["devel", "virtualPrinter", "repetierStyleTargetTemperature"]):
self.outgoing.put("TargetBed:%d" % self.bedTargetTemp)
self._sendOk()
def _performMove(self, line):
matchX = re.search("X([0-9.]+)", line)