Skip to content

feat(esp-box): Move backlight initialization into LCD instead of display#488

Merged
finger563 merged 2 commits intomainfrom
feat/esp-box-backlight-separation
Aug 12, 2025
Merged

feat(esp-box): Move backlight initialization into LCD instead of display#488
finger563 merged 2 commits intomainfrom
feat/esp-box-backlight-separation

Conversation

@finger563
Copy link
Copy Markdown
Contributor

Description

  • Directly store LED for backlight control in esp-box, and initialize it in initialize_lcd instead of letting display handle it.

Motivation and Context

This allows users to initialize the LCD for display (including backlight) without having to initialize LVGL.

How has this been tested?

Build and run on esp-box

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.

@github-actions
Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563 finger563 requested a review from Copilot August 12, 2025 12:09
Copy link
Copy Markdown
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 refactors backlight control in the ESP-Box component by moving backlight initialization from the display layer to the LCD initialization phase. This change allows users to control LCD backlighting without requiring LVGL initialization.

  • Moves backlight LED initialization from initialize_display() to initialize_lcd()
  • Replaces display-based backlight control with direct LED control using hardware PWM
  • Updates brightness control methods to work directly with the LED component

Reviewed Changes

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

File Description
components/esp-box/src/video.cpp Implements LED-based backlight initialization in initialize_lcd() and updates brightness control methods
components/esp-box/include/esp-box.hpp Adds LED member variables for backlight control and updates documentation

Comment thread components/esp-box/src/video.cpp Outdated
Comment thread components/esp-box/src/video.cpp
Comment thread components/esp-box/src/video.cpp
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.

2 participants