From bc55974f346a98010640328f046021ccb2d24ed2 Mon Sep 17 00:00:00 2001 From: liyashuai Date: Wed, 28 Feb 2024 17:18:46 +0800 Subject: [PATCH] resolve some comment --- components/esp_matter/esp_matter_attribute.cpp | 10 +++++----- components/esp_matter/esp_matter_attribute.h | 4 ++-- components/esp_matter/esp_matter_cluster.cpp | 9 ++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/components/esp_matter/esp_matter_attribute.cpp b/components/esp_matter/esp_matter_attribute.cpp index cd3ca5f03..f682c87a7 100644 --- a/components/esp_matter/esp_matter_attribute.cpp +++ b/components/esp_matter/esp_matter_attribute.cpp @@ -283,7 +283,7 @@ attribute_t *create_specification_version(cluster_t *cluster, uint32_t value) esp_matter_uint32(value)); } -attribute_t *create_max_path_per_invoke_version(cluster_t *cluster, uint16_t value) +attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value) { return esp_matter::attribute::create(cluster, BasicInformation::Attributes::MaxPathsPerInvoke::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value)); @@ -1067,22 +1067,22 @@ attribute_t *create_group_name_support(cluster_t *cluster, uint8_t value) namespace scenes_management { namespace attribute { -attribute_t *create_last_configure_by(cluster_t *cluster, uint64_t value) +attribute_t *create_last_configured_by(cluster_t *cluster, uint64_t value) { return esp_matter::attribute::create(cluster, ScenesManagement::Attributes::LastConfiguredBy::Id, ATTRIBUTE_FLAG_NONE, - esp_matter_uint64(value)); + esp_matter_uint64(value)); } attribute_t *create_scene_table_size(cluster_t *cluster, uint16_t value) { return esp_matter::attribute::create(cluster, ScenesManagement::Attributes::SceneTableSize::Id, ATTRIBUTE_FLAG_NONE, - esp_matter_uint16(value)); + esp_matter_uint16(value)); } attribute_t *create_fabric_scene_info(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count) { return esp_matter::attribute::create(cluster, ScenesManagement::Attributes::FabricSceneInfo::Id, ATTRIBUTE_FLAG_NONE, - esp_matter_array((uint8_t*)value, length, count)); + esp_matter_array((uint8_t*)value, length, count)); } } /* attribute */ diff --git a/components/esp_matter/esp_matter_attribute.h b/components/esp_matter/esp_matter_attribute.h index 4eb311642..deaaf8f68 100644 --- a/components/esp_matter/esp_matter_attribute.h +++ b/components/esp_matter/esp_matter_attribute.h @@ -92,7 +92,7 @@ attribute_t *create_reachable(cluster_t *cluster, bool value); attribute_t *create_unique_id(cluster_t *cluster, char *value, uint16_t length); attribute_t *create_product_appearance(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); attribute_t *create_specification_version(cluster_t *cluster, uint32_t value); -attribute_t *create_max_path_per_invoke_version(cluster_t *cluster, uint16_t value); +attribute_t *create_max_paths_per_invoke(cluster_t *cluster, uint16_t value); } /* attribute */ } /* basic_information */ @@ -303,7 +303,7 @@ attribute_t *create_group_name_support(cluster_t *cluster, uint8_t value); namespace scenes_management { namespace attribute { -attribute_t *create_last_configure_by(cluster_t *cluster, uint64_t value); +attribute_t *create_last_configured_by(cluster_t *cluster, uint64_t value); attribute_t *create_scene_table_size(cluster_t *cluster, uint16_t value); attribute_t *create_fabric_scene_info(cluster_t *cluster, const uint8_t * value, uint16_t length, uint16_t count); } /* attribute */ diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index c2e4f51c5..e3e374c38 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -241,7 +241,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) attribute::create_software_version_string(cluster, NULL, 0); attribute::create_capability_minima(cluster, NULL, 0, 0); attribute::create_specification_version(cluster, 0); - //attribute::create_max_path_per_invoke_version(cluster, 0); + attribute::create_max_paths_per_invoke(cluster, 0); /* Attributes not managed internally */ if (config) { @@ -594,7 +594,6 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ /* Commands */ command::create_open_commissioning_window(cluster); - //command::create_open_basic_commissioning_window(cluster); command::create_revoke_commissioning(cluster); return cluster; @@ -998,12 +997,12 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ } } -#if CHIP_CONFIG_ENABLE_ICD_CIP +#if defined(CHIP_CONFIG_ENABLE_ICD_CIP) && CHIP_CONFIG_ENABLE_ICD_CIP if (features & feature::check_in_protocol_support::get_id()) { feature::check_in_protocol_support::config_t cip_config; feature::check_in_protocol_support::add(cluster, &cip_config); } -#endif // CHIP_CONFIG_ENABLE_ICD_CIP +#endif // defined(CHIP_CONFIG_ENABLE_ICD_CIP) && CHIP_CONFIG_ENABLE_ICD_CIP #endif // CONFIG_ENABLE_ICD_SERVER return cluster; } @@ -1215,7 +1214,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) /* Attributes not managed internally */ if (config) { global::attribute::create_cluster_revision(cluster, config->cluster_revision); - attribute::create_last_configure_by(cluster, 0); + attribute::create_last_configured_by(cluster, 0); attribute::create_scene_table_size(cluster, config->scene_table_size); attribute::create_fabric_scene_info(cluster, NULL, 0, 0); } else {