Explorar el Código

make sensor check in valve and pump menu optional

Thomas Buck hace 3 años
padre
commit
66744bb6c9
Se han modificado 2 ficheros con 4 adiciones y 0 borrados
  1. 2
    0
      include/config.h
  2. 2
    0
      src/Statemachine.cpp

+ 2
- 0
include/config.h Ver fichero

@@ -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 Ver fichero

@@ -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;

Loading…
Cancelar
Guardar