瀏覽代碼

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
 #define INVERT_SENSOR_BOTTOM
28
 #define INVERT_SENSOR_BOTTOM
29
 //#define INVERT_SENSOR_TOP
29
 //#define INVERT_SENSOR_TOP
30
 
30
 
31
+//#define CHECK_SENSORS_VALVE_PUMP_MENU
32
+
31
 #define OWN_I2C_ADDRESS 0x42
33
 #define OWN_I2C_ADDRESS 0x42
32
 #define I2C_BUS_SPEED 400000
34
 #define I2C_BUS_SPEED 400000
33
 #define I2C_BUF_SIZE 32
35
 #define I2C_BUF_SIZE 32

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

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

Loading…
取消
儲存