diff options
author | Jaime van Kessel <nallath@gmail.com> | 2016-03-16 17:18:11 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2016-03-16 17:18:11 +0300 |
commit | 9a6615213cac5f740258954a3e4bedee82baba8b (patch) | |
tree | 16a93371ab1a3d85b9a7779364caa7958f5b9858 /plugins/USBPrinting/PrinterConnection.py | |
parent | 762f964221fcf46eb1b6cc3f1d51b4a0e4aa6221 (diff) |
Bed should no longer be damaged when leveling
CURA-1102
Diffstat (limited to 'plugins/USBPrinting/PrinterConnection.py')
-rw-r--r-- | plugins/USBPrinting/PrinterConnection.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index ffcd6d0d75..907cebc012 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -368,14 +368,28 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): Logger.log("d", "Setting bed temperature to %s", temperature) self._sendCommand("M140 S%s" % temperature) + @pyqtSlot() + def setMoveToRelative(self): + self._sendCommand("G91") + + @pyqtSlot() + def setMoveToAbsolute(self): + self._sendCommand("G90") + @pyqtSlot("long", "long","long") def moveHead(self, x, y, z): Logger.log("d","Moving head to %s, %s , %s", x, y, z) - self._sendCommand("G0 X%s Y%s Z%s"%(x,y,z)) + self._sendCommand("G0 X%s Y%s Z%s F3000"%(x,y,z)) + + @pyqtSlot("long", "long","long") + def moveHeadRelative(self, x, y, z): + self.setMoveToRelative() + self.moveHead(x,y,z) + self.setMoveToAbsolute() @pyqtSlot() def homeHead(self): - self._sendCommand("G28") + self._sendCommand("G28") ## Directly send the command, withouth checking connection state (eg; printing). # \param cmd string with g-code |