mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Provide pre-heat command with integer parameters
The firmware only accepts integers, apparently. Contributes to issue CURA-3161.
This commit is contained in:
parent
b27a9e6535
commit
d751285713
1 changed files with 2 additions and 2 deletions
|
@ -247,10 +247,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
# Celsius.
|
||||
# \param duration How long the bed should stay warm, in seconds. Defaults
|
||||
# to a quarter hour.
|
||||
@pyqtSlot(float, float)
|
||||
@pyqtSlot(int, int)
|
||||
def preheatBed(self, temperature, duration=900):
|
||||
url = QUrl("http://" + self._address + self._api_prefix + "printer/bed/pre_heat")
|
||||
data = """{"temperature": "%0.3f", "timeout": "%0.3f"}""" % (temperature, duration)
|
||||
data = """{"temperature": "%i", "timeout": "%i"}""" % (temperature, duration)
|
||||
put_request = QNetworkRequest(url)
|
||||
put_request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json")
|
||||
self._manager.put(put_request, data.encode())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue