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

Revise touch & orientation #105

Merged
merged 33 commits into from
Feb 9, 2019
Merged

Revise touch & orientation #105

merged 33 commits into from
Feb 9, 2019

Conversation

ImpulseAdventure
Copy link
Owner

@ImpulseAdventure ImpulseAdventure commented Jan 29, 2019

This pull request implements the rewrite of the orientation & touch handling code referenced in #98

  • GuiRotate() is used to dynamically rotate the display
  • 3 new touch calibration sketches have been added:
    • diag_ard_touch_detect: Detects pin configuration for simple 4-wire resistive touch displays (description)
    • diag_ard_touch_calib: Detects touch calibration settings for resistive touch displays (description)
    • diag_ard_touch_test: Demonstrates current touch calibration settings for all displays (description)
  • The GUIslice configuration has been greatly simplified in the process (see Dynamic Display Orientation vs Touch #98 for details)

This PR also adds a couple other changes:

  • Reporting of display and touch driver name during GUIslice init (GetNameDisp and GetNameTouch)
  • Additional fixes for static rotation on various displays
  • Example configs cleanup

NOTE: With the new configuration simplification, users of resistive displays should run the calibration sketch to determine the new settings appropriate for their display (ie. ADATOUCH_X/Y_MIN/MAX) and update their config accordingly.

@ImpulseAdventure ImpulseAdventure changed the title Dynamic orientation for #98 Revise touch & orientation Feb 9, 2019
@ImpulseAdventure
Copy link
Owner Author

Major update of orientation / touch handling from #98

  • A significant revision was made to the way in which display rotation & touch orientation for Arduino is handled by the library. I believe the new approach will provide greater compatibility across displays and ultimately be easier to configure (rather than the trial & error approach in the past). The immediate impact is that users may need to re-detect the touch configuration for their particular displays, with the help of the new diagnostic sketches (since the former GSLC_TOUCH_ROTATE and related config settings are no longer used).
  • For reference, please refer to the Configuring Touch Support wiki page for details, and a how-to walkthrough. Please report any difficulties with the calibration or documentation so that I can address them in the wiki. This guide, and the pages associated with it, will be continually updated in the next few days to address any outstanding issues in the transition.
  • It is also recommended that users take this opportunity to update to the new (simpler) configuration scheme based on the canned example configurations in /configs (see Configuring GUIslice).

Breaking Changes:

  • For Arduino devices with resistive touch displays: users will need to run
    the pin detection and calibration sketches (/examples/arduino/diag_ard_touch_*) one time in order to ensure that the calibration settings are correct for the display & new library implementation. These sketches will output settings that can be copied directly into the user config. Note that skipping this step could result in the touch mapping not matching the display orientation.
  • For STM32 devices with DRV_TOUCH_XPT2046 touch mode: users will need to rename DRV_TOUCH_XPT2046 to DRV_TOUCH_XPT2046_STM in their config. This was done because a new XPT2046 touch library (DRV_TOUCH_XPT2046_PS) has been added to GUIslice and the renaming should avoid future ambiguity.

Other Changes

  • Calibration sketches added, including touch debouncing.
  • Add support for HX8347D (prenticedavid/HX8347D_kbv)
  • Add support for XPT2046 (PaulStoffregen)

Notes

  • It is possible that certain displays/libraries perform rotation in a non-standard way. If the calibration sketch reports on the serial monitor that a reversed or unusual rotation was detected, please file an issue in GitHub so that I can add support for your display accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant