1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 23:13:07 +01:00

Merge branch 'norbert-walter:master' into PageWindPlot

This commit is contained in:
Scorgan01
2025-07-25 08:19:24 +02:00
committed by GitHub
37 changed files with 501 additions and 175 deletions

View File

@@ -423,7 +423,7 @@ void OBP60Task(GwApi *api){
#endif
#ifdef DISPLAY_GDEY042T81
getdisplay().init(115200, true, 2, false); // Use this for Waveshare boards with "clever" reset circuit, 2ms reset pulse
getdisplay().init(115200, true, 2, false); // Init for Waveshare boards with "clever" reset circuit, 2ms reset pulse
#else
getdisplay().init(115200); // Init for normal displays
#endif
@@ -713,7 +713,7 @@ void OBP60Task(GwApi *api){
}
// #9 or #10 Refresh display after a new page after 4s waiting time and if refresh is disabled
if(refreshmode == true && (keyboardMessage == 9 || keyboardMessage == 10)){
if(refreshmode == true && (keyboardMessage == 9 || keyboardMessage == 10 || keyboardMessage == 4 || keyboardMessage == 3)){
starttime4 = millis();
starttime2 = millis(); // Reset the timer for full display update
delayedDisplayUpdate = true;
@@ -749,12 +749,22 @@ void OBP60Task(GwApi *api){
starttime1 = millis();
starttime2 = millis();
getdisplay().setFullWindow(); // Set full update
getdisplay().nextPage();
if(fastrefresh == "false"){
if(fastrefresh == "true"){
getdisplay().nextPage(); // Full update
}
else{
getdisplay().fillScreen(commonData.fgcolor); // Clear display
#ifdef DISPLAY_GDEY042T81
getdisplay().init(115200, true, 2, false); // Init for Waveshare boards with "clever" reset circuit, 2ms reset pulse
#else
getdisplay().init(115200); // Init for normal displays
#endif
getdisplay().firstPage(); // Full update
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(commonData.bgcolor); // Clear display
getdisplay().nextPage(); // Full update
// getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update
// getdisplay().fillScreen(commonData.bgcolor); // Clear display
// getdisplay().nextPage(); // Partial update
// getdisplay().nextPage(); // Partial update
}
delayedDisplayUpdate = false;
}
@@ -766,12 +776,22 @@ void OBP60Task(GwApi *api){
starttime2 = millis();
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh first 5 min");
getdisplay().setFullWindow(); // Set full update
getdisplay().nextPage();
if(fastrefresh == "false"){
if(fastrefresh == "true"){
getdisplay().nextPage(); // Full update
}
else{
getdisplay().fillScreen(commonData.fgcolor); // Clear display
#ifdef DISPLAY_GDEY042T81
getdisplay().init(115200, true, 2, false); // Init for Waveshare boards with "clever" reset circuit, 2ms reset pulse
#else
getdisplay().init(115200); // Init for normal displays
#endif
getdisplay().firstPage(); // Full update
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(commonData.bgcolor); // Clear display
getdisplay().nextPage(); // Full update
// getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update
// getdisplay().fillScreen(commonData.bgcolor); // Clear display
// getdisplay().nextPage(); // Partial update
// getdisplay().nextPage(); // Partial update
}
}
@@ -780,12 +800,22 @@ void OBP60Task(GwApi *api){
starttime2 = millis();
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh");
getdisplay().setFullWindow(); // Set full update
getdisplay().nextPage();
if(fastrefresh == "false"){
if(fastrefresh == "true"){
getdisplay().nextPage(); // Full update
}
else{
getdisplay().fillScreen(commonData.fgcolor); // Clear display
#ifdef DISPLAY_GDEY042T81
getdisplay().init(115200, true, 2, false); // Init for Waveshare boards with "clever" reset circuit, 2ms reset pulse
#else
getdisplay().init(115200); // Init for normal displays
#endif
getdisplay().firstPage(); // Full update
getdisplay().nextPage(); // Full update
getdisplay().fillScreen(commonData.bgcolor); // Clear display
getdisplay().nextPage(); // Full update
// getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update
// getdisplay().fillScreen(commonData.bgcolor); // Clear display
// getdisplay().nextPage(); // Partial update
// getdisplay().nextPage(); // Partial update
}
}
@@ -846,7 +876,16 @@ void OBP60Task(GwApi *api){
if (pages[pageNumber].description && pages[pageNumber].description->header){
displayFooter(commonData);
}
currentPage->displayPage(pages[pageNumber].parameters);
int ret = currentPage->displayPage(pages[pageNumber].parameters);
if (commonData.alarm.active) {
displayAlarm(commonData);
}
if (ret & PAGE_UPDATE) {
getdisplay().nextPage(); // Partial update (fast)
}
if (ret & PAGE_HIBERNATE) {
getdisplay().hibernate();
}
}
}