Redesign Statemachine

This commit is contained in:
Patrick Amrhein 2024-03-30 10:04:14 +01:00
parent 589b798f4d
commit 5afc97f7f8
4 changed files with 626 additions and 560 deletions

View file

@ -235,7 +235,7 @@ void app::regularTickers(void) {
// Plugin ZeroExport
#if defined(PLUGIN_ZEROEXPORT)
everySec(std::bind(&ZeroExportType::tickerSecond, &mZeroExport), "ZeroExport");
everySec(std::bind(&ZeroExportType::tickSecond, &mZeroExport), "ZeroExport");
#endif
// Plugin ZeroExport - Ende
@ -423,6 +423,10 @@ void app::tickMinute(void) {
//-----------------------------------------------------------------------------
void app::tickMidnight(void) {
#if defined(PLUGIN_ZEROEXPORT)
mZeroExport.tickMidnight();
#endif /*defined(PLUGIN_ZEROEXPORT)*/
uint32_t localTime = gTimezone.toLocal(mTimestamp);
uint32_t nxtTrig = gTimezone.toUTC(localTime - (localTime % 86400) + 86400); // next midnight local time
onceAt(std::bind(&app::tickMidnight, this), nxtTrig, "mid2");