Skip to content

Commit 777a88f

Browse files
committed
Add supported for inverted display
1 parent 5b47b27 commit 777a88f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Firmware/RTK_Everywhere/Display.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ void beginDisplay(TwoWire *i2cBus)
165165
oled->setPreCharge(0xF1); // Set Pre-charge Period (D9h)
166166
oled->setVcomDeselect(0x40); // Set VCOMH Deselect Level (DBh)
167167
oled->setContrast(0xCF); // Set Contrast Control for BANK0 (81h)
168-
169-
if (present.display_type == DISPLAY_128x64_INVERTED)
170-
{
171-
oled->flipVertical(true);
172-
oled->flipHorizontal(true);
173-
}
174168
}
175169

176170
// Display may still be powering up
@@ -184,6 +178,12 @@ void beginDisplay(TwoWire *i2cBus)
184178

185179
systemPrintln("Display started");
186180

181+
if (present.display_type == DISPLAY_128x64_INVERTED)
182+
{
183+
oled->flipVertical(true);
184+
oled->flipHorizontal(true);
185+
}
186+
187187
// Display the brand LOGO
188188
RTKBrandAttribute *brandAttribute = getBrandAttributeFromBrand(present.brand);
189189
oled->erase();

0 commit comments

Comments
 (0)