| | |
| | | { |
| | | foreach (var f in scene.functions) |
| | | { |
| | | if(f.localFunction == null) |
| | | { |
| | | continue; |
| | | } |
| | | switch (f.localFunction.functionType) |
| | | { |
| | | case FunctionType.Curtain: |
| | |
| | | } |
| | | } |
| | | ControlBytesSend(Command.SetSingleLight, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, |
| | | new byte[] { f.localFunction.bus.LoopId, brightness }); |
| | | new byte[] { f.localFunction.bus.LoopId, brightness, (byte)(f.localFunction.delay / 255), (byte)(f.localFunction.delay % 255) }); |
| | | break; |
| | | case FunctionType.RGB: |
| | | break; |
| | |
| | | UdpSocket._BusSocket.AsyncBeginSend(packet); |
| | | controlLostCount++; |
| | | } |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(300); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | wait(); |
| | | } |
| | | //MainPage.Log($"发送Hdl-Link数据,IP:{Control.Ins.reportIp}:8585"); |
| | | MainPage.Log($"发送Hdl-Link数据,IP:{Control.Ins.reportIp}:8585"); |
| | | } |
| | | } |
| | | |