From 5ff5a957ae50c666e0216780ff400d737631194f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 13 Apr 2016 16:08:17 +0200 Subject: [PATCH] Added _setBedTemperature CURA-1339 --- cura/PrinterOutputDevice.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 54550e1aee..9b85b7f2ca 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -47,10 +47,7 @@ class PrinterOutputDevice(OutputDevice, QObject): # /sa _getBedTemperature @pyqtProperty(float, notify = bedTemperatureChanged) def bedTemperature(self): - return self._getBedTemperature() - - def _getBedTemperature(self): - return None + return self._bed_temperature ## Get the temperature of a hot end as defined by index. # /parameter index Index of the hotend to get a temperature from. @@ -59,7 +56,7 @@ class PrinterOutputDevice(OutputDevice, QObject): ## Set the (target) bed temperature # This function is "final" (do not re-implement) - # /sa _setBedTemperature + # /sa _setTargetBedTemperature @pyqtSlot(int) def setTargetBedTemperature(self, temperature): self._setTargetBedTemperature(temperature) @@ -71,6 +68,10 @@ class PrinterOutputDevice(OutputDevice, QObject): def _setTargetBedTemperature(self, temperature): pass + def _setBedTemperature(self, temperature): + self._bed_temperature = temperature + self.bedTemperatureChanged.emit() + ## Get the bed temperature if connected printer (if any) @pyqtProperty(int, notify = bedTemperatureChanged) def bedTemperature(self):