mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
NetworkedPrinterOutputDevice now requires address in constructor
CL-541
This commit is contained in:
parent
68e80a88bc
commit
1b8caa7a21
3 changed files with 11 additions and 5 deletions
|
@ -8,14 +8,14 @@ from time import time
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
|
||||||
class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
||||||
def __init__(self, device_id, parent = None):
|
def __init__(self, device_id, address: str, parent = None):
|
||||||
super().__init__(device_id = device_id, parent = parent)
|
super().__init__(device_id = device_id, parent = parent)
|
||||||
self._manager = None
|
self._manager = None
|
||||||
self._createNetworkManager()
|
self._createNetworkManager()
|
||||||
self._last_response_time = time()
|
self._last_response_time = time()
|
||||||
self._last_request_time = None
|
self._last_request_time = None
|
||||||
self._api_prefix = ""
|
self._api_prefix = ""
|
||||||
self._address = ""
|
self._address = address
|
||||||
|
|
||||||
self._user_agent = "%s/%s " % (Application.getInstance().getApplicationName(), Application.getInstance().getVersion())
|
self._user_agent = "%s/%s " % (Application.getInstance().getApplicationName(), Application.getInstance().getVersion())
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,7 @@ from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutp
|
||||||
|
|
||||||
class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
def __init__(self, device_id, address, properties, parent = None):
|
def __init__(self, device_id, address, properties, parent = None):
|
||||||
super().__init__(device_id = device_id, parent = parent)
|
super().__init__(device_id = device_id, address = address, parent = parent)
|
||||||
|
|
||||||
|
def _update(self):
|
||||||
|
pass
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutputDevice
|
from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutputDevice
|
||||||
|
|
||||||
class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
def __init__(self, device_id, address, properties, parent = None):
|
def __init__(self, device_id, address: str, properties, parent = None):
|
||||||
super().__init__(device_id = device_id, parent = parent)
|
super().__init__(device_id = device_id, address = address, parent = parent)
|
||||||
|
|
||||||
|
def _update(self):
|
||||||
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue