Skip to content

Conversation

@Lord-Grey
Copy link
Collaborator

Summary

✨ Added

🔧 Changed

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:
fixes: #1899
fixes: #1922

Copy link

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 the RGB backlight threshold system and fixes a critical bug in color adjustment. The main changes convert the backlight threshold from a double-based calculation to a simpler integer-based approach, add dynamic brightness calculation for Home Assistant devices, and fix an incorrect parameter in the backlight color application.

  • Simplified backlight threshold to use integer values (0-255) instead of percentage-based double calculations
  • Implemented dynamic brightness calculation for Home Assistant devices based on perceived luminance
  • Fixed bug where blue channel was incorrectly passed as green channel in backlight application

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libsrc/utils/RgbTransform.cpp Changed backlight threshold from double to int, simplified calculation, rewrote applyBacklight logic, added const to applyGamma
include/utils/RgbTransform.h Updated function signatures and member variables to match implementation changes (double to int for threshold, added const)
libsrc/hyperion/MultiColorAdjustment.cpp Fixed bug passing color.green twice instead of color.blue to applyBacklight
libsrc/leddevice/dev_net/LedDeviceHomeAssistant.cpp Implemented dynamic brightness calculation using perceived luminance formula, simplified control flow
libsrc/leddevice/schemas/schema-homeassistant.json Changed default brightnessOverwrite from true to false to enable dynamic brightness by default
CHANGELOG.md Added entries for new Home Assistant feature and backlight color bug fix

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status
Status: Backlog

1 participant