some fixes for hydroponics mode

This commit is contained in:
Your Name
2021-10-26 20:46:40 +02:00
parent 49664ba6f7
commit 9170a1fe05
5 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -82,10 +82,10 @@
/** \addtogroup Configuration
* @{
*/
#define FIRMWARE_VERSION "sw 1.4 hw 0.10"
#define FIRMWARE_VERSION "sw 2.0 hw 0.10_no_sensor_caps"
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
#define FLOWMETER_PIN CUSTOM1_PIN1
//#define FLOWMETER_PIN CUSTOM1_PIN1
#ifdef FLOWMETER_PIN
#define FLOWMETER_FLOWFACTOR 22 /** F = 22 * Q;Q = L/min */
#endif
+2 -1
View File
@@ -5,6 +5,7 @@
#define LOG_LEVEL_INFO 2
#define LOG_LEVEL_DEBUG 3
#define LOG_TANKSENSOR_FAIL_DETECT "Failed to detect and initialize distance sensor!"
#define LOG_TANKSENSOR_FAIL_DETECT_CODE -1
@@ -25,7 +26,7 @@
//msg is dynamic defined
#define LOG_PUMP_INEFFECTIVE -4
#define LOG_PUMP_STARTED_CODE 10
#define LOG_DEBUG_CODE 1001
#define LOG_SLEEP_NIGHT 100
#define LOG_SLEEP_DAY 101
+2 -4
View File
@@ -64,7 +64,7 @@ public:
bool isHydroponic(){
long current = this->mSetting->pSensorDry->get();
return !equalish(current,HYDROPONIC_MODE);
return equalish(current,HYDROPONIC_MODE);
}
/**
@@ -82,9 +82,7 @@ public:
bool isDry = getCurrentMoisture() > getSetting2Moisture();
bool isActive = isPumpTriggerActive();
return isDry && isActive;
}
}
bool isPumpTriggerActive()
{