diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs index eac3c96..7383d27 100644 --- a/.settings/org.eclipse.cdt.core.prefs +++ b/.settings/org.eclipse.cdt.core.prefs @@ -184,10 +184,10 @@ environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.DT environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.DTS/value=3600 environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.LOCAL/delimiter=\: environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.LOCAL/operation=replace -environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.LOCAL/value=1524433102 +environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.LOCAL/value=1524511581 environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.UTC/delimiter=\: environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.UTC/operation=replace -environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.UTC/value=1524425902 +environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.UTC/value=1524504381 environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.ZONE/delimiter=\: environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.ZONE/operation=replace environment/project/io.sloeber.core.toolChain.release.1856809793/A.EXTRA.TIME.ZONE/value=3600 @@ -469,7 +469,7 @@ environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.COM_PORT environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.COM_PORT/value=/dev/ttyUSB5 environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.ECLIPSE_LOCATION/delimiter=\: environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.ECLIPSE_LOCATION/operation=replace -environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}///////////////// +environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.ECLIPSE_LOCATION/value=${eclipse_home}///////////////////////////////////// environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.EXTRA.ALL/delimiter=\: environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.EXTRA.ALL/operation=replace environment/project/io.sloeber.core.toolChain.release.1856809793/JANTJE.EXTRA.ALL/value= diff --git a/ConfigGenerator/configGen.py b/ConfigGenerator/configGen.py index 800b51d..9ef7431 100644 --- a/ConfigGenerator/configGen.py +++ b/ConfigGenerator/configGen.py @@ -19,11 +19,12 @@ configItems = [ {"label":"MQTT Topic", "key":"mqttTopic", "type":"C", "length":64, "default":"IoT/RainSensor1/Value"}, {"label":"MQTT DebugTopic", "key":"mqttDebugTopic", "type":"C", "length":64, "default":"IoT/RainSensor1/Debug"}, {"label":"DebugMode", "key":"debugMode", "type":"I", "default":0}, - {"label":"Period", "key":"period", "type":"I", "default":300} + {"label":"Period (s)", "key":"period", "type":"I", "default":5}, + {"label":"Debounce (us)", "key":"debounce", "type":"I", "default":300} ] -magic = 0xC0DE0003 +magic = 0xC0DE0004 appName = "ESP8266 based RainSensor" confWifiSsid = "espconfig" diff --git a/configuration.cpp b/configuration.cpp index bb60755..552c37c 100644 --- a/configuration.cpp +++ b/configuration.cpp @@ -9,7 +9,7 @@ tConfigBlock configBlock; -const uint32_t MAGIC = 3235774467; +const uint32_t MAGIC = 3235774468; const char* CONFIG_SSID = "espconfig"; extern ESP8266WebServer webServer; @@ -39,7 +39,8 @@ void configServeIndex() { strcpy(configBlock.mqttTopic, "IoT/RainSensor1/Value"); strcpy(configBlock.mqttDebugTopic, "IoT/RainSensor1/Debug"); configBlock.debugMode = 0; - configBlock.period = 500; + configBlock.period = 5; + configBlock.debounce = 300; } if (! checkAuthentication()) { @@ -244,7 +245,7 @@ void configServeIndex() { " " "