ESP32 / ESP8266 & BME280 / SHT2x sensor with InfluxDB support
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ui.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. enum bathroom_light_states {
  16. BATH_LIGHT_OFF,
  17. BATH_LIGHT_NONE,
  18. BATH_LIGHT_BIG,
  19. BATH_LIGHT_SMALL,
  20. };
  21. struct ui_status {
  22. bool light_corner;
  23. bool light_workspace;
  24. bool light_kitchen;
  25. bool sound_amplifier;
  26. bool light_bench;
  27. bool light_pc;
  28. bool light_amp;
  29. bool light_box;
  30. enum bathroom_light_states bathroom_lights;
  31. bool light_sink;
  32. };
  33. extern struct ui_status ui_status;
  34. enum ui_state {
  35. UI_INIT = 0,
  36. UI_MEMORY_READY,
  37. UI_WIFI_CONNECT,
  38. UI_WIFI_CONNECTING,
  39. UI_WIFI_CONNECTED,
  40. UI_READY,
  41. UI_UPDATE,
  42. };
  43. void ui_init(void);
  44. void ui_run(void);
  45. void ui_progress(enum ui_state state);
  46. #endif // __UI_H__