mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add default for duration parameter of preheatBed
It defaults to 15 minutes. Contributes to issue CURA-3161.
This commit is contained in:
parent
cfbcf56739
commit
9d8034d14f
1 changed files with 3 additions and 2 deletions
|
@ -244,8 +244,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
#
|
||||
# \param temperature The temperature to heat the bed to, in degrees
|
||||
# Celsius.
|
||||
# \param duration How long the bed should stay warm, in seconds.
|
||||
def preheatBed(self, temperature, duration):
|
||||
# \param duration How long the bed should stay warm, in seconds. Defaults
|
||||
# to a quarter hour.
|
||||
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=temperature, timeout=duration)
|
||||
put_request = QNetworkRequest(url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue