1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 13:41:23 +01:00

Handle display types correctly

This commit is contained in:
Neil McKechnie 2021-02-18 21:17:54 +00:00
parent 1ef22e0aea
commit 2cf17fa143

View File

@ -40,10 +40,10 @@ SSD1306AsciiWire LCDDriver;
const DevType *devType; const DevType *devType;
if (lcdCols == 132) if (lcdCols == 132)
devType = &SH1106_128x64; // Actually 132x64 but treated as 128x64 devType = &SH1106_128x64; // Actually 132x64 but treated as 128x64
else if (lcdCols == 128 && lcdRows == 8) else if (lcdCols == 128 && lcdRows == 4)
devType = &Adafruit128x64;
else
devType = &Adafruit128x32; devType = &Adafruit128x32;
else
devType = &Adafruit128x64;
LCDDriver.begin(devType, address); LCDDriver.begin(devType, address);
lcdDisplay=this; lcdDisplay=this;
LCDDriver.setFont(System5x7); // Normal 1:1 pixel scale, 8 bits high LCDDriver.setFont(System5x7); // Normal 1:1 pixel scale, 8 bits high