mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Hotend temperatures now follow same logic as bed
CURA-1339
This commit is contained in:
parent
5ff5a957ae
commit
45b3e8fbd6
1 changed files with 9 additions and 9 deletions
|
@ -18,8 +18,9 @@ class PrinterOutputDevice(OutputDevice, QObject):
|
||||||
|
|
||||||
self._target_bed_temperature = 0
|
self._target_bed_temperature = 0
|
||||||
self._bed_temperature = 0
|
self._bed_temperature = 0
|
||||||
self._hotend_temperatures = {}
|
self._num_extruders = 1
|
||||||
self._target_hotend_temperatures = {}
|
self._hotend_temperatures = [0] * self._num_extruders
|
||||||
|
self._target_hotend_temperatures = [0] * self._num_extruders
|
||||||
self._progress = 0
|
self._progress = 0
|
||||||
self._head_x = 0
|
self._head_x = 0
|
||||||
self._head_y = 0
|
self._head_y = 0
|
||||||
|
@ -49,11 +50,6 @@ class PrinterOutputDevice(OutputDevice, QObject):
|
||||||
def bedTemperature(self):
|
def bedTemperature(self):
|
||||||
return self._bed_temperature
|
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.
|
|
||||||
def getHotendTemperature(self, index):
|
|
||||||
raise NotImplementedError("getHotendTemperature needs to be implemented")
|
|
||||||
|
|
||||||
## Set the (target) bed temperature
|
## Set the (target) bed temperature
|
||||||
# This function is "final" (do not re-implement)
|
# This function is "final" (do not re-implement)
|
||||||
# /sa _setTargetBedTemperature
|
# /sa _setTargetBedTemperature
|
||||||
|
@ -96,14 +92,18 @@ class PrinterOutputDevice(OutputDevice, QObject):
|
||||||
def _setTargetHotendTemperature(self, index, temperature):
|
def _setTargetHotendTemperature(self, index, temperature):
|
||||||
raise NotImplementedError("_setTargetHotendTemperature needs to be implemented")
|
raise NotImplementedError("_setTargetHotendTemperature needs to be implemented")
|
||||||
|
|
||||||
@pyqtProperty("QVariantMap", notify = targetHotendTemperaturesChanged)
|
@pyqtProperty("QVariantList", notify = targetHotendTemperaturesChanged)
|
||||||
def targetHotendTemperatures(self):
|
def targetHotendTemperatures(self):
|
||||||
return self._target_hotend_temperatures
|
return self._target_hotend_temperatures
|
||||||
|
|
||||||
@pyqtProperty("QVariantMap", notify = hotendTemperaturesChanged)
|
@pyqtProperty("QVariantList", notify = hotendTemperaturesChanged)
|
||||||
def hotendTemperatures(self):
|
def hotendTemperatures(self):
|
||||||
return self._hotend_temperatures
|
return self._hotend_temperatures
|
||||||
|
|
||||||
|
def _setHotendTemperature(self, index, temperature):
|
||||||
|
self._hotend_temperatures[index] = temperature
|
||||||
|
self.hotendTemperaturesChanged.emit()
|
||||||
|
|
||||||
## Attempt to establish connection
|
## Attempt to establish connection
|
||||||
def connect(self):
|
def connect(self):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue