@@ -1498,7 +1498,11 @@ void display_show_image(uint8_t *image_buffer, int data_size, bool bWait)
14981498 int y = (height - pBBB->height )/2 ;
14991499 if (x > 0 || y > 0 ) // only clear if the image is smaller than the display
15001500 {
1501+ #ifdef BB_EPAPER
1502+ if (!bbep.getBuffer ()) {
1503+ #else
15011504 if (!bbep.currentBuffer ()) {
1505+ #endif
15021506 Log_error (" [DISPLAY-FAIL] TAG: embedded-logo - FATAL: pCurrent is NULL before fillScreen!" );
15031507 return ;
15041508 }
@@ -1521,6 +1525,7 @@ void display_show_image(uint8_t *image_buffer, int data_size, bool bWait)
15211525 image_buffer[4 ], image_buffer[5 ], image_buffer[6 ], image_buffer[7 ]);
15221526 Log_info (" Color params: FG=BBEP_WHITE(%d), BG=BBEP_BLACK(%d)" , BBEP_WHITE, BBEP_BLACK);
15231527
1528+ #ifdef BOARD_LILYGO_T5S3_PRO
15241529 uint8_t *buf = bbep.currentBuffer ();
15251530 // Calculate buffer offset for draw position (x,y) with 180° rotation
15261531 // Using same calculation as bbepSetPixelFast16Clr_180
@@ -1537,6 +1542,7 @@ void display_show_image(uint8_t *image_buffer, int data_size, bool bWait)
15371542 buf[offset+4 ], buf[offset+5 ], buf[offset+6 ], buf[offset+7 ],
15381543 buf[offset+8 ], buf[offset+9 ], buf[offset+10 ], buf[offset+11 ],
15391544 buf[offset+12 ], buf[offset+13 ], buf[offset+14 ], buf[offset+15 ]);
1545+ #endif
15401546
15411547 // Use 4-bit pixel values for T5S3 Pro (4BPP mode), symbolic constants for others (1BPP mode)
15421548#ifdef BOARD_LILYGO_T5S3_PRO
@@ -1547,13 +1553,15 @@ void display_show_image(uint8_t *image_buffer, int data_size, bool bWait)
15471553#endif
15481554 Log_info (" loadG5Image() returned: %d" , rc);
15491555
1556+ #ifdef BOARD_LILYGO_T5S3_PRO
15501557 // DIAGNOSTIC: Check buffer after loadG5Image
15511558 Log_info (" Buffer AFTER loadG5Image (at offset %d): %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X" ,
15521559 offset,
15531560 buf[offset+0 ], buf[offset+1 ], buf[offset+2 ], buf[offset+3 ],
15541561 buf[offset+4 ], buf[offset+5 ], buf[offset+6 ], buf[offset+7 ],
15551562 buf[offset+8 ], buf[offset+9 ], buf[offset+10 ], buf[offset+11 ],
15561563 buf[offset+12 ], buf[offset+13 ], buf[offset+14 ], buf[offset+15 ]);
1564+ #endif
15571565 }
15581566 else
15591567 {
0 commit comments