readRect() is reading the wrong color #1190
Replies: 5 comments 10 replies
-
I have run a test with an ESP32 and ST7789 and it runs fine. To test your setup I need full details of your hardware and software environment (versions etc). |
Beta Was this translation helpful? Give feedback.
-
HI. Thanks for the response. Sorry, I should have included this info in the first post. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi, it seems I have the same problem here. Thank you very much
|
Beta Was this translation helpful? Give feedback.
-
Hi, here is the link to the display vendor LCD 5“SSD1963 TFT - The unit is configured as follow: 3.3V - 8bit parallel and GSL1680 capacitive touchscreen. Except from readrect() it works very well. |
Beta Was this translation helpful? Give feedback.
-
I had the same problem with ILI9341 TFT. Colors read were too bright. Thanks again Bodmer for the great library. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
First, thank you to Bodmer for the fantastic library.
I'm having an issue with pushRect() pushing the wrong color. I have a very simple example sketch that shows the problem.
TFT_ESPI_VERSION "2.3.66"
`#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
uint16_t* knobBuffer;
#define SLIDER_KNOB_WIDTH 32
#define SLIDER_KNOB_HEIGHT 14
void setup() {
tft.init();
tft.setRotation(3);
//tft.fillScreen(0x738E);
tft.fillScreen(TFT_LIGHTGREY);
knobBuffer = (uint16_t*)malloc(((SLIDER_KNOB_WIDTH + 2) * (SLIDER_KNOB_HEIGHT + 2)) * 2);
}
void loop() {
int x = random(300);
int y = random(200);
tft.readRect(x, y, SLIDER_KNOB_WIDTH, SLIDER_KNOB_HEIGHT, knobBuffer);
tft.pushRect(x, y, SLIDER_KNOB_WIDTH, SLIDER_KNOB_HEIGHT, knobBuffer);
delay(3000);
}`
I see this on multiple displays.
Attached is an image of the display showing the mismatched color. And the script and user_setup.h
I'm curious if this is a buffer size problem? or maybe a bug was introduced? or something else?
Thanks for reading.
Cheers,
Kitecraft.
tft_pushRectTest.zip
Beta Was this translation helpful? Give feedback.
All reactions