mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-12-06 21:23:05 +05:00
refactor: start task managers in their owning modules
This commit is contained in:
1 parent
de1e43c707
commit
d19f6aaa52
4 files changed
+38
-31
No files matched your search
@@ -1,11 +1,13 @@
|
||||
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
|
||||
|
||||
#include <app.h>
|
||||
#include <esp_system.h>
|
||||
|
||||
#include <ESP32OT.h>
|
||||
#include <atomic>
|
||||
|
||||
// Application state and ID polling belong to this manager; the library owns RMT.
|
||||
TaskManager openthermTaskManager("OpenTherm");
|
||||
|
||||
static const unsigned short masterReadyTime = 60000u;
|
||||
static const unsigned int resetBusInterval = 120000u;
|
||||
@@ -2338,4 +2340,12 @@ void initOpenTherm() {
|
||||
})
|
||||
.onDone(onOperationDone);
|
||||
openthermTaskManager.addTask(readCoolingHoursTask);
|
||||
|
||||
|
||||
// Start
|
||||
if (!openthermTaskManager.asyncStart(4096, 5, 0, 10, false)) {
|
||||
esp_system_abort("Failed to start OpenTherm task manager");
|
||||
}
|
||||
|
||||
ESP_LOGI(L_MAIN, "Started %s task manager", openthermTaskManager.name());
|
||||
}
|
||||
Reference in new issue
Block a user