diff --git a/lib/obp60task/PageWindRose.cpp b/lib/obp60task/PageWindRose.cpp index 397ce70..1e2d113 100644 --- a/lib/obp60task/PageWindRose.cpp +++ b/lib/obp60task/PageWindRose.cpp @@ -370,6 +370,6 @@ PageDescription registerPageWindRose( "WindRose", // Page name createPage, // Action 0, // Number of bus values depends on selection in Web configuration - {"AWA","AWS", "TWD", "TWS"}, // Bus values we need in the page + {"AWA", "AWS", "TWD", "TWS"}, // Bus values we need in the page true // Show display header on/off ); \ No newline at end of file diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index 74e9662..abf8759 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -430,12 +430,13 @@ void OBP60Task(GwApi *api){ LOG_DEBUG(GwLog::LOG,"obp60task: start mainloop"); int pageNumber=0; int lastPage=pageNumber; + bool delayedDisplayUpdate = false; // If select a new pages then make a delayed full display update long firststart = millis(); // First start long starttime0 = millis(); // Mainloop long starttime1 = millis(); // Full display refresh for the first 5 min (more often as normal) long starttime2 = millis(); // Full display refresh after 5 min long starttime3 = millis(); // Display update all 1s - + long starttime4 = millis(); // Delayed display update after 5s when select a new page while (true){ Timer1.update(); // Update for Timer1 @@ -499,11 +500,22 @@ void OBP60Task(GwApi *api){ display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, GxEPD_WHITE); // Draw white sreen display.updateWindow(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, true); // Needs partial update before full update to refresh the frame buffer display.update(); // Full update + } + // #9 or #10 Refresh display after a new page after 5s waiting time and if refresh is disabled + if(refreshmode == false && (keyboardMessage == 9 || keyboardMessage == 10)){ + starttime4 = millis(); + delayedDisplayUpdate = true; } } LOG_DEBUG(GwLog::LOG,"set pagenumber to %d",pageNumber); } + // Full display update afer a new selected page and 5s wait time + if(millis() > starttime4 + 5000 && delayedDisplayUpdate == true){ + display.update(); // Full update + delayedDisplayUpdate = false; + } + // Subtask E-Ink full refresh all 1 min for the first 5min after power on or restart // This needs for a better display contrast after power on in cold or warm environments if(millis() < firststart + (5 * 60 * 1000) && millis() > starttime1 + (60 * 1000)){