|
@@ -272,7 +272,7 @@ void Statemachine::input(int n) {
|
272
|
272
|
|
273
|
273
|
selected_time = number_input();
|
274
|
274
|
|
275
|
|
- if ((selected_time <= 0) || (selected_time > 120)) {
|
|
275
|
+ if ((selected_time <= 0) || (selected_time > MAX_PUMP_RUNTIME)) {
|
276
|
276
|
error_condition = "Invalid time range!";
|
277
|
277
|
switch_to(error);
|
278
|
278
|
} else {
|
|
@@ -354,7 +354,7 @@ void Statemachine::input(int n) {
|
354
|
354
|
|
355
|
355
|
selected_time = number_input();
|
356
|
356
|
|
357
|
|
- if ((selected_time <= 0) || (selected_time > 120)) {
|
|
357
|
+ if ((selected_time <= 0) || (selected_time > MAX_VALVE_RUNTIME)) {
|
358
|
358
|
error_condition = "Invalid time range!";
|
359
|
359
|
switch_to(error);
|
360
|
360
|
} else {
|
|
@@ -436,7 +436,7 @@ void Statemachine::act(void) {
|
436
|
436
|
}
|
437
|
437
|
}
|
438
|
438
|
|
439
|
|
-#ifdef CHECK_SENSORS_VALVE_PUMP_MENU
|
|
439
|
+#ifdef CHECK_SENSORS_VALVE_PUMP_MENU_FULL
|
440
|
440
|
if ((state == menu_pumps_run) || ((state == menu_valves_run) && (selected_id == (plants.countPlants() + 1)))) {
|
441
|
441
|
// check water level state
|
442
|
442
|
auto wl = plants.getWaterlevel();
|
|
@@ -451,7 +451,9 @@ void Statemachine::act(void) {
|
451
|
451
|
switch_to(error);
|
452
|
452
|
}
|
453
|
453
|
}
|
|
454
|
+#endif // CHECK_SENSORS_VALVE_PUMP_MENU_FULL
|
454
|
455
|
|
|
456
|
+#ifdef CHECK_SENSORS_VALVE_PUMP_MENU_EMPTY
|
455
|
457
|
if ((state == menu_valves_run) && (selected_id <= plants.countPlants())) {
|
456
|
458
|
// check water level state
|
457
|
459
|
auto wl = plants.getWaterlevel();
|
|
@@ -466,7 +468,7 @@ void Statemachine::act(void) {
|
466
|
468
|
switch_to(error);
|
467
|
469
|
}
|
468
|
470
|
}
|
469
|
|
-#endif
|
|
471
|
+#endif // CHECK_SENSORS_VALVE_PUMP_MENU_EMPTY
|
470
|
472
|
|
471
|
473
|
if ((state == auto_fert_run) || (state == auto_tank_run)) {
|
472
|
474
|
unsigned long runtime = millis() - start_time;
|