-
Notifications
You must be signed in to change notification settings - Fork 5
RDKEMW-17349 : setColor failure #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -476,10 +476,12 @@ uint32_t FrontPanelIndicator::getColor() | |||||
| */ | ||||||
| void FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool toPersist) | ||||||
| { | ||||||
| INT_INFO("[%s:%d] 17349:Color id = %d, color name = %s", __FUNCTION__, __LINE__, color.getId(), color.getName().c_str()); | ||||||
|
|
||||||
| bool IsPersist = toPersist; | ||||||
| if(_colorMode == 0 || _colorMode == 1) | ||||||
| { | ||||||
| INT_INFO("[%s:%d] 17349:Color mode is %d, API not supported", __FUNCTION__, __LINE__, _colorMode); | ||||||
| throw UnsupportedOperationException("This API not supported for the color mode"); | ||||||
| } | ||||||
| else if(_colorMode == 2) | ||||||
|
|
@@ -488,6 +490,7 @@ void FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool | |||||
| const List<FrontPanelIndicator::Color> supportedColors = FrontPanelConfig::getInstance().getColors(); | ||||||
| for (uint j = 0; j < supportedColors.size(); j++) | ||||||
| { | ||||||
| INT_INFO("[%s:%d] 17349:Supported color id = %d, color id = %d", __FUNCTION__, __LINE__, supportedColors.at(j).getId(), color.getId()); | ||||||
| if( supportedColors.at(j).getId() == color.getId()) | ||||||
| { | ||||||
| isValidColor = true; | ||||||
|
|
@@ -496,13 +499,15 @@ void FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool | |||||
| } | ||||||
| if(!isValidColor) | ||||||
| { | ||||||
| INT_INFO("[%s:%d] 17349:Invalid color id = %d", __FUNCTION__, __LINE__, color.getId()); | ||||||
| throw IllegalArgumentException("Invalid color object"); | ||||||
|
nanimatta marked this conversation as resolved.
|
||||||
| } | ||||||
| } | ||||||
| dsFPDColor_t colorValue = _colorsValues[color.getId()]; | ||||||
|
|
||||||
| if (dsERR_NONE != dsSetFPDColor((dsFPDIndicator_t)_id, (dsFPDColor_t)colorValue,IsPersist) ) | ||||||
| { | ||||||
| INT_INFO("[%s:%d] 17349: dsSetFPDColor failed--", __FUNCTION__, __LINE__); | ||||||
| throw IllegalArgumentException("dsSetFPDColor failed"); | ||||||
| } | ||||||
| _color_rgb32 = colorValue; | ||||||
|
|
@@ -525,10 +530,12 @@ void FrontPanelIndicator::setColor(uint32_t color,bool toPersist) | |||||
| bool isValidColor = false; | ||||||
| if(_colorMode == 0 || _colorMode == 2) | ||||||
| { | ||||||
|
||||||
| { | |
| INT_INFO("setColor(uint32_t): API not supported for color mode %d", _colorMode); |
Uh oh!
There was an error while loading. Please reload this page.