This commit is contained in:
123
2024-06-29 20:05:05 +08:00
parent 3f249ca4ce
commit 743f114e62
2 changed files with 7 additions and 5 deletions

View File

@ -979,6 +979,8 @@ namespace WCS.BLL.Services.Service
}
}
}
//发送间隔
Thread.Sleep(300);
foreach (string shelfcode in WarnLightShelfCode)
{
List<ShelfInfo> si = DbHelp.db.Queryable<ShelfInfo>().Where(it => it.ShelfCode == shelfcode).ToList();

View File

@ -384,21 +384,21 @@ namespace WCS.BLL.Tool
color = 0x00;
break;
}
byte[] data1 = new byte[5 + 3 * 7];
byte[] data1 = new byte[5 + 3 * 6];
data1[0] = 0xff;
data1[1] = 0x01;
data1[2] = 0x00;
data1[3] = (byte)(data1.Length + 2);
data1[4] = 0x07;
data1[4] = 0x06;
for (int i = 0; i < 6; i++)
{
data1[5 + i * 3] = (byte)(lightid + i);
data1[6 + i * 3] = (byte)status;
data1[7 + i * 3] = color;
}
data1[5 + 3 * 7 - 3] = (byte)(lightid + 6);
data1[5 + 3 * 7 - 2] =(byte)beestatus;
data1[5 + 3 * 7 - 1] = 0x00;
//data1[5 + 3 * 7 - 3] = (byte)(lightid + 6);
//data1[5 + 3 * 7 - 2] =(byte)beestatus;
//data1[5 + 3 * 7 - 1] = 0x00;
byte[] data2 = Crc16(data1, data1.Length, true);
return data2;
}