mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-09-01 16:48:29 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user