From 9d8034d14fcc4dc1665226ccb480ff7dc79a24ce Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 7 Feb 2017 13:22:21 +0100 Subject: [PATCH] Add default for duration parameter of preheatBed It defaults to 15 minutes. Contributes to issue CURA-3161. --- plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 99d07a8b81..5ac06e7154 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -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)