This commit is contained in:
hehaibing-1996
2024-06-25 13:49:02 +08:00
2 changed files with 26 additions and 5 deletions

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -185,15 +186,21 @@ namespace WCS.BLL.Tool
color = 0x00; color = 0x00;
break; break;
} }
byte[] data1 = new byte[8]; byte[] data1 = new byte[8 + 3 * 6];
data1[0] = 0xff; data1[0] = 0xff;
data1[1] = 0x02; data1[1] = 0x02;
data1[2] = 0x00; data1[2] = 0x00;
data1[3] = 0x0a; data1[3] = 0x0a;
data1[4] = (byte)lightid; for (int i = 0; i < 7;i++)
data1[5] = (byte)status; {
data1[6] = color; data1[4 + i * 3] = (byte)(lightid + i);
data1[7] = (byte)beestatus; data1[5 + i * 3] = (byte)status;
data1[6 + i * 3] = color;
}
//data1[4] = (byte)lightid;
//data1[5] = (byte)status;
//data1[6] = color;
data1[25] = (byte)beestatus;
byte[] data2 = Crc16(data1, data1.Length, true); byte[] data2 = Crc16(data1, data1.Length, true);
return data2; return data2;
} }
@ -218,6 +225,7 @@ namespace WCS.BLL.Tool
public static byte[] InstoreWarnLight(int lightid) public static byte[] InstoreWarnLight(int lightid)
{ {
byte[] data1 = new byte[8]; byte[] data1 = new byte[8];
byte[] data1 = new byte[8 + 3 * 6];
data1[0] = 0xff; data1[0] = 0xff;
data1[1] = 0x02; data1[1] = 0x02;
data1[2] = 0x00; data1[2] = 0x00;
@ -225,6 +233,15 @@ namespace WCS.BLL.Tool
data1[4] = (byte)lightid; data1[4] = (byte)lightid;
data1[5] = 0x03; data1[5] = 0x03;
data1[6] = 0x02; data1[6] = 0x02;
for (int i = 0; i < 7; i++)
{
data1[4 + i * 3] = (byte)(lightid + i);
data1[5 + i * 3] = 0x03;
data1[6 + i * 3] = 0x02;
}
//data1[4] = (byte)lightid;
//data1[5] = 0x03;
//data1[6] = 0x02;
//data1[7] = 0x02; //data1[7] = 0x02;
data1[7] = 0x00; data1[7] = 0x00;
byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true); byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true);

View File

@ -20,6 +20,9 @@ namespace WebApi
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
<<<<<<< HEAD
WebSoceketManager.InitWebSocket();
=======
try try
{ {
//<2F><>ʼ<EFBFBD><CABC>websocket //<2F><>ʼ<EFBFBD><CABC>websocket
@ -27,6 +30,7 @@ namespace WebApi
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD> //<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
DbInit.InitDb(); DbInit.InitDb();
>>>>>>> 7f35077c07959e9571515ee1a1f88123f9e20bd5
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> //<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
LocalFile.SaveConfig(); LocalFile.SaveConfig();