From 21936a8e1aba06501db8b19f095e732bcae7cd96 Mon Sep 17 00:00:00 2001 From: Bernhard Kirchen Date: Fri, 29 Dec 2023 11:41:35 +0100 Subject: [PATCH] Fix: define _TASK_THREAD_SAFE for TaskScheduler the TaskScheduler runs in the context of a FreeRTOS thread/task. there are other such threads (MQTT client and web server in particular). to allow changing TaskScheduler task properties from different threads, we need to enable the use of a mutex to protect the TaskScheduler. --- platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio.ini b/platformio.ini index b84fa1de7..27db4ef71 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,6 +24,7 @@ platform = espressif32@6.5.0 build_flags = -DPIOENV=\"$PIOENV\" -D_TASK_STD_FUNCTION=1 + -D_TASK_THREAD_SAFE=1 -Wall -Wextra -Wunused -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wnull-dereference ; Have to remove -Werror because of ; https://github.com/espressif/arduino-esp32/issues/9044 and