Skip to content

Commit 5a8463e

Browse files
Fix example
1 parent d8a00a6 commit 5a8463e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void HandleSimulateLatchPosition(Json::Value & jsonValue)
290290
* Named pipe handler for simulating a Door Opening.
291291
*
292292
* Usage example:
293-
* echo '{"Name":"SetRefDoorStatus", "EndpointId": 1, "Status": 1}' > /tmp/chip_all_clusters_fifo_1146610
293+
* echo '{"Name":"SetRefrigeratorDoorStatus", "EndpointId": 1, "DoorOpen": 1}' > /tmp/chip_all_clusters_fifo_1146610
294294
*
295295
* JSON Arguments:
296296
* - "Name": Must be "SetRefDoorStatus"
@@ -319,16 +319,12 @@ void SetRefrigetatorDoorStatusHandler(Json::Value & jsonValue)
319319
RefrigeratorAlarmServer::Instance().SetMaskValue(endpointId, doorStatus);
320320
ChipLogDetail(NotSpecified, "Refrigeratoralarm status updated to :%d", doorStatus);
321321
}
322-
else if (doorStatus)
322+
else
323323
{
324+
ChipLogDetail(NotSpecified, "Refrigeratoralarm status updated to :%d", doorStatus);
324325
RefrigeratorAlarmServer::Instance().SetMaskValue(endpointId, doorStatus);
325326
RefrigeratorAlarmServer::Instance().SetStateValue(endpointId, doorStatus);
326327
}
327-
else
328-
{
329-
ChipLogError(NotSpecified, "Invalid value to set.");
330-
return;
331-
}
332328
}
333329

334330
/**

0 commit comments

Comments
 (0)