Moved display's update and redraw into task manager

This commit is contained in:
2021-12-20 10:52:02 +01:00
parent 2a56f59d86
commit 1830df26fd
10 changed files with 6 additions and 50 deletions

View File

@ -77,12 +77,15 @@
#ifdef FEATURE_DNS_NS
#include "dnsannounce.h"
#endif
#include "screens.h"
using namespace std::chrono_literals;
namespace {
constexpr const char * const TAG = "TASKS";
void not_needed() {}
espcpputils::SchedulerTask schedulerTasksArr[] {
espcpputils::SchedulerTask { "wifi", wifi_begin, wifi_update, 100ms },
espcpputils::SchedulerTask { "input", InputDispatcher::init, InputDispatcher::update, 20ms },
@ -151,6 +154,8 @@ espcpputils::SchedulerTask schedulerTasksArr[] {
#ifdef FEATURE_DNS_NS
espcpputils::SchedulerTask { "dnsannounce", init_dns_announce, handle_dns_announce, 100ms },
#endif
espcpputils::SchedulerTask { "updateDisp", not_needed, updateDisplay, 20ms },
espcpputils::SchedulerTask { "redrawDisp", not_needed, redrawDisplay, 20ms },
};
} // namespace