* converted to "poor-man-ticker" using millis() for uptime, send and mqtt

* added inverter overview
* added send count to statistics
This commit is contained in:
lumapu 2022-05-01 20:48:10 +02:00
parent 89624f7f02
commit 2abd388726
8 changed files with 89 additions and 66 deletions

View file

@ -23,10 +23,9 @@ Main::Main(void) {
mEep = new eep();
Serial.begin(115200);
mUptimeSecs = 0;
mUptimeTicker = new Ticker();
mUptimeTicker->attach(1, std::bind(&Main::uptimeTicker, this));
mUptimeSecs = 0;
mUptimeTicker = 0xffffffff;
mUptimeInterval = 1000;
}
@ -67,6 +66,11 @@ void Main::loop(void) {
if(mApActive)
mDns->processNextRequest();
mWeb->handleClient();
if(checkTicker(&mUptimeTicker, &mUptimeInterval)) {
mUptimeSecs++;
mTimestamp++;
}
}
@ -271,14 +275,6 @@ void Main::showReboot(void) {
}
//-----------------------------------------------------------------------------
void Main::uptimeTicker(void) {
mUptimeSecs++;
mTimestamp++;
}
//-----------------------------------------------------------------------------
time_t Main::getNtpTime(void) {
time_t date = 0;