Skip to content

Commit 7dcf609

Browse files
committed
Add dimmer hard switches
1 parent a21643b commit 7dcf609

5 files changed

+1703
-224
lines changed

examples/chef/common/chef-binding-handler.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void ChefBindingHandler::BoundDeviceChangedHandler(const EmberBindingTableEntry
202202

203203
printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__);
204204

205-
if (bindingEntry.type == EMBER_MULTICAST_BINDING && data->IsGroup)
205+
if (bindingEntry.type == MATTER_MULTICAST_BINDING && data->IsGroup)
206206
{
207207
switch (data->ClusterId)
208208
{
@@ -217,7 +217,7 @@ printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__);
217217
break;
218218
}
219219
}
220-
else if (bindingEntry.type == EMBER_UNICAST_BINDING && !data->IsGroup)
220+
else if (bindingEntry.type == MATTER_UNICAST_BINDING && !data->IsGroup)
221221
{
222222
switch (data->ClusterId)
223223
{
@@ -249,7 +249,6 @@ void ChefBindingHandler::InitInternal(intptr_t aArg)
249249
ChipLogProgress(NotSpecified, "ChefBindingHandler Inited");
250250
return;
251251
}
252-
// Erwin: TBD aArg is endpoint
253252
ChipLogProgress(NotSpecified, "Initialize binding Handler, endpoint=%d", static_cast<uint8_t>(aArg));
254253

255254
auto & server = Server::GetInstance();
@@ -273,7 +272,7 @@ bool ChefBindingHandler::IsGroupBound()
273272

274273
for (auto & entry : bindingTable)
275274
{
276-
if (EMBER_MULTICAST_BINDING == entry.type)
275+
if (MATTER_MULTICAST_BINDING == entry.type)
277276
{
278277
return true;
279278
}
@@ -291,7 +290,7 @@ void ChefBindingHandler::PrintBindingTable()
291290
{
292291
switch (entry.type)
293292
{
294-
case EMBER_UNICAST_BINDING:
293+
case MATTER_UNICAST_BINDING:
295294
ChipLogProgress(NotSpecified, "[%d] UNICAST:", i++);
296295
ChipLogProgress(NotSpecified, "\t\t+ Fabric: %d\n \
297296
\t+ LocalEndpoint %d \n \
@@ -301,15 +300,15 @@ void ChefBindingHandler::PrintBindingTable()
301300
(int) entry.fabricIndex, (int) entry.local, (int) entry.clusterId.Value(), (int) entry.remote,
302301
(int) entry.nodeId);
303302
break;
304-
case EMBER_MULTICAST_BINDING:
303+
case MATTER_MULTICAST_BINDING:
305304
ChipLogProgress(NotSpecified, "[%d] GROUP:", i++);
306305
ChipLogProgress(NotSpecified, "\t\t+ Fabric: %d\n \
307306
\t+ LocalEndpoint %d \n \
308307
\t+ RemoteEndpointId %d \n \
309308
\t+ GroupId %d",
310309
(int) entry.fabricIndex, (int) entry.local, (int) entry.remote, (int) entry.groupId);
311310
break;
312-
case EMBER_UNUSED_BINDING:
311+
case MATTER_UNUSED_BINDING:
313312
ChipLogProgress(NotSpecified, "[%d] UNUSED", i++);
314313
break;
315314
default:

examples/chef/common/chef-binding-handler.h

-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@
2929
class ChefBindingHandler
3030
{
3131
public:
32-
enum class SwitchAction : uint8_t
33-
{
34-
Toggle, /// Switch state on lighting-app device
35-
On, /// Turn on light on lighting-app device
36-
Off /// Turn off light on lighting-app device
37-
};
38-
3932
struct BindingData
4033
{
4134
chip::EndpointId EndpointId;

0 commit comments

Comments
 (0)