Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 27ef480

Browse files
restyled-commitsstingchang
authored andcommittedMay 28, 2024·
Restyled by clang-format
1 parent 939bf7f commit 27ef480

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed
 

‎examples/chef/common/chef-rvc-operational-state-delegate.cpp

+18-17
Original file line numberDiff line numberDiff line change
@@ -232,26 +232,27 @@ chip::Protocols::InteractionModel::Status chefRvcOperationalStateReadCallback(ch
232232
uint8_t * buffer, uint16_t maxReadLength)
233233
{
234234
chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success;
235-
chip::AttributeId attributeId = attributeMetadata->attributeId;
236-
switch(attributeId) {
237-
case chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id: {
235+
chip::AttributeId attributeId = attributeMetadata->attributeId;
236+
switch (attributeId)
237+
{
238+
case chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id: {
238239

239-
app::DataModel::Nullable<uint8_t> currentPhase = gRvcOperationalStateInstance->GetCurrentPhase();
240-
if(currentPhase.IsNull())
241-
{
242-
ret = chip::Protocols::InteractionModel::Status::UnsupportedAttribute;
243-
break;
244-
}
245-
*buffer = currentPhase.Value();
246-
}
247-
break;
248-
case chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id: {
249-
*buffer = gRvcOperationalStateInstance->GetCurrentOperationalState();
240+
app::DataModel::Nullable<uint8_t> currentPhase = gRvcOperationalStateInstance->GetCurrentPhase();
241+
if (currentPhase.IsNull())
242+
{
243+
ret = chip::Protocols::InteractionModel::Status::UnsupportedAttribute;
244+
break;
250245
}
246+
*buffer = currentPhase.Value();
247+
}
248+
break;
249+
case chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id: {
250+
*buffer = gRvcOperationalStateInstance->GetCurrentOperationalState();
251+
}
252+
break;
253+
default:
254+
ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast<int>(attributeId));
251255
break;
252-
default:
253-
ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast<int>(attributeId));
254-
break;
255256
}
256257

257258
return ret;

0 commit comments

Comments
 (0)
Please sign in to comment.