PrinterOutputController.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from UM.Logger import Logger
  4. MYPY = False
  5. if MYPY:
  6. from cura.PrinterOutput.PrintJobOutputModel import PrintJobOutputModel
  7. from cura.PrinterOutput.ExtruderOutputModel import ExtruderOutputModel
  8. from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
  9. class PrinterOutputController:
  10. def __init__(self, output_device):
  11. self.can_pause = True
  12. self.can_abort = True
  13. self.can_pre_heat_bed = True
  14. self.can_pre_heat_hotends = True
  15. self.can_send_raw_gcode = True
  16. self.can_control_manually = True
  17. self._output_device = output_device
  18. def setTargetHotendTemperature(self, printer: "PrinterOutputModel", extruder: "ExtruderOutputModel", temperature: int):
  19. Logger.log("w", "Set target hotend temperature not implemented in controller")
  20. def setTargetBedTemperature(self, printer: "PrinterOutputModel", temperature: int):
  21. Logger.log("w", "Set target bed temperature not implemented in controller")
  22. def setJobState(self, job: "PrintJobOutputModel", state: str):
  23. Logger.log("w", "Set job state not implemented in controller")
  24. def cancelPreheatBed(self, printer: "PrinterOutputModel"):
  25. Logger.log("w", "Cancel preheat bed not implemented in controller")
  26. def preheatBed(self, printer: "PrinterOutputModel", temperature, duration):
  27. Logger.log("w", "Preheat bed not implemented in controller")
  28. def cancelPreheatHotend(self, extruder: "ExtruderOutputModel"):
  29. Logger.log("w", "Cancel preheat hotend not implemented in controller")
  30. def preheatHotend(self, extruder: "ExtruderOutputModel", temperature, duration):
  31. Logger.log("w", "Preheat hotend not implemented in controller")
  32. def setHeadPosition(self, printer: "PrinterOutputModel", x, y, z, speed):
  33. Logger.log("w", "Set head position not implemented in controller")
  34. def moveHead(self, printer: "PrinterOutputModel", x, y, z, speed):
  35. Logger.log("w", "Move head not implemented in controller")
  36. def homeBed(self, printer: "PrinterOutputModel"):
  37. Logger.log("w", "Home bed not implemented in controller")
  38. def homeHead(self, printer: "PrinterOutputModel"):
  39. Logger.log("w", "Home head not implemented in controller")
  40. def sendRawCommand(self, printer: "PrinterOutputModel", command: str):
  41. Logger.log("w", "Custom command not implemented in controller")