From d9531564619023415d566b814a1f3166b1515dee Mon Sep 17 00:00:00 2001 From: Jack Massey Date: Thu, 28 Feb 2019 22:05:21 +1000 Subject: [PATCH] Fix rotation offsets for JAYCAR display The JAYCAR display was not having its offsets set correctly now that they were being set by default. --- st7735.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/st7735.c b/st7735.c index 3e8089b..3c19e7c 100644 --- a/st7735.c +++ b/st7735.c @@ -188,6 +188,7 @@ void st7735_set_orientation(enum ST7735_ORIENTATION orientation) { } if(st7735_type == ST7735_RED144_JAYCAR) { + st7735_column_start = 32; st7735_row_start = 32; } break; @@ -234,6 +235,11 @@ void st7735_set_orientation(enum ST7735_ORIENTATION orientation) { } else { st7735_height = st7735_default_height_18; } + + if(st7735_type == ST7735_RED144_JAYCAR) { + st7735_column_start = 0; + } + break; case ST7735_LANDSCAPE_INV: @@ -252,6 +258,10 @@ void st7735_set_orientation(enum ST7735_ORIENTATION orientation) { st7735_width = st7735_default_height_18; } + if(st7735_type == ST7735_RED144_JAYCAR) { + st7735_column_start = 0; + } + st7735_height = st7735_default_width; break; }