File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,24 @@ void setup()
134134
135135 // Detect and fix the mirrored & inverted display
136136 // https://github.com/esp32-si4732/ats-mini/issues/41
137- if (tft.readcommand8 (ST7789_RDDID, 3 ) == 0x93 )
137+ uint8_t did3 = tft.readcommand8 (ST7789_RDDID, 3 );
138+ // 0x048181B3 - the original display
139+ // 0x04858552 - high gamma display
140+ // 0x00009307 - inverted & mirrored display
141+ if (did3 == 0x93 )
138142 {
139143 tft.invertDisplay (0 );
140144 tft.writecommand (TFT_MADCTL);
141145 tft.writedata (TFT_MAD_MV | TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_BGR);
142146 }
147+ else if (did3 == 0x85 )
148+ {
149+ tft.writecommand (0x26 ); // GAMSET
150+ tft.writedata (8 ); // Gamma Curve 3
151+
152+ tft.writecommand (0x55 ); // WRCACE (content adaptive brightness and color)
153+ tft.writedata (0xB1 ); // High enhancement, UI mode
154+ }
143155
144156 tft.fillScreen (TH.bg );
145157 spr.createSprite (320 , 170 );
Original file line number Diff line number Diff line change 1+ Adjust gamma for display ID 0x04858552 so the themes look closer to how they were designed (at least Orange now doesn't look like a lemon).
You can’t perform that action at this time.
0 commit comments