From 3b0e2084501ea07fbcd1f984585bd64e3a0df241 Mon Sep 17 00:00:00 2001
From: xcd <834800634@qq.com>
Date: 星期四, 02 七月 2020 17:14:41 +0800
Subject: [PATCH] 添加板卡基类,提取GTS板卡配置到板卡基类

---
 src/Bro.M071.Process/M071Process.cs |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/Bro.M071.Process/M071Process.cs b/src/Bro.M071.Process/M071Process.cs
index 61f3aee..a6a58a3 100644
--- a/src/Bro.M071.Process/M071Process.cs
+++ b/src/Bro.M071.Process/M071Process.cs
@@ -201,18 +201,19 @@
                   {
                       _pauseHandle.WaitHandle.WaitOne();
 
-                      IDevice device = DeviceCollection.FirstOrDefault(u => u.Id == s.MotionDevice);
+                      IDevice device = DeviceCollection.FirstOrDefault(u => u.Id == s.MotionOp.Device);
                       if (device == null)
                           throw new ProcessException($"{s.Name}鎷嶇収鐐逛綅鏈缃繍鍔ㄨ澶�");
 
-                      IMotion motionDevice = device as IMotion;
+                      IMotionCard motionDevice = device as IMotionCard;
 
                       if (motionDevice == null)
                           throw new ProcessException($"{s.Name}鎷嶇収鐐逛綅璁剧疆{device.Name}涓嶆槸杩愬姩璁惧");
 
-                      if (!motionDevice.MoveToPoint(null))
+                      var response = motionDevice.Run(s.MotionOp.OpConfig);
+                      if (!response.Result)
                       {
-                          throw new ProcessException("杩愬姩涓", null, ExceptionLevel.Info);
+                          throw new ProcessException($"{device.Name}寮傚父锛寋response.Message}", null, ExceptionLevel.Info);
                       }
 
                       CameraBase camera = DeviceCollection.FirstOrDefault(u => u.Id == s.CameraOp.Device) as CameraBase;
@@ -229,8 +230,6 @@
                   });
 
             BarCode = "";
-
-
 
             return new ProcessResponse(true);
         }

--
Gitblit v1.8.0