Endstop now stops listening upon destruction

This commit is contained in:
Jaime van Kessel 2015-08-19 14:35:35 +02:00
parent 83426878d2
commit 7fda5e9a39
2 changed files with 6 additions and 0 deletions

View file

@ -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")