mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Use the new CuraEngine GCode protocol instead of temp files.
This commit is contained in:
parent
c0d39ff287
commit
8d21136530
2 changed files with 11 additions and 15 deletions
|
@ -113,15 +113,15 @@ class USBPrinterManager(SignalEmitter,PluginObject):
|
|||
})
|
||||
else:
|
||||
Application.getInstance().removeOutputDevice(serial_port)
|
||||
|
||||
def _writeToSerial(self, serial_port):
|
||||
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()):
|
||||
if type(node) is not SceneNode or not node.getMeshData():
|
||||
continue
|
||||
|
||||
gcode = getattr(node.getMeshData(), 'gcode', False)
|
||||
self.sendGCodeByPort(serial_port,gcode.split('\n'))
|
||||
|
||||
|
||||
gcode_list = getattr(Application.getInstance().getController().getScene(), 'gcode_list', None)
|
||||
if gcode_list:
|
||||
final_list = []
|
||||
for gcode in gcode_list:
|
||||
final_list += gcode.split('\n')
|
||||
self.sendGCodeByPort(serial_port, gcode_list)
|
||||
|
||||
## Get a list of printer connection objects that are connected.
|
||||
def getActiveConnections(self):
|
||||
return [connection for connection in self._printer_connections if connection.isConnected()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue