Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added AVOutput/.AVOutputTV.cpp.swp
Binary file not shown.
4 changes: 3 additions & 1 deletion AVOutput/AVOutputTV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2059,13 +2059,15 @@ namespace Plugin {
std::string value;

value = parameters.HasLabel("DimmingMode") ? parameters["DimmingMode"].String() : "";
returnIfParamNotFound(parameters,"DimmingMode");
LOGINFO("%s: DimmingMode [value]: %s\n", __FUNCTION__, value);
returnIfParamNotFound(parameters,"DimmingMode");

if (validateInputParameter("DimmingMode",value) != 0) {
LOGERR("%s: Range validation failed for DimmingMode\n", __FUNCTION__);
returnResponse(false);
}
dimmingMode = getDimmingModeIndex(value);
LOGINFO("%s: dimmingMode : %d\n", __FUNCTION__, dimmingMode);

if (parsingSetInputArgument(parameters, "DimmingMode",inputInfo) != 0) {
LOGERR("%s: Failed to parse the input arguments \n", __FUNCTION__);
Expand Down
20 changes: 10 additions & 10 deletions AVOutput/AVOutputTVHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ namespace Plugin {
tvDimmingMode_t AVOutputTV::getDimmingModeIndex(std::string mode)
{
tvDimmingMode_t index = tvDimmingMode_MAX;

if(mode.compare("local") == 0 ) {
LOGINFO("mode =%s!!!\n",mode);
if(mode.compare("Local") == 0 ) {
index=tvDimmingMode_Local;
}
else if(mode.compare("fixed") == 0 ) {
else if(mode.compare("Fixed") == 0 ) {
index=tvDimmingMode_Fixed;
}
else if(mode.compare("global") == 0 ) {
else if(mode.compare("Global") == 0 ) {
index=tvDimmingMode_Global;
}
else {
Expand Down Expand Up @@ -1514,13 +1514,13 @@ namespace Plugin {
return 0;
}
else if( forParam.compare("DimmingMode") == 0 ) {
if (strncmp(param.value, "fixed", strlen(param.value))==0) {
if (strncmp(param.value, "Fixed", strlen(param.value))==0) {
value=tvDimmingMode_Fixed;
}
else if (strncmp(param.value, "local", strlen(param.value))==0) {
else if (strncmp(param.value, "Local", strlen(param.value))==0) {
value=tvDimmingMode_Local;
}
else if (strncmp(param.value, "global", strlen(param.value))==0) {
else if (strncmp(param.value, "Global", strlen(param.value))==0) {
value=tvDimmingMode_Global;
}
return 0;
Expand Down Expand Up @@ -1683,9 +1683,9 @@ namespace Plugin {
void AVOutputTV::getDimmingModeStringFromEnum(int value, std::string &toStore)
{
const char *color_temp_string[] = {
[tvDimmingMode_Fixed] = "fixed",
[tvDimmingMode_Local] = "local",
[tvDimmingMode_Global] = "global",
[tvDimmingMode_Fixed] = "Fixed",
[tvDimmingMode_Local] = "Local",
[tvDimmingMode_Global] = "Global",
};
toStore.clear();
toStore+=color_temp_string[value];
Expand Down
Loading