wxr
2024-01-03 300a5d5370d10d97eb5dfdfa43bb0156c15d23e3
HDL_ON/DAL/DriverLayer/Packet.cs
@@ -12,11 +12,11 @@
    /// </summary>
    public class Packet
    {
        ///// <summary>
        ///// 缓冲区大小
        ///// Link协议现在一个包的数据比较大,缓冲区太小存不完全部数据 2023-07-14 16:03:56  wxr
        ///// </summary>
        //public const int Size = 2000;
        /// <summary>
        /// 缓冲区大小
        /// Link协议现在一个包的数据比较大,缓冲区太小存不完全部数据 2023-07-14 16:03:56  wxr
        /// </summary>
        public const int Size = 1024 * 10;
        /// <summary>
        /// 接收到的数据
@@ -28,15 +28,11 @@
        /// </summary>
        public System.Net.EndPoint RemoteEndPoint;
        public Packet(int lenght)
        public Packet()
        {
            this.Bytes = new byte[lenght];
            this.Bytes = new byte[Size];
            RemoteEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Any, 0);
        }
        public Packet(byte[] data, System.Net.EndPoint remoteEndPoint)
        {
            this.Bytes = data;
@@ -265,7 +261,8 @@
                                    FunctionPage.UpdataStates(lightTeme);
                                    ClassificationPage.UpdataInfo(lightTeme);
                                    RGBPage.UpdataStates(lightTeme);
                                }else if(lightTeme.spk == SPK.LightCCT)
                                }
                                else if (lightTeme.spk == SPK.LightCCT)
                                {
                                    lightTeme.SetAttrState(FunctionAttributeKey.OnOff, receiveBytes[1] > 0 ? "on" : "off");
                                    if (receiveBytes[1] > 0)
@@ -494,7 +491,8 @@
                                if (receiveBytes[9] > 128)
                                {
                                    indoorTemp = 1 - (receiveBytes[9] - 128);
                                }else
                                }
                                else
                                {
                                    indoorTemp = receiveBytes[9];
                                }