Kaynağa Gözat

Make fade inclusive of upper bound

Robert Marshall 5 yıl önce
ebeveyn
işleme
32e180685b
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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;
 	}