浏览代码

make sensor check in valve and pump menu optional

Thomas Buck 3 年前
父节点
当前提交
66744bb6c9
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2
    0
      include/config.h
  2. 2
    0
      src/Statemachine.cpp

+ 2
- 0
include/config.h 查看文件

@@ -28,6 +28,8 @@
28 28
 #define INVERT_SENSOR_BOTTOM
29 29
 //#define INVERT_SENSOR_TOP
30 30
 
31
+//#define CHECK_SENSORS_VALVE_PUMP_MENU
32
+
31 33
 #define OWN_I2C_ADDRESS 0x42
32 34
 #define I2C_BUS_SPEED 400000
33 35
 #define I2C_BUF_SIZE 32

+ 2
- 0
src/Statemachine.cpp 查看文件

@@ -417,6 +417,7 @@ void Statemachine::act(void) {
417 417
         }
418 418
     }
419 419
     
420
+#ifdef CHECK_SENSORS_VALVE_PUMP_MENU
420 421
     if ((state == menu_pumps_run) || ((state == menu_valves_run) && (selected_id == (plants.countPlants() + 1)))) {
421 422
         // check water level state
422 423
         auto wl = plants.getWaterlevel();
@@ -446,6 +447,7 @@ void Statemachine::act(void) {
446 447
             switch_to(error);
447 448
         }
448 449
     }
450
+#endif
449 451
     
450 452
     if ((state == auto_fert_run) || (state == auto_tank_run)) {
451 453
         unsigned long runtime = millis() - start_time;

正在加载...
取消
保存