From a1dc04151a0a82597cff3706bb841354c203cf6e Mon Sep 17 00:00:00 2001 From: Sayon Deep Date: Tue, 28 Nov 2023 20:10:20 +0530 Subject: [PATCH] matter_support: Changes to support new subscribe command format --- .../main/app_matter_ctrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/matter/matter_controller_on_esp32_s3_box/main/app_matter_ctrl.cpp b/examples/matter/matter_controller_on_esp32_s3_box/main/app_matter_ctrl.cpp index f5b803d..b895b1f 100644 --- a/examples/matter/matter_controller_on_esp32_s3_box/main/app_matter_ctrl.cpp +++ b/examples/matter/matter_controller_on_esp32_s3_box/main/app_matter_ctrl.cpp @@ -190,7 +190,7 @@ static void subscribe_failed_cb(void *subscribe_cmd) } /* be called when subscribe timeout */ -static void subscribe_done_cb(uint64_t remote_node_id) +static void subscribe_done_cb(uint64_t remote_node_id, uint32_t subscription_id) { ESP_LOGE(TAG, "subscribe done callback"); device_list_lock my_device_lock; @@ -217,7 +217,7 @@ static void subscribe_done_cb(uint64_t remote_node_id) /* after subscribe timeout, re-send subscribe to check state */ sub_ptr->subscribe_ptr = chip::Platform::New( sub_ptr->node_id, sub_ptr->endpoint_id, cluster_id, attribute_id, SUBSCRIBE_ATTRIBUTE, - min_interval, max_interval, attribute_data_cb, nullptr, subscribe_done_cb, + min_interval, max_interval,true, attribute_data_cb, nullptr, subscribe_done_cb, subscribe_failed_cb); if (!sub_ptr->subscribe_ptr) { @@ -256,7 +256,7 @@ static void _subscribe_rainmaker_device_state(intptr_t arg) } esp_matter::controller::subscribe_command *cmd = chip::Platform::New( - ptr->node_id, ptr->endpoint_id, cluster_id, attribute_id, SUBSCRIBE_ATTRIBUTE, min_interval, max_interval, + ptr->node_id, ptr->endpoint_id, cluster_id, attribute_id, SUBSCRIBE_ATTRIBUTE, min_interval, max_interval, true, attribute_data_cb, nullptr, nullptr, nullptr); if (!cmd) { @@ -288,7 +288,7 @@ void matter_ctrl_subscribe_device_state(subscribe_device_type_t sub_type) if (!sub_ptr->subscribe_ptr) { sub_ptr->subscribe_ptr = chip::Platform::New( sub_ptr->node_id, sub_ptr->endpoint_id, cluster_id, attribute_id, SUBSCRIBE_ATTRIBUTE, min_interval, - max_interval, attribute_data_cb, nullptr, subscribe_done_cb, subscribe_failed_cb); + max_interval, true,attribute_data_cb, nullptr, subscribe_done_cb, subscribe_failed_cb); } if (!sub_ptr->subscribe_ptr) { ESP_LOGE(TAG, "Failed to alloc memory for subscribe-local-device command");