mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Close now uses new API stuff
This commit is contained in:
parent
3bd25e5f7f
commit
960ac9af99
1 changed files with 4 additions and 4 deletions
|
@ -49,11 +49,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
time.sleep(1) # Poll every second for printer state.
|
time.sleep(1) # Poll every second for printer state.
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self._do_update = False
|
self._connection_state == ConnectionState.closed
|
||||||
self._is_connected = False
|
self._thread = None
|
||||||
|
|
||||||
def requestWrite(self, node, file_name = None):
|
def requestWrite(self, node, file_name = None):
|
||||||
self._file = getattr( Application.getInstance().getController().getScene(), "gcode_list")
|
self._file = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||||
self.startPrint()
|
self.startPrint()
|
||||||
|
|
||||||
## Start the polling thread.
|
## Start the polling thread.
|
||||||
|
@ -79,7 +79,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
def _httpPost(self, path, file_data):
|
def _httpPost(self, path, file_data):
|
||||||
with self._http_lock:
|
with self._http_lock:
|
||||||
files_dict = {}
|
files_dict = {}
|
||||||
if isinstance(file_data, list): # in case a list with strings is sent
|
if isinstance(file_data, list): # in case a list with strings is sent
|
||||||
single_string_file_data = ""
|
single_string_file_data = ""
|
||||||
for line in file_data:
|
for line in file_data:
|
||||||
single_string_file_data += line
|
single_string_file_data += line
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue