We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc2023e commit d6affbbCopy full SHA for d6affbb
lib/tftLib/src/tft.cpp
@@ -4820,9 +4820,9 @@ void TP::setVersion(uint8_t v) {
4820
}
4821
if (TP_vers == 5) { // ST7796 4" display
4822
Xmax = 1922;
4823
- Xmin = 140;
4824
- Ymax = 1930;
4825
- Ymin = 125;
+ Xmin = 103;
+ Ymax = 1950;
+ Ymin = 110;
4826
xFaktor = float(Xmax - Xmin) / ST7796_WIDTH;
4827
yFaktor = float(Ymax - Ymin) / ST7796_HEIGHT;
4828
@@ -4847,6 +4847,8 @@ bool TP::read_TP(uint16_t& x, uint16_t& y) {
4847
_x /= 100;
4848
_y /= 100;
4849
4850
+ // log_w("_x %i, _y %i", _x, _y);
4851
+
4852
if ((_x < Xmin) || (_x > Xmax)) return false; // outside the display
4853
_x = Xmax - _x;
4854
_x /= xFaktor;
0 commit comments