From 8d52466acdaa180651db17eb818c77606075e3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sch=C3=B6ck=2C=20Florian?= Date: Sun, 29 Nov 2015 19:38:40 +0100 Subject: [PATCH] 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: def3c46687670439be572e6b9c2dd1de5be2f1b5 --- .../LightberryHDUSBAPA1021.1.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dependencies/LightberryHDUSBAPA1021.1/LightberryHDUSBAPA1021.1.ino b/dependencies/LightberryHDUSBAPA1021.1/LightberryHDUSBAPA1021.1.ino index 4a02d71a..603599c9 100644 --- a/dependencies/LightberryHDUSBAPA1021.1/LightberryHDUSBAPA1021.1.ino +++ b/dependencies/LightberryHDUSBAPA1021.1/LightberryHDUSBAPA1021.1.ino @@ -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();