1
0
mirror of https://github.com/hyperion-project/hyperion.git synced 2024-06-22 13:53:32 +02:00

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

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();