From 86b6f608092dd5eec732c52afb3e534ffb06d5b4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 25 Aug 2015 11:36:44 +0200 Subject: [PATCH] Added status events to usb printer --- plugins/USBPrinting/PrinterConnection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index 1ac1cb1b89..76c1f5a49b 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -155,6 +155,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): @pyqtSlot() def startPrint(self): + self.writeStarted.emit(self) gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list") self.printGCode(gcode_list) @@ -163,6 +164,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): def printGCode(self, gcode_list): if self.isPrinting() or not self._is_connected: Logger.log("d", "Printer is busy or not connected, aborting print") + self.writeError.emit() return 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 self._sendNextGcodeLine() + self.writeFinished.emit() + ## Get the serial port string of this connection. # \return serial port def getSerialPort(self):