Commit 43745a9a LN
2 个父辈 f450c15a 751367a6
......@@ -131,14 +131,15 @@ namespace OnlineStore.Common
}
return default;
}
public static string Get(string url)
public static string Get(string url, bool islog=true)
{
return Get(url, Encoding.UTF8);
return Get(url, Encoding.UTF8, islog);
}
public static string Get(string url, Encoding encoding, int timeOut = 10000)
public static string Get(string url, Encoding encoding, bool islog = true,int timeOut = 10000)
{
try
{
if (islog)
LogUtil.debug("HTTP GET FROM: " + url);
using (var wc = new MyWebClient { Encoding = encoding })
{
......@@ -147,7 +148,8 @@ namespace OnlineStore.Common
using (var sr = new StreamReader(readStream, encoding))
{
var result = sr.ReadToEnd();
LogUtil.debug("receive << " + result);
if (islog)
LogUtil.debug("receive << " + result);
return result;
}
}
......
此文件类型无法预览
......@@ -156,6 +156,12 @@
<param name="key"></param>
<param name="value"></param>
</member>
<member name="M:ConfigHelper.Config.Del(System.String)">
<summary>
删除配置
</summary>
<param name="key"></param>
</member>
<member name="M:ConfigHelper.Config.SaveChangeDebounce">
<summary>
保存设置
......
......@@ -28,7 +28,7 @@ namespace DeviceLibrary
{"height",Setting_Init.UploadVideo_ImgHeight.ToString()},
{"quality",Setting_Init.UploadVideo_ImgQuality.ToString()},
};
base64 = HttpHelper.Get(GetAddr(Addr_getImgBase64, dic));
base64 = HttpHelper.Get(GetAddr(Addr_getImgBase64, dic),false);
}
catch (Exception ex)
{
......
......@@ -611,8 +611,8 @@ namespace DeviceLibrary
if (RobotManage.mainMachine.IsInStoreReady)
{
WarnMsg = "";
if (plateH > 56)
plateH = 56;
if (plateH > 72)
plateH = 72;
JobInfo inStoreJob = new JobInfo(message, posId, plateW, plateH);
RobotManage.mainMachine.StartInStore(inStoreJob);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
......
......@@ -95,6 +95,32 @@ namespace DeviceLibrary
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")
{
if (!lastColor.Equals("yellowL"))
......@@ -124,7 +150,7 @@ namespace DeviceLibrary
return;
}
// 红色: 急停,
//红色: 急停,
//紫色: 异常,
//蓝绿: 待机
//流动绿: 入库
......@@ -198,33 +224,37 @@ namespace DeviceLibrary
else if (scanCode)
{
//蓝色: 扫码检测
ShowColor(Color.Blue, "scanCode");
//ShowColor(Color.Blue, "scanCode");
ShowBlink(Color.Yellow, "scanCode");
}
else if (waitTake)
{
//暂停等待料盘拿走
//白色: 等待用户响应(等待取走盘等),
//蓝色: 扫码检测
ShowColor(Color.White, "waitTask");
//ShowColor(Color.White, "waitTask");
ShowBlink(Color.Yellow, "waitTask");
}
//出入库 绿闪 黄闪
else if (inOut)
{
////流动黄: 出库,
ShowYellowLight();
//ShowYellowLight();
ShowBlink(Color.Yellow, "inOut");
//lastS = "storeOut";
//LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
}
else if (inPut)
{
ShowGreenLight();
//ShowGreenLight();
ShowBlink(Color.Yellow, "InPut");
//lastS = "storeIn";
//LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
}
else if (hasAlarm)
{
//紫色: 异常,
ShowColor(Color.Purple, "hasAlarm");
ShowColor(Color.Red, "hasAlarm");
} //温度超限
//else if (IsTHoutRange())
......@@ -243,7 +273,8 @@ namespace DeviceLibrary
else
{
//待机 蓝绿
ShowColor(Color.FromArgb(0, 255, 64), "waiting");
//ShowColor(Color.FromArgb(0, 255, 64), "waiting");
ShowColor(Color.Green, "waiting");
}
}
}
......
......@@ -737,7 +737,7 @@ namespace DeviceLibrary
{
StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
StoreMoveInfo.MoveParam.PosID = "NG";
StoreMoveInfo.MoveParam.PlateH = 56;
StoreMoveInfo.MoveParam.PlateH = 72;
StoreMoveInfo.MoveParam.PlateW = 7;
StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.tray_detect_reel_01, "料叉传感器感应到有料,请人工确认");
......
......@@ -76,7 +76,7 @@ namespace DeviceLibrary
return false;
}
StringStateE LastStringState { get => ConfigHelper.Config.Get("Buffer_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); }
StringStateE LastStringState { get => ConfigHelper.Config.Get("Buffer_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Buffer_LastStringState", value); }
bool newreel = true;
bool downCheck1 = false;
bool downCheck2 = false;
......@@ -664,7 +664,7 @@ namespace DeviceLibrary
catch (Exception e)
{
LogUtil.error($"{prefix}使用自定义高度列表异常", e);
List<int> heightList = new List<int> { 8, 12, 16, 24, 32, 44, 56 };
List<int> heightList = new List<int> { 8, 12, 16, 24, 32, 44, 56, 72 };
float minCha = float.MaxValue;
foreach (int h in heightList)
{
......@@ -688,7 +688,7 @@ namespace DeviceLibrary
}
else
{
List<int> heightList = new List<int> { 8, 12, 16, 24, 32, 44, 56 };
List<int> heightList = new List<int> { 8, 12, 16, 24, 32, 44, 56, 72 };
float minCha = float.MaxValue;
foreach (int h in heightList)
{
......
......@@ -45,7 +45,7 @@ namespace TheMachine
//Config.PropertyBind("Device_Humiture_Port", cb_tempsensorport, "SelectedItem", "SelectedIndexChanged");
Config.PropertyBind("Device_Use_Fixpos", cb_usefixpos, "Checked", "CheckedChanged");
Config.PropertyBind("Enable_Fixpos", cb_usefixpos, "Checked", "CheckedChanged");
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!