Browse Source

make sensor check in valve and pump menu optional

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

+ 2
- 0
include/config.h View File

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 View File

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…
Cancel
Save