From 880f89d634b43d66c1f3d1dfd086898ec8bbaba9 Mon Sep 17 00:00:00 2001 From: james <1943357252@qq.com> Date: Wed, 31 Jul 2024 01:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E7=AC=A6=E5=8F=B7=EF=BC=8C=E5=B0=91?= =?UTF-8?q?=E8=BE=93=E5=87=BA=EF=BC=88debug=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Day5/mqtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Day5/mqtt.c b/Day5/mqtt.c index 1b8f66a..a47a498 100644 --- a/Day5/mqtt.c +++ b/Day5/mqtt.c @@ -110,7 +110,7 @@ void make_file(char *String) //写入文件 write(fd, String, sizeof(String)); - rt_kprintf("Write done.\n"); + // rt_kprintf("Write done.\n"); //关闭文件 close(fd); @@ -128,7 +128,7 @@ void tmp_payload(void) // 读取温湿度值 Humi = aht10_read_humidity(Dev); Temp = aht10_read_temperature(Dev); - sprintf(tmp, "Temp:%f ; Humi:%f ; Count: %d", Temp, Humi,++cnt); + sprintf(tmp, "Temp:%f ; Humi:%f ; Count: %d", Temp, Humi,++cnt); make_file(tmp); sprintf(tmp, "{\"params\":{\"temperature\":%.2f,\"humidity\":%.2f}}", Temp, Humi); // rt_kprintf("\n%f %f tmp:%s\n",Humi,Temp,tmp);