Added mode reset during LED clear

Prevents partial frames being shown if the LEDs are cleared in the
middle of data parsing.
This commit is contained in:
David Madison 2017-06-08 17:47:19 -04:00
parent 4cb6aa1096
commit fc4ccd693e
1 changed files with 1 additions and 0 deletions

View File

@ -242,6 +242,7 @@ void timeouts(){
if((t - lastByteTime) > SerialTimeout * 1000) { if((t - lastByteTime) > SerialTimeout * 1000) {
memset(leds, 0, Num_Leds * sizeof(struct CRGB)); //filling Led array by zeroes memset(leds, 0, Num_Leds * sizeof(struct CRGB)); //filling Led array by zeroes
FastLED.show(); FastLED.show();
mode = Header;
lastByteTime = t; // Reset counter lastByteTime = t; // Reset counter
} }
} }