mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 23:13:07 +01:00
Merge branch 'PageWindPlot' of https://github.com/Scorgan01/esp32-nmea2000-obp60 into PageWindPlot
This commit is contained in:
@@ -531,7 +531,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
|
||||
@@ -837,7 +837,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;
|
||||
@@ -873,12 +873,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;
|
||||
}
|
||||
@@ -890,12 +900,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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,12 +924,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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -975,7 +1005,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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user