Skip to content

Commit

Permalink
Add init dsplay before full refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
norbert-walter committed Sep 13, 2024
1 parent 688c123 commit 393f713
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/obp60task/obp60task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,15 @@ void OBP60Task(GwApi *api){
if(millis() > starttime4 + 4000 && delayedDisplayUpdate == true){
starttime1 = millis();
starttime2 = millis();
getdisplay().init(115200); // Display init
getdisplay().setFullWindow(); // Set full update
getdisplay().firstPage();
if(fastrefresh == "false"){
getdisplay().fillScreen(pixelcolor);// Clear display
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(bgcolor); // Clear display
getdisplay().nextPage(); // Full update
}
getdisplay().nextPage(); // Full update
delayedDisplayUpdate = false;
}

Expand All @@ -562,26 +564,30 @@ void OBP60Task(GwApi *api){
starttime1 = millis();
starttime2 = millis();
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh first 5 min");
getdisplay().init(115200); // Display init
getdisplay().setFullWindow(); // Set full update
getdisplay().firstPage();
if(fastrefresh == "false"){
getdisplay().fillScreen(pixelcolor);// Clear display
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(bgcolor); // Clear display
getdisplay().nextPage(); // Full update
}
getdisplay().nextPage(); // Full update
}

// Subtask E-Ink full refresh
if(millis() > starttime2 + fullrefreshtime * 60 * 1000){
starttime2 = millis();
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh");
getdisplay().init(115200); // Display init
getdisplay().setFullWindow(); // Set full update
getdisplay().firstPage();
if(fastrefresh == "false"){
getdisplay().fillScreen(pixelcolor);// Clear display
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(bgcolor); // Clear display
getdisplay().nextPage(); // Full update
}
getdisplay().nextPage(); // Full update
}

// Refresh display data all 1s
Expand Down

0 comments on commit 393f713

Please sign in to comment.