diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index d79d2ef67d..9635b5f0b6 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -230,11 +230,16 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): Logger.log("i", "Updating firmware of %s using %s", self._serial_port, file_name) self._firmware_file_name = file_name self._update_firmware_thread.start() + @pyqtSlot() def startPollEndstop(self): self._poll_endstop = True self._end_stop_thread.start() + @pyqtSLot() + def stopPollEndstop(self): + self._poll_endstop = False + def _pollEndStop(self): while self._is_connected and self._poll_endstop: self.sendCommand("M119") diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index 584f7436ba..acfe288e14 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -22,6 +22,7 @@ Column property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer Component.onCompleted: printer_connection.startPollEndstop() + Component.onDestruction: printer_connection.stopPollEndstop() Label {