fix incorrect day counting with dry days option

master
Ondřej Hruška 6 months ago
parent 73b5eb8d9f
commit 9dd300e591
  1. 2
      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;
}

Loading…
Cancel
Save