mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 15:36:38 +02:00
corrected most of the review comments, except "maxlength"
This commit is contained in:
parent
7c5650ebe9
commit
0355572692
3 changed files with 7 additions and 20 deletions
|
@ -36,6 +36,7 @@ For now the following inverters should work out of the box:
|
||||||
- HM600
|
- HM600
|
||||||
- HM700
|
- HM700
|
||||||
- HM800
|
- HM800
|
||||||
|
- HM1000?
|
||||||
- HM1200
|
- HM1200
|
||||||
- HM1500
|
- HM1500
|
||||||
|
|
||||||
|
@ -48,15 +49,7 @@ These pins can be changed in the http://<ip-adress>/setup URL or with a click on
|
||||||
|
|
||||||
## Compile
|
## Compile
|
||||||
|
|
||||||
This code can be compiled using Visual Studio Code and **PlatformIO** Addon. The settings were:
|
This code can be compiled using Visual Studio Code and **PlatformIO** Addon.
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
## Used Libraries
|
## Used Libraries
|
||||||
|
|
||||||
|
|
|
@ -52,14 +52,12 @@ void app::loop(void) {
|
||||||
bool apActive = mWifi->loop();
|
bool apActive = mWifi->loop();
|
||||||
mWebInst->loop();
|
mWebInst->loop();
|
||||||
|
|
||||||
if(checkTicker(&mUptimeTicker, mUptimeInterval)) {
|
|
||||||
if(millis() - mPrevMillis >= 1000) {
|
if(millis() - mPrevMillis >= 1000) {
|
||||||
mPrevMillis += 1000;
|
mPrevMillis += 1000;
|
||||||
mUptimeSecs++;
|
mUptimeSecs++;
|
||||||
if(0 != mTimestamp)
|
if(0 != mTimestamp)
|
||||||
mTimestamp++;
|
mTimestamp++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(checkTicker(&mNtpRefreshTicker, mNtpRefreshInterval)) {
|
if(checkTicker(&mNtpRefreshTicker, mNtpRefreshInterval)) {
|
||||||
if(!apActive) {
|
if(!apActive) {
|
||||||
|
@ -658,8 +656,6 @@ const char* app::getFieldStateClass(uint8_t fieldId) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void app::resetSystem(void) {
|
void app::resetSystem(void) {
|
||||||
mUptimeSecs = 0;
|
mUptimeSecs = 0;
|
||||||
mUptimeTicker = 0xffffffff;
|
|
||||||
mUptimeInterval = 500; // [ms]
|
|
||||||
mPrevMillis = 0;
|
mPrevMillis = 0;
|
||||||
|
|
||||||
mNtpRefreshTicker = 0;
|
mNtpRefreshTicker = 0;
|
||||||
|
|
|
@ -221,8 +221,6 @@ class app {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t mUptimeTicker;
|
|
||||||
uint16_t mUptimeInterval;
|
|
||||||
uint32_t mUptimeSecs;
|
uint32_t mUptimeSecs;
|
||||||
uint32_t mPrevMillis;
|
uint32_t mPrevMillis;
|
||||||
uint8_t mHeapStatCnt;
|
uint8_t mHeapStatCnt;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue