mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Endstop now stops listening upon destruction
This commit is contained in:
parent
83426878d2
commit
7fda5e9a39
2 changed files with 6 additions and 0 deletions
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue