@@ -44,12 +44,12 @@ using FnCreateDispDrvTft = std::function<dispDrvBase *(
4444// NOTE: When you add a new SPI TFT display driver, make sure to add it to the
4545// factory!
4646static const std::map<std::string, FnCreateDispDrvTft> FactoryDrvDispTft = {
47- {" st7735 " ,
47+ {" tft-154-wide-angle " ,
4848 [](int16_t cs, int16_t dc, int16_t mosi, int16_t sck, int16_t rst,
4949 int16_t miso) -> dispDrvBase * {
5050 return new dispDrvSt7789 (cs, dc, mosi, sck, rst, miso);
5151 }},
52- {" st7789 " ,
52+ {" tft-154-wide-angle " ,
5353 [](int16_t cs, int16_t dc, int16_t mosi, int16_t sck, int16_t rst,
5454 int16_t miso) -> dispDrvBase * {
5555 return new dispDrvSt7789 (cs, dc, mosi, sck, rst, miso);
@@ -344,12 +344,31 @@ bool DisplayHardware::beginTft(
344344 }
345345
346346 // Create display driver object using the factory function
347+ WS_DEBUG_PRINTLN (" [display] Creating TFT display driver with pinout: " );
348+ WS_DEBUG_PRINT (" CS: D" ); WS_DEBUG_PRINTLN (cs);
349+ WS_DEBUG_PRINT (" DC: D" ); WS_DEBUG_PRINTLN (dc);
350+ WS_DEBUG_PRINT (" MOSI: D" );WS_DEBUG_PRINTLN (mosi);
351+ WS_DEBUG_PRINT (" SCK: D" ); WS_DEBUG_PRINTLN (sck);
352+ if (rst != -1 ) {
353+ WS_DEBUG_PRINT (" RST: D" ); WS_DEBUG_PRINTLN (rst);
354+ }
355+ if (miso != -1 ) {
356+ WS_DEBUG_PRINT (" MISO: D" ); WS_DEBUG_PRINTLN (miso);
357+ }
347358 _drvDisp = CreateDrvDispTft (_name, cs, dc, mosi, sck, rst, miso);
348359 if (!_drvDisp) {
349360 WS_DEBUG_PRINTLN (" [display] Failed to create display driver!" );
350361 return false ;
351362 }
352363
364+ // Print configuration
365+ WS_DEBUG_PRINTLN (" [display] Successfully created tft display driver!" );
366+ WS_DEBUG_PRINTLN (" [display] TFT configuration:" );
367+ WS_DEBUG_PRINT (" Width: " ); WS_DEBUG_PRINTLN (config->width );
368+ WS_DEBUG_PRINT (" Height: " );WS_DEBUG_PRINTLN (config->height );
369+ WS_DEBUG_PRINT (" Rotation: " );WS_DEBUG_PRINTLN (config->rotation );
370+ WS_DEBUG_PRINT (" Text Size: " );WS_DEBUG_PRINTLN (text_sz);
371+
353372 _drvDisp->setWidth (config->width );
354373 _drvDisp->setHeight (config->height );
355374 _drvDisp->setRotation (config->rotation );
0 commit comments