fixed not watering when water is left

This commit is contained in:
Your Name 2023-04-26 08:33:12 +02:00
parent 9235e8a272
commit 1cc46a360b

View File

@ -1118,7 +1118,8 @@ bool isLowLight = (mSolarVoltage <= SOLAR_CHARGE_MAX_VOLTAGE);
bool hasWater = true; // By default activate the pump
if (waterRawSensor.getCount() > 0)
{
hasWater = ( (waterLevelMax.get() - waterRawSensor.getAverage()) > waterLevelMin.get() );
//surface of water is still nearer the sensor than required to cover the pumps
hasWater = waterRawSensor.getAverage() < waterLevelMin.get();
}
// FIXME no water warning message