Fix name and address for USB printing devices

As address it uses the serial port, which would be COM# for Windows and /dev/ttyUSB# for Linux. I don't know what it would display there on OSX, probably a drive directory.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-02 15:19:56 +01:00
parent 7b8d41cb8f
commit 7b41e844cc
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -124,6 +124,16 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
def _homeBed(self):
self._sendCommand("G28 Z")
## A name for the device.
@pyqtProperty(str, constant = True)
def name(self):
return self.getName()
## The address of the device.
@pyqtProperty(str, constant = True)
def address(self):
return self._serial_port
def startPrint(self):
self.writeStarted.emit(self)
gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list")