From 9ff922bb630ed1cbcea7bc43357f66bb9cf90371 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期四, 02 七月 2020 14:57:14 +0800
Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071

---
 src/Bro.M071.Process/M071Process.cs |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/Bro.M071.Process/M071Process.cs b/src/Bro.M071.Process/M071Process.cs
index 0c615a6..dfab5fa 100644
--- a/src/Bro.M071.Process/M071Process.cs
+++ b/src/Bro.M071.Process/M071Process.cs
@@ -164,6 +164,12 @@
                 throw new ProcessException("鏈緭鍏ヤ骇鍝佹潯鐮侊紝璇峰嬁寮�濮嬫祴閲�");
             }
 
+            //妫�鏌ヤ骇鍝佹斁缃甇K
+
+            //姘旂几鎺ㄥ姩鍘嬫澘绉诲姩鍒颁骇鍝佷笂鏂�
+
+            //鍘嬫澘鍘嬬揣浜у搧
+
             OnMeasureStart?.BeginInvoke(null, null);
 
             var measurements = Config.MeasurementUnitCollection.Where(u => u.IsEnabled).ToList().DeepSerializeClone();
@@ -195,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;
@@ -223,6 +230,9 @@
                   });
 
             BarCode = "";
+
+
+
             return new ProcessResponse(true);
         }
 

--
Gitblit v1.8.0