From 9c607e921ca7c379799e4dd88b140265a1d5d5c5 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 22 十一月 2019 16:35:30 +0800 Subject: [PATCH] 需要合并 --- ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs index ec02fdb..1e01919 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs @@ -18,10 +18,16 @@ /// <summary> /// 璇诲彇娓�/婀垮害 /// </summary> - public void ReadTemperature() + public void ReadTemperatureOrHumidity() { - ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.MeasuredValue ); - ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.MeasuredValue); + if (SensorDiv == 1) + { + ReadAttri(Device.Cluster_ID.TemperatureMeasurement, AttriButeId.MeasuredValue); + } + else if (SensorDiv == 2) + { + ReadAttri(Device.Cluster_ID.RelativeHumidityMeasurement, AttriButeId.MeasuredValue); + } } } } -- Gitblit v1.8.0