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.
This commit is contained in:
Ghostkeeper 2017-02-07 17:26:44 +01:00
parent b05697b0d5
commit 7cf81412ae
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -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)