瀏覽代碼

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

Thomas Buck 2 年之前
父節點
當前提交
188b07f1b9
共有 2 個檔案被更改,包括 10 行新增3 行删除
  1. 4
    3
      include/config.h
  2. 6
    0
      src/Statemachine.cpp

+ 4
- 3
include/config.h 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存