mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Added status events to usb printer
This commit is contained in:
parent
bbebeeb66d
commit
86b6f60809
1 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def startPrint(self):
|
def startPrint(self):
|
||||||
|
self.writeStarted.emit(self)
|
||||||
gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list")
|
gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list")
|
||||||
self.printGCode(gcode_list)
|
self.printGCode(gcode_list)
|
||||||
|
|
||||||
|
@ -163,6 +164,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
||||||
def printGCode(self, gcode_list):
|
def printGCode(self, gcode_list):
|
||||||
if self.isPrinting() or not self._is_connected:
|
if self.isPrinting() or not self._is_connected:
|
||||||
Logger.log("d", "Printer is busy or not connected, aborting print")
|
Logger.log("d", "Printer is busy or not connected, aborting print")
|
||||||
|
self.writeError.emit()
|
||||||
return
|
return
|
||||||
|
|
||||||
self._gcode.clear()
|
self._gcode.clear()
|
||||||
|
@ -179,6 +181,8 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
||||||
for i in range(0, 4): #Push first 4 entries before accepting other inputs
|
for i in range(0, 4): #Push first 4 entries before accepting other inputs
|
||||||
self._sendNextGcodeLine()
|
self._sendNextGcodeLine()
|
||||||
|
|
||||||
|
self.writeFinished.emit()
|
||||||
|
|
||||||
## Get the serial port string of this connection.
|
## Get the serial port string of this connection.
|
||||||
# \return serial port
|
# \return serial port
|
||||||
def getSerialPort(self):
|
def getSerialPort(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue