mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 10:46:33 +00:00
Update playlist.cpp
Updated to allow a user to optionally skip to the next preset in the playlist anytime they desire.
This commit is contained in:
parent
9f99a1896d
commit
bed364d75e
@ -123,11 +123,11 @@ int16_t loadPlaylist(JsonObject playlistObj, byte presetId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void handlePlaylist() {
|
void handlePlaylist(bool skipNext) {
|
||||||
static unsigned long presetCycledTime = 0;
|
static unsigned long presetCycledTime = 0;
|
||||||
if (currentPlaylist < 0 || playlistEntries == nullptr) return;
|
if (currentPlaylist < 0 || playlistEntries == nullptr) return;
|
||||||
|
|
||||||
if (millis() - presetCycledTime > (100*playlistEntryDur)) {
|
if (millis() - presetCycledTime > (100 * playlistEntryDur) || skipNext) {
|
||||||
presetCycledTime = millis();
|
presetCycledTime = millis();
|
||||||
if (bri == 0 || nightlightActive) return;
|
if (bri == 0 || nightlightActive) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user