refactor: start task managers in their owning modules

This commit is contained in:
Yurii committed 2026-11-29 11:27:13 +03:00
1 parent de1e43c707
commit d19f6aaa52
4 files changed
+38 -31

No files matched your search

+8 -1
View File
@@ -4,6 +4,7 @@
#include <metrics.h>
#include <esp_system.h>
TaskManager systemTaskManager("System");
std::string getResetReason() {
std::string value;
@@ -83,7 +84,6 @@ Task restartTask("Restart", Task::Type::ONCE, [](void*) {
// Maintenance
static Task maintenanceTask("System maintenance", [](void*) {
getMemoryMetrics();
drainLoggingSerial();
});
@@ -137,4 +137,11 @@ void initSystem() {
heapTask.setInterval(100);
systemTaskManager.addTask(heapTask);
// System keeps maintenance, networking and restart handling active during App pauses.
if (!systemTaskManager.asyncStart(5120, 3, tskNO_AFFINITY, 100, false)) {
esp_system_abort("Failed to start System task manager");
}
ESP_LOGI(L_MAIN, "Started %s task manager", systemTaskManager.name());
}