Przeglądaj źródła

修复ikap相机无法编辑和添加
修复无法强制mes上传pass
修复动态精度输出不了的问题

KWD 4 miesięcy temu
rodzic
commit
3016245f38

+ 9 - 2
TeamAAS-VM/Core/Management.cs

@@ -156,7 +156,7 @@ namespace TeamAAS_VP.Core
             set { SetProperty(ref _ShowMes_Query, value); }
         }
 
-        private bool _ShowMes_Result;
+        private bool _ShowMes_Result = false;
         /// <summary>
         /// 显示上传结果
         /// </summary>
@@ -164,6 +164,7 @@ namespace TeamAAS_VP.Core
         {
             get { return _ShowMes_Result; }
             set { SetProperty(ref _ShowMes_Result, value); }
+
         }
 
         /// <summary>
@@ -2732,6 +2733,12 @@ namespace TeamAAS_VP.Core
                                     }
                                     bool allSuccess = true;
                                     bool ok = false;
+
+                                    if (homeview.IsResultTrue)
+                                    {
+                                        ShowMes_Result = true;
+                                    }
+
                                     if (stationConfig.SaveCsvkeyData)
                                     {
                                        
@@ -2748,7 +2755,7 @@ namespace TeamAAS_VP.Core
                                         {
                                             ShowMes_Result = false;
                                         }
-                                        if (homeview.IsResultTrue == false)
+                                        if (homeview.IsResultTrue == true)
                                         {
                                             ShowMes_Result = true;
                                         }

+ 16 - 7
TeamAAS-VM/ViewModels/Product/VisionDynamicAccuracyAnalyzerViewModel.cs

@@ -24,6 +24,7 @@ using TeamAAS_VP.Core.PLCs;
 using TeamAAS_VP.Enums;
 using TeamAAS_VP.Interfaces;
 using TeamAAS_VP.Models;
+using TeamAAS_VP.Models.Calibration;
 using TeamAAS_VP.Resources.Languages;
 using TeamAAS_VP.Services;
 using static TeamAAS_VP.Core.StabilityAnalyzer;
@@ -1200,11 +1201,11 @@ namespace TeamAAS_VP.ViewModels.Product
                         //}
 
                         ////获取机器人当前坐标系
-                        //RPoint rPoint = Robot.GetRobotPos();
-                        //double[] point = new double[3];
-                        //point[0] = rPoint.X;
-                        //point[1] = rPoint.Y;
-                        //point[2] = rPoint.U;
+                        RPoint rPoint = Robot.GetRobotPos();
+                        double[] point = new double[3];
+                        point[0] = rPoint.X;
+                        point[1] = rPoint.Y;
+                        point[2] = rPoint.U;
                         //if (calib.CameraMount == CameraMount.FixedUp || calib.CameraMount == CameraMount.FixedDown)
                         //{
                         //    point = null;
@@ -1219,9 +1220,17 @@ namespace TeamAAS_VP.ViewModels.Product
                         //eturn (true, _pixel_x, _pixel_y, _pixel_u, calibResult.X, calibResult.Y); ;
                         if (!outputCollection.Contains("dis1"))
                         {
+                            CalibrationInfo calibration = new CalibrationInfo();
                             string[] Point1 = ((string)(outputCollection["Point"].Value)).Split(',');
-                            var calibration = _calibrationService.GetCalibration(SelectProcedure.CalibrationId);
-                            (bool IsSucceed, double X, double Y, double U) = _calibrationService.ConvertPixelToPosition((double.Parse(Point1[0]), double.Parse(Point1[1]), double.Parse(Point1[2])), null, calibration);
+                            try
+                            {
+                                calibration = _calibrationService.GetCalibration(SelectProcedure.CalibrationId);
+                            }
+                            catch (Exception)
+                            {
+                                SendTaskMessage("坐标转换失败!");
+                            }
+                            (bool IsSucceed, double X, double Y, double U) = _calibrationService.ConvertPixelToPosition((double.Parse(Point1[0]), double.Parse(Point1[1]), double.Parse(Point1[2])), point, calibration);
                             if (!IsSucceed)
                             {
                                 SendTaskMessage("坐标转换失败!");

+ 4 - 0
TeamAAS-VM/ViewModels/Setting/EditCameraViewModel.cs

@@ -159,6 +159,10 @@ namespace TeamAAS_VP.ViewModels.Setting
             {
                 cameras = SSZNCamera.GetDevices();
             }
+            else if (cameraBrand == CameraBrand.IKap)
+            {
+                cameras = IKapCamera.GetDevices();
+            }
             CameraList.Clear();
             if (cameras != null)
             {

+ 5 - 1
TeamAAS-VM/ViewModels/SettingViewModel.cs

@@ -918,7 +918,11 @@ namespace TeamAAS_VP.ViewModels
                     break;
                 case CameraBrand.SSZN:
                     softwarename = "SSZN Camera Viewer";
-                    result = OptCamera.CheckSoftwareInstalled();
+                    result = SSZNCamera.CheckSoftwareInstalled();
+                    break;
+                case CameraBrand.IKap:
+                    softwarename = "IKap Camera Viewer";
+                    result = IKapCamera.CheckSoftwareInstalled();
                     break;
                 default:
                     break;