From 0b28f24b2e9587a628390c3c82dd711aa25f7db5 Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 4 Dec 2017 19:11:30 -0500 Subject: [PATCH] Evaluate timeouts on the second --- Arduino/LEDstream_FastLED/LEDstream_FastLED.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino b/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino index 01db0e1..a16ef66 100644 --- a/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino +++ b/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino @@ -234,12 +234,12 @@ void dataSet(){ void timeouts(){ // No data received. If this persists, send an ACK packet // to host once every second to alert it to our presence. - if((t - lastAckTime) > 1000) { + if((t - lastAckTime) >= 1000) { Serial.print("Ada\n"); // Send ACK string to host lastAckTime = t; // Reset counter // If no data received for an extended time, turn off all LEDs. - if((t - lastByteTime) > SerialTimeout * 1000) { + if((t - lastByteTime) >= SerialTimeout * 1000) { memset(leds, 0, Num_Leds * sizeof(struct CRGB)); //filling Led array by zeroes FastLED.show(); mode = Header;