Skip to content

Commit

Permalink
[Chef] Add contactsensor with powersource (#31363)
Browse files Browse the repository at this point in the history
* Quick fix for Chef RVC compilation failure

* [Chef] Add new contactsensor device with powersource cluster

* Remove unused clusters

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 8, 2024
1 parent dd5ba61 commit 1116132
Show file tree
Hide file tree
Showing 5 changed files with 4,601 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/chef/common/chef-rvc-operational-state-delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpointId)

gOperationalStateDelegate = new OperationalStateDelegate;
EndpointId operationalStateEndpoint = 0x01;
gOperationalStateInstance = new Instance(gOperationalStateDelegate, operationalStateEndpoint, Clusters::OperationalState::Id);
gOperationalStateInstance = new OperationalState::Instance(gOperationalStateDelegate, operationalStateEndpoint);

gOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped));

Expand All @@ -137,8 +137,8 @@ void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpointId)

// Init RVC Operational State cluster

static OperationalState::Instance * gRvcOperationalStateInstance = nullptr;
static RvcOperationalStateDelegate * gRvcOperationalStateDelegate = nullptr;
static RvcOperationalState::Instance * gRvcOperationalStateInstance = nullptr;
static RvcOperationalStateDelegate * gRvcOperationalStateDelegate = nullptr;

void RvcOperationalState::Shutdown()
{
Expand All @@ -161,8 +161,7 @@ void emberAfRvcOperationalStateClusterInitCallback(chip::EndpointId endpointId)

gRvcOperationalStateDelegate = new RvcOperationalStateDelegate;
EndpointId operationalStateEndpoint = 0x01;
gRvcOperationalStateInstance =
new Instance(gRvcOperationalStateDelegate, operationalStateEndpoint, Clusters::RvcOperationalState::Id);
gRvcOperationalStateInstance = new RvcOperationalState::Instance(gRvcOperationalStateDelegate, operationalStateEndpoint);

gRvcOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped));

Expand Down
Loading

0 comments on commit 1116132

Please sign in to comment.