From 463cf39019aa54e6c1226be4620766a035a0c490 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 14 四月 2020 13:31:07 +0800 Subject: [PATCH] 上传个东西 --- ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 30 ++++++++++++------------------ 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs index 33bb1bc..0735d15 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs @@ -2408,7 +2408,7 @@ { var tempD = new VolumeResponseData(); tempD.command = data[10].ToString() + data[11].ToString(); - tempD.value = Convert.ToInt32(data[13].ToString(), 16); + tempD.value = Convert.ToInt32(data[12].ToString() + data[13].ToString(), 16); result = new VolumeResponseAllData { volumeResponseData = tempD }; DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_command:0456_{ topic}"); } @@ -2455,10 +2455,7 @@ ///<summary > ///闊抽噺 ///<para>鍛戒护鍊�: comandValue</para> - ///<para>comandValue: 0 闈欓煶</para> - ///<para>comandValue:1 鏈�灏忛煶閲�</para> - ///<para>comandValue:2~13 闊抽噺 </para> - ///<para>comandValue:14 鏈�澶ч煶閲�</para> + ///<para>comandValue: 0-0x64 闊抽噺</para> /// </summary> public async System.Threading.Tasks.Task<DefaultControlResponseAllData> SetVolumeAsync(int comandValue) { @@ -2560,10 +2557,7 @@ /// <summary> /// 闊抽噺鍙戦�佹暟鎹� - ///<para>comandValue: 0 闈欓煶</para> - ///<para>comandValue:1 鏈�灏忛煶閲�</para> - ///<para>comandValue:2~13 闊抽噺 </para> - ///<para>comandValue:14 鏈�澶ч煶閲�</para> + ///<para>comandValue: 0-100 闊抽噺</para> /// </summary> public string VolumeData(int comandValue) { @@ -2578,16 +2572,16 @@ { if (comandValue >= 1) { - //comandValue = comandValue * 100; - //float v = (float)100 / 15; - //int vv = Convert.ToInt32(v * 100); - //var comandValueTemp = comandValue / vv; - //if (comandValueTemp == 0) - //{ - // comandValueTemp = 1; - //} cValue = Convert.ToString(comandValue, 16).ToUpper(); - cValue = "F" + cValue; + if (cValue.Length == 1) + { + cValue = "0" + cValue; + } + else + { + cValue = cValue; + } + } else { -- Gitblit v1.8.0