Adjust moister sensor boundaries

This commit is contained in:
c3ma 2021-07-09 19:40:51 +02:00
parent 12d4c9950d
commit 99703e5ad1
2 changed files with 5 additions and 4 deletions

View File

@ -80,14 +80,15 @@
*/ */
#define FIRMWARE_VERSION "sw 1.3 hw 0.10" #define FIRMWARE_VERSION "sw 1.3 hw 0.10"
#define MOIST_SENSOR_MAX_ADC (85 * 4095 / 100) #define MOIST_SENSOR_MAX_ADC 1200 //swamp earth - 50 margin
#define MOIST_SENSOR_MIN_ADC (25 * 4095 / 100) #define MOIST_SENSOR_MIN_ADC 1800 //dry earth + 1500 margin
#define SOLAR_VOLT_FACTOR 11 #define SOLAR_VOLT_FACTOR 11
#define BATTSENSOR_INDEX_SOLAR 0 #define BATTSENSOR_INDEX_SOLAR 0
#define BATTSENSOR_INDEX_BATTERY 1 #define BATTSENSOR_INDEX_BATTERY 1
#define MQTT_TIMEOUT (1000 * 10) /**< After 10 seconds, MQTT is expected to be connected */ #define MQTT_TIMEOUT (1000 * 60) /**< After 10 seconds, MQTT is expected to be connected */
#define ESP_STALE_TIMEOUT (MQTT_TIMEOUT+(30*1000))
#define MAX_PLANTS 7 #define MAX_PLANTS 7
#define SOLAR_CHARGE_MIN_VOLTAGE 7 /**< Sun is rising (morning detected) */ #define SOLAR_CHARGE_MIN_VOLTAGE 7 /**< Sun is rising (morning detected) */

View File

@ -742,7 +742,7 @@ void loop()
} }
/** Timeout always stopping the ESP -> no endless power consumption */ /** Timeout always stopping the ESP -> no endless power consumption */
if (millis() > 60000 && !mDownloadMode) if (millis() > ESP_STALE_TIMEOUT && !mDownloadMode)
{ {
Serial << (millis() / 1000) << "not terminated watchdog reset" << endl; Serial << (millis() / 1000) << "not terminated watchdog reset" << endl;
Serial.flush(); Serial.flush();