Skip to content

Commit

Permalink
presets: disable "crude hack" on single core
Browse files Browse the repository at this point in the history
This code in handlepresets() does not make much sense.
Especially it does not make any sense on single core MCU's.
  • Loading branch information
softhack007 committed Sep 17, 2022
1 parent cce54f3 commit a01f3e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wled00/presets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...)
Expand Down

0 comments on commit a01f3e4

Please sign in to comment.