A few additional points on this discussion:
1. Aside from USB corruption issue, we have long recommended (as have many), to print over SD Card.
Mainly because it will effect print quality if you print over USB at Sailfish speeds. With the print head
flying around at 120mm/s and the extra processing required for acceleration to achieve that speed, USB
comms is a massive overhead. The stepper interrupt runs with the highest priority we can give it, because
we know that if it doesn't get priority, then print quality suffers. Although USB corruption will likely contribute to
print quality reduction when printing over USB, testing we've done independent of that has shown us that USB
comms is costly, and print quality will suffer. Really, don't print over USB, it's a bad idea until we get
a faster processor, and it's something you should really sacrifice if you want to print at these speeds. Ultimately
you can't keep the acceleration buffer full, and it needs to be to get that performance.
2. I'm in favor, like Dan of printing a popup warning when printing over USB is attempted.
However disabling it completely, I believe that people should make
their own decision on that one, I can see cases (e.g. Calibration), where someone might not want to, and
after all, things like setting acceleration settings etc. are done over USB (but generally these things aren't done
when running at 120mm/s, so the issue is less). So USB comms will be staying.
3. It's correct to say that adding buffers and crc's will solve the issue, and they would. However
there are serious resource limitations. Currently we're CPU bound (these are 8 bit 16MHz processors with no floating point
hardware), we're code space bound (128K) and Ram Bound (8K). For example, I'd love to increase the acceleration buffer
from 16 commands to 32 commands, but we can't, it wouldn't run in the 8K anymore.
We've literally used every trick in the book from Fixed Floating Point to Assembler to interrupts that can pre-empt themselves and
have code to handle that to get speed ups and compile time options that change the way the call stack is managed to eek
back space. We're at the point now where claiming back 200 bytes in code space, is a big deal for us. E.G. I put some DigiPot
verification code in there the other day, that might need to come out in future because the cost (around 200 bytes) outweighs the
potential benefit of having the DigiPots written correctly, because something more important may come along that needs it more.
4. These are all design decisions, none of them are right or wrong. We outweigh pros/cons on everything, between us and a
few active community members to try and find the best solution. Where we can't really make our minds up on it, because pros/cons
are equal, we'll post to this forum to garner a consensus in opinion.
However that comes with a problem, others requirements may be different. Personally I want to print at the fastest speed
possible with the best quality and after that, have the coolest features that let me be more productive, that's kinda the Mantra of Sailfish.
However some want to print at 60mm/s and over RepG, and that's okay too. It's Open Source, fork it and do what you want, often
others may want to do the same as you. Sailfish was forked from MBI's software based on adding more standalone control, then
speeding up printing, I can see room for forks with other requirements.
5. Both myself and Dan regard this USB comms issue pretty seriously. It's been bugging us for a while, and Rich
inadvertently finding this issue has given us information as to what's happening and plausible reasons that are different to
what we have been putting it down to before, because we'd assumed that the timeouts were due to increased load,
which was plausible, we'd also assumed that timeouts would be retransmitted correctly. It looks like there
maybe an issue there that was inherited and just highlighted by Sailfish putting more of a strain on the CPU.
We're fully intending to fix this one on the caveat that the fix doesn't require more resources. If it does and
we reach the point something has to go to fix it, then it becomes a pro/con decision and as it's possible to
print from SDCard, that may win.
I plan on looking further at the USB comms issue today and it'll likely take the form of hammering the comms from
RepG with dummy commands whilst printing from SDCard and getting a metric on what corruption / loss we're seeing
first, before looking for causes.
Then I've got the blobbing issue to look at :-)