Fixed serial timeout overflow
This commit is contained in:
parent
0b28f24b2e
commit
061ac5edfd
|
@ -239,7 +239,7 @@ void timeouts(){
|
||||||
lastAckTime = t; // Reset counter
|
lastAckTime = t; // Reset counter
|
||||||
|
|
||||||
// If no data received for an extended time, turn off all LEDs.
|
// If no data received for an extended time, turn off all LEDs.
|
||||||
if((t - lastByteTime) >= SerialTimeout * 1000) {
|
if((t - lastByteTime) >= (uint32_t) 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;
|
mode = Header;
|
||||||
|
|
Loading…
Reference in New Issue