Optimize behavior when watering blocked by soil moisture

master
Ondřej Hruška 2 months ago
parent b76ab770da
commit 73b5eb8d9f
  1. 5
      src/screens/app_gui.c

@ -126,6 +126,11 @@ void gui_loop_iter(GuiEvent message)
if (app_config.moisture_enable) {
if (s_app.moisture_pt > app_config.moisture_threshold_percent) {
// watering not needed
// Pretend we started the cycle, so we don't get into this loop again and again for the whole minute
s_app.last_cycle_time.hour = s_app.rtc_time.hour;
s_app.last_cycle_time.minute = s_app.rtc_time.minute;
s_app.cycle_time_checking = false;
break;
}
}

Loading…
Cancel
Save