From 2ed66eb99219e0c78f15f97289e1b6183fa3a798 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 d7f10e76..6e2227fd 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