ESP32 / ESP8266 & BME280 / SHT2x sensor with InfluxDB support
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

memory.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * memory.h
  3. *
  4. * ESP8266 / ESP32 Environmental Sensor
  5. *
  6. * ----------------------------------------------------------------------------
  7. * "THE BEER-WARE LICENSE" (Revision 42):
  8. * <xythobuz@xythobuz.de> wrote this file. As long as you retain this notice
  9. * you can do whatever you want with this stuff. If we meet some day, and you
  10. * think this stuff is worth it, you can buy me a beer in return. Thomas Buck
  11. * ----------------------------------------------------------------------------
  12. */
  13. #ifndef __ESP_ENV_MEMORY__
  14. #define __ESP_ENV_MEMORY__
  15. struct ConfigMemory {
  16. double sht_temp_off;
  17. double bme1_temp_off;
  18. double bme2_temp_off;
  19. #ifdef FEATURE_UI
  20. int touch_calibrate_left;
  21. int touch_calibrate_right;
  22. int touch_calibrate_top;
  23. int touch_calibrate_bottom;
  24. #endif // FEATURE_UI
  25. ConfigMemory() {
  26. sht_temp_off = 0.0;
  27. bme1_temp_off = 0.0;
  28. bme2_temp_off = 0.0;
  29. #ifdef FEATURE_UI
  30. touch_calibrate_left = 0;
  31. touch_calibrate_right = 0;
  32. touch_calibrate_top = 0;
  33. touch_calibrate_bottom = 0;
  34. #endif // FEATURE_UI
  35. }
  36. };
  37. ConfigMemory mem_read();
  38. void mem_write(ConfigMemory mem);
  39. extern ConfigMemory config;
  40. #endif // __ESP_ENV_MEMORY__