| | |
| | | /// WcdType=4:开合帘 |
| | | /// WcdType=0:卷帘 |
| | | /// </summary> |
| | | public int WcdType = 0; |
| | | public int WcdType = -1; |
| | | |
| | | /// <summary> |
| | | ///窗帘当前高度,单位:cm. |
| | |
| | | } |
| | | |
| | | /// <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> |