diff --git a/src/octoprint/plugins/virtual_printer/virtual.py b/src/octoprint/plugins/virtual_printer/virtual.py index 17517455..3eb02e0d 100644 --- a/src/octoprint/plugins/virtual_printer/virtual.py +++ b/src/octoprint/plugins/virtual_printer/virtual.py @@ -94,6 +94,8 @@ class VirtualPrinter(object): self._brokenM29 = settings().getBoolean(["devel", "virtualPrinter", "brokenM29"]) + self._firmwareName = settings().get(["devel", "virtualPrinter", "firmwareName"]) + self.currentLine = 0 self.lastN = 0 @@ -380,6 +382,10 @@ class VirtualPrinter(object): self._send(output) return True + def _gcode_M115(self, data): + output = "FIRMWARE_NAME:{} PROTOCOL_VERSION:1.0".format(self._firmwareName) + self._send(output) + def _gcode_M117(self, data): # we'll just use this to echo a message, to allow playing around with pause triggers if self._echoOnM117: diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index d5f8dd2e..20cb42b3 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -348,7 +348,8 @@ default_settings = { "supportM112": True, "echoOnM117": True, "brokenM29": True, - "supportF": False + "supportF": False, + "firmwareName": "Virtual Marlin 1.0" } } }