Test program for OBP60 with modyfied display update (slow and duble update )
This commit is contained in:
parent
ff02bfecb0
commit
e27de07af1
|
@ -40,7 +40,7 @@ GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> display(GxEPD2_4
|
||||||
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay(){return display;}
|
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay(){return display;}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_GYE042A8
|
#ifdef DISPLAY_GYE042A87
|
||||||
// Set display type and SPI pins for display
|
// Set display type and SPI pins for display
|
||||||
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> display(GxEPD2_420_GYE042A87(OBP_SPI_CS, OBP_SPI_DC, OBP_SPI_RST, OBP_SPI_BUSY)); // GDEW042T2 400x300, UC8176 (IL0398)
|
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> display(GxEPD2_420_GYE042A87(OBP_SPI_CS, OBP_SPI_DC, OBP_SPI_RST, OBP_SPI_BUSY)); // GDEW042T2 400x300, UC8176 (IL0398)
|
||||||
// Export display in new funktion
|
// Export display in new funktion
|
||||||
|
|
|
@ -27,7 +27,7 @@ GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> & getdisplay();
|
||||||
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay();
|
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_GYE042A8
|
#ifdef DISPLAY_GYE042A87
|
||||||
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> & getdisplay();
|
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> & getdisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#define OBP_SPI_CLK 38
|
#define OBP_SPI_CLK 38
|
||||||
#define OBP_SPI_DIN 48
|
#define OBP_SPI_DIN 48
|
||||||
#define SHOW_TIME 6000 // Show time in [ms] for logo and WiFi QR code
|
#define SHOW_TIME 6000 // Show time in [ms] for logo and WiFi QR code
|
||||||
|
#define FAST_FULL_UPDATE false// Enable fast full update for e-paper display GDEY042T81
|
||||||
#define FULL_REFRESH_TIME 600 // Refresh cycle time in [s][600...3600] for full display update (very important healcy function)
|
#define FULL_REFRESH_TIME 600 // Refresh cycle time in [s][600...3600] for full display update (very important healcy function)
|
||||||
#define MAX_PAGE_NUMBER 10 // Max number of pages for show data
|
#define MAX_PAGE_NUMBER 10 // Max number of pages for show data
|
||||||
#define FONT1 "Ubuntu_Bold8pt7b"
|
#define FONT1 "Ubuntu_Bold8pt7b"
|
||||||
|
|
|
@ -262,7 +262,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update display
|
// Update display
|
||||||
getdisplay().nextPage(); // Partial update (fast)
|
while(getdisplay().nextPage()); // Partial update (fast)
|
||||||
|
while(getdisplay().nextPage()); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -387,7 +387,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update display
|
// Update display
|
||||||
getdisplay().nextPage(); // Partial update (fast)
|
while(getdisplay().nextPage()); // Partial update (fast)
|
||||||
|
while(getdisplay().nextPage()); // Partial update (fast)
|
||||||
|
while(getdisplay().nextPage()); // Partial update (fast)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,13 @@ void OBP60Init(GwApi *api){
|
||||||
|
|
||||||
// Init hardware
|
// Init hardware
|
||||||
hardwareInit();
|
hardwareInit();
|
||||||
// static const bool useFastFullUpdate = true; // For high speed full update e-paper
|
|
||||||
static const bool useFastFullUpdate = false; // For normal speed full update e-paper
|
#ifdef DISPLAY_GDEY042T81
|
||||||
|
if(FAST_FULL_UPDATE == true){
|
||||||
|
static const bool useFastFullUpdate = true; // Enable fast full display update only for GDEY042T81
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
setCpuFrequencyMhz(80);
|
setCpuFrequencyMhz(80);
|
||||||
int freq = getCpuFrequencyMhz();
|
int freq = getCpuFrequencyMhz();
|
||||||
|
@ -535,9 +540,11 @@ void OBP60Task(GwApi *api){
|
||||||
// Full display update afer a new selected page and 4s wait time
|
// Full display update afer a new selected page and 4s wait time
|
||||||
if(millis() > starttime4 + 4000 && delayedDisplayUpdate == true){
|
if(millis() > starttime4 + 4000 && delayedDisplayUpdate == true){
|
||||||
getdisplay().setFullWindow(); // Set full update
|
getdisplay().setFullWindow(); // Set full update
|
||||||
getdisplay().fillScreen(pixelcolor);// Clear display
|
if(FAST_FULL_UPDATE == false){
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().fillScreen(pixelcolor);// Clear display
|
||||||
getdisplay().fillScreen(bgcolor);// Clear display
|
getdisplay().nextPage(); // Full update
|
||||||
|
getdisplay().fillScreen(bgcolor); // Clear display
|
||||||
|
}
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().nextPage(); // Full update
|
||||||
delayedDisplayUpdate = false;
|
delayedDisplayUpdate = false;
|
||||||
}
|
}
|
||||||
|
@ -548,9 +555,11 @@ void OBP60Task(GwApi *api){
|
||||||
starttime1 = millis();
|
starttime1 = millis();
|
||||||
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh first 5 min");
|
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh first 5 min");
|
||||||
getdisplay().setFullWindow(); // Set full update
|
getdisplay().setFullWindow(); // Set full update
|
||||||
getdisplay().fillScreen(pixelcolor);// Clear display
|
if(FAST_FULL_UPDATE == false){
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().fillScreen(pixelcolor);// Clear display
|
||||||
getdisplay().fillScreen(bgcolor);// Clear display
|
getdisplay().nextPage(); // Full update
|
||||||
|
getdisplay().fillScreen(bgcolor); // Clear display
|
||||||
|
}
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().nextPage(); // Full update
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,10 +569,11 @@ void OBP60Task(GwApi *api){
|
||||||
starttime2 = millis();
|
starttime2 = millis();
|
||||||
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh");
|
LOG_DEBUG(GwLog::DEBUG,"E-Ink full refresh");
|
||||||
getdisplay().setFullWindow(); // Set full update
|
getdisplay().setFullWindow(); // Set full update
|
||||||
getdisplay().setFullWindow(); // Set full update
|
if(FAST_FULL_UPDATE == false){
|
||||||
getdisplay().fillScreen(pixelcolor);// Clear display
|
getdisplay().fillScreen(pixelcolor);// Clear display
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().nextPage(); // Full update
|
||||||
getdisplay().fillScreen(bgcolor);// Clear display
|
getdisplay().fillScreen(bgcolor); // Clear display
|
||||||
|
}
|
||||||
getdisplay().nextPage(); // Full update
|
getdisplay().nextPage(); // Full update
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ build_flags=
|
||||||
-D BOARD_OBP60S3
|
-D BOARD_OBP60S3
|
||||||
# -D DISPLAY_GDEW042T2 #old E-Ink display from Waveshare, R10 0.47 ohm
|
# -D DISPLAY_GDEW042T2 #old E-Ink display from Waveshare, R10 0.47 ohm
|
||||||
-D DISPLAY_GDEY042T81 #new E-Ink display from Waveshare, R10 2.2 ohm
|
-D DISPLAY_GDEY042T81 #new E-Ink display from Waveshare, R10 2.2 ohm
|
||||||
# -D DISPLAY_GYE042A8 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm
|
# -D DISPLAY_GYE042A87 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm
|
||||||
# -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm
|
# -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
#CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default
|
#CONFIG_ESP_TASK_WDT_TIMEOUT_S = 10 #Task Watchdog timeout period (seconds) [1...60] 5 default
|
||||||
|
|
Loading…
Reference in New Issue