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
 #define MAX_PUMP_RUNTIME 30
36
 #define MAX_PUMP_RUNTIME 30
37
 #define MAX_VALVE_RUNTIME (45 * 60)
37
 #define MAX_VALVE_RUNTIME (45 * 60)
38
 #define MAX_AUX_RUNTIME (5 * 60)
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
 // Sketch version
44
 // Sketch version
44
 #define FIRMWARE_VERSION "0.6"
45
 #define FIRMWARE_VERSION "0.6"

+ 6
- 0
src/Statemachine.cpp View File

663
                     return;
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
                 // check if we need to run fertilizers
672
                 // check if we need to run fertilizers
667
                 if (selected_ferts.countSet() > 0) {
673
                 if (selected_ferts.countSet() > 0) {
668
                     // stirr before pumping fertilizers
674
                     // stirr before pumping fertilizers

Loading…
Cancel
Save