Skip to content

Commit a1d6ffa

Browse files
Update json.cpp
adds support for np boolean parameter to skip to next preset
1 parent 3b89814 commit a1d6ffa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wled00/json.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,11 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
486486
strip.loadCustomPalettes();
487487
}
488488
}
489-
489+
490+
if (root.containsKey(F("np")) && root[F("np")].as<bool>()) { //skip to next preset in a playlist
491+
handlePlaylist(true);
492+
}
493+
490494
JsonObject wifi = root[F("wifi")];
491495
if (!wifi.isNull()) {
492496
bool apMode = getBoolVal(wifi[F("ap")], apActive);

0 commit comments

Comments
 (0)