Try to remove timing issues when preparing next line to send
parent
245d9651b6
commit
da90b2d738
|
@ -205,6 +205,7 @@ class MachineCom(object):
|
|||
self._resendDelta = None
|
||||
self._lastLines = []
|
||||
|
||||
self._sendNextLock = threading.Lock()
|
||||
self._sendingLock = threading.Lock()
|
||||
|
||||
self.thread = threading.Thread(target=self._monitor)
|
||||
|
@ -644,6 +645,7 @@ class MachineCom(object):
|
|||
self.close(True)
|
||||
|
||||
def _sendNext(self):
|
||||
with self._sendNextLock:
|
||||
if self._gcodePos >= len(self._gcodeList):
|
||||
self._changeState(self.STATE_OPERATIONAL)
|
||||
return
|
||||
|
@ -686,7 +688,7 @@ class MachineCom(object):
|
|||
self._printSection = 'CUSTOM'
|
||||
self._changeState(self.STATE_PRINTING)
|
||||
self._printStartTime = time.time()
|
||||
for i in xrange(0, 6):
|
||||
#for i in xrange(0, 6):
|
||||
self._sendNext()
|
||||
|
||||
def cancelPrint(self):
|
||||
|
|
Loading…
Reference in New Issue