Commit 1d055fbc authored by 方开's avatar 方开 🍔
Browse files

修复温湿度传感器温度的计算方式为 原始数据 / 10

parent dc9ba296
......@@ -183,7 +183,7 @@ def checkData(data: bytes, houseType: str, measureType: str, pointnum):
# 分别取出温度和湿度数据
tempData = data[14:18]
humiData = data[18:22]
tempValue = int(tempData[1:4], 16) * 0.0625
tempValue = int(tempData[1:4], 16) / 10
humiValue = int(humiData[1:4], 16) / 10
realTempHumi = [tempValue, humiValue]
logging.info(f"实际温湿度值为{realTempHumi}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment