Skip to content

Commit dfaf6c7

Browse files
committed
Implenmented EPD_Painter clearDirtyAreas
1 parent 168308d commit dfaf6c7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

boards/lilygo-t5-epaper-s3-pro/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ lib_deps =
6969
; epdiy intentionally disabled here in favor of EPD_Painter.
7070
;https://github.com/bmorcelli/epdiy
7171
;symlink://C:/Projetos/EPD_Painter
72-
https://github.com/bmorcelli/EPD_Painter
72+
https://github.com/tonywestonuk/EPD_Painter
7373

7474
lib_ignore =
7575
GFX Library for Arduino

src/tft.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef __TFT_H
22
#define __TFT_H
33
#if defined(USE_EPD_PAINTER)
4-
#define EPD_PAINTER_ENABLE_AUTO_SHUTDOWN 0
54
// #define EPD_PAINTER_PRESET_LILYGO_T5_S3_H752
65
// #define EPD_PAINTER_PRESET_LILYGO_T5_S3_GPS
76
#include <EPD_Painter_presets.h>
@@ -33,6 +32,7 @@ class Ard_eSPI : public EPD_PainterAdafruit {
3332
_textsize = 1;
3433
_textcolor = BLACK;
3534
_textbgcolor = WHITE;
35+
EPD_PainterAdafruit::setAutoShutdown(false);
3636
bool r = EPD_PainterAdafruit::begin();
3737
EPD_PainterAdafruit::setQuality(EPD_Painter::Quality::QUALITY_HIGH);
3838
EPD_PainterAdafruit::clear();
@@ -43,6 +43,7 @@ class Ard_eSPI : public EPD_PainterAdafruit {
4343
inline void display(bool a = false) {
4444
(void)a;
4545
if (xHandle != nullptr) vTaskSuspend(xHandle);
46+
clearDirtyAreas(10);
4647
paint();
4748
if (xHandle != nullptr) vTaskResume(xHandle);
4849
}

0 commit comments

Comments
 (0)