mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
ManualPrinterControl uses correct functions again
CL-541
This commit is contained in:
parent
5036eccd32
commit
00eeb835ac
3 changed files with 24 additions and 20 deletions
|
@ -1,6 +1,8 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from UM.Logger import Logger
|
||||
|
||||
MYPY = False
|
||||
if MYPY:
|
||||
from cura.PrinterOutput.PrintJobOutputModel import PrintJobOutputModel
|
||||
|
@ -16,31 +18,29 @@ class PrinterOutputController:
|
|||
self.can_control_manually = True
|
||||
self._output_device = output_device
|
||||
|
||||
|
||||
def setTargetHotendTemperature(self, printer: "PrinterOutputModel", extruder: "ExtruderOuputModel", temperature: int):
|
||||
# TODO: implement
|
||||
pass
|
||||
Logger.log("w", "Set target hotend temperature not implemented in controller")
|
||||
|
||||
def setTargetBedTemperature(self, printer: "PrinterOutputModel", temperature: int):
|
||||
pass
|
||||
Logger.log("w", "Set target bed temperature not implemented in controller")
|
||||
|
||||
def setJobState(self, job: "PrintJobOutputModel", state: str):
|
||||
pass
|
||||
Logger.log("w", "Set job state not implemented in controller")
|
||||
|
||||
def cancelPreheatBed(self, printer: "PrinterOutputModel"):
|
||||
pass
|
||||
Logger.log("w", "Cancel preheat bed not implemented in controller")
|
||||
|
||||
def preheatBed(self, printer: "PrinterOutputModel", temperature, duration):
|
||||
pass
|
||||
Logger.log("w", "Preheat bed not implemented in controller")
|
||||
|
||||
def setHeadPosition(self, printer: "PrinterOutputModel", x, y, z, speed):
|
||||
pass
|
||||
Logger.log("w", "Set head position not implemented in controller")
|
||||
|
||||
def moveHead(self, printer: "PrinterOutputModel", x, y, z, speed):
|
||||
pass
|
||||
Logger.log("w", "Move head not implemented in controller")
|
||||
|
||||
def homeBed(self, printer):
|
||||
pass
|
||||
Logger.log("w", "Home bed not implemented in controller")
|
||||
|
||||
def homeHead(self, printer):
|
||||
pass
|
||||
Logger.log("w", "Home head not implemented in controller")
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
|
||||
|
||||
MYPY = False
|
||||
if MYPY:
|
||||
from cura.PrinterOutput.PrintJobOutputModel import PrintJobOutputModel
|
||||
|
||||
|
||||
class LegacyUM3PrinterOutputController(PrinterOutputController):
|
||||
def __init__(self, output_device):
|
||||
|
|
|
@ -108,7 +108,7 @@ Item
|
|||
return false; //Can't control the printer if not connected
|
||||
}
|
||||
|
||||
if (!connectedPrinter.acceptsCommands)
|
||||
if (!connectedDevice.acceptsCommands)
|
||||
{
|
||||
return false; //Not allowed to do anything.
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(0, distancesRow.currentDistance, 0)
|
||||
printerModel.moveHead(0, distancesRow.currentDistance, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(-distancesRow.currentDistance, 0, 0)
|
||||
printerModel.moveHead(-distancesRow.currentDistance, 0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(distancesRow.currentDistance, 0, 0)
|
||||
printerModel.moveHead(distancesRow.currentDistance, 0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(0, -distancesRow.currentDistance, 0)
|
||||
printerModel.moveHead(0, -distancesRow.currentDistance, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.homeHead()
|
||||
printerModel.homeHead()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(0, 0, distancesRow.currentDistance)
|
||||
printerModel.moveHead(0, 0, distancesRow.currentDistance)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.homeBed()
|
||||
printerModel.homeBed()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ Item
|
|||
|
||||
onClicked:
|
||||
{
|
||||
connectedPrinter.moveHead(0, 0, -distancesRow.currentDistance)
|
||||
printerModel.moveHead(0, 0, -distancesRow.currentDistance)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue