mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 21:21:24 +01:00
Handle display types correctly
This commit is contained in:
parent
1ef22e0aea
commit
2cf17fa143
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user