Fix GT911 touch coordinate axes for T-Deck Plus display orientation

Swap X/Y axes and invert Y so (0, 0) maps to the top-left corner,
matching the physical display orientation on the T-Deck Plus.
Patch suggested by scotty007 in PR #10.
This commit is contained in:
DeFiDude
2026-03-23 17:57:34 -06:00
parent f060b892b9
commit 8c0b0853e4
+2 -1
View File
@@ -79,10 +79,11 @@ bool TouchInput::readGT911() {
}
uint8_t trackId = Wire.read();
_x = Wire.read() | (Wire.read() << 8);
_y = Wire.read() | (Wire.read() << 8);
_x = Wire.read() | (Wire.read() << 8);
Wire.read() | (Wire.read() << 8); // size (unused)
_y = TFT_HEIGHT - 1 - _y;
_touched = true;
// Clear buffer status