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

[P095] Add support for extra TFT displays (ILI934x/ILI948x) #3903

Merged

Conversation

tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Jan 9, 2022

On request via multiple channels (Forum req 1, forum req 2, PM) I have done some investigation and found that the displays mentioned here all are quite similar, except for the initialization and rotation support. As the initialization for the Adafruit_ILI9341 library is very structured and can easily be extended, I've added these display models to the base support for ILI9341 (that also should work with ILI9340):

  • ILI9342 240x320px (as used on some M5Stack units)
  • ILI9481 320x480px (f.e. used on this LilyGo Lily PI unit)
    • Has support for some specific hardware variations: CPT29, PVI35, AUO317, CMO35, RGB, CMI7 and CMI8.

Skipped for now, because these type only seem to be available in 8 bit parallel (DMA) interface, not in regular SPI:

  • ILI9486 320x480px
  • ILI9488 320x480px

This includes a modified version of the Adafruit_ILI9341 library, where I added the specific Initialization and Rotation handling.
Adapted initialization/rotation is based on the famous Bodmer TFT_eSPI library, that supports many displays, but isn't very well suited to include in ESPEasy, because of the conditional compilation required.

NB: Original development was done in combination with P116 and the AdaGFX_Helper module, but I created a separate PR to improve testability, so those parts are not included here.
NB2: Touch support is usually by an XPT2046 driver, that is already supported by ESPEasy via plugin P099, other touch drivers is being worked on, like the FT62x6 in planned plugin P123. Also, support for GT911/GT9110 touch driver has been planned, no plugin ID reserved yet.

TODO:

  • Update documentation (may be postponed until the PR for plugin P116 is merged, as there I've already created documentation for this plugin)
  • Testing: Help wanted 🌞 (as usual, I don't own most of the hardware, so I can't test myself)
    • ILI9341 (to avoid regression errors, tested locally already, confirmation requested)
    • ILI9342 (tested on M5Stack Core)
    • ILI9481 (base-type) (tested on LilyGo Lily Pi, exception: changing rotation after displaying anything causes distorted display, like moving, rotating and/or mirroring existing content)
      • ILI9481 sub-types, (don't know how to distinguish the separate types, though) (also tested on Lily Pi)
    • ILI9486 (if availableSeems to only be available in 8 bit parallel versions, not in regular SPI, ignored for now)
    • ILI9488 (if availableSeems to only be available in 8 bit parallel versions, not in regular SPI, ignored for now)
  • Fixed: Overwriting text when non-default font was used (may cause some minor flashing, as the space is cleared and re-painted)
  • Added: Feature to display text centered within a specific width (using tft,txtfull... command)
  • Added: Enable SD-card support, as AdafruitGFX_helper can show .bmp files from SD storage, and some displays have an SD slot
  • Make ILI9486/ILI9488 a compile-time option to save a little space.

When testing, please pay attention to the Rotation setting & command (tft,rot,<0..3>), they should work as advertised, or else a bug crept in 😮 (exception: ILI9481, see above)

Resolves #4060

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Jan 9, 2022

The selector for the display type: (Updated: 2022-07-17)

P095_TFTDisplayModelOptions

src/_P095_ILI9341.ino Outdated Show resolved Hide resolved
platformio_esp82xx_base.ini Outdated Show resolved Hide resolved
platformio_esp32_envs.ini Outdated Show resolved Hide resolved
(cherry picked from commit acd3c50)
@TD-er TD-er merged commit 9c8f3da into letscontrolit:mega Aug 10, 2022
@tonhuisman tonhuisman deleted the feature/P095-add-extra-display-types branch August 10, 2022 19:47
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.

ESP32&mega-20220427 possible P095 broken tft commands support.
2 participants