Skip to content

Commit

Permalink
Merge pull request #62 from hugefishh/master
Browse files Browse the repository at this point in the history
MQTT filed switchTo added to be able to choose previous or next effect
  • Loading branch information
CODeRUS authored Sep 26, 2021
2 parents 152e6b4 + a811b81 commit ada7784
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ void Settings::processCommandMqtt(const String &message)
if (json.containsKey(F("effect"))) {
const String effect = json[F("effect")];
effectsManager->changeEffectByName(effect);
} else if (json.containsKey(F("switchTo"))) {
const String switchTo = json[F("switchTo")];
if (switchTo.equals(F("prev"))) {
effectsManager->previous();
} else if (switchTo.equals(F("next"))) {
effectsManager->next();
}
}
if (json.containsKey(F("color"))) {
effectsManager->changeEffectById(F("Color"));
Expand Down

0 comments on commit ada7784

Please sign in to comment.