LegacyUM3PrinterOutputController.py 608 B

1234567891011121314151617
  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. class LegacyUM3PrinterOutputController(PrinterOutputController):
  8. def __init__(self, output_device):
  9. super().__init__(output_device)
  10. def setJobState(self, job: "PrintJobOutputModel", state: str):
  11. data = "{\"target\": \"%s\"}" % state
  12. self._output_device.put("print_job/state", data, onFinished=None)