diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 8262aaf3c4..fbf9e376b6 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -126,6 +126,11 @@ class USBPrinterOutputDevice(PrinterOutputDevice): gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list") self.printGCode(gcode_list) + def _moveHead(self, x, y, z, speed): + self._sendCommand("G91") + self._sendCommand("G0 X%s Y%s Z%s F%s" % (x, y, z, speed)) + self._sendCommand("G90") + ## Start a print based on a g-code. # \param gcode_list List with gcode (strings). def printGCode(self, gcode_list): diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index 1721f0fd4a..256b858792 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -22,7 +22,7 @@ Item Component.onCompleted: { printer_connection.homeBed() - printer_connection.moveHeadRelative(0, 0, 3) + printer_connection.moveHead(0, 0, 3) printer_connection.homeHead() } UM.I18nCatalog { id: catalog; name:"cura"} @@ -84,23 +84,23 @@ Item { if(wizardPage.leveling_state == 0) { - printer_connection.moveHeadRelative(0, 0, 3) + printer_connection.moveHead(0, 0, 3) printer_connection.homeHead() - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(platform_width - 10, 0, 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(platform_width - 10, 0, 0) + printer_connection.moveHead(0, 0, -3) } if(wizardPage.leveling_state == 1) { - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(-platform_width/2, platform_height - 10, 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(-platform_width/2, platform_height - 10, 0) + printer_connection.moveHead(0, 0, -3) } if(wizardPage.leveling_state == 2) { - printer_connection.moveHeadRelative(0, 0, 3) - printer_connection.moveHeadRelative(-platform_width/2 + 10, -(platform_height + 10), 0) - printer_connection.moveHeadRelative(0, 0, -3) + printer_connection.moveHead(0, 0, 3) + printer_connection.moveHead(-platform_width/2 + 10, -(platform_height + 10), 0) + printer_connection.moveHead(0, 0, -3) } wizardPage.leveling_state++ if (wizardPage.leveling_state >= 3){