RDEMW-20793: Get Default FP LED brightness from hostDataDefault - #282
Open
kprasad96 wants to merge 2 commits into
Open
RDEMW-20793: Get Default FP LED brightness from hostDataDefault#282kprasad96 wants to merge 2 commits into
kprasad96 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates FP (front panel) brightness initialization to source the default power LED brightness from HostPersistence’s default-properties store (i.e., hostDataDefault), removing the compile-time dsFPD_BRIGHTNESS_DEFAULT fallback and the associated migration logic.
Changes:
- Removed the
dsFPD_BRIGHTNESS_DEFAULTmacro fallback block (previously defaulted todsFPD_BRIGHTNESS_MAX). - Updated power LED brightness initialization to read from
HostPersistence::getDefaultProperty("Power.brightness"). - Removed logic that conditionally migrated persisted MAX brightness values to a non-MAX default.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+178
to
182
| int maxBrightness = dsFPD_BRIGHTNESS_MAX; | ||
|
|
||
| value = device::HostPersistence::getInstance().getProperty("Power.brightness", numberToString(maxBrightness)); | ||
| value = device::HostPersistence::getInstance().getDefaultProperty("Power.brightness"); | ||
| _dsPowerBrightness = stringToNumber(value); | ||
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
rpc/srv/dsFPD.c:184
dsFPDMgr_init()now initializesPower.brightnessusinggetDefaultProperty()only, which bypasses the persisted value written bypersistHostProperty("Power.brightness", ...)(see same file around line 434). This breaks restoring user-set brightness after reboot. Also,Text.brightnessstill falls back todsFPD_BRIGHTNESS_MAXinstead of the host default, so defaults come from two different sources.
try {
value = device::HostPersistence::getInstance().getDefaultProperty("Power.brightness");
_dsPowerBrightness = stringToNumber(value);
}
catch(...) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://ccp.sys.comcast.net/browse/RDKEMW-20793