diff --git a/tools/esp8266/README.md b/tools/esp8266/README.md index fdebe916..41fb0bb0 100644 --- a/tools/esp8266/README.md +++ b/tools/esp8266/README.md @@ -36,6 +36,7 @@ For now the following inverters should work out of the box: - HM600 - HM700 - HM800 +- HM1000? - HM1200 - HM1500 @@ -48,15 +49,7 @@ These pins can be changed in the http:///setup URL or with a click on ## Compile -This code can be compiled using Visual Studio Code and **PlatformIO** Addon. The settings were: - -- Board: Generic ESP8266 Module -- Flash-Size: 4MB -- Install libraries (not included in the Arduino IDE 1.8.19): - - `Time` 1.6.1 - - `RF24` 1.4.5 - - `PubSubClient` 2.8 - - `ArduinoJson` 6.19.4 +This code can be compiled using Visual Studio Code and **PlatformIO** Addon. ## Used Libraries diff --git a/tools/esp8266/app.cpp b/tools/esp8266/app.cpp index be78d6a5..1394876c 100644 --- a/tools/esp8266/app.cpp +++ b/tools/esp8266/app.cpp @@ -52,13 +52,11 @@ void app::loop(void) { bool apActive = mWifi->loop(); mWebInst->loop(); - if(checkTicker(&mUptimeTicker, mUptimeInterval)) { - if(millis() - mPrevMillis >= 1000) { - mPrevMillis += 1000; - mUptimeSecs++; - if(0 != mTimestamp) - mTimestamp++; - } + if(millis() - mPrevMillis >= 1000) { + mPrevMillis += 1000; + mUptimeSecs++; + if(0 != mTimestamp) + mTimestamp++; } if(checkTicker(&mNtpRefreshTicker, mNtpRefreshInterval)) { @@ -658,8 +656,6 @@ const char* app::getFieldStateClass(uint8_t fieldId) { //----------------------------------------------------------------------------- void app::resetSystem(void) { mUptimeSecs = 0; - mUptimeTicker = 0xffffffff; - mUptimeInterval = 500; // [ms] mPrevMillis = 0; mNtpRefreshTicker = 0; diff --git a/tools/esp8266/app.h b/tools/esp8266/app.h index b7fd462b..4accf7d0 100644 --- a/tools/esp8266/app.h +++ b/tools/esp8266/app.h @@ -221,8 +221,6 @@ class app { } - uint32_t mUptimeTicker; - uint16_t mUptimeInterval; uint32_t mUptimeSecs; uint32_t mPrevMillis; uint8_t mHeapStatCnt;