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

LilyGo T-Display-S3 Support #20

Merged
merged 2 commits into from
Jan 21, 2025
Merged

LilyGo T-Display-S3 Support #20

merged 2 commits into from
Jan 21, 2025

Conversation

cr0bar
Copy link
Collaborator

@cr0bar cr0bar commented Jan 15, 2025

Release Notes for LNbits NSD (LilyGo T-Display-S3 Support)

Added

Support for LilyGo T-Display-S3

  • Board Type: Introduced a new BOARD_TYPE variable where type 1 holds the pin configuration for the TTGO T-Display (existing supported device) and type 2 holds the pin configuration for the LilyGo T-Display-S3.
  • Notes for compiling: The board type and user setup select in TFT_eSPI are different for S3 devices, so notes have been added to direct users when compiling. This should help with troubleshooting.

UI Improvements

  • Dynamic UI sizing: UI element sizing is now based on the TFT width and height, and the base screen width and height which was used for the creation of the elements. This allows us to size and position elements dynamically. Key previews are also truncated based on the width of the screen.
  • Menu items: Linked to dynamic sizing (although not directly to the base screen variables), the number of menu items displayed now increases or decreased based on the TFT height.
  • Dark/Light Mode: Introduced light mode and the ability to toggle between dark and light mode within the menu. Default is dark mode.
  • Accent Colour Change: Ability to change the accent colour from the default of LNbits purple to a range of other colours.

Updated

  • TFT_eSPI: Updated the TFT_eSPI library to support the T-Display-S3. Also supports other boards not fully supported by the current version.
  • Menu item state: Minor change to menu items to reflect the current state. eg. Set/Change PIN is not Set PIN or Change PIN based on the current state.

@cr0bar
Copy link
Collaborator Author

cr0bar commented Jan 16, 2025

@motorina0 @blackcoffeexbt @arcbtc @fiatjaf @dni

Just a heads up... the release looks massive, but that's due to upgrading the TFT_eSPI library to support the newer display types. You'll notice that the NSD changes themselves are relatively small compared to my previous PR.

Copy link
Collaborator

@motorina0 motorina0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Needs testing on a physical device

@dni
Copy link
Member

dni commented Jan 16, 2025

damn, nsd is still not uppgraded to the new hardware installer... #16
@motorina0 can we put that on a todo?

@arcbtc
Copy link
Member

arcbtc commented Jan 17, 2025

So can i use a regular t-display as it scales? Misplaced my S3 - ordering a new one

@cr0bar
Copy link
Collaborator Author

cr0bar commented Jan 17, 2025

So can i use a regular t-display as it scales? Misplaced my S3 - ordering a new one

Yes, however if the PIN numbers don't match the T-Display S3 or TTGO, you might need to add a new device type and find the right device in TFT-eSPI. Don't have a T-Display to test myself.

@cr0bar
Copy link
Collaborator Author

cr0bar commented Jan 19, 2025

Minor challenge, it seems that T-Display-S3 can be either RGB or BGR meaning that the blue and reds displayed on the screen may be inverted.

For this release you can change the colour order in the user select file (just comment our the old one and uncomment the new one), for the next PR which has BLE support, I'll look to add a menu item to allow the user to switch colour order on device. Will need a new helper function to switch at runtime.

@arcbtc arcbtc merged commit 1956e59 into lnbits:main Jan 21, 2025
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.

4 participants