New E-Ink update function

This commit is contained in:
norbert-walter 2022-06-17 19:23:22 +02:00
parent e0505997c7
commit 3fc95f873e
1 changed files with 3 additions and 0 deletions

View File

@ -255,7 +255,9 @@ void OBP60Task(GwApi *api){
} }
display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, bgcolor); // Draw white sreen display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, bgcolor); // Draw white sreen
display.setTextColor(textcolor); // Set display color display.setTextColor(textcolor); // Set display color
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true);
display.update(); // Full update (slow) display.update(); // Full update (slow)
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true);
if(String(displaymode) == "Logo + QR Code" || String(displaymode) == "Logo"){ if(String(displaymode) == "Logo + QR Code" || String(displaymode) == "Logo"){
display.drawBitmap(gImage_Logo_OBP_400x300_sw, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, pixelcolor); // Draw start logo display.drawBitmap(gImage_Logo_OBP_400x300_sw, 0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, pixelcolor); // Draw start logo
@ -276,6 +278,7 @@ void OBP60Task(GwApi *api){
display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, bgcolor); // Draw white sreen display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, bgcolor); // Draw white sreen
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true); // Needs partial update before full update to refresh the frame buffer display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true); // Needs partial update before full update to refresh the frame buffer
display.update(); // Full update display.update(); // Full update
display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true);
} }
} }