Browse Source

dont allow fullauto with less than configured amount of plants (2)

Thomas Buck 2 years ago
parent
commit
188b07f1b9
2 changed files with 10 additions and 3 deletions
  1. 4
    3
      include/config.h
  2. 6
    0
      src/Statemachine.cpp

+ 4
- 3
include/config.h View File

@@ -36,9 +36,10 @@
36 36
 #define MAX_PUMP_RUNTIME 30
37 37
 #define MAX_VALVE_RUNTIME (45 * 60)
38 38
 #define MAX_AUX_RUNTIME (5 * 60)
39
-#define KICKSTART_RUNTIME 30
40
-#define OVERRUN_RUNTIME 60
41
-#define PURGE_FILL_RUNTIME 10
39
+#define KICKSTART_RUNTIME 45
40
+#define OVERRUN_RUNTIME 75
41
+#define PURGE_FILL_RUNTIME 20
42
+#define FULLAUTO_MIN_PLANT_COUNT 2
42 43
 
43 44
 // Sketch version
44 45
 #define FIRMWARE_VERSION "0.6"

+ 6
- 0
src/Statemachine.cpp View File

@@ -663,6 +663,12 @@ void Statemachine::input(int n) {
663 663
                     return;
664 664
                 }
665 665
 
666
+#ifdef FULLAUTO_MIN_PLANT_COUNT
667
+                if (selected_plants.countSet() < FULLAUTO_MIN_PLANT_COUNT) {
668
+                    return;
669
+                }
670
+#endif
671
+
666 672
                 // check if we need to run fertilizers
667 673
                 if (selected_ferts.countSet() > 0) {
668 674
                     // stirr before pumping fertilizers

Loading…
Cancel
Save