From: daid Date: Thu, 2 Jan 2014 12:28:23 +0000 (+0100) Subject: Minor fix for Doodle3D support. X-Git-Tag: 14.01~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dbc43d1782b246ce1ae47c5587870769ca3f1973;p=cura.git Minor fix for Doodle3D support. --- diff --git a/Cura/util/printerConnection/doodle3dConnect.py b/Cura/util/printerConnection/doodle3dConnect.py index bb03cd75..25b42851 100644 --- a/Cura/util/printerConnection/doodle3dConnect.py +++ b/Cura/util/printerConnection/doodle3dConnect.py @@ -25,6 +25,9 @@ class doodle3dConnectionGroup(printerConnectionBase.printerConnectionGroup): def getAvailableConnections(self): return filter(lambda c: c.isAvailable(), self._connectionMap.values()) + def remove(self, host): + del self._connectionMap[host] + def getIconID(self): return 27 @@ -224,12 +227,13 @@ class doodle3dConnect(printerConnectionBase.printerConnectionBase): # The Doodle3D box could also be offline, if we reach a high enough errorCount then assume the box is gone. self._errorCount += 1 if self._errorCount > 10: - self._host = None if self._isAvailable: self._printing = False self._isAvailable = False self._doCallback() self._sleep(15) + self._group.remove(self._host) + return else: self._sleep(3) continue diff --git a/Cura/util/printerConnection/printerConnectionManager.py b/Cura/util/printerConnection/printerConnectionManager.py index 674b86ae..62f77df6 100644 --- a/Cura/util/printerConnection/printerConnectionManager.py +++ b/Cura/util/printerConnection/printerConnectionManager.py @@ -9,7 +9,7 @@ class PrinterConnectionManager(object): self._groupList = [] if version.isDevVersion(): self._groupList.append(dummyConnection.dummyConnectionGroup()) - #self._groupList.append(doodle3dConnect.doodle3dConnectionGroup()) + self._groupList.append(doodle3dConnect.doodle3dConnectionGroup()) #Sort the connections by highest priority first. self._groupList.sort(reverse=True)