ESP32 / ESP8266 & BME280 / SHT2x sensor with InfluxDB support
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * ui.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 __UI_H__
  14. #define __UI_H__
  15. #ifdef FEATURE_NTP
  16. #include <time.h>
  17. String time_to_date_str(struct tm timeinfo);
  18. String time_to_time_str(struct tm timeinfo);
  19. #endif // FEATURE_NTP
  20. #ifdef FEATURE_UI
  21. enum bathroom_light_states {
  22. BATH_LIGHT_OFF,
  23. BATH_LIGHT_NONE,
  24. BATH_LIGHT_BIG,
  25. BATH_LIGHT_SMALL,
  26. };
  27. struct ui_status {
  28. bool light_corner;
  29. bool light_workspace;
  30. bool light_kitchen;
  31. bool sound_amplifier;
  32. bool light_bench;
  33. bool light_pc;
  34. bool light_amp;
  35. bool light_box;
  36. enum bathroom_light_states bathroom_lights;
  37. bool light_sink;
  38. bool pc_displays;
  39. };
  40. extern struct ui_status ui_status;
  41. enum ui_state {
  42. UI_INIT = 0,
  43. UI_MEMORY_READY,
  44. UI_WIFI_CONNECT,
  45. UI_WIFI_CONNECTING,
  46. UI_WIFI_CONNECTED,
  47. UI_READY,
  48. UI_UPDATE,
  49. };
  50. void ui_init(void);
  51. void ui_run(void);
  52. void ui_progress(enum ui_state state);
  53. #endif // FEATURE_UI
  54. #endif // __UI_H__