From a01f3e4efd656f7d37663c97199c82de61123496 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 17 Sep 2022 13:41:27 +0200 Subject: [PATCH] presets: disable "crude hack" on single core This code in handlepresets() does not make much sense. Especially it does not make any sense on single core MCU's. --- wled00/presets.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wled00/presets.cpp b/wled00/presets.cpp index 4bcccea5..30aaeb3e 100644 --- a/wled00/presets.cpp +++ b/wled00/presets.cpp @@ -37,7 +37,10 @@ void handlePresets(bool force) //crude way to determine if this was called by a network request uint8_t core = 1; #ifdef ARDUINO_ARCH_ESP32 - core = xPortGetCoreID(); + #if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S2) + // this does not make sense on single core + core = xPortGetCoreID(); + #endif #endif //only allow use of fileDoc from the core responsible for network requests (AKA HTTP JSON API) //do not use active network request doc from preset called by main loop (playlist, schedule, ...)