Don't limit sentlines queue size
parent
6164e162b5
commit
da0cab63c7
|
@ -120,7 +120,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
self.skeinp = None
|
self.skeinp = None
|
||||||
self.monitor_interval = 3
|
self.monitor_interval = 3
|
||||||
self.paused = False
|
self.paused = False
|
||||||
self.sentlines = Queue.Queue(30)
|
self.sentlines = Queue.Queue(0)
|
||||||
self.cpbuttons = [
|
self.cpbuttons = [
|
||||||
SpecialButton(_("Motors off"), ("M84"), (250, 250, 250), None, 0, _("Switch all motors off")),
|
SpecialButton(_("Motors off"), ("M84"), (250, 250, 250), None, 0, _("Switch all motors off")),
|
||||||
SpecialButton(_("Check temp"), ("M105"), (225, 200, 200), (2, 5), (1, 1), _("Check current hotend temperature")),
|
SpecialButton(_("Check temp"), ("M105"), (225, 200, 200), (2, 5), (1, 1), _("Check current hotend temperature")),
|
||||||
|
@ -256,7 +256,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
self.sentlines.put_nowait(line)
|
self.sentlines.put_nowait(line)
|
||||||
except:
|
except Queue.Full:
|
||||||
pass
|
pass
|
||||||
#threading.Thread(target = self.gviz.addgcode, args = (line, 1)).start()
|
#threading.Thread(target = self.gviz.addgcode, args = (line, 1)).start()
|
||||||
#self.gwindow.p.addgcode(line, hilight = 1)
|
#self.gwindow.p.addgcode(line, hilight = 1)
|
||||||
|
@ -1091,11 +1091,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
break
|
break
|
||||||
time.sleep(0.25)
|
time.sleep(0.25)
|
||||||
while not self.sentlines.empty():
|
while not self.sentlines.empty():
|
||||||
try:
|
gc = self.sentlines.get_nowait()
|
||||||
gc = self.sentlines.get_nowait()
|
wx.CallAfter(self.gviz.addgcode, gc, 1)
|
||||||
wx.CallAfter(self.gviz.addgcode, gc, 1)
|
|
||||||
except:
|
|
||||||
break
|
|
||||||
wx.CallAfter(self.status.SetStatusText, _("Not connected to printer."))
|
wx.CallAfter(self.status.SetStatusText, _("Not connected to printer."))
|
||||||
|
|
||||||
def capture(self, func, *args, **kwargs):
|
def capture(self, func, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue