Honor user set values for col/row start for INITR_MINI_160X80. (#2976)

If the caller sets a value for colstart and/or rowstart when using the INITR_MINI_160X80 model, use those values instead of the default 24 and 0.

After this patch devices with a 160x80 TFT like the m5stick C can set row/col start (26, 1 for m5stick) and avoid garbage lines showing in the display.
This commit is contained in:
Gonzalo Paniagua Javier 2022-01-04 05:02:53 -05:00 committed by GitHub
parent c855bc31b4
commit c8f4fbb7dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,8 +265,8 @@ void ST7735::setup() {
height_ == 0 ? height_ = ST7735_TFTHEIGHT_160 : height_;
width_ == 0 ? width_ = ST7735_TFTWIDTH_80 : width_;
display_init_(RCMD2GREEN160X80);
colstart_ = 24;
rowstart_ = 0; // For default rotation 0
colstart_ == 0 ? colstart_ = 24 : colstart_;
rowstart_ == 0 ? rowstart_ = 0 : rowstart_;
} else {
// colstart, rowstart left at default '0' values
display_init_(RCMD2RED);