Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPT2046 displays with swapped coords #113

Closed
ImpulseAdventure opened this issue Feb 19, 2019 · 3 comments
Closed

XPT2046 displays with swapped coords #113

ImpulseAdventure opened this issue Feb 19, 2019 · 3 comments
Assignees
Labels
device_arduino Devices: Arduino compatible enhancement
Milestone

Comments

@ImpulseAdventure
Copy link
Owner

I have received reports of a display with an integrated XPT2046 touch controller that appears to read-back a swapped X & Y convention versus what would be expected from a native portrait orientation.

In order to support such displays, we would need to:

  • a) modify the calibration utility to detect this case
  • b) add an ADATOUCH_REMAP_YX config flag
  • c) modify the core library to perform the X/Y swap upon ADATOUCH_REMAP_YX (prior to any flip / swap as a result of rotation away from native orientation).

Without this enhancement, these displays would currently report ERROR: Calibration failed.

@ImpulseAdventure ImpulseAdventure self-assigned this Feb 19, 2019
@ImpulseAdventure ImpulseAdventure added enhancement device_arduino Devices: Arduino compatible labels Feb 19, 2019
@ImpulseAdventure ImpulseAdventure added this to the 0.11.1 milestone Feb 19, 2019
ImpulseAdventure added a commit that referenced this issue Feb 19, 2019
- Detect touch segments, identify remapping mode
- Detect need for touch controller X&Y remap
- Reorder ADATOUCH reporting for clarity
@ImpulseAdventure
Copy link
Owner Author

Initial implementation of the revised functionality (with enhanced calibration sketch) has been integrated into Pull Request #114.

@ImpulseAdventure
Copy link
Owner Author

Hermann has reported that the enhanced calibration sketch & functionality in PR 114 works properly with his Mega2560 + SPI-TFT ILI9341 + XPT2046 (where his XPT2046 was appearing to provide swapped/landscape X & Y coords). Thanks Hermann for testing it!

ImpulseAdventure added a commit that referenced this issue Feb 20, 2019
Support touch controllers with swapped XY for #113
- Enhanced calibration sketch `diag_ard_touch_calib`
- Added config option `ADATOUCH_REMAP_YX`
@ImpulseAdventure
Copy link
Owner Author

Enhanced calibration & detection support has now been integrated & merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device_arduino Devices: Arduino compatible enhancement
Projects
None yet
Development

No branches or pull requests

1 participant