From fc4ccd693ee161218e83eaaeec6bbc7342249035 Mon Sep 17 00:00:00 2001 From: David Madison Date: Thu, 8 Jun 2017 17:47:19 -0400 Subject: [PATCH] Added mode reset during LED clear Prevents partial frames being shown if the LEDs are cleared in the middle of data parsing. --- Arduino/LEDstream_FastLED/LEDstream_FastLED.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino b/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino index 185592c..781a5df 100644 --- a/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino +++ b/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino @@ -242,6 +242,7 @@ void timeouts(){ if((t - lastByteTime) > SerialTimeout * 1000) { memset(leds, 0, Num_Leds * sizeof(struct CRGB)); //filling Led array by zeroes FastLED.show(); + mode = Header; lastByteTime = t; // Reset counter } }