From acea4e23cfe7aeb4efb2bbf3c1cad3f448d00af3 Mon Sep 17 00:00:00 2001 From: Sayon Deep Date: Fri, 24 May 2024 12:57:47 +0530 Subject: [PATCH] changed device type value to have 0x for hex --- .../main/read_node_info.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/matter/matter_controller_with_touchscreen/main/read_node_info.cpp b/examples/matter/matter_controller_with_touchscreen/main/read_node_info.cpp index e55cd01..2ccda42 100644 --- a/examples/matter/matter_controller_with_touchscreen/main/read_node_info.cpp +++ b/examples/matter/matter_controller_with_touchscreen/main/read_node_info.cpp @@ -260,7 +260,10 @@ static esp_err_t json_gen(json_gen_str_t *jstr) char dev_type[5]; sprintf(dev_type, "%x", node_ptr.second->device_type); - json_gen_obj_set_string(jstr, "device_type",dev_type); + std::string dev_type_str = "0x"; + dev_type_str += dev_type; + json_gen_obj_set_string(jstr, "device_type",(char*)dev_type_str.c_str()); + dev_type_str.clear();