HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-09-30 404cdc88627f942df7944af04ee05b9d527752d6
ZigbeeApp/Shared/Phone/ZigBee/Device/Rollershade.cs
@@ -16,7 +16,7 @@
        /// WcdType=4:开合帘
        /// WcdType=0:卷帘
        /// </summary>
        public int WcdType = 0;
        public int WcdType = -1;
        /// <summary>
        ///窗帘当前高度,单位:cm.
@@ -94,6 +94,30 @@
        }
        /// <summary>
        /// 读取当前窗帘模式
        /// </summary>
        /// <param name="commonDevice"></param>
        /// <param name="action"></param>
        public static void ReadWcdTypeAction(CommonDevice commonDevice, Action action)
        {
            new System.Threading.Thread(() =>
            {
                (commonDevice as Rollershade).ReadWcdType();
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalSeconds < 10)
                {
                    System.Threading.Thread.Sleep(100);
                    if ((commonDevice as Rollershade).WcdType != -1)
                    {
                        break;
                    }
                }
                action?.Invoke();
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 窗帘当前倾斜度,单位:0.1°
        /// <para>AttriButeId=3 (先调用发现属性接口,查看设备是否支持该接口的属性)</para>
        /// </summary>