mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Add custom command methods to output device and controller
This commit is contained in:
parent
8c7f8fa1fa
commit
80b589344f
3 changed files with 14 additions and 4 deletions
|
@ -31,6 +31,9 @@ class USBPrinterOutputController(PrinterOutputController):
|
|||
def homeBed(self, printer):
|
||||
self._output_device.sendCommand("G28 Z")
|
||||
|
||||
def sendCustomCommand(self, printer, command):
|
||||
self._output_device.sendCommand(str(command))
|
||||
|
||||
def setJobState(self, job: "PrintJobOutputModel", state: str):
|
||||
if state == "pause":
|
||||
self._output_device.pausePrint()
|
||||
|
@ -65,4 +68,4 @@ class USBPrinterOutputController(PrinterOutputController):
|
|||
|
||||
def _onPreheatBedTimerFinished(self):
|
||||
self.setTargetBedTemperature(self._preheat_printer, 0)
|
||||
self._preheat_printer.updateIsPreheating(False)
|
||||
self._preheat_printer.updateIsPreheating(False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue