From f2abdb972592f95620245589d4aa40882baa7787 Mon Sep 17 00:00:00 2001 From: David Madison Date: Tue, 20 Dec 2016 12:13:09 -0500 Subject: [PATCH 1/3] Fixed variable declaration whitespace --- .../LEDstream_WS2812B/LEDstream_WS2812B.ino | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino index c1c1d49..fec205f 100644 --- a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino +++ b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino @@ -53,28 +53,29 @@ void setup() // needs to change, slowing things down tremendously. uint8_t buffer[256], - indexIn = 0, - indexOut = 0, - mode = MODE_HEADER, - hi, lo, chk, i, spiFlag; + indexIn = 0, + indexOut = 0, + mode = MODE_HEADER, + hi, lo, chk, i, spiFlag; int16_t bytesBuffered = 0, - hold = 0, - c; + hold = 0, + c; int32_t bytesRemaining; unsigned long startTime, - lastByteTime, - lastAckTime, - t; - int32_t outPos = 0; + lastByteTime, + lastAckTime, + t; + int32_t + outPos = 0; Serial.begin(SPEED); // Teensy/32u4 disregards baud rate; is OK! Serial.print("Ada\n"); // Send ACK string to host - startTime = micros(); + startTime = micros(); lastByteTime = lastAckTime = millis(); // loop() is avoided as even that small bit of function overhead From 04f773ef2f4c0260705fe60c819077cba077eab5 Mon Sep 17 00:00:00 2001 From: David Madison Date: Tue, 20 Dec 2016 12:16:15 -0500 Subject: [PATCH 2/3] Removed obsolete comment about serial hold mode --- Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino | 3 --- 1 file changed, 3 deletions(-) diff --git a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino index fec205f..5a6e59a 100644 --- a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino +++ b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino @@ -157,9 +157,6 @@ void setup() bytesBuffered--; bytesRemaining--; } - // If serial buffer is threatening to underrun, start - // introducing progressively longer pauses to allow more - // data to arrive (up to a point). } else { // End of data -- issue latch: From dff36ed0f6c262ce465c9ecf326f47e7dc9e5f3f Mon Sep 17 00:00:00 2001 From: David Madison Date: Tue, 20 Dec 2016 12:39:54 -0500 Subject: [PATCH 3/3] Removed obsolete variables --- Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino index 5a6e59a..24056f8 100644 --- a/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino +++ b/Arduino/LEDstream_WS2812B/LEDstream_WS2812B.ino @@ -56,15 +56,13 @@ void setup() indexIn = 0, indexOut = 0, mode = MODE_HEADER, - hi, lo, chk, i, spiFlag; + hi, lo, chk, i; int16_t bytesBuffered = 0, - hold = 0, c; int32_t bytesRemaining; unsigned long - startTime, lastByteTime, lastAckTime, t; @@ -75,7 +73,6 @@ void setup() Serial.print("Ada\n"); // Send ACK string to host - startTime = micros(); lastByteTime = lastAckTime = millis(); // loop() is avoided as even that small bit of function overhead @@ -160,7 +157,6 @@ void setup() } else { // End of data -- issue latch: - startTime = micros(); mode = MODE_HEADER; // Begin next header search FastLED.show(); }