Skip to content

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Oct 28, 2025

Description

  • Add methods for getting the rotated display width/height
  • Update example to use the methods and ensure they work

Motivation and Context

Provides additional methods for getting the rotated display size, not just the lvgl methods.

How has this been tested?

Build and run t-deck/example on t-deck and ensure as the screen is rotated the background / display is correct.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

… size, use it to update display when it rotates in example
Copilot AI review requested due to automatic review settings October 28, 2025 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds functionality to retrieve the current rotated display dimensions for the T-Deck component. When the display rotates, the example code now correctly updates the background object size to match the new orientation.

Key Changes:

  • Added rotated_display_width() and rotated_display_height() methods that return dimensions based on current rotation
  • Refactored display rotation logic into a reusable rotate_display lambda function
  • Updated background object size on rotation to match the rotated display dimensions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
components/t-deck/src/t-deck.cpp Implements the rotated display dimension methods with switch statements handling all rotation cases
components/t-deck/include/t-deck.hpp Declares new static and instance methods for getting display dimensions
components/t-deck/example/main/t_deck_example.cpp Refactors rotation logic into lambda and updates background size using new rotated dimension methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@finger563 finger563 self-assigned this Oct 28, 2025
@finger563 finger563 added enhancement New feature or request display t-deck labels Oct 28, 2025
@github-actions
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit c657746 into main Oct 28, 2025
100 of 101 checks passed
@finger563 finger563 deleted the feat/t-deck-rotated-display-improvements branch October 28, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

display enhancement New feature or request t-deck

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants