Fixed serial timeout overflow

This commit is contained in:
David Madison 2017-12-04 19:26:35 -05:00
parent 0b28f24b2e
commit 061ac5edfd
1 changed files with 1 additions and 1 deletions

View File

@ -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;