From 19310470b6ca81014086c08232229600ec719053 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 6 Oct 2021 19:52:21 +0200 Subject: [PATCH] Nonsense fix. --- wled00/set.cpp | 2 +- wled00/wled.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wled00/set.cpp b/wled00/set.cpp index 5449c4126..0836de194 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -652,7 +652,7 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply) byte presetCycleMin = 1; byte presetCycleMax = 5; - byte presetCycCurr; + pos = req.indexOf(F("P1=")); //sets first preset for cycle if (pos > 0) presetCycleMin = getNumVal(&req, pos); diff --git a/wled00/wled.h b/wled00/wled.h index 0a0878457..8d4ea77e7 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -514,6 +514,8 @@ WLED_GLOBAL bool blynkEnabled _INIT(false); //playlists WLED_GLOBAL byte currentPlaylist _INIT(0); +//still used for "PL=~" HTTP API command +WLED_GLOBAL byte presetCycCurr _INIT(0); // realtime WLED_GLOBAL byte realtimeMode _INIT(REALTIME_MODE_INACTIVE);