From 9dd300e5910598775be50b9ea949fae481ef4669 Mon Sep 17 00:00:00 2001 From: ondra Date: Fri, 5 Jul 2024 22:15:13 +0200 Subject: [PATCH] fix incorrect day counting with dry days option --- src/screens/app_gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/app_gui.c b/src/screens/app_gui.c index 369c07e..5112bdb 100644 --- a/src/screens/app_gui.c +++ b/src/screens/app_gui.c @@ -69,7 +69,7 @@ static void read_time_and_moisture() s_app.today_is_watering_day = false; uint8_t now_normalized = cur_wd + (cur_wd < s_app.last_watering_day_wd ? 7 : 0); uint8_t elapsed_days = now_normalized - s_app.last_watering_day_wd; - if (elapsed_days >= app_config.scheduler_dry_days) { + if (elapsed_days > app_config.scheduler_dry_days) { s_app.today_is_watering_day = true; s_app.last_watering_day_wd = cur_wd; }