Skip to content

RDKEMW-17349 : setColor failure#242

Open
nanimatta wants to merge 3 commits intodevelopfrom
feature/RDKEMW-17349
Open

RDKEMW-17349 : setColor failure#242
nanimatta wants to merge 3 commits intodevelopfrom
feature/RDKEMW-17349

Conversation

@nanimatta
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 20:48
@nanimatta nanimatta requested a review from a team as a code owner April 22, 2026 20:48
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

Adds additional logging to help diagnose failures in FrontPanelIndicator::setColor(...) (RDKEMW-17349).

Changes:

  • Logs the requested color ID/name when setColor(Color, toPersist) is called.
  • Logs when setColor is invoked in unsupported color modes.
  • Logs supported/invalid color IDs during validation.

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

Comment thread ds/frontPanelIndicator.cpp Outdated
*/
void FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool toPersist)
{
INT_INFO("[%s:%d] Color id = %d, color name = %s", __FUNCTION__, __LINE__, color.getId(), color.getName().c_str());
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

INT_INFO already logs file/line/function via ds_log (see ds/dslogger.cpp:66-72). Including [%s:%d] with __FUNCTION__/__LINE__ in the message is redundant and makes logs noisier; consider removing that prefix and logging just the relevant fields (or moving this to INT_DEBUG if it's primarily for troubleshooting).

Copilot uses AI. Check for mistakes.
Comment thread ds/frontPanelIndicator.cpp
Comment thread ds/frontPanelIndicator.cpp Outdated
Comment on lines 484 to 485
INT_INFO("[%s:%d] Color mode is %d, API not supported", __FUNCTION__, __LINE__, _colorMode);
throw UnsupportedOperationException("This API not supported for the color mode");
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The log/exception text is grammatically incorrect and not very actionable ("This API not supported..."). Consider changing it to "This API is not supported for color mode X" (including _colorMode), so failures are clearer in telemetry and in exception reports.

Copilot uses AI. Check for mistakes.
Comment thread ds/frontPanelIndicator.cpp
Copilot AI review requested due to automatic review settings April 22, 2026 20:51
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

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


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

@@ -525,10 +530,12 @@ void FrontPanelIndicator::setColor(uint32_t color,bool toPersist)
bool isValidColor = false;
if(_colorMode == 0 || _colorMode == 2)
{
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

Log message says "setLED" but this is FrontPanelIndicator::setColor(uint32_t). This looks like a copy/paste error and will confuse diagnostics. Also, since INT_INFO already prints file/line/function, drop the embedded "[%s:%d]" prefix and include the actual _colorMode value in the message if needed for troubleshooting.

Suggested change
{
INT_INFO("setColor(uint32_t): API not supported for color mode %d", _colorMode);

Copilot uses AI. Check for mistakes.
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.

3 participants