STAR-322: First tests for cloud output device

This commit is contained in:
Daniel Schiavini 2018-12-10 14:43:02 +01:00
parent e5124532f8
commit d482924ea2
8 changed files with 191 additions and 138 deletions

View file

@ -13,7 +13,6 @@ from UM.Logger import Logger
from UM.Message import Message
from UM.Qt.Duration import Duration, DurationFormat
from UM.Scene.SceneNode import SceneNode
from cura.CuraApplication import CuraApplication
from cura.PrinterOutput.NetworkedPrinterOutputDevice import AuthState, NetworkedPrinterOutputDevice
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
from plugins.UM3NetworkPrinting.src.Cloud.CloudOutputController import CloudOutputController
@ -93,7 +92,7 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
self._setInterfaceElements()
self._device_id = device_id
self._account = CuraApplication.getInstance().getCuraAPI().account
self._account = api_client.account
# We use the Cura Connect monitor tab to get most functionality right away.
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
@ -174,10 +173,6 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
)
self._api.requestUpload(request, lambda response: self._onPrintJobCreated(mesh_bytes, response))
## Called when the connection to the cluster changes.
def connect(self) -> None:
super().connect()
## Called when the network data should be updated.
def _update(self) -> None:
super()._update()