re-added buffer underrun handling

should not be necessary because the number of LED's in a usual Lightberry setup is to low, but it's nice to have implemented.


Former-commit-id: def3c46687
This commit is contained in:
Schöck, Florian 2015-11-29 19:38:40 +01:00
parent f950ec7df6
commit 8d52466acd
1 changed files with 5 additions and 5 deletions

View File

@ -252,11 +252,11 @@ void setup()
// If serial buffer is threatening to underrun, start
// introducing progressively longer pauses to allow more
// data to arrive (up to a point).
// if((bytesBuffered < 32) && (bytesRemaining > bytesBuffered)) {
// startTime = micros();
// hold = 100 + (32 - bytesBuffered) * 10;
// mode = MODE_HOLD;
//}
if ((bytesBuffered < 32) && (bytesRemaining > bytesBuffered)) {
startTime = micros();
hold = 100 + (32 - bytesBuffered) * 10;
mode = MODE_HOLD;
}
} else {
// End of data -- issue latch:
startTime = micros();