Hi, I'm trying to write a function that will blink a part of the screen using readRect to get the contents, store them, empty that part of the screen and after a while, use pushRect to re-paint that area,
it doesn't work, readrect gives me a full-of-zeroes array.
I've read that some screens doesnt support readback. Is this the case? how can I solve this issue,
Thx in advance
This is my blink code:
void blink(int x, int y, int w, int h) {
if (!isRectBlack) {
Serial.println("Blink");
if (originalContent == NULL) {
originalContent = new uint16_t[w * h];
}
tft.readRect(x, y, w, h, originalContent);
for (int f=0; f< w*h;f++)
Serial.print(originalContent[f]);
tft.fillRect(x, y, w, h, TFT_BLACK);
isRectBlack = true;
} else {
Serial.println("Recover");
tft.pushRect(x, y, w, h, originalContent);
isRectBlack = false;
delete[] originalContent;
originalContent = NULL;
}
}
Hi, I'm trying to write a function that will blink a part of the screen using readRect to get the contents, store them, empty that part of the screen and after a while, use pushRect to re-paint that area,
it doesn't work, readrect gives me a full-of-zeroes array.
I've read that some screens doesnt support readback. Is this the case? how can I solve this issue,
Thx in advance
This is my blink code: