epaper slow data after partial refresh
Posted: Sat Dec 02, 2023 11:22 am
Hi everyone, I have a problem, with an esp32 wroom in which the code works perfectly with an oled, when I switch to a 2.9" epaper screen and I refresh the parts where I have the data fields that change continuously, I find myself with the data is very slow, if I leave only one string (any) everything resumes normal speed.
Can everything be compacted for speed?
Thank you.
T.
Can everything be compacted for speed?
Thank you.
T.
Code: Select all
display.setPartialWindow(100, 4, 110, 28); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor( 100, 32);
if (vario > 0)
u8g2Fonts.print(F("+"));
u8g2Fonts.print(vario, 1); //vario
} while (display.nextPage());
display.setPartialWindow(100, 75, 110, 28); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(100, 101);
u8g2Fonts.print(gps.altitude.meters(), 0); //altitude
} while (display.nextPage());
display.setPartialWindow(4, 4, 82, 28); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setFont(u8g2_font_luBIS19_tr);
u8g2Fonts.setCursor(4, 32);
u8g2Fonts.print(gps.speed.kmph(), 0); //speed
} while (display.nextPage());
display.setPartialWindow(4, 55, 78, 25); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setFont(u8g2_font_luBIS19_tr);
u8g2Fonts.setCursor(4, 78);
u8g2Fonts.print(gps.course.deg(), 0);
} while (display.nextPage());
u8g2Fonts.setFont(u8g2_font_luIS08_tf);
display.setPartialWindow(108, 50, 90, 10); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(108, 60);
u8g2Fonts.print("TIME ");
u8g2Fonts.print(gps.time.hour());
u8g2Fonts.print(" : ");
u8g2Fonts.print(gps.time.minute());
} while (display.nextPage());
display.setPartialWindow(2, 95, 90, 8); //(X, Y, width, eight)
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(4, 101);
u8g2Fonts.print(volts, 1); //volts
u8g2Fonts.print(" # 3.1 = low");
} while (display.nextPage());
u8g2Fonts.setFont(u8g2_font_luBIS24_tr);
}