mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Forward hotend and material data to PrinterOutputDevice
CURA-491
This commit is contained in:
parent
f3c1f947d4
commit
051419577e
1 changed files with 12 additions and 1 deletions
|
@ -44,6 +44,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
## It's okay to leave this for now, as this plugin is um3 only (and has 2 extruders by definition)
|
## It's okay to leave this for now, as this plugin is um3 only (and has 2 extruders by definition)
|
||||||
self._num_extruders = 2
|
self._num_extruders = 2
|
||||||
|
|
||||||
|
# These are reinitialised here (from PrinterOutputDevice) to match the new _num_extruders
|
||||||
self._hotend_temperatures = [0] * self._num_extruders
|
self._hotend_temperatures = [0] * self._num_extruders
|
||||||
self._target_hotend_temperatures = [0] * self._num_extruders
|
self._target_hotend_temperatures = [0] * self._num_extruders
|
||||||
|
|
||||||
|
@ -185,6 +186,16 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
for index in range(0, self._num_extruders):
|
for index in range(0, self._num_extruders):
|
||||||
temperature = self._json_printer_state["heads"][0]["extruders"][index]["hotend"]["temperature"]["current"]
|
temperature = self._json_printer_state["heads"][0]["extruders"][index]["hotend"]["temperature"]["current"]
|
||||||
self._setHotendTemperature(index, temperature)
|
self._setHotendTemperature(index, temperature)
|
||||||
|
try:
|
||||||
|
material_id = self._json_printer_state["heads"][0]["extruders"][index]["active_material"]["GUID"]
|
||||||
|
except KeyError:
|
||||||
|
material_id = ""
|
||||||
|
self._setMaterialId(index, material_id)
|
||||||
|
try:
|
||||||
|
hotend_id = self._json_printer_state["heads"][0]["extruders"][index]["hotend"]["id"]
|
||||||
|
except KeyError:
|
||||||
|
hotend_id = ""
|
||||||
|
self._setHotendId(index, hotend_id)
|
||||||
|
|
||||||
bed_temperature = self._json_printer_state["bed"]["temperature"]["current"]
|
bed_temperature = self._json_printer_state["bed"]["temperature"]["current"]
|
||||||
self._setBedTemperature(bed_temperature)
|
self._setBedTemperature(bed_temperature)
|
||||||
|
@ -214,7 +225,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
# Check if cartridges are loaded at all (Error)
|
# Check if cartridges are loaded at all (Error)
|
||||||
#self._json_printer_state["heads"][0]["extruders"][0]["hotend"]["id"] != ""
|
#self._json_printer_state["heads"][0]["extruders"][0]["hotend"]["id"] != ""
|
||||||
|
|
||||||
# Check if there is material loaded at all (Error)self.authentication_requested_message.setProgress(self._authentication_counter / self._max_authentication_counter)
|
# Check if there is material loaded at all (Error)
|
||||||
#self._json_printer_state["heads"][0]["extruders"][0]["active_material"]["GUID"] != ""
|
#self._json_printer_state["heads"][0]["extruders"][0]["active_material"]["GUID"] != ""
|
||||||
|
|
||||||
# Check if there is enough material (Warning)
|
# Check if there is enough material (Warning)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue