From 5dd252c41d62fd659f54b01f5856fd33fb43c740 Mon Sep 17 00:00:00 2001 From: zwj <645281962@qq.com> Date: Sun, 25 Jun 2023 10:19:14 +0800 Subject: [PATCH] =?utf8?q?=E6=B7=BB=E5=8A=A0=E8=BD=AF=E4=BB=B6=E7=89=88?= =?utf8?q?=E6=9C=AC=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- udp/src/udp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/udp/src/udp.c b/udp/src/udp.c index 8490621..b959a3d 100644 --- a/udp/src/udp.c +++ b/udp/src/udp.c @@ -11,6 +11,7 @@ #include "cJSON.h" #include "udp.h" +#include "mg_version.h" //套接字FD static int sockfd = 0; @@ -115,7 +116,7 @@ static int build_a_response_message() { get_local_mac(); //read_the_system_PID(); - char qrcode[ 256]; + char qrcode[256]; if( tuya_productid_read( board_pid, sizeof( board_pid ) ) ){ strcpy( board_pid, "error" ); @@ -133,7 +134,7 @@ static int build_a_response_message() cJSON* device = cJSON_CreateObject(); cJSON_AddStringToObject(device, "mac", local_mac); cJSON_AddStringToObject(device, "productId", board_pid); - cJSON_AddStringToObject(device, "version", "v1.0.1"); + cJSON_AddStringToObject(device, "version", SW_VERSION); cJSON_AddStringToObject(device, "ip", get_local_ip()); cJSON_AddNumberToObject(device, "status", 0); cJSON_AddStringToObject(device, "qrCode", qrcode ); -- 2.34.1