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:
parent
4cb6aa1096
commit
fc4ccd693e
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue