From e158ae8dc127e1fe226ac1d8ce18dd3a25c4c524 Mon Sep 17 00:00:00 2001 From: chendejin Date: Mon, 22 Dec 2025 09:58:53 +0800 Subject: [PATCH] components/esp_matter: fix compile error for icd without esp data model --- components/esp_matter/esp_matter_icd_configuration.cpp | 4 +--- components/esp_matter/esp_matter_icd_configuration.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/components/esp_matter/esp_matter_icd_configuration.cpp b/components/esp_matter/esp_matter_icd_configuration.cpp index df1ef0bdf..b26cfa597 100644 --- a/components/esp_matter/esp_matter_icd_configuration.cpp +++ b/components/esp_matter/esp_matter_icd_configuration.cpp @@ -110,14 +110,12 @@ static esp_err_t set_active_threshold(uint32_t active_threshold_ms) return chip::Test::ICDConfigurationDataTestAccess::SetActiveThreshold(Milliseconds32(active_threshold_ms)); } -#ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL -static bool s_enable_icd_server = true; +static bool s_enable_icd_server = CHIP_CONFIG_ENABLE_ICD_SERVER; bool get_icd_server_enabled() { return s_enable_icd_server; } -#endif // CONFIG_ESP_MATTER_ENABLE_DATA_MODEL esp_err_t set_configuration_data(config_t *config) { diff --git a/components/esp_matter/esp_matter_icd_configuration.h b/components/esp_matter/esp_matter_icd_configuration.h index a47191fda..550d713a6 100644 --- a/components/esp_matter/esp_matter_icd_configuration.h +++ b/components/esp_matter/esp_matter_icd_configuration.h @@ -29,11 +29,9 @@ typedef struct config { std::optional active_threshold_ms; } config_t; -#ifdef CONFIG_ESP_MATTER_ENABLE_DATA_MODEL /** Get whether ICD server is enabled for Matter end-device */ bool get_icd_server_enabled(); -#endif /** Set ICD configuration data *