1
0
Fork 0

main.py aktualisiert

This commit is contained in:
Manuel Kamper 2024-04-16 18:29:19 +02:00
parent c70beab5f4
commit 3dbda1a293
1 changed files with 404 additions and 404 deletions

10
main.py
View File

@ -9,7 +9,7 @@ from secrets import secrets
from configs import configs
rp2.country(configs['country'])
version = "0.8"
version = "0.9"
TimeUtils = TimeUtils.TimeUtils()
Logger = Logger.Logger(configs['log_housekeeping_days'])
@ -153,12 +153,12 @@ def ReadSoil():
lastSoil3 = read3
# eliminate false readings
if (lastSoil1 > 25000):
lastSoil1 = 100
lastSoil1 = configs["soil_dry_value"]
if (lastSoil2 > 25000):
lastSoil2 = 100
lastSoil2 = configs["soil_dry_value"]
if (lastSoil3 > 25000):
lastSoil3 = 100
if ((read1 + read2 + read3) / 3 <= configs["soil_dry_value"]):
lastSoil3 = configs["soil_dry_value"]
if ((lastSoil1 + lastSoil2 + lastSoil3) / 3 <= configs["soil_dry_value"]):
soilDry = False
Logger.LogMessage("Soil is wet")
else: