Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrejoespinoza-grid committed Jan 31, 2025
1 parent 382c076 commit 7f90846
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void HandleSimulateLatchPosition(Json::Value & jsonValue)
* Named pipe handler for simulating a Door Opening.
*
* Usage example:
* echo '{"Name":"SetRefDoorStatus", "EndpointId": 1, "Status": 1}' > /tmp/chip_all_clusters_fifo_1146610
* echo '{"Name":"SetRefrigeratorDoorStatus", "EndpointId": 1, "DoorOpen": 1}' > /tmp/chip_all_clusters_fifo_1146610
*
* JSON Arguments:
* - "Name": Must be "SetRefDoorStatus"
Expand Down Expand Up @@ -319,16 +319,12 @@ void SetRefrigetatorDoorStatusHandler(Json::Value & jsonValue)
RefrigeratorAlarmServer::Instance().SetMaskValue(endpointId, doorStatus);
ChipLogDetail(NotSpecified, "Refrigeratoralarm status updated to :%d", doorStatus);
}
else if (doorStatus)
else
{
ChipLogDetail(NotSpecified, "Refrigeratoralarm status updated to :%d", doorStatus);
RefrigeratorAlarmServer::Instance().SetMaskValue(endpointId, doorStatus);
RefrigeratorAlarmServer::Instance().SetStateValue(endpointId, doorStatus);
}
else
{
ChipLogError(NotSpecified, "Invalid value to set.");
return;
}
}

/**
Expand Down

0 comments on commit 7f90846

Please sign in to comment.