Skip to content

Commit

Permalink
[Chef] Add contactsensor with powersource (project-chip#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 <commits@restyled.io>
  • Loading branch information
erwinpan1 and restyled-commits authored Jan 11, 2024
1 parent 195b45d commit 8b9c7a8
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 8b9c7a8

Please sign in to comment.