ClusterUM3PrinterOutputController.py 860 B

1234567891011121314151617181920212223
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
  4. MYPY = False
  5. if MYPY:
  6. from cura.PrinterOutput.PrintJobOutputModel import PrintJobOutputModel
  7. from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
  8. class ClusterUM3PrinterOutputController(PrinterOutputController):
  9. def __init__(self, output_device):
  10. super().__init__(output_device)
  11. self.can_pre_heat_bed = False
  12. self.can_pre_heat_hotends = False
  13. self.can_control_manually = False
  14. self.can_send_raw_gcode = False
  15. def setJobState(self, job: "PrintJobOutputModel", state: str):
  16. data = "{\"action\": \"%s\"}" % state
  17. self._output_device.put("print_jobs/%s/action" % job.key, data, onFinished=None)