From 7cf81412ae4cc46e94013c3e9706069764601424 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 7 Feb 2017 17:26:44 +0100 Subject: [PATCH] Implement bed pre-heating via USB It just calls the bed heating command without implementing the time-out. Implementing the time-out is impossible via just g-code. Contributes to issue CURA-3161. --- plugins/USBPrinting/USBPrinterOutputDevice.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index e30ba613bc..9fd5bf02e0 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -641,3 +641,20 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._update_firmware_thread.daemon = True self.connect() + + ## Pre-heats the heated bed of the printer, if it has one. + # + # \param temperature The temperature to heat the bed to, in degrees + # Celsius. + # \param duration How long the bed should stay warm, in seconds. This is + # ignored because there is no g-code to set this. + @pyqtSlot(float, float) + def preheatBed(self, temperature, duration): + self._setTargetBedTemperature(temperature) + + ## Cancels pre-heating the heated bed of the printer. + # + # If the bed is not pre-heated, nothing happens. + @pyqtSlot() + def cancelPreheatBed(self): + self._setTargetBedTemperature(0) \ No newline at end of file