UITask.h 484 B

12345678910111213141516171819
  1. #pragma once
  2. #include <helpers/ui/DisplayDriver.h>
  3. class UITask {
  4. DisplayDriver* _display;
  5. unsigned long _next_read, _next_refresh, _auto_off;
  6. int _prevBtnState;
  7. const char* _node_name;
  8. const char* _build_date;
  9. char _version_info[32];
  10. void renderCurrScreen();
  11. public:
  12. UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; }
  13. void begin(const char* node_name, const char* build_date, const char* firmware_version);
  14. void loop();
  15. };