Using the GxEPD2 library and working on an ESP32S3:
I am working with a GDEY042T81
e-ink display from Good Display
I am trying to render a timestamp on an existing content on the display. This timestamp only takes a very tiny rectangle of space on the display. Therefore I am using the display.setPartialWindow(x, y, w, h)
method for doing so.
My application requires that I am able to add this partial-content:
a) after some main content is shown on the entire e-ink display
b) after a reset (keeping whatever is shown on the e-ink display and only adding the partial-content to whatever is there on the display after coming from reset)
a) I achieved without issues. But b) does not work. I tried during 6 hours today to make b) work ! But unfortunately without success
I had to realize that, for some unknown reason, the partial window render does only work if I do a setFullWindow()
drawing in the first place.
Can anybody explain how I can add partial content coming from reset withtout having to execute a fullWindow-render before ??
Here is my partial-content adding code :
display.setRotation(0);
display.setPartialWindow(EPD_WIDTH - 85, 0, 85, 22);
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(EPD_WIDTH - 82, 20);
u8g2Fonts.print(timeHoursStr + ":" + timeMinutesStr + ":" + timeSecondsStr);
} while(display.nextPage());
There is no effect if I do this coming from Reset. Or even worse, in some cases the e-ink display eliminates whatever is there in the non-partial-regions ! I really don't understand this weird behaviour.
However the above code perfectly works if I do the following before :
If I render a display.setFullWindow()
beforehand, then the parial-display render works !!!
Here is the code for this:
display.setRotation(0);
display.setFullWindow();
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(EPD_WIDTH / 2 - 112, EPD_HEIGHT / 2);
u8g2Fonts.print("Test - Welcome");
} while (display.nextPage());
The main problem is that the fullWindow render overwrites what is on the display coming from Reset. And I don't want to do this.
What I need is to being able to partially render a region of interest on the display without having to first render the entire display after coming from reset.
How can I do this ?