MCPcopy
hub / github.com/Ultimaker/Cura / sendCommand

Method sendCommand

Cura/util/machineCom.py:744–754  ·  view source on GitHub ↗
(self, cmd)

Source from the content-addressed store, hash-verified

742 self._callback.mcProgress(self._gcodePos)
743
744 def sendCommand(self, cmd):
745 cmd = cmd.encode('ascii', 'replace')
746 if self.isPrinting() or self.isPaused() or self.isOperational():
747 # If waiting for heating, send M108 immediatly to
748 # interrupt it instead of queueing it
749 if self._heatupWaiting and "M108" in cmd:
750 self._sendCommand(cmd)
751 else:
752 self._commandQueue.put(cmd)
753 if len(self._currentCommands) == 0:
754 self._sendCommand(self._commandQueue.get())
755
756 def printGCode(self, gcodeList):
757 if not self.isOperational() or self.isPrinting() or self.isPaused():

Callers 15

_monitorMethod · 0.95
monitorStdinMethod · 0.45
mcTempUpdateMethod · 0.45
mcMessageMethod · 0.45
sendGCommandMethod · 0.45
OnBedUpMethod · 0.45
OnBedDownMethod · 0.45
OnBedUp2Method · 0.45
OnBedDown2Method · 0.45
OnResumeMethod · 0.45
mcStateChangeMethod · 0.45
mcStateChangeMethod · 0.45

Calls 5

isPrintingMethod · 0.95
isPausedMethod · 0.95
isOperationalMethod · 0.95
_sendCommandMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected