Version for GDEY042T81
This commit is contained in:
parent
8c73a8739f
commit
8eb4bab9d7
|
@ -25,10 +25,34 @@
|
||||||
// E-Ink Display
|
// E-Ink Display
|
||||||
#define GxEPD_WIDTH 400 // Display width
|
#define GxEPD_WIDTH 400 // Display width
|
||||||
#define GxEPD_HEIGHT 300 // Display height
|
#define GxEPD_HEIGHT 300 // Display height
|
||||||
|
|
||||||
|
#ifdef DISPLAY_GDEW042T2
|
||||||
// Set display type and SPI pins for display
|
// Set display type and SPI pins for display
|
||||||
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(OBP_SPI_CS, OBP_SPI_DC, OBP_SPI_RST, OBP_SPI_BUSY)); // GDEW042T2 400x300, UC8176 (IL0398)
|
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(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
|
||||||
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> & getdisplay(){return display;}
|
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> & getdisplay(){return display;}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_GDEY042T81
|
||||||
|
// Set display type and SPI pins for display
|
||||||
|
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> display(GxEPD2_420_GDEY042T81(OBP_SPI_CS, OBP_SPI_DC, OBP_SPI_RST, OBP_SPI_BUSY)); // GDEW042T2 400x300, UC8176 (IL0398)
|
||||||
|
// Export display in new funktion
|
||||||
|
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay(){return display;}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_GYE042A8
|
||||||
|
// 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)
|
||||||
|
// Export display in new funktion
|
||||||
|
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> & getdisplay(){return display;}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_SE0420NQ04
|
||||||
|
// Set display type and SPI pins for display
|
||||||
|
GxEPD2_BW<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> display(GxEPD2_420_SE0420NQ04(OBP_SPI_CS, OBP_SPI_DC, OBP_SPI_RST, OBP_SPI_BUSY)); // GDEW042T2 400x300, UC8176 (IL0398)
|
||||||
|
// Export display in new funktion
|
||||||
|
GxEPD2_BW<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> & getdisplay(){return display;}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Horter I2C moduls
|
// Horter I2C moduls
|
||||||
PCF8574 pcf8574_Out(PCF8574_I2C_ADDR1); // First digital output modul PCF8574 from Horter
|
PCF8574 pcf8574_Out(PCF8574_I2C_ADDR1); // First digital output modul PCF8574 from Horter
|
||||||
|
|
|
@ -19,7 +19,21 @@ extern const GFXfont DSEG7Classic_BoldItalic42pt7b;
|
||||||
extern const GFXfont DSEG7Classic_BoldItalic60pt7b;
|
extern const GFXfont DSEG7Classic_BoldItalic60pt7b;
|
||||||
|
|
||||||
// Gloabl functions
|
// Gloabl functions
|
||||||
|
#ifdef DISPLAY_GDEW042T2
|
||||||
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> & getdisplay();
|
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> & getdisplay();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_GDEY042T81
|
||||||
|
GxEPD2_BW<GxEPD2_420_GDEY042T81, GxEPD2_420_GDEY042T81::HEIGHT> & getdisplay();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_GYE042A8
|
||||||
|
GxEPD2_BW<GxEPD2_420_GYE042A87, GxEPD2_420_GYE042A87::HEIGHT> & getdisplay();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISPLAY_SE0420NQ04
|
||||||
|
GxEPD2_BW<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> & getdisplay();
|
||||||
|
#endif
|
||||||
|
|
||||||
void hardwareInit();
|
void hardwareInit();
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,8 @@ void OBP60Task(GwApi *api){
|
||||||
int pixelcolor = GxEPD_BLACK;
|
int pixelcolor = GxEPD_BLACK;
|
||||||
int bgcolor = GxEPD_WHITE;
|
int bgcolor = GxEPD_WHITE;
|
||||||
|
|
||||||
getdisplay().init(115200, true, 2, false); // Use this for Waveshare boards with "clever" reset circuit, 2ms reset pulse
|
getdisplay().init(115200); // Init for nolrmal displays
|
||||||
|
// getdisplay().init(115200, true, 2, false); // Use this for Waveshare boards with "clever" reset circuit, 2ms reset pulse
|
||||||
getdisplay().setRotation(0); // Set display orientation (horizontal)
|
getdisplay().setRotation(0); // Set display orientation (horizontal)
|
||||||
if(displaycolor == "Normal"){
|
if(displaycolor == "Normal"){
|
||||||
textcolor = GxEPD_BLACK;
|
textcolor = GxEPD_BLACK;
|
||||||
|
@ -262,18 +263,26 @@ void OBP60Task(GwApi *api){
|
||||||
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
||||||
getdisplay().setTextColor(textcolor); // Set display color
|
getdisplay().setTextColor(textcolor); // Set display color
|
||||||
getdisplay().nextPage(); // Full Refresh
|
getdisplay().nextPage(); // Full Refresh
|
||||||
|
getdisplay().setPartialWindow(0, 0, getdisplay().width(), getdisplay().height()); // Set partial update
|
||||||
if(String(displaymode) == "Logo + QR Code" || String(displaymode) == "Logo"){
|
|
||||||
getdisplay().drawBitmap(0, 0, gImage_Logo_OBP_400x300_sw, getdisplay().width(), getdisplay().height(), pixelcolor); // Draw start logo
|
|
||||||
getdisplay().nextPage(); // Full Refresh
|
|
||||||
delay(SHOW_TIME); // Logo show time
|
|
||||||
getdisplay().nextPage(); // Full Refresh
|
|
||||||
if(String(displaymode) == "Logo + QR Code"){
|
|
||||||
qrWiFi(systemname, wifipass, displaycolor); // Show QR code for WiFi connection
|
|
||||||
delay(SHOW_TIME); // QR code show time
|
|
||||||
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
||||||
getdisplay().nextPage(); // Full Refresh
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
if(String(displaymode) == "Logo + QR Code" || String(displaymode) == "Logo"){
|
||||||
|
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
||||||
|
getdisplay().drawBitmap(0, 0, gImage_Logo_OBP_400x300_sw, getdisplay().width(), getdisplay().height(), pixelcolor); // Draw start logo
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
delay(SHOW_TIME); // Logo show time
|
||||||
|
if(String(displaymode) == "Logo + QR Code"){
|
||||||
|
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
||||||
|
qrWiFi(systemname, wifipass, displaycolor); // Show QR code for WiFi connection
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
delay(SHOW_TIME); // QR code show time
|
||||||
}
|
}
|
||||||
|
getdisplay().fillScreen(bgcolor); // Draw white sreen
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
|
getdisplay().nextPage(); // Fast Refresh
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init pages
|
// Init pages
|
||||||
|
|
|
@ -33,8 +33,8 @@ lib_deps =
|
||||||
build_flags=
|
build_flags=
|
||||||
-DTIME=$UNIX_TIME
|
-DTIME=$UNIX_TIME
|
||||||
-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_GYE042A8 #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}
|
||||||
|
|
Loading…
Reference in New Issue