Hi,
First of all Many thanks for Jean-Marc Zing for your great job.
I'm using an ESP32 NodeMCU Development Board with a Waveshare E-Paper [ 1448 x 1072 hd, 6inch E-Ink with e-Paper IT8951 Driver HAT (B)].
As a Library I am using the Library GxEPD2_it60_1448x1072.cpp
written by Jean-Marc Zing.
The Problem is when I am using the partial update the displayed data are overlapped. I have tried to use the function: void GxEPD2_it60_1448x1072::refresh(int16_t x, int16_t y, int16_t w, int16_t h)
and the function: void GxEPD2_it60_1448x1072::refresh(bool partial_update_mode)
in separate tests but unfortunately the overlapping occurred in both tests.
Here is the function I am using to write the display:
void reportReaderError(int readerNumber){
uint16_t box_x =0;
uint16_t box_y =0;
//set x and y
switch(readerNumber)
{
case 0: box_x = R1_X_POS, box_y = R1_y_POS;break;
case 1: box_x = R2_X_POS, box_y = R2_y_POS;break;
case 2: box_x = R3_X_POS, box_y = R3_y_POS;break;
case 3: box_x = R4_X_POS, box_y = R4_y_POS;break;
case 4: box_x = R5_X_POS, box_y = R5_y_POS;break;
case 5: box_x = R6_X_POS, box_y = R6_y_POS;break;
case 6: box_x = R7_X_POS, box_y = R7_y_POS;break;
case 7: box_x = R8_X_POS, box_y = R8_y_POS;break;
}
//set box position
uint16_t firstLinPos= box_y+30;
uint16_t secondLinePos = firstLinPos +55;
uint16_t thirdLinePos = secondLinePos + 30;
uint16_t fourthLinePos = thirdLinePos +30;
//set rotation
display.setRotation(1);
//set text color
display.setTextColor(GxEPD_WHITE);
//set partial window
display.setPartialWindow(box_x, box_y, box_w, box_h);
//write the box
display.firstPage();
do{
display.fillRect(box_x, box_y, box_w, box_h, GxEPD_BLACK);
display.drawRect(box_x, box_y, box_w, box_h, GxEPD_BLACK);
display.setCursor(box_x, firstLinPos);
display.setFont(&FreeSansBold24pt7b);
display.print("Reader off!");
display.setCursor(box_x, secondLinePos);
display.setFont(&FreeSansBold24pt7b);
display.print("Check Cable!");
display.setCursor(box_x, thirdLinePos);
display.setFont(&FreeSansBold24pt7b);
display.print("");
display.setCursor(box_x, fourthLinePos);
display.setFont(&FreeSansBold24pt7b);
display.print("");
}
while(display.nextPage());
display.refresh(true);
// display.refresh(box_x, box_y, box_w, box_h);
}
I would be thankful for any advice.