From f06ae0e33e33f1ed5f198827b9b5a53e765b3eee Mon Sep 17 00:00:00 2001 From: patrick.xu <patrick.xu@broconcentric.com> Date: 星期一, 11 一月 2021 10:58:26 +0800 Subject: [PATCH] 1. 来料检测添加线体代码 2. 添加检测数据区间压缩配置和功能 --- src/Bro.Process/ProcessControl.cs | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Bro.Process/ProcessControl.cs b/src/Bro.Process/ProcessControl.cs index 8a4c27f..2f31a10 100644 --- a/src/Bro.Process/ProcessControl.cs +++ b/src/Bro.Process/ProcessControl.cs @@ -21,7 +21,7 @@ using System.Threading.Tasks; using static Bro.Common.Helper.EnumHelper; -namespace Bro.Process +namespace Bro.Process { [Process("", DeviceAttributeType.Device)] public partial class ProcessControl : IProcess @@ -45,7 +45,6 @@ #region Event public event Action<string, Bitmap, string> OnBitmapOutput; - //public event Action<string, object> OnObjectOutput; public Action<DateTime, Exception> OnExceptionOccured { get; set; } public event Action<DeviceState> OnProcessStateChanged; public event Action<DateTime, string, string> OnLog; @@ -471,14 +470,14 @@ /// <param name="config">鎿嶄綔閰嶇疆锛岀敤鏉ョ‘璁ょ洃鍚潵婧愬拰绠楁硶璺緞</param> /// <param name="algorithemPath">绠楁硶璺緞锛岄粯璁ゆ槸閰嶇疆涓殑绗竴涓畻娉曡矾寰�</param> /// <returns>Halcon绠楁硶</returns> - protected HDevEngineTool GetHalconTool(IOperationConfig config, string algorithemPath = "") + protected HDevEngineTool GetHalconTool(IOperationConfig config, string monitorSetId = "", string algorithemPath = "") { if (string.IsNullOrWhiteSpace(algorithemPath)) { algorithemPath = (config as IHalconToolPath)?.GetHalconToolPathList()[0]; } - string key = config.MonitorSetId + "|" + algorithemPath; + string key = (string.IsNullOrWhiteSpace(monitorSetId) ? config.MonitorSetId : monitorSetId) + "|" + algorithemPath; if (_halconToolDict.ContainsKey(key)) { return _halconToolDict[key]; @@ -632,7 +631,7 @@ #endregion #region 鍥惧儚澶勭悊 - protected IImageSet CollectHImage(CameraBase camera, IOperationConfig opConfig, [CallerMemberName]string methodCode = "") + protected IImageSet CollectHImage(CameraBase camera, IOperationConfig opConfig, [CallerMemberName] string methodCode = "") { IImageSet set = null; -- Gitblit v1.8.0