Skip to content

Commit 4f9207f

Browse files
authored
Merge pull request #437 from jquatier/t114-display-flicker
Fix T114 display flicker
2 parents 727a044 + 3719c09 commit 4f9207f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/helpers/ui/ST7789Display.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,21 @@ bool ST7789Display::begin() {
3232
}
3333

3434
void ST7789Display::turnOn() {
35-
ST7789Display::begin();
35+
if (!_isOn) {
36+
// Restore power to the display but keep backlight off
37+
digitalWrite(PIN_TFT_VDD_CTL, LOW);
38+
digitalWrite(PIN_TFT_RST, HIGH);
39+
40+
// Re-initialize the display
41+
display.init();
42+
display.displayOn();
43+
delay(20);
44+
45+
// Now turn on the backlight
46+
digitalWrite(PIN_TFT_LEDA_CTL, LOW);
47+
48+
_isOn = true;
49+
}
3650
}
3751

3852
void ST7789Display::turnOff() {

0 commit comments

Comments
 (0)