mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:55:54 +08: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
@ -244,8 +244,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
#
|
#
|
||||||
# \param temperature The temperature to heat the bed to, in degrees
|
# \param temperature The temperature to heat the bed to, in degrees
|
||||||
# Celsius.
|
# Celsius.
|
||||||
# \param duration How long the bed should stay warm, in seconds.
|
# \param duration How long the bed should stay warm, in seconds. Defaults
|
||||||
def preheatBed(self, temperature, duration):
|
# to a quarter hour.
|
||||||
|
def preheatBed(self, temperature, duration=900):
|
||||||
url = QUrl("http://" + self._address + self._api_prefix + "printer/bed/pre_heat")
|
url = QUrl("http://" + self._address + self._api_prefix + "printer/bed/pre_heat")
|
||||||
data = """{"temperature": "{temperature}", "timeout": "{timeout}"}""".format(temperature=temperature, timeout=duration)
|
data = """{"temperature": "{temperature}", "timeout": "{timeout}"}""".format(temperature=temperature, timeout=duration)
|
||||||
put_request = QNetworkRequest(url)
|
put_request = QNetworkRequest(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user