From 489b6a3c10ccaff0fd0de55b5030e2992d122a7b Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 18 Nov 2025 15:41:51 +0800
Subject: [PATCH] update mqttd program to compatble with android app

---
 project/4.mqttd/modules/sht20.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/project/4.mqttd/booster/sht20.c b/project/4.mqttd/modules/sht20.c
similarity index 96%
rename from project/4.mqttd/booster/sht20.c
rename to project/4.mqttd/modules/sht20.c
index d3e0b8f..a96d0c6 100644
--- a/project/4.mqttd/booster/sht20.c
+++ b/project/4.mqttd/modules/sht20.c
@@ -40,9 +40,8 @@
 #include <linux/i2c-dev.h>
 
 #include "logger.h"
+#include "utils.h"
 #include "sht20.h"
-
-#define msleep(x) usleep(1000*(x));
 
 int i2c_write(int fd, uint8_t slave_addr, uint8_t *data, int len);
 int i2c_read(int fd, uint8_t slave_addr, uint8_t *buf, int size);
@@ -91,7 +90,7 @@
 
     memset(buf, 0, sizeof(buf));
     i2c_read(fd, SHT20_I2CADDR, buf, 3);
-    log_dump(LOG_LEVEL_DEBUG, "Temperature sample data: ", (char *)buf, 3);
+    log_dump(LOG_LEVEL_TRACE, "Temperature sample data: ", buf, 3);
 
     if( !sht20_checksum(buf, 2, buf[2]) )
     {
@@ -114,7 +113,7 @@
 
     memset(buf, 0, sizeof(buf));
     i2c_read(fd, SHT20_I2CADDR, buf, 3);
-    log_dump(LOG_LEVEL_DEBUG, "Relative humidity sample data: ", (char *)buf, 3);
+    log_dump(LOG_LEVEL_TRACE, "Relative humidity sample data: ", buf, 3);
 
     if( !sht20_checksum(buf, 2, buf[2]) )
     {

--
Gitblit v1.9.1