mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
5aa394b197
2 changed files with 7 additions and 2 deletions
|
@ -124,6 +124,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
||||||
## Stop looking for devices on network.
|
## Stop looking for devices on network.
|
||||||
def stop(self):
|
def stop(self):
|
||||||
if self._zero_conf is not None:
|
if self._zero_conf is not None:
|
||||||
|
Logger.log("d", "zeroconf close...")
|
||||||
self._zero_conf.close()
|
self._zero_conf.close()
|
||||||
|
|
||||||
def getPrinters(self):
|
def getPrinters(self):
|
||||||
|
@ -136,10 +137,12 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
||||||
|
|
||||||
for key in self._printers:
|
for key in self._printers:
|
||||||
if key == active_machine.getMetaDataEntry("um_network_key"):
|
if key == active_machine.getMetaDataEntry("um_network_key"):
|
||||||
|
Logger.log("d", "Connecting [%s]..." % key)
|
||||||
self._printers[key].connect()
|
self._printers[key].connect()
|
||||||
self._printers[key].connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
self._printers[key].connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
||||||
else:
|
else:
|
||||||
if self._printers[key].isConnected():
|
if self._printers[key].isConnected():
|
||||||
|
Logger.log("d", "Closing connection [%s]..." % key)
|
||||||
self._printers[key].close()
|
self._printers[key].close()
|
||||||
|
|
||||||
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||||
|
@ -149,6 +152,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
if global_container_stack and printer.getKey() == global_container_stack.getMetaDataEntry("um_network_key"):
|
if global_container_stack and printer.getKey() == global_container_stack.getMetaDataEntry("um_network_key"):
|
||||||
if printer.getKey() not in self._old_printers: # Was the printer already connected, but a re-scan forced?
|
if printer.getKey() not in self._old_printers: # Was the printer already connected, but a re-scan forced?
|
||||||
|
Logger.log("d", "addPrinter, connecting [%s]..." % printer.getKey())
|
||||||
self._printers[printer.getKey()].connect()
|
self._printers[printer.getKey()].connect()
|
||||||
printer.connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
printer.connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
||||||
self.printerListChanged.emit()
|
self.printerListChanged.emit()
|
||||||
|
@ -158,6 +162,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
||||||
if printer:
|
if printer:
|
||||||
if printer.isConnected():
|
if printer.isConnected():
|
||||||
printer.connectionStateChanged.disconnect(self._onPrinterConnectionStateChanged)
|
printer.connectionStateChanged.disconnect(self._onPrinterConnectionStateChanged)
|
||||||
|
Logger.log("d", "removePrinter, disconnecting [%s]..." % name)
|
||||||
printer.disconnect()
|
printer.disconnect()
|
||||||
self.printerListChanged.emit()
|
self.printerListChanged.emit()
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@
|
||||||
"machine_heat_zone_length":
|
"machine_heat_zone_length":
|
||||||
{
|
{
|
||||||
"label": "Heat zone length",
|
"label": "Heat zone length",
|
||||||
"description": "The distance from the tip of the nozzle in which heat from the nozzle is transferred to the filament.",
|
"description": "The distance from the tip of the nozzle in which heat from the nozzle is transferred to the filament. When an extruder is not needed any more, its filament is moved out of the heat zone.",
|
||||||
"default_value": 16,
|
"default_value": 16,
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
"machine_cool_zone_length":
|
"machine_cool_zone_length":
|
||||||
{
|
{
|
||||||
"label": "Cool Zone Length",
|
"label": "Cool Zone Length",
|
||||||
"description": "The length of the piece that dissipates heat from the hot end to shield heat-sensitive equipment.",
|
"description": "The length of the piece that dissipates heat from the hot end to shield heat-sensitive equipment. When an extruder is not needed any more, its filament is moved out of the cool zone.",
|
||||||
"default_value": 0,
|
"default_value": 0,
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue