mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 02:28:58 +08:00
NetworkedPrinterOutputDevice now requires address in constructor
CL-541
This commit is contained in:
parent
68e80a88bc
commit
1b8caa7a21
@ -8,14 +8,14 @@ from time import time
|
||||
from typing import Callable
|
||||
|
||||
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)
|
||||
self._manager = None
|
||||
self._createNetworkManager()
|
||||
self._last_response_time = time()
|
||||
self._last_request_time = None
|
||||
self._api_prefix = ""
|
||||
self._address = ""
|
||||
self._address = address
|
||||
|
||||
self._user_agent = "%s/%s " % (Application.getInstance().getApplicationName(), Application.getInstance().getVersion())
|
||||
|
||||
|
@ -2,4 +2,7 @@ from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutp
|
||||
|
||||
class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||
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
|
||||
|
||||
class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||
def __init__(self, device_id, address, properties, parent = None):
|
||||
super().__init__(device_id = device_id, parent = parent)
|
||||
def __init__(self, device_id, address: str, properties, parent = None):
|
||||
super().__init__(device_id = device_id, address = address, parent = parent)
|
||||
|
||||
def _update(self):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user