mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Call pre-heat if pre-heat button is pressed
Contributes to issue CURA-3161.
This commit is contained in:
parent
0df4afff33
commit
559b40867e
2 changed files with 3 additions and 1 deletions
|
@ -246,6 +246,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
# Celsius.
|
||||
# \param duration How long the bed should stay warm, in seconds. Defaults
|
||||
# to a quarter hour.
|
||||
@pyqtSlot(float, float)
|
||||
def preheatBed(self, temperature, duration=900):
|
||||
url = QUrl("http://" + self._address + self._api_prefix + "printer/bed/pre_heat")
|
||||
data = """{"temperature": "{temperature}", "timeout": "{timeout}"}""".format(temperature=str(temperature), timeout=str(duration))
|
||||
|
@ -256,6 +257,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
## Cancels pre-heating the heated bed of the printer.
|
||||
#
|
||||
# If the bed is not pre-heated, nothing happens.
|
||||
@pyqtSlot()
|
||||
def cancelPreheatBed(self):
|
||||
self.preheatBed(temperature=0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue