From 6f92829951f3ec228b18df8c157239573edd9cb4 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期三, 09 九月 2020 15:20:53 +0800
Subject: [PATCH] 1. 取消ImageSet中的HImage释放动作,转移到业务流程中 2. 拆分板卡的IO监听和轴状态,轴位置监听

---
 src/Bro.Device.Gocator/GocatorDriver.cs |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/Bro.Device.Gocator/GocatorDriver.cs b/src/Bro.Device.Gocator/GocatorDriver.cs
index 2a659df..ae21a3f 100644
--- a/src/Bro.Device.Gocator/GocatorDriver.cs
+++ b/src/Bro.Device.Gocator/GocatorDriver.cs
@@ -1,11 +1,13 @@
 锘縰sing Bro.Common.Base;
 using Bro.Common.Helper;
 using Bro.Common.Interface;
+using Bro.Common.Model;
 using HalconDotNet;
 using Lmi3d.GoSdk;
 using Lmi3d.GoSdk.Messages;
 using Lmi3d.Zen;
 using Lmi3d.Zen.Io;
+using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
@@ -108,12 +110,22 @@
                             {
                                 imgSet.HImage = new HImage();
                                 imgSet.HImage.GenImage1("uint2", (int)width, zoomHeight, zoomPtr);
-                                //imgSet.HImage = imgSet.HImage.ZoomImageSize((int)width, zoomHeight, "constant");
-
 
                                 imgSet.HImage_2 = new HImage();
                                 imgSet.HImage_2.GenImage1("uint2", (int)width, zoomHeight, zoomPtr);
 
+                                LaserScanParam para = new LaserScanParam()
+                                {
+                                    Resolution_X = surfaceMsg.XResolution,
+                                    Resolution_Y = surfaceMsg.YResolution,
+                                    Resolution_Z = surfaceMsg.ZResolution,
+                                    Offset_X = surfaceMsg.XOffset,
+                                    Offset_Y = surfaceMsg.YOffset,
+                                    Offset_Z = surfaceMsg.ZOffset,
+                                    Angle_Z = surfaceMsg.ZAngle,
+                                };
+                                imgSet.ImageData = JsonConvert.SerializeObject(para);
+
                                 //imgSet.HImage_2 = imgSet.HImage_2.ZoomImageSize((int)width, zoomHeight, "constant");
                             }
 

--
Gitblit v1.8.0