Browse Source

Make fade inclusive of upper bound

Robert Marshall 5 years ago
parent
commit
32e180685b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Receiver/src/LED.cpp

+ 1 - 1
Receiver/src/LED.cpp

@@ -9,7 +9,7 @@ class LED{
 
 	float getMultiplier() {
 		unsigned long now = millis();
-		float remainingTime = _fadeEnd > now ? constrain(_fadeEnd - now, 0, _fadeDuration) : 0;
+		float remainingTime = _fadeEnd >= now ? constrain(_fadeEnd - now, 0, _fadeDuration) : 0;
 		float value = remainingTime / (float)_fadeDuration;
 		return _on ? value : 1.0f - value;
 	}