@@ -52,7 +52,9 @@ class dispDrvSt7789 : public dispDrvBase {
5252 delete _display;
5353 _display = nullptr ;
5454 }
55- // digitalWrite(TFT_BACKLIGHT, LOW);
55+ #if defined(ARDUINO_FUNHOUSE_ESP32S2)
56+ digitalWrite (TFT_BACKLIGHT, LOW);
57+ #endif
5658 }
5759
5860 /* !
@@ -68,13 +70,14 @@ class dispDrvSt7789 : public dispDrvBase {
6870 _display->init (_width, _height);
6971 _display->setRotation (_rotation);
7072 setTextSize (ST7789_TEXT_SZ_DEFAULT);
71- _display->fillScreen (ST77XX_WHITE );
73+ _display->fillScreen (ST77XX_BLACK );
7274 _display->setTextColor (ST77XX_WHITE);
7375
74- /* #ifdef TFT_BACKLIGHT
76+ #if defined(ARDUINO_FUNHOUSE_ESP32S2)
77+ // Turn backlight on
7578 pinMode (TFT_BACKLIGHT, OUTPUT);
76- digitalWrite(TFT_BACKLIGHT, HIGH); // Backlight on
77- #endif */
79+ digitalWrite (TFT_BACKLIGHT, HIGH);
80+ #endif
7881
7982 return true ;
8083 }
@@ -102,15 +105,15 @@ class dispDrvSt7789 : public dispDrvBase {
102105
103106 // Display the appropriate splash screen based on resolution
104107 if (_width == 240 && _height == 240 ) {
105- _display->drawBitmap (0 , 0 , tft_bmp_logo_240240, 240 , 240 , ST77XX_BLACK );
108+ _display->drawBitmap (0 , 0 , tft_bmp_logo_240240, 240 , 240 , ST77XX_WHITE );
106109 } else if (_width == 240 && _height == 135 ) {
107110 _display->drawBitmap (0 , 0 , tft_bmp_logo_240135, 240 , 135 , EPD_BLACK);
108111 } else {
109112 // Unsupported resolution
110113 return ;
111114 }
112115
113- delay (1500 ); // Pause for 1.5 seconds
116+ delay (1000 );
114117 }
115118
116119 /* !
@@ -141,10 +144,8 @@ class dispDrvSt7789 : public dispDrvBase {
141144 _display->fillScreen (ST77XX_BLACK);
142145
143146 // Draw status bar
144- // TODO: We are not drawing a border here because it isnt
145- // required on a color display, I think.
146147 _display->fillRect (0 , 0 , _display->width (), _status_bar_height,
147- ST77XX_BLACK );
148+ ST77XX_WHITE );
148149
149150 // Draw username on left side of the status bar
150151 _display->setTextSize (1 );
@@ -202,8 +203,11 @@ class dispDrvSt7789 : public dispDrvBase {
202203 if (_display == nullptr )
203204 return ;
204205
205- // Start with a fresh display buffer
206- _display->fillScreen (ST77XX_BLACK);
206+ _display->setTextColor (ST77XX_WHITE);
207+
208+ // Clear only the area below the status bar
209+ _display->fillRect (0 , _status_bar_height, _width,
210+ _height - _status_bar_height, ST77XX_BLACK);
207211 int16_t y_idx = _status_bar_height;
208212 _display->setCursor (0 , y_idx);
209213
0 commit comments