This issue is caused by the Marlin firmware filling up its command buffer queue
and then keeping commands on the serial buffer (which is limited to 64 bytes)
which eventually causes a buffer overflow and data is lost.
By sending only 2 commands to be queued, we ensure that we are not always catching up
but we also make sure that we cause no checksum issues.
Anyways, when a checksum issue happens and Marlin asks for a resend,
we end up sending one command at a time with nothing in Marlin's queue,
so this makes it even more efficient.
Note: Pronterface only sends one command at a time and does not fill up
Marlin's queue, that's why it doesn't have the checksum issues.
This really fixes the underlying cause for issue #66
self._printSection = 'CUSTOM'
self._changeState(self.STATE_PRINTING)
self._printStartTime = time.time()
- for i in xrange(0, 4):
+ for i in xrange(0, 2):
self._sendNext()
def cancelPrint(self):
def setPause(self, pause):
if not pause and self.isPaused():
self._changeState(self.STATE_PRINTING)
- for i in xrange(0, 6):
+ for i in xrange(0, 2):
self._sendNext()
if pause and self.isPrinting():
self._changeState(self.STATE_PAUSED)