mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-05 21:54:42 +02:00
Remove setAddressWindow change for ESP32
Corner case caused missed graphics.
This commit is contained in:
19
TFT_eSPI.cpp
19
TFT_eSPI.cpp
@@ -185,8 +185,8 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h)
|
||||
|
||||
_booted = true;
|
||||
|
||||
ys_row = ye_row = addr_row = 0xFFFF;
|
||||
xs_col = xe_col = addr_col = 0xFFFF;
|
||||
addr_row = 0xFFFF;
|
||||
addr_col = 0xFFFF;
|
||||
|
||||
#ifdef LOAD_GLCD
|
||||
fontsloaded = 0x0002; // Bit 1 set
|
||||
@@ -2689,11 +2689,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
|
||||
|
||||
CS_L_DC_C;
|
||||
|
||||
// No need to send x if it has not changed (small speed-up of complex transparent Sprites and bitmaps)
|
||||
// Nb: caller must fill the set address area so that setting same area again will fill from xs, ys
|
||||
if (xs_col != x0 || xe_col != x1) {
|
||||
// Column addr set
|
||||
|
||||
tft_Write_8(TFT_CASET);
|
||||
|
||||
DC_D;
|
||||
@@ -2706,11 +2701,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
|
||||
#endif
|
||||
|
||||
DC_C;
|
||||
xs_col = x0; xe_col = x1;
|
||||
}
|
||||
|
||||
// No need to send y if it has not changed
|
||||
if (ys_row != y0 || ye_row != y1) {
|
||||
|
||||
// Row addr set
|
||||
tft_Write_8(TFT_PASET);
|
||||
@@ -2725,8 +2715,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
|
||||
#endif
|
||||
|
||||
DC_C;
|
||||
ys_row = y0; ye_row = y1;
|
||||
}
|
||||
|
||||
// write to RAM
|
||||
tft_Write_8(TFT_RAMWR);
|
||||
@@ -3074,8 +3062,6 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color)
|
||||
DC_C;
|
||||
|
||||
addr_col = x;
|
||||
xs_col = xe_col = x;
|
||||
|
||||
}
|
||||
|
||||
// No need to send y if it has not changed (speeds things up)
|
||||
@@ -3095,7 +3081,6 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color)
|
||||
DC_C;
|
||||
|
||||
addr_row = y;
|
||||
ys_row = ye_row = y;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -784,8 +784,6 @@ class TFT_eSPI : public Print {
|
||||
uint32_t _init_width, _init_height; // Display w/h as input, used by setRotation()
|
||||
uint32_t _width, _height; // Display w/h as modified by current rotation
|
||||
uint32_t addr_row, addr_col;
|
||||
uint32_t xs_col, xe_col;
|
||||
uint32_t ys_row, ye_row;
|
||||
|
||||
uint32_t fontsloaded;
|
||||
|
||||
|
Reference in New Issue
Block a user