Skip to content

Commit

Permalink
Fix Chef RVC compilation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinpan1 committed Jan 11, 2024
1 parent d2a13cb commit 5290329
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 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,7 +137,7 @@ void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpointId)

// Init RVC Operational State cluster

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

void RvcOperationalState::Shutdown()
Expand All @@ -162,7 +162,7 @@ void emberAfRvcOperationalStateClusterInitCallback(chip::EndpointId endpointId)
gRvcOperationalStateDelegate = new RvcOperationalStateDelegate;
EndpointId operationalStateEndpoint = 0x01;
gRvcOperationalStateInstance =
new Instance(gRvcOperationalStateDelegate, operationalStateEndpoint, Clusters::RvcOperationalState::Id);
new RvcOperationalState::Instance(gRvcOperationalStateDelegate, operationalStateEndpoint);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,8 @@ endpoint 1 {
ram attribute clusterRevision default = 1;

handle command Pause;
handle command Stop;
handle command Start;
handle command Resume;
handle command OperationalCommandResponse;
}
Expand Down
16 changes: 16 additions & 0 deletions examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2837,6 +2837,22 @@
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Stop",
"code": 1,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Start",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "Resume",
"code": 3,
Expand Down

0 comments on commit 5290329

Please sign in to comment.