Skip to content

Commit

Permalink
Update playlist.cpp
Browse files Browse the repository at this point in the history
Updated to allow a user to optionally skip to the next preset in the playlist anytime they desire.
  • Loading branch information
freakintoddles2 authored Apr 30, 2024
1 parent 9f99a18 commit bed364d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ int16_t loadPlaylist(JsonObject playlistObj, byte presetId) {
}


void handlePlaylist() {
void handlePlaylist(bool skipNext) {
static unsigned long presetCycledTime = 0;
if (currentPlaylist < 0 || playlistEntries == nullptr) return;

if (millis() - presetCycledTime > (100*playlistEntryDur)) {
if (millis() - presetCycledTime > (100 * playlistEntryDur) || skipNext) {
presetCycledTime = millis();
if (bri == 0 || nightlightActive) return;

Expand Down

0 comments on commit bed364d

Please sign in to comment.