From 2636e2defa693d8100c342d1723bed7948e355ab Mon Sep 17 00:00:00 2001 From: Ollo Date: Sun, 11 Jun 2023 13:51:13 +0200 Subject: [PATCH] Read more distances --- esp32/include/ControllerConfiguration.h | 2 +- esp32/src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/esp32/include/ControllerConfiguration.h b/esp32/include/ControllerConfiguration.h index b0b1d92..c1c0f48 100644 --- a/esp32/include/ControllerConfiguration.h +++ b/esp32/include/ControllerConfiguration.h @@ -115,7 +115,7 @@ #define TEMPERATUR_TIMEOUT 3000 /**< 3 Seconds timeout for the temperatures sensors */ #define WATERSENSOR_TIMEOUT 3000 /**< 3 Seconds timeout for the water distance sensor */ -#define WATERSENSOR_CYCLE 5 /**< 5 sensor measurement are performed */ +#define WATERSENSOR_CYCLE 10 /**< 5 sensor measurement are performed */ #define DS18B20_RESOLUTION 9 /**< 9bit temperature resolution -> 0.5°C steps */ #define UTC_OFFSET_DE 3600 /* UTC offset in seconds for Germany */ diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index c2e5afc..b97f17e 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -51,7 +51,7 @@ extern "C" bool verifyRollbackLater(){ * DEFINES ******************************************************************************/ #define AMOUNT_SENOR_QUERYS 8 -#define MAX_TANK_DEPTH 2000 +#define MAX_TANK_DEPTH 5000 #define REBOOT_LOOP_DETECTION_ERROR 5 /****************************************************************************** @@ -85,7 +85,7 @@ int volatile selfTestPumpRun = -1; /** pump to run at the end of the cycle */ bool mConfigured = false; long nextBlink = 0; /**< Time needed in main loop to support expected blink code */ -RunningMedian waterRawSensor = RunningMedian(5); +RunningMedian waterRawSensor = RunningMedian(WATERSENSOR_CYCLE); float mSolarVoltage = 0.0f; /**< Voltage from solar panels */ float mBatteryVoltage = 0.0f; /**< Voltage from lipo */ unsigned long setupFinishedTimestamp;