short cycle avoidance
This commit is contained in:
parent
88736f288b
commit
616099f699
@ -184,10 +184,10 @@ environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.DTS
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.DTS/value=0
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.LOCAL/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.LOCAL/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.LOCAL/value=1517501856
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.LOCAL/value=1517504909
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.UTC/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.UTC/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.UTC/value=1517498256
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.UTC/value=1517501309
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.ZONE/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.ZONE/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/A.EXTRA.TIME.ZONE/value=3600
|
||||
@ -466,10 +466,10 @@ environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.BOARD_NAM
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.BOARD_NAME/value=NodeMCU 1.0 (ESP-12E Module)
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.COM_PORT/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.COM_PORT/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.COM_PORT/value=/dev/ttyUSB1
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.COM_PORT/value=/dev/ttyUSB0
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.ECLIPSE_LOCATION/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.ECLIPSE_LOCATION/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.EXTRA.ALL/delimiter=\:
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.EXTRA.ALL/operation=replace
|
||||
environment/project/io.sloeber.core.toolChain.release.547546691/JANTJE.EXTRA.ALL/value=
|
||||
|
@ -8,7 +8,7 @@
|
||||
#ifndef DEFINES_H_
|
||||
#define DEFINES_H_
|
||||
|
||||
#define DEBUG
|
||||
// #define DEBUG
|
||||
|
||||
#define EEPROM_ADDR 0
|
||||
|
||||
|
@ -73,6 +73,7 @@ void reconnect() {
|
||||
#endif
|
||||
// Once connected, publish an announcement...
|
||||
client.publish(configBlock.mqttDebugTopic, "hello world");
|
||||
client.publish(configBlock.mqttDebugTopic, WiFi.localIP().toString().c_str());
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
Serial.print("failed, rc=");
|
||||
@ -141,7 +142,9 @@ void loopProduction() {
|
||||
uint32_t currentMillis = millis();
|
||||
|
||||
|
||||
if ((currentMillis - lastMillis > configBlock.period) && (currentMillis - reconnectTime > 1000)) {
|
||||
if ((currentMillis - lastMillis > configBlock.period) &&
|
||||
(currentMillis - reconnectTime > 1000) &&
|
||||
(senseCnt > 100)) {
|
||||
lastMillis = currentMillis;
|
||||
|
||||
uint32_t chargeCntAvg = chargeCntSum / senseCnt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user