chiark / gitweb /
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