Skip to content

Commit d6affbb

Browse files
committed
new min/max values, ST7796 disolay
1 parent dc2023e commit d6affbb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/tftLib/src/tft.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4820,9 +4820,9 @@ void TP::setVersion(uint8_t v) {
48204820
}
48214821
if (TP_vers == 5) { // ST7796 4" display
48224822
Xmax = 1922;
4823-
Xmin = 140;
4824-
Ymax = 1930;
4825-
Ymin = 125;
4823+
Xmin = 103;
4824+
Ymax = 1950;
4825+
Ymin = 110;
48264826
xFaktor = float(Xmax - Xmin) / ST7796_WIDTH;
48274827
yFaktor = float(Ymax - Ymin) / ST7796_HEIGHT;
48284828
}
@@ -4847,6 +4847,8 @@ bool TP::read_TP(uint16_t& x, uint16_t& y) {
48474847
_x /= 100;
48484848
_y /= 100;
48494849

4850+
// log_w("_x %i, _y %i", _x, _y);
4851+
48504852
if ((_x < Xmin) || (_x > Xmax)) return false; // outside the display
48514853
_x = Xmax - _x;
48524854
_x /= xFaktor;

0 commit comments

Comments
 (0)