From 0085f334e8e4d2b3648d2511df1f24860be65cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bene=20D=C3=A1niel?= Date: Mon, 4 May 2020 09:19:01 +0200 Subject: [PATCH 1/2] Calibrate notification threshold --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index fe1a60a..4cd62a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ IPAddress subnet(255, 255, 255, 0); // subnet mask of the local network IPAddress dns(1, 1, 1, 1); // DNS server address */ -#define DRYNESS_ALARM_VALUE 500 // the higher the value, the dryer the soil (water ~300, air ~730) +#define DRYNESS_ALARM_VALUE 600 // the higher the value, the dryer the soil (water ~300, air ~730) //#define SLEEP_USECS powerManager.MAX_SLEEP ESPPowerManager powerManager(ssid, password, ip, gateway, subnet, dns); From 7c28dcc918970ad5c51a8f47244a2fc2fb9d4425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bene=20D=C3=A1niel?= Date: Mon, 4 May 2020 09:19:33 +0200 Subject: [PATCH 2/2] Fix additional hour in counter --- lib/ESPPowerManager/ESPPowerManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ESPPowerManager/ESPPowerManager.cpp b/lib/ESPPowerManager/ESPPowerManager.cpp index c174c61..9f168a7 100644 --- a/lib/ESPPowerManager/ESPPowerManager.cpp +++ b/lib/ESPPowerManager/ESPPowerManager.cpp @@ -27,7 +27,7 @@ void ESPPowerManager::beginEDSMode(uint16_t checksumNumber, uint16_t sleepHours) extendedDSData.cycleCounter += 1; if (extendedDSData.cycleCounter > sleepHours) { - extendedDSData.cycleCounter = 0; + extendedDSData.cycleCounter = 1; ESP.rtcUserMemoryWrite(DS_CYCLE_MEMORY_OFFSET, (uint32_t*)&extendedDSData, sizeof(extendedDSData)); return; // reached specified sleep count, let the jobs run }