mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Log when pre-heating or cancelling pre-heat
To help debugging and because it's a user interaction. Contributes to issue CURA-3161.
This commit is contained in:
parent
75a50b73c2
commit
3cc11ecae5
2 changed files with 4 additions and 0 deletions
|
@ -259,6 +259,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
data = """{"temperature": "%i", "timeout": "%i"}""" % (temperature, duration)
|
||||
else:
|
||||
data = """{"temperature": "%i"}""" % temperature
|
||||
Logger.log("i", "Pre-heating bed to %i degrees.", temperature)
|
||||
put_request = QNetworkRequest(url)
|
||||
put_request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json")
|
||||
self._manager.put(put_request, data.encode())
|
||||
|
@ -269,6 +270,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
# If the bed is not pre-heated, nothing happens.
|
||||
@pyqtSlot()
|
||||
def cancelPreheatBed(self):
|
||||
Logger.log("i", "Cancelling pre-heating of the bed.")
|
||||
self.preheatBed(temperature = 0, duration = 0)
|
||||
self._preheat_bed_timer.stop()
|
||||
self._preheat_bed_timer.setInterval(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue