Explorar el Código

Only reset LED state when there's a state change.

Robert Marshall hace 5 años
padre
commit
3dcdc41de9
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Receiver/src/LED.cpp

+ 2 - 0
Receiver/src/LED.cpp

@@ -27,6 +27,8 @@ class LED{
 	}
 
 	void reset(bool on){
+		if (on == _on)
+			return;
 		float oldMultiplier = getMultiplier();
 		_on = on;
 		_fadeStart = millis();