Skip to content

Commit

Permalink
Merge pull request rdkcentral#5796 from apatel859/main
Browse files Browse the repository at this point in the history
ES1-1902: Launch issue with WTA app in WH
  • Loading branch information
apatel859 authored Oct 16, 2024
2 parents 3b35808 + 267c537 commit 7322b4e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions FrontPanel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.8] - 2024-09-30
### Added
- Fixed getFrontPanelIndicatorInfo API

## [1.0.7] - 2024-05-25
### Added
- Make plugin autostart configurable from recipe
Expand Down
14 changes: 9 additions & 5 deletions FrontPanel/FrontPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 0
#define API_VERSION_NUMBER_PATCH 7
#define API_VERSION_NUMBER_PATCH 8

namespace
{
Expand Down Expand Up @@ -114,11 +114,10 @@ namespace
return name;
}

JsonObject getFrontPanelIndicatorInfo(device::FrontPanelIndicator &indicator)
JsonObject getFrontPanelIndicatorInfo(device::FrontPanelIndicator &indicator,JsonObject &indicatorInfo)
{
JsonObject returnResult;
int levels=0, min=0, max=0;
JsonObject indicatorInfo;
string range;

indicator.getBrightnessLevels(levels, min, max);
Expand All @@ -138,6 +137,7 @@ namespace
{
availableColors.Add(colorsList.at(j).getName());
}

if (availableColors.Length() > 0)
{
indicatorInfo["colors"] = availableColors;
Expand Down Expand Up @@ -632,17 +632,21 @@ namespace WPEFramework
{
IndicatorNameIarm = fpIndicators.at(i).getName();
MappedName = iarm2svc(IndicatorNameIarm);
getFrontPanelIndicatorInfo(fpIndicators.at(i),indicatorInfo);
if (MappedName != IndicatorNameIarm)
{
indicatorInfo = getFrontPanelIndicatorInfo(fpIndicators.at(i));
returnResult[MappedName.c_str()] = indicatorInfo;
}
else
{
returnResult[IndicatorNameIarm.c_str()] = indicatorInfo;
}
}

#ifdef CLOCK_BRIGHTNESS_ENABLED
try
{
indicatorInfo = getFrontPanelIndicatorInfo(device::FrontPanelConfig::getInstance().getTextDisplay(0));
getFrontPanelIndicatorInfo(device::FrontPanelConfig::getInstance().getTextDisplay(0),indicatorInfo);
returnResult[CLOCK_LED] = indicatorInfo;
}
catch (...)
Expand Down

0 comments on commit 7322b4e

Please sign in to comment.