Commit 92f17790 刘韬

1

1 个父辈 4bc7bbd9
...@@ -95,6 +95,32 @@ namespace DeviceLibrary ...@@ -95,6 +95,32 @@ namespace DeviceLibrary
catch (Exception ex) { LogUtil.error("ShowColror " + color + ", " + lastState + "出错:" + ex.ToString()); } catch (Exception ex) { LogUtil.error("ShowColror " + color + ", " + lastState + "出错:" + ex.ToString()); }
} }
public void ShowBlink(Color color, string lastState)
{
try
{
if (rGB_Controller == null || (!rgbLedInitOk))
{
return;
}
if (string.IsNullOrEmpty(lastS))
{
lastS = "show";
rGB_Controller.ShowColor(color);
}
else
{
lastS = "";
rGB_Controller.CloseLed();
}
lastColor = color.Name.ToString();
}
catch (Exception ex) { LogUtil.error("ShowColror " + color + ", " + lastState + "出错:" + ex.ToString()); }
}
public void ShowYellowLight(string s= "storeOut") public void ShowYellowLight(string s= "storeOut")
{ {
if (!lastColor.Equals("yellowL")) if (!lastColor.Equals("yellowL"))
...@@ -124,7 +150,7 @@ namespace DeviceLibrary ...@@ -124,7 +150,7 @@ namespace DeviceLibrary
return; return;
} }
// 红色: 急停, //红色: 急停,
//紫色: 异常, //紫色: 异常,
//蓝绿: 待机 //蓝绿: 待机
//流动绿: 入库 //流动绿: 入库
...@@ -198,33 +224,37 @@ namespace DeviceLibrary ...@@ -198,33 +224,37 @@ namespace DeviceLibrary
else if (scanCode) else if (scanCode)
{ {
//蓝色: 扫码检测 //蓝色: 扫码检测
ShowColor(Color.Blue, "scanCode"); //ShowColor(Color.Blue, "scanCode");
ShowBlink(Color.Yellow, "scanCode");
} }
else if (waitTake) else if (waitTake)
{ {
//暂停等待料盘拿走 //暂停等待料盘拿走
//白色: 等待用户响应(等待取走盘等), //白色: 等待用户响应(等待取走盘等),
//蓝色: 扫码检测 //蓝色: 扫码检测
ShowColor(Color.White, "waitTask"); //ShowColor(Color.White, "waitTask");
ShowBlink(Color.Yellow, "waitTask");
} }
//出入库 绿闪 黄闪 //出入库 绿闪 黄闪
else if (inOut) else if (inOut)
{ {
////流动黄: 出库, ////流动黄: 出库,
ShowYellowLight(); //ShowYellowLight();
ShowBlink(Color.Yellow, "inOut");
//lastS = "storeOut"; //lastS = "storeOut";
//LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor); //LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
} }
else if (inPut) else if (inPut)
{ {
ShowGreenLight(); //ShowGreenLight();
ShowBlink(Color.Yellow, "InPut");
//lastS = "storeIn"; //lastS = "storeIn";
//LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor); //LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
} }
else if (hasAlarm) else if (hasAlarm)
{ {
//紫色: 异常, //紫色: 异常,
ShowColor(Color.Purple, "hasAlarm"); ShowColor(Color.Red, "hasAlarm");
} //温度超限 } //温度超限
//else if (IsTHoutRange()) //else if (IsTHoutRange())
...@@ -243,7 +273,8 @@ namespace DeviceLibrary ...@@ -243,7 +273,8 @@ namespace DeviceLibrary
else else
{ {
//待机 蓝绿 //待机 蓝绿
ShowColor(Color.FromArgb(0, 255, 64), "waiting"); //ShowColor(Color.FromArgb(0, 255, 64), "waiting");
ShowColor(Color.Green, "waiting");
} }
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!