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 esp-box/example on esp-box 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.

…play size, use it to update display when it rotates
Copilot AI review requested due to automatic review settings October 28, 2025 13:30
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 methods to retrieve the current rotated display dimensions and updates the display size when rotation occurs. The changes ensure that UI elements correctly adapt to display orientation changes.

  • Adds rotated_display_width() and rotated_display_height() methods that return dimensions based on current display rotation
  • Updates the display rotation callback to resize the background object using the new methods
  • Refactors the rotation button callback into a reusable lambda function

Reviewed Changes

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

File Description
components/esp-box/include/esp-box.hpp Adds public API methods for getting display dimensions (both static and rotation-aware)
components/esp-box/src/video.cpp Implements the rotation-aware dimension methods using LVGL rotation state
components/esp-box/example/main/esp_box_example.cpp Updates example to use new methods and properly handle display rotation

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

@github-actions
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 self-assigned this Oct 28, 2025
@finger563 finger563 added enhancement New feature or request display esp-box labels Oct 28, 2025
@finger563 finger563 merged commit 9f75a17 into main Oct 28, 2025
100 of 101 checks passed
@finger563 finger563 deleted the feat/esp-box-rotated-size branch October 28, 2025 14:10
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 esp-box

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants