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