mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 14:36:00 +08:00
Camera stream is now restored if the printer got a timeout
CURA-2411
This commit is contained in:
parent
8765d1980e
commit
f7e9914401
@ -814,6 +814,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
|
|
||||||
if self._connection_state_before_timeout and reply.error() == QNetworkReply.NoError: # There was a timeout, but we got a correct answer again.
|
if self._connection_state_before_timeout and reply.error() == QNetworkReply.NoError: # There was a timeout, but we got a correct answer again.
|
||||||
Logger.log("d", "We got a response (%s) from the server after %0.1f of silence. Going back to previous state %s", reply.url().toString(), time() - self._last_response_time, self._connection_state_before_timeout)
|
Logger.log("d", "We got a response (%s) from the server after %0.1f of silence. Going back to previous state %s", reply.url().toString(), time() - self._last_response_time, self._connection_state_before_timeout)
|
||||||
|
|
||||||
|
# Camera was active before timeout. Start it again
|
||||||
|
if self._camera_active:
|
||||||
|
self._startCamera()
|
||||||
|
|
||||||
self.setConnectionState(self._connection_state_before_timeout)
|
self.setConnectionState(self._connection_state_before_timeout)
|
||||||
self._connection_state_before_timeout = None
|
self._connection_state_before_timeout = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user