chiark / gitweb /
Fix serial communication issues due to buffer overflow
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 2 Jan 2015 08:15:38 +0000 (03:15 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 2 Jan 2015 08:21:23 +0000 (03:21 -0500)
commit073d3e392b54f8c7a4c3d537a729a066b39113ce
tree874e3a0ebb7bdd21895e63a54d7e467decfd86bc
parent95f711c49c63425fce23c695b0f20b68fa39552f
Fix serial communication issues due to buffer overflow
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
Cura/util/machineCom.py