Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and nivi-apple committed Jul 27, 2024
1 parent a2bb5d6 commit 0147c71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
13 changes: 9 additions & 4 deletions examples/thermostat/linux/thermostat-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,17 @@ void OnAttributeChangeReported<MeasuredValue::TypeInfo::DecodableType>(const Con
ClusterId clusterId = path.mClusterId;
if (clusterId != TemperatureMeasurement::Id)
{
ChipLogError(AppServer, "Attribute change reported for TemperatureMeasurement cluster on incorrect cluster id " ChipLogFormatMEI,
ChipLogError(AppServer,
"Attribute change reported for TemperatureMeasurement cluster on incorrect cluster id " ChipLogFormatMEI,
ChipLogValueMEI(clusterId));
return;
}

AttributeId attributeId = path.mAttributeId;
if (attributeId != MeasuredValue::Id)
{
ChipLogError(AppServer, "Attribute change reported for TemperatureMeasurement cluster for incorrect attribute" ChipLogFormatMEI,
ChipLogError(AppServer,
"Attribute change reported for TemperatureMeasurement cluster for incorrect attribute" ChipLogFormatMEI,
ChipLogValueMEI(attributeId));
return;
}
Expand All @@ -99,7 +101,9 @@ void OnAttributeChangeReported<MeasuredValue::TypeInfo::DecodableType>(const Con

static void OnError(const ConcreteDataAttributePath * path, ChipError err)
{
ChipLogError(AppServer, "Subscribing to cluster Id " ChipLogFormatMEI " and attribute Id " ChipLogFormatMEI " failed with error %" CHIP_ERROR_FORMAT,
ChipLogError(AppServer,
"Subscribing to cluster Id " ChipLogFormatMEI " and attribute Id " ChipLogFormatMEI
" failed with error %" CHIP_ERROR_FORMAT,
ChipLogValueMEI(path->mClusterId), ChipLogValueMEI(path->mAttributeId), err.Format());
}

Expand Down Expand Up @@ -493,7 +497,8 @@ void MatterPostAttributeChangeCallback(const ConcreteAttributePath & attributePa
ChipLogProgress(AppServer, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId));

ChipLogProgress(AppServer,
"Attribute ID changed: " ChipLogFormatMEI " Endpoint: %d ClusterId: " ChipLogFormatMEI " Type: %u Value: %u, length %u",
"Attribute ID changed: " ChipLogFormatMEI " Endpoint: %d ClusterId: " ChipLogFormatMEI
" Type: %u Value: %u, length %u",
ChipLogValueMEI(attributeId), attributePath.mEndpointId, ChipLogValueMEI(clusterId), type, *value, size);

ThermostatMgr().AttributeChangeHandler(attributePath.mEndpointId, clusterId, attributeId, value, size);
Expand Down
7 changes: 4 additions & 3 deletions src/app/clusters/thermostat-server/thermostat-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ CHIP_ERROR ThermostatAttrAccess::Write(const ConcreteDataAttributePath & aPath,
// Check if the OriginatorScopedNodeId at the endpoint is the same as the node editing the presets,
// otherwise return BUSY.
const Access::SubjectDescriptor subjectDescriptor = aDecoder.GetSubjectDescriptor();
ScopedNodeId scopedNodeId = ScopedNodeId();
ScopedNodeId scopedNodeId = ScopedNodeId();

// Get the node id if the authentication mode is CASE.
if (subjectDescriptor.authMode == Access::AuthMode::kCase)
Expand Down Expand Up @@ -946,8 +946,9 @@ void emberAfThermostatClusterServerInitCallback(chip::EndpointId endpoint)
// or should this just be the responsibility of the thermostat application?
}

Protocols::InteractionModel::Status MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttributePath & attributePath,
EmberAfAttributeType attributeType, uint16_t size, uint8_t * value)
Protocols::InteractionModel::Status
MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttributePath & attributePath,
EmberAfAttributeType attributeType, uint16_t size, uint8_t * value)
{
EndpointId endpoint = attributePath.mEndpointId;
int16_t requested;
Expand Down

0 comments on commit 0147c71

Please sign in to comment.