From 49750eb3ad8de48be8d02fe31918a307ff8dfdaf Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 2 Mar 2026 15:30:21 -1000 Subject: [PATCH] Add static_assert for MAIN_TASK_PRIORITY < configMAX_PRIORITIES --- esphome/components/libretiny/core.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/libretiny/core.cpp b/esphome/components/libretiny/core.cpp index 1641be7af2..6bb2d9dcc1 100644 --- a/esphome/components/libretiny/core.cpp +++ b/esphome/components/libretiny/core.cpp @@ -38,6 +38,7 @@ void arch_init() { // This is safe because ESPHome yields voluntarily via yield_with_select_() and // the Arduino mainTask yield() after each loop() iteration. static constexpr UBaseType_t MAIN_TASK_PRIORITY = 6; + static_assert(MAIN_TASK_PRIORITY < configMAX_PRIORITIES, "MAIN_TASK_PRIORITY must be less than configMAX_PRIORITIES"); vTaskPrioritySet(nullptr, MAIN_TASK_PRIORITY); #endif #if LT_GPIO_RECOVER