more tasks in task manager
This commit is contained in:
@ -53,7 +53,6 @@ using namespace std::chrono_literals;
|
||||
#include "udpcloud.h"
|
||||
#endif
|
||||
#include "wifi_bobbycar.h"
|
||||
#include "time_bobbycar.h"
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
#include "ledstrip.h"
|
||||
#endif
|
||||
@ -87,9 +86,6 @@ std::optional<espchrono::millis_clock::time_point> lastBleUpdate;
|
||||
std::optional<espchrono::millis_clock::time_point> lastCloudCollect;
|
||||
std::optional<espchrono::millis_clock::time_point> lastCloudSend;
|
||||
#endif
|
||||
#ifdef FEATURE_NTP
|
||||
std::optional<espchrono::millis_clock::time_point> lastNtpUpdate;
|
||||
#endif
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
std::optional<espchrono::millis_clock::time_point> lastLedstripUpdate;
|
||||
#endif
|
||||
@ -219,11 +215,6 @@ extern "C" void app_main()
|
||||
initCloud();
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_NTP
|
||||
bootLabel.redraw("time");
|
||||
initTime();
|
||||
#endif
|
||||
|
||||
bootLabel.redraw("switchScreen");
|
||||
|
||||
#if defined(FEATURE_DPAD_5WIRESW) && defined(DPAD_5WIRESW_DEBUG)
|
||||
@ -366,15 +357,6 @@ extern "C" void app_main()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_NTP
|
||||
if (!lastNtpUpdate || now - *lastNtpUpdate >= 100ms)
|
||||
{
|
||||
updateTime();
|
||||
|
||||
lastNtpUpdate = now;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_WEBSERVER
|
||||
handleWebserver();
|
||||
#endif
|
||||
|
@ -34,6 +34,9 @@
|
||||
#ifdef FEATURE_MOSFETS
|
||||
#include "mosfets.h"
|
||||
#endif
|
||||
#ifdef FEATURE_NTP
|
||||
#include "time_bobbycar.h"
|
||||
#endif
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@ -64,7 +67,10 @@ espcpputils::SchedulerTask schedulerTasksArr[] {
|
||||
#ifdef FEATURE_MOSFETS
|
||||
espcpputils::SchedulerTask { "mosfets", init_mosfets, update_mosfets, {} },
|
||||
#endif
|
||||
espcpputils::SchedulerTask { "wifi", wifi_begin, wifi_update, 100ms },
|
||||
espcpputils::SchedulerTask { "wifi", wifi_begin, wifi_update, 100ms },
|
||||
#ifdef FEATURE_NTP
|
||||
espcpputils::SchedulerTask { "time", initTime, updateTime, 100ms },
|
||||
#endif
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
Reference in New Issue
Block a user