From e49e01e8523c0cecc73e3035d010b67cde411257 Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sat, 24 Oct 2020 09:59:38 -0700 Subject: [PATCH] Fix LCD shield output --- src/omv/py/py_lcd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/omv/py/py_lcd.c b/src/omv/py/py_lcd.c index 6213b10a8..0aa4e7957 100644 --- a/src/omv/py/py_lcd.c +++ b/src/omv/py/py_lcd.c @@ -329,12 +329,13 @@ static mp_obj_t py_lcd_display(uint n_args, const mp_obj_t *args, mp_map_t *kw_a uint8_t pixel = IM_GET_GS_PIXEL(arg_img, (rect.x + j), (rect.y + i)); line[j] = COLOR_Y_TO_RGB565(pixel); } - lcd_write_data(rect.w*2, (uint8_t *) line); } else { - lcd_write_data(rect.w*2, (uint8_t *) - (((uint16_t *) arg_img->pixels) + - ((rect.y + i) * arg_img->w) + rect.x)); + for (int j=0; j