Skip to content

Commit f1a6fa1

Browse files
[SL-TEMP] Matter-5802: Check if Zigbee attributes exist before attemp… (#848)
Co-authored-by: Restyled.io <commits@restyled.io>
1 parent ecaa5de commit f1a6fa1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

examples/platform/silabs/cmp/MultiProtocolDataModelHelper.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,17 @@ void WriteMatterAttributeValueToZigbee(chip::EndpointId endpointId, chip::Cluste
7676
const MpAttributeMetadata * mpAttributeMetadata = GetMpAttributeMetadata(mpClusterMetadata, attributeId);
7777
VerifyOrReturn(mpAttributeMetadata != nullptr);
7878
// TODO handle MFG specific attributes
79-
sl_zigbee_af_write_server_attribute_without_sync(endpointId, mpClusterMetadata->zigbeeClusterId,
80-
mpAttributeMetadata->zigbeeAttributeId, attributeValue, dataType);
79+
80+
// TODO MATTER-5844 remove the check below once the Zigbee stack support overriding CLI and logs outputs.
81+
// They first need to decouple the output of both so that the Matter team can retrieve them separately.
82+
// Otherwise either the logs are blocking and causing major delays or the CLI output will be completely mangle
83+
// and some string might be lost.
84+
if (sl_zigbee_af_contains_attribute(endpointId, mpClusterMetadata->zigbeeClusterId, mpAttributeMetadata->zigbeeAttributeId,
85+
CLUSTER_MASK_SERVER, mpAttributeMetadata->zigbeeMfgAttributeId))
86+
{
87+
sl_zigbee_af_write_server_attribute_without_sync(endpointId, mpClusterMetadata->zigbeeClusterId,
88+
mpAttributeMetadata->zigbeeAttributeId, attributeValue, dataType);
89+
}
8190
}
8291

8392
void SynchMultiProtocolAttributes(chip::EndpointId endpointId, const MpClusterMetadata * mpClusterMetadata)

0 commit comments

Comments
 (0)