fix 1.14" tft rotation 3
This commit is contained in:
parent
84a5b431af
commit
bcc7e08752
1 changed files with 3 additions and 4 deletions
|
|
@ -103,7 +103,7 @@ void Adafruit_ST7789::init(uint16_t width, uint16_t height, uint8_t mode) {
|
|||
|
||||
commonInit(NULL);
|
||||
|
||||
if (width == 174 && height == 320) {
|
||||
if (width == 172 && height == 320) {
|
||||
// 1.47" display
|
||||
_rowstart = _rowstart2 = 0;
|
||||
_colstart = _colstart2 = 34;
|
||||
|
|
@ -112,11 +112,10 @@ void Adafruit_ST7789::init(uint16_t width, uint16_t height, uint8_t mode) {
|
|||
_rowstart = 20;
|
||||
_rowstart2 = 0;
|
||||
_colstart = _colstart2 = 0;
|
||||
} else if (width < 240) {
|
||||
} else if (width == 135 && height == 240) {
|
||||
// 1.14" display
|
||||
_rowstart = _rowstart2 = (int)((320 - height + 1) / 2);
|
||||
_colstart = (int)((240 - width + 1) / 2);
|
||||
_colstart2 = (int)((240 - width) / 2);
|
||||
_colstart2 = _colstart = (int)((240 - width + 1) / 2);
|
||||
} else {
|
||||
// 1.3", 1.54", and 2.0" displays
|
||||
_rowstart = (320 - height);
|
||||
|
|
|
|||
Loading…
Reference in a new issue