添加单灯调试

This commit is contained in:
hehaibing-1996
2024-06-25 13:48:57 +08:00
parent 7f35077c07
commit 7228b74cb5
8 changed files with 211 additions and 68 deletions

View File

@ -107,7 +107,7 @@ namespace WCS.BLL.Tool
}
//出库库位灯亮灯
public static byte[] OutstoreLight(List<int> board_id, string lightcolor,int status)
public static byte[] OutstoreLight(List<int> board_id, string lightcolor, int status)
{
byte color = 0x00;
switch (lightcolor)
@ -155,7 +155,7 @@ namespace WCS.BLL.Tool
}
//出库警示灯亮灯
public static byte[] OutstoreWarnLight(int lightid ,string lightcolor, int status,int beestatus)
public static byte[] OutstoreWarnLight(int lightid, string lightcolor, int status, int beestatus)
{
byte color = 0x00;
switch (lightcolor)
@ -230,5 +230,59 @@ namespace WCS.BLL.Tool
byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true);
return senddata1;
}
/// <summary>
/// 库位灯常亮/关闭
/// </summary>
/// <param name="board_id"></param>
/// <param name="lightcolor"></param>
/// <param name="status">0X00 关闭 0X01 常亮 0X02 闪烁 0X03 短亮一次</param>
/// <returns></returns>
public static byte[] StoreLightOnOff(int board_id, string lightcolor, int status)
{
byte color = 0x00;
switch (lightcolor)
{
case "红":
color = 0x01;
break;
case "绿":
color = 0x02;
break;
case "黄":
color = 0x03;
break;
case "蓝":
color = 0x04;
break;
case "紫":
color = 0x05;
break;
case "青":
color = 0x06;
break;
case "白":
color = 0x07;
break;
case "无":
color = 0x00;
break;
}
byte[] data1 = new byte[3 + 5];
data1[0] = 0xff;
data1[1] = 0x01;
byte[] length_base = BitConverter.GetBytes(data1.Length + 2);
data1[2] = length_base[1];
data1[3] = length_base[0];
data1[4] = 0x01;
data1[5] = (byte)board_id;
data1[5 + 1] = (byte)status;
data1[5 + 2] = color;
byte[] data = Crc16(data1, data1.Length, true);
return data;
}
}
}

View File

@ -41,6 +41,10 @@ namespace WCS.BLL
/// 出库流程日志
/// </summary>
Outstore,
/// <summary>
/// 入库流程日志
/// </summary>
Instore,
}
/// <summary>