Add RepRapPro style file opened to virtual printer

This commit is contained in:
Mark Walker 2015-12-30 14:13:33 -07:00
parent 9c89d45c10
commit 257c4ed8aa
3 changed files with 13 additions and 1 deletions

View file

@ -290,6 +290,14 @@ The following settings are only relevant to you if you want to do OctoPrint deve
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
includeCurrentToolInTemps: true
# Whether to include the selected filename in the M23 File opened response.
#
# True: > M23 filename.gcode
# < File opened: filename.gcode Size: 27
# False: > M23 filename.gcode
# > File opened
includeFilenameInOpened: true
# The maximum movement speeds of the simulated printer's axes, in mm/s
movementSpeed:
x: 6000

View file

@ -539,7 +539,10 @@ class VirtualPrinter(object):
else:
self._selectedSdFile = file
self._selectedSdFileSize = os.stat(file).st_size
self._send("File opened: %s Size: %d" % (filename, self._selectedSdFileSize))
if settings().getBoolean(["devel", "virtualPrinter", "includeFilenameInOpened"]):
self._send("File opened: %s Size: %d" % (filename, self._selectedSdFileSize))
else:
self._send("File opened")
self._send("File selected")
def _startSdPrint(self):

View file

@ -300,6 +300,7 @@ default_settings = {
"okWithLinenumber": False,
"numExtruders": 1,
"includeCurrentToolInTemps": True,
"includeFilenameOnOpened": True,
"movementSpeed": {
"x": 6000,
"y": 6000,