コード例 #1
0
ファイル: gcodefiles.py プロジェクト: d42/octoprint-fork
        def fileProcessingFinished(filename, absFilename, destination):
            """
            Callback for when the file processing (upload, optional slicing, addition to analysis queue) has
            finished.

            Depending on the file's destination triggers either streaming to SD card or directly calls selectOrPrint.
            """
            sd = destination == FileDestinations.SDCARD
            if sd:
                printer.addSdFile(filename, absFilename, selectAndOrPrint)
            else:
                selectAndOrPrint(absFilename, destination)
コード例 #2
0
ファイル: gcodefiles.py プロジェクト: zhenninglim/OctoPrint
        def fileProcessingFinished(filename, absFilename, destination):
            """
			Callback for when the file processing (upload, optional slicing, addition to analysis queue) has
			finished.

			Depending on the file's destination triggers either streaming to SD card or directly calls selectOrPrint.
			"""
            sd = destination == FileDestinations.SDCARD
            if sd:
                printer.addSdFile(filename, absFilename, selectAndOrPrint)
            else:
                selectAndOrPrint(absFilename, destination)
コード例 #3
0
ファイル: files.py プロジェクト: Bevaz/OctoPrint
	def fileProcessingFinished(filename, absFilename, destination):
		"""
		Callback for when the file processing (upload, optional slicing, addition to analysis queue) has
		finished.

		Depending on the file's destination triggers either streaming to SD card or directly calls selectAndOrPrint.
		"""

		if destination == FileDestinations.SDCARD and octoprint.filemanager.valid_file_type(filename, "gcode"):
			return filename, printer.addSdFile(filename, absFilename, selectAndOrPrint)
		else:
			selectAndOrPrint(filename, absFilename, destination)
			return filename
コード例 #4
0
    def fileProcessingFinished(filename, absFilename, destination):
        """
		Callback for when the file processing (upload, optional slicing, addition to analysis queue) has
		finished.

		Depending on the file's destination triggers either streaming to SD card or directly calls selectAndOrPrint.
		"""

        if destination == FileDestinations.SDCARD and octoprint.filemanager.valid_file_type(
                filename, "gcode"):
            return filename, printer.addSdFile(filename, absFilename,
                                               selectAndOrPrint)
        else:
            selectAndOrPrint(filename, absFilename, destination)
            return filename