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.
 
 
 

28 lignes
526 B

  1. #include "core/display.h"
  2. #include "epaper/EPD.h"
  3. #include "PagePrinter.h"
  4. #include "esp_log.h"
  5. static const char *TAG = "PagePrinter";
  6. //int pageFont = DEFAULT_FONT;
  7. int pageFont = DEJAVU18_FONT;
  8. PagePrinter::PagePrinter()
  9. {}
  10. void PagePrinter::print(Page* page)
  11. {
  12. if (page->text == NULL) {
  13. ESP_LOGE(TAG, "Page text is NULL");
  14. return;
  15. }
  16. if (page->len == 0) {
  17. return;
  18. }
  19. EPD_setFont(pageFont, NULL);
  20. text_wrap = 1;
  21. EPD_print(page->text, 0, 0);
  22. //EPD_UpdateScreen();
  23. }