Browse Source

Automatically disable ledAuto when an MQTT message is received

fastled
Xose Pérez 8 years ago
parent
commit
caf58e0eab
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      code/src/led.ino

+ 3
- 7
code/src/led.ino View File

@ -79,13 +79,9 @@ void ledMQTTCallback(unsigned int type, const char * topic, const char * payload
// Check ledAuto
if (ledID == 0) {
if (bitAuto) {
ledAuto = bitState;
setSetting("ledAuto", String() + (ledAuto ? "1" : "0"));
return;
} else if (ledAuto) {
return;
}
ledAuto = bitAuto ? bitState : false;
setSetting("ledAuto", String() + (ledAuto ? "1" : "0"));
if (bitAuto) return;
}
// Action to perform


Loading…
Cancel
Save