mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Added moveHead to usb printing
And ensured that wizard page uses correct version again CURA-1339
This commit is contained in:
parent
fc88844cf8
commit
6b7fb894f8
2 changed files with 16 additions and 11 deletions
|
@ -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):
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue