ソースを参照

Merge branch 'Bezel-Assy' of http://49.235.130.76/XXF_1122/DaisyNPILine into Bezel-Assy

孝锋 徐 8 ヶ月 前
コミット
61b0396daf

+ 14 - 1
TeamAAS-VM/Controls/PlcRobotManual.xaml

@@ -238,7 +238,7 @@
                                    HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>--> 
-                <StackPanel Grid.Row="6"
+                <StackPanel Grid.Row="5"
                             Grid.ColumnSpan="7"
                             Margin="10,10,0,10"
                             Grid.Column="0"
@@ -255,6 +255,19 @@
                                               Value="{Binding Distance,Mode=TwoWay}"
                                               Margin="10,0" />
                 </StackPanel>
+                <TextBlock Grid.Row="6"
+                           Grid.ColumnSpan="7"
+                           VerticalAlignment="Center"
+                           Margin="10,0">
+                    <TextBlock.Text>
+                        <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                            <Binding Path="Robot.CurrentPosition.X" />
+                            <Binding Path="Robot.CurrentPosition.Y" />
+                            <Binding Path="Robot.CurrentPosition.Z" />
+                            <Binding Path="Robot.CurrentPosition.U" />
+                        </MultiBinding>
+                    </TextBlock.Text>
+                </TextBlock>
             </Grid>
             
             <!-- 附加轴列表:绑定到视图模型中的 ExtraAxes 集合(每项假定有 Name、Position) -->

+ 2 - 1
TeamAAS-VM/Controls/RobotManual.xaml

@@ -130,9 +130,10 @@
                               SelectedItem="{Binding SelectTool,Mode=TwoWay}"
                               ItemsSource="{Binding Tools}" />
                     <TextBlock VerticalAlignment="Center"
+                               Width="380"
                                Margin="10,0">
                         <TextBlock.Text>
-                            <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                            <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} °">
                                 <Binding Path="Robot.CurrentPosition.X" />
                                 <Binding Path="Robot.CurrentPosition.Y" />
                                 <Binding Path="Robot.CurrentPosition.Z" />

+ 4 - 0
TeamAAS-VM/Core/Lights/LightModel.cs

@@ -15,5 +15,9 @@ namespace TeamAAS_VP.Core.Lights
         /// 顺尚信KDC-12V60W-4T
         /// </summary>
         KCS_KDC_12V60W_4T,
+        /// <summary>
+        /// 顺尚信KDC3-24V300W-8T
+        /// </summary>
+        KCS_KDC3_24V300W_8T,
     }
 }

+ 108 - 44
TeamAAS-VM/Models/Lights/LightControllerConfig.cs

@@ -57,50 +57,7 @@ namespace TeamAAS_VP.Models.Lights
         {
             get { return _LightModel; }
             set {
-                if (SetProperty(ref _LightModel, value))
-                {
-                    // 当 LightModel 发生变化时,根据不同型号初始化相关字段与集合。
-                    switch (value)
-                    {
-                        case LightModel.KCS_KDC_12V60W_4T:
-                            // 该型号为 4 通道的串口控制器(示例)
-                            ChannelCount = 4;
-                            // 对于串口型号,清空/禁用 TCP 配置
-                            TcpConfig = null;
-                            // 如果尚未创建串口配置则初始化
-                            if (SerialPortConfig == null)
-                            {
-                                SerialPortConfig = new SerialPortConfig();
-                            }
-
-                            // 初始化通道集合,确保包含正确数量的 ChannelConfig
-                            ChannelConfigs = new ObservableCollection<ChannelConfig>();
-                            if (ChannelConfigs.Count != ChannelCount)
-                            {
-                                ChannelConfigs.Clear();
-                                for (int i = 0; i < ChannelCount; i++)
-                                {
-                                    // 为每个通道创建默认配置:本地索引/全局索引、名称、描述和默认亮度
-                                    ChannelConfigs.Add(new ChannelConfig()
-                                    {
-                                        LocalIndex = i,
-                                        GlobalIndex = i,
-                                        Name = $"Channel {i + 1}",
-                                        Description = $"Description for Channel {i + 1}",
-                                        DefaultBrightness = 100
-                                    });
-                                }
-                            }
-
-                            break;
-                        default:
-                            // 对于未知或未实现的型号,清理所有特定配置并使用默认空集合
-                            ChannelConfigs = new ObservableCollection<ChannelConfig>();
-                            SerialPortConfig = null;
-                            TcpConfig = null;
-                            break;
-                    }
-                }
+                SetProperty(ref _LightModel, value);
             }
         }
 
@@ -176,6 +133,37 @@ namespace TeamAAS_VP.Models.Lights
                             DefaultBrightness = 100
                         });
                     }
+                    break;
+                case LightModel.KCS_KDC3_24V300W_8T:
+                    // 该型号为 8 通道的串口控制器(示例)
+                    ChannelCount = 8;
+                    // 对于串口型号,清空/禁用 TCP 配置
+                    TcpConfig = null;
+                    // 如果尚未创建串口配置则初始化
+                    if (SerialPortConfig == null)
+                    {
+                        SerialPortConfig = new SerialPortConfig();
+                    }
+
+                    // 初始化通道集合,确保包含正确数量的 ChannelConfig
+                    ChannelConfigs = new ObservableCollection<ChannelConfig>();
+                    if (ChannelConfigs.Count != ChannelCount)
+                    {
+                        ChannelConfigs.Clear();
+                        for (int i = 0; i < ChannelCount; i++)
+                        {
+                            // 为每个通道创建默认配置:本地索引/全局索引、名称、描述和默认亮度
+                            ChannelConfigs.Add(new ChannelConfig()
+                            {
+                                LocalIndex = i,
+                                GlobalIndex = i,
+                                Name = $"Channel {i + 1}",
+                                Description = $"Description for Channel {i + 1}",
+                                DefaultBrightness = 100
+                            });
+                        }
+                    }
+
                     break;
                 default:
                     // 未知型号:初始化空集合并清空通信配置
@@ -185,5 +173,81 @@ namespace TeamAAS_VP.Models.Lights
                     break;
             }
         }
+
+        public void Init()
+        {
+            // 当 LightModel 发生变化时,根据不同型号初始化相关字段与集合。
+            switch (LightModel)
+            {
+                case LightModel.KCS_KDC_12V60W_4T:
+                    // 该型号为 4 通道的串口控制器(示例)
+                    ChannelCount = 4;
+                    // 对于串口型号,清空/禁用 TCP 配置
+                    TcpConfig = null;
+                    // 如果尚未创建串口配置则初始化
+                    if (SerialPortConfig == null)
+                    {
+                        SerialPortConfig = new SerialPortConfig();
+                    }
+
+                    // 初始化通道集合,确保包含正确数量的 ChannelConfig
+                    ChannelConfigs = new ObservableCollection<ChannelConfig>();
+                    if (ChannelConfigs.Count != ChannelCount)
+                    {
+                        ChannelConfigs.Clear();
+                        for (int i = 0; i < ChannelCount; i++)
+                        {
+                            // 为每个通道创建默认配置:本地索引/全局索引、名称、描述和默认亮度
+                            ChannelConfigs.Add(new ChannelConfig()
+                            {
+                                LocalIndex = i,
+                                GlobalIndex = i,
+                                Name = $"Channel {i + 1}",
+                                Description = $"Description for Channel {i + 1}",
+                                DefaultBrightness = 100
+                            });
+                        }
+                    }
+
+                    break;
+                case LightModel.KCS_KDC3_24V300W_8T:
+                    // 该型号为 8 通道的串口控制器(示例)
+                    ChannelCount = 8;
+                    // 对于串口型号,清空/禁用 TCP 配置
+                    TcpConfig = null;
+                    // 如果尚未创建串口配置则初始化
+                    if (SerialPortConfig == null)
+                    {
+                        SerialPortConfig = new SerialPortConfig();
+                    }
+
+                    // 初始化通道集合,确保包含正确数量的 ChannelConfig
+                    ChannelConfigs = new ObservableCollection<ChannelConfig>();
+                    if (ChannelConfigs.Count != ChannelCount)
+                    {
+                        ChannelConfigs.Clear();
+                        for (int i = 0; i < ChannelCount; i++)
+                        {
+                            // 为每个通道创建默认配置:本地索引/全局索引、名称、描述和默认亮度
+                            ChannelConfigs.Add(new ChannelConfig()
+                            {
+                                LocalIndex = i,
+                                GlobalIndex = i,
+                                Name = $"Channel {i + 1}",
+                                Description = $"Description for Channel {i + 1}",
+                                DefaultBrightness = 100
+                            });
+                        }
+                    }
+
+                    break;
+                default:
+                    // 对于未知或未实现的型号,清理所有特定配置并使用默认空集合
+                    ChannelConfigs = new ObservableCollection<ChannelConfig>();
+                    SerialPortConfig = null;
+                    TcpConfig = null;
+                    break;
+            }
+        }
     }
 }

+ 39 - 13
TeamAAS-VM/Services/CameraCalibrationService.cs

@@ -357,14 +357,14 @@ namespace TeamAAS_VP.Services
             }
 
             //计算相机与机器人坐标系的旋转矩阵
-            var robotCameraRotationMatrix= await AutoIdentifyRobotCameraRotationMatrix(calibrationInfo, robot, cancellationToken);
+            var robotCameraRotationMatrix = await AutoIdentifyRobotCameraRotationMatrix(calibrationInfo, robot, cancellationToken);
             if (!robotCameraRotationMatrix.IsSuccess)
             {
                 return (false, null, 0, 0, 0, 0);
             }
-            pixelScaleX= robotCameraRotationMatrix.PixelScaleX;
-            pixelScaleY= robotCameraRotationMatrix.PixelScaleY;
-            RobotCameraRotationMatrix= robotCameraRotationMatrix.Item2;
+            pixelScaleX = robotCameraRotationMatrix.PixelScaleX;
+            pixelScaleY = robotCameraRotationMatrix.PixelScaleY;
+            RobotCameraRotationMatrix = robotCameraRotationMatrix.Item2;
 
             //自动移动机器人至图像中心点位置
             var autoMoveResult = await AutoMoveRobotToImageCenter(robot, RobotCameraRotationMatrix, pixelScaleX, pixelScaleY, cancellationToken);
@@ -372,8 +372,8 @@ namespace TeamAAS_VP.Services
             {
                 return (false, null, 0, 0, 0, 0);
             }
-            calibrationInfo.CenterPoint.X= (float)autoMoveResult.X;
-            calibrationInfo.CenterPoint.Y= (float)autoMoveResult.Y;
+            calibrationInfo.CenterPoint.X = (float)autoMoveResult.X;
+            calibrationInfo.CenterPoint.Y = (float)autoMoveResult.Y;
 
 
             RPoint RobotU = calibrationInfo.CenterPoint.Clone();
@@ -381,7 +381,7 @@ namespace TeamAAS_VP.Services
 
             //机器人U轴旋转
             await robot.CalibMotionAsync(RobotU, RobotU.Z);
-            if(cancellationToken.IsCancellationRequested)
+            if (cancellationToken.IsCancellationRequested)
             {
                 return (false, null, 0, 0, 0, 0);
             }
@@ -449,7 +449,7 @@ namespace TeamAAS_VP.Services
             (bool IsSuccess, Matrix<double> RotationMatrix, double ToolX, double ToolY, double PixelScaleX, double PixelScaleY) calibresult;
             if (calibrationInfo.CameraMount == Enums.CameraMount.FixedDown)
             {
-                calibresult = await CalibrateFixedDownCameraTool(calibrationInfo,robot,cancellationToken);
+                calibresult = await CalibrateFixedDownCameraTool(calibrationInfo, robot, cancellationToken);
             }
             else if (calibrationInfo.CameraMount == Enums.CameraMount.FixedUp)
             {
@@ -467,10 +467,10 @@ namespace TeamAAS_VP.Services
             {
                 return (false, null, 0, 0, 0, 0);
             }
-            
-            pixelScaleX= calibresult.PixelScaleX;
-            pixelScaleY= calibresult.PixelScaleY;
-            RobotCameraRotationMatrix= calibresult.RotationMatrix;
+
+            pixelScaleX = calibresult.PixelScaleX;
+            pixelScaleY = calibresult.PixelScaleY;
+            RobotCameraRotationMatrix = calibresult.RotationMatrix;
 
             return (true, RobotCameraRotationMatrix, calibresult.ToolX, calibresult.ToolY, pixelScaleX, pixelScaleY);
         }
@@ -533,7 +533,7 @@ namespace TeamAAS_VP.Services
             {
                 //移动机器人至P0
                 await robot.CalibMotionAsync(RobotP0, 0);
-                if(cancellationToken.IsCancellationRequested)
+                if (cancellationToken.IsCancellationRequested)
                 {
                     return (false, null, 0, 0);
                 }
@@ -818,6 +818,32 @@ namespace TeamAAS_VP.Services
 
                 calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
             }
+            else if (calibrationInfo.CameraMount== Enums.CameraMount.MobileDown_XYPlatform && calibrationInfo.CalibTechP0Mode== Enums.CalibTechP0Mode.CameraAutoFindP0)
+            {
+                //移动机器人至中心位置
+                await robot.CalibMotionAsync(calibrationInfo.CenterPoint, 0);
+                if (cancellationToken.IsCancellationRequested)
+                {
+                    return (false, null, null, null);
+                }
+                //计算相机与机器人坐标系的旋转矩阵
+                var robotCameraRotationMatrix = await AutoIdentifyRobotCameraRotationMatrix(calibrationInfo, robot, cancellationToken);
+                if (!robotCameraRotationMatrix.IsSuccess)
+                {
+                    return (false, null, null, null);
+                }
+                //自动移动机器人至图像中心点位置
+                var autoMoveResult = await AutoMoveRobotToImageCenter(robot, robotCameraRotationMatrix.RotationMatrix, robotCameraRotationMatrix.PixelScaleX, robotCameraRotationMatrix.PixelScaleY, cancellationToken);
+                if (!autoMoveResult.IsSuccess)
+                {
+                    return (false, null, null, null);
+                }
+                calibrationInfo.CenterPoint.X = (float)autoMoveResult.X;
+                calibrationInfo.CenterPoint.Y = (float)autoMoveResult.Y;
+                calibrationInfo.MarkPoint = calibrationInfo.CenterPoint.Clone();
+
+                calibrationInfo.RobotCameraRotationMatrix = robotCameraRotationMatrix.RotationMatrix.ToArray();
+            }
 
             /// <summary>
             /// 机器人与相机之间的旋转矩阵

+ 8 - 0
TeamAAS-VM/Services/LightManagerService.cs

@@ -88,6 +88,14 @@ namespace TeamAAS_VP.Services
                 var protocol = new SerialPortProtocol(config.SerialPortConfig);
                 return new KCSLightController(id, protocol, config.ChannelCount,config);
             });
+            // 注册KCS控制器工厂
+            RegisterControllerFactory(LightModel.KCS_KDC3_24V300W_8T, (id, config) =>
+            {
+                if (config == null) throw new ArgumentNullException(nameof(config));
+                // 使用配置里的串口配置创建协议实现,再创建控制器实例
+                var protocol = new SerialPortProtocol(config.SerialPortConfig);
+                return new KCSLightController(id, protocol, config.ChannelCount, config);
+            });
         }
 
         /// <summary>

+ 12 - 4
TeamAAS-VM/ViewModels/Calibration/CalibToolViewModel.cs

@@ -189,16 +189,19 @@ namespace TeamAAS_VP.ViewModels.Calibration
             {
                 if (Angle == 0)
                     Angle = 10;
-                _cts=new CancellationTokenSource();
+                
                 var view = new ShowMessage(Lang.Tool校准, Lang.是否开始自动校准工具坐标);
                 //show the dialog
                 var result = await DialogHost.Show(view, "CalibToolDialog", null, null, (sender,e) =>{
                     try
                     {
                         if (_cts != null && !_cts.IsCancellationRequested)
+                        {
                             _cts.Cancel();
-                        _cts.Dispose();
-                        _cts = null;
+                            _cts.Dispose();
+                            _cts = null;
+                        }
+                        
                     }
                     catch (Exception)
                     {
@@ -207,6 +210,8 @@ namespace TeamAAS_VP.ViewModels.Calibration
                 });
                 if (!((bool)result)) return;
                 IsRunning = false;
+                SelectCalibration.Angle = Angle;
+                _cts = new CancellationTokenSource();
                 var toolResult = await _cameraCalibrationService.CalibrateUncalibratedCameraTool(SelectCalibration, Robot, _cts.Token);
                 if (toolResult.IsSuccess)
                 {
@@ -247,8 +252,11 @@ namespace TeamAAS_VP.ViewModels.Calibration
                 try
                 {
                     if (_cts != null && !_cts.IsCancellationRequested)
+                    {
                         _cts.Cancel();
-                    _cts.Dispose();
+                        _cts.Dispose();
+                        
+                    }
                     _cts = null;
                 }
                 catch (Exception)

+ 8 - 8
TeamAAS-VM/ViewModels/Calibration/CalibrationBasicsViewModel.cs

@@ -386,10 +386,10 @@ namespace TeamAAS_VP.ViewModels.Calibration
                                     break;
                                 case RobotBrand.XYZ_Platform:
                                 case RobotBrand.XYZU_Platform:
-                                    if (SelectCalibration.CameraMount == CameraMount.MobileJ2 || SelectCalibration.CameraMount == CameraMount.MobileJ4)
-                                    {
-                                        result = "Unsupported camera installation method!";
-                                    }
+                                    //if (SelectCalibration.CameraMount == CameraMount.MobileJ2 || SelectCalibration.CameraMount == CameraMount.MobileJ4)
+                                    //{
+                                    //    result = "Unsupported camera installation method!";
+                                    //}
                                     break;
                                 default:
                                     break;
@@ -413,10 +413,10 @@ namespace TeamAAS_VP.ViewModels.Calibration
                                     break;
                                 case RobotBrand.XYZ_Platform:
                                 case RobotBrand.XYZU_Platform:
-                                    if (SelectCalibration.CameraMount == CameraMount.MobileJ2 || SelectCalibration.CameraMount == CameraMount.MobileJ4)
-                                    {
-                                        result = "不支持的相机校准方式!";
-                                    }
+                                    //if (SelectCalibration.CameraMount == CameraMount.MobileJ2 || SelectCalibration.CameraMount == CameraMount.MobileJ4)
+                                    //{
+                                    //    result = "不支持的相机校准方式!";
+                                    //}
                                     break;
                                 default:
                                     break;

+ 1 - 0
TeamAAS-VM/ViewModels/Calibration/CalibrationHomeViewModel.cs

@@ -204,6 +204,7 @@ namespace TeamAAS_VP.ViewModels.Calibration
             {
                 return;
             }
+            SelectCalibration.ToolBlock = null;
             NavigationParameters param = new NavigationParameters();
             param.Add("SelectCalibration", SelectCalibration);
             _regionManager.RequestNavigate("CalibrationRegionContext", "CalibrationBasics", param);

+ 4 - 3
TeamAAS-VM/ViewModels/DebugMod/PlcRobotManualStepViewModel.cs

@@ -328,7 +328,7 @@ namespace TeamAAS_VP.ViewModels.DebugMod
         }
 
         /// <summary>
-        /// 附加轴使能
+        /// 附加轴使能
         /// </summary>
         /// <param name="obj"></param>
         async void ExecuteAdditionalAxisMotorOffCommand(object obj)
@@ -338,7 +338,7 @@ namespace TeamAAS_VP.ViewModels.DebugMod
             {
                 if (obj is AxisExtended axis)
                 {
-                    await Robot.AdditionalAxisMotorAsync(axis.Name, true);
+                    await Robot.AdditionalAxisMotorAsync(axis.Name, false);
                     ShowMsg($"{Lang.完成}!");
                 }
             }
@@ -350,7 +350,7 @@ namespace TeamAAS_VP.ViewModels.DebugMod
         }
 
         /// <summary>
-        /// 附加轴使能
+        /// 附加轴使能
         /// </summary>
         /// <param name="obj"></param>
         async void ExecuteAdditionalAxisMotorOnCommand(object obj)
@@ -395,6 +395,7 @@ namespace TeamAAS_VP.ViewModels.DebugMod
             if (robotInfo != null)
             {
                 Robot = _robotService.GetRobot(robotInfo.Id) as XYZU_Robot;
+                AdditionalAxisList = Robot.AdditionalAxisList;
                 Robot.EnterDebugMode = true;
             }
 

+ 1 - 1
TeamAAS-VM/ViewModels/DebugViewModel.cs

@@ -134,7 +134,7 @@ namespace TeamAAS_VP.ViewModels
                     SelectRobot = e.NewValue as RobotInfo;
                     NavigationParameters keyValues = new NavigationParameters();
                     keyValues.Add("RobotInfo", SelectRobot);
-                    if (SelectRobot != null && SelectRobot.RobotBrand == RobotBrand.XYZ_Platform || SelectRobot.RobotBrand == RobotBrand.XYZU_Platform)
+                    if (SelectRobot != null && (SelectRobot.RobotBrand == RobotBrand.XYZ_Platform || SelectRobot.RobotBrand == RobotBrand.XYZU_Platform))
                         _regionManager.RequestNavigate("DebugRegionContext", "PlcRobotManualStep", keyValues);
                     else
                         _regionManager.RequestNavigate("DebugRegionContext", "RobotManualStep", keyValues);

+ 2 - 0
TeamAAS-VM/ViewModels/Setting/AddLightControllerViewModel.cs

@@ -2,6 +2,7 @@ using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
 using System;
+using TeamAAS_VP.Core.Lights;
 using TeamAAS_VP.Models.Lights;
 using TeamAAS_VP.Resources.Languages;
 
@@ -47,6 +48,7 @@ namespace TeamAAS_VP.ViewModels.Setting
         void ExecuteConfirmCommand()
         {
             var p = new DialogParameters();
+            LightController.Init();
             p.Add("LightController", LightController);
             RequestClose?.Invoke(new DialogResult(ButtonResult.OK, p));
         }

+ 5 - 3
TeamAAS-VM/Views/Calibration/CalibTool.xaml

@@ -18,8 +18,6 @@
              mc:Ignorable="d"
              d:DataContext="{d:DesignInstance Type=vm:CalibToolViewModel}"
              d:Background="White"
-             MinHeight="500"
-             MinWidth="500"
              Width="1024"
              Height="768"
              FontFamily="{DynamicResource DefaultFont}">
@@ -32,6 +30,10 @@
                     Value="True" />
             <Setter Property="ShowInTaskbar"
                     Value="True" />
+            <Setter Property="Width"
+                    Value="1024" />
+            <Setter Property="Height"
+                    Value="768" />
             <!--<Setter Property="SizeToContent"
                     Value="WidthAndHeight" />-->
             <!--<Setter Property="WindowState"
@@ -49,7 +51,7 @@
                 <RowDefinition Height="auto" />
                 <RowDefinition Height="auto" />
             </Grid.RowDefinitions>
-            <wf:WindowsFormsHost Grid.Column="0">
+            <wf:WindowsFormsHost>
                 <vp:CogRecordDisplay x:Name="display" />
             </wf:WindowsFormsHost>
             <StackPanel Grid.Row="1"

+ 1 - 1
TeamAAS-VM/Views/Calibration/CalibrationAuto.xaml

@@ -62,7 +62,7 @@
             </Grid.RowDefinitions>
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="*" />
-                <ColumnDefinition Width="auto" />
+                <ColumnDefinition Width="auto" MinWidth="300" />
             </Grid.ColumnDefinitions>
             <wf:WindowsFormsHost Grid.Column="0">
                 <vp:CogRecordDisplay x:Name="display"/>

+ 14 - 6
TeamAAS-VM/Views/Calibration/CalibrationTeachCenterPoint.xaml

@@ -68,7 +68,8 @@
                 <uControl:RobotManual x:Name="robotManual" />
             </materialDesign:DrawerHost.RightDrawerContent>
             <Grid VerticalAlignment="Center"
-                  Width="350">
+                  HorizontalAlignment="Center"
+                  MinWidth="350">
                 <Grid.RowDefinitions>
                     <RowDefinition Height="auto" />
                     <RowDefinition Height="auto" />
@@ -85,7 +86,8 @@
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="auto"
                                       MinWidth="100" />
-                    <ColumnDefinition Width="*" />
+                    <ColumnDefinition Width="*"
+                                      MinWidth="200" />
                     <ColumnDefinition Width="auto"
                                       />
                 </Grid.ColumnDefinitions>
@@ -129,10 +131,10 @@
                     </Button.ToolTip>
                 </Button>
                 <TextBlock Grid.Row="1"
-                           Grid.ColumnSpan="2"
+                           Grid.ColumnSpan="3"
                            Foreground="{DynamicResource PrimaryHueMidForegroundBrush}">
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{2:F3} mm">
+                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{2:F3} mm U:{3:F3} °">
                             <Binding Path="SelectCalibration.CenterPoint.X"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
@@ -142,6 +144,9 @@
                             <Binding Path="SelectCalibration.CenterPoint.Z"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
+                            <Binding Path="SelectCalibration.CenterPoint.U"
+                                     TargetNullValue="0.000"
+                                     FallbackValue="0.000" />
                         </MultiBinding>
                     </TextBlock.Text>
                 </TextBlock>
@@ -164,10 +169,10 @@
                         Command="{Binding TechHomeCommand}">
                 </Button>
                 <TextBlock Grid.Row="3"
-                           Grid.ColumnSpan="2"
+                           Grid.ColumnSpan="3"
                            Visibility="{Binding IsShowTechHome,Converter={StaticResource BooleanToVisibilityConverter}}">
                     <TextBlock.Text>
-                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{2:F3} mm">
+                        <MultiBinding StringFormat="{}X:{0:F3} mm Y:{1:F3} mm Z:{2:F3} mm U:{3:F3} °">
                             <Binding Path="SelectCalibration.HomePoint.X"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
@@ -177,6 +182,9 @@
                             <Binding Path="SelectCalibration.HomePoint.Z"
                                      TargetNullValue="0.000"
                                      FallbackValue="0.000" />
+                            <Binding Path="SelectCalibration.HomePoint.U"
+                                     TargetNullValue="0.000"
+                                     FallbackValue="0.000" />
                         </MultiBinding>
                     </TextBlock.Text>
                 </TextBlock>

+ 2 - 1
TeamAAS-VM/Views/Calibration/CalibrationVerification.xaml

@@ -56,7 +56,8 @@
               IsEnabled="{Binding IsAllowEdit}">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="*" />
-                <ColumnDefinition Width="auto" />
+                <ColumnDefinition Width="auto"
+                                  MinWidth="300" />
             </Grid.ColumnDefinitions>
             <wf:WindowsFormsHost Grid.Column="0">
                 <vp:CogRecordDisplay x:Name="display" />

+ 65 - 7
TeamAAS-VM/Views/DebugMod/PlcRobotManualStep.xaml

@@ -242,7 +242,7 @@
                                HorizontalAlignment="Center" />
                 </StackPanel>
             </Button>-->
-                <StackPanel Grid.Row="6"
+                <StackPanel Grid.Row="5"
                             Grid.ColumnSpan="7"
                             Margin="10,10,0,10"
                             Grid.Column="0"
@@ -259,6 +259,19 @@
                                               Value="{Binding Distance,Mode=TwoWay}"
                                               Margin="10,0" />
                 </StackPanel>
+                <TextBlock Grid.Row="6"
+                           Grid.ColumnSpan="7"
+                           VerticalAlignment="Center"
+                           Margin="10,0">
+                    <TextBlock.Text>
+                        <MultiBinding StringFormat="{}CurPos X: {0:F3} mm Y: {1:F3} mm Z: {2:F3} mm U: {3:F3} mm">
+                            <Binding Path="Robot.CurrentPosition.X" />
+                            <Binding Path="Robot.CurrentPosition.Y" />
+                            <Binding Path="Robot.CurrentPosition.Z" />
+                            <Binding Path="Robot.CurrentPosition.U" />
+                        </MultiBinding>
+                    </TextBlock.Text>
+                </TextBlock>
             </Grid>
 
             <!-- 附加轴列表:绑定到视图模型中的 ExtraAxes 集合(每项假定有 Name、Position) -->
@@ -274,31 +287,76 @@
                                 <StackPanel Orientation="Horizontal"
                                             DockPanel.Dock="Left"
                                             VerticalAlignment="Center">
+                                    <TextBlock Text="{Binding Index}"
+                                               FontWeight="Bold"
+                                               VerticalAlignment="Center" />
                                     <TextBlock Text="{Binding Name}"
-                                               Width="140"
+                                               FontWeight="Bold"
+                                               Margin="2,0"
+                                               VerticalAlignment="Center" />
+
+                                    <TextBlock Text="当前位置:"
+                                               Margin="30,0"
                                                VerticalAlignment="Center" />
                                     <TextBlock Text="{Binding CurrentPosition, StringFormat='{}{0:F3} mm'}"
                                                Width="140"
-                                               Margin="10,0"
+                                               
                                                VerticalAlignment="Center" />
                                 </StackPanel>
                                 <StackPanel Orientation="Horizontal"
                                             HorizontalAlignment="Right"
                                             DockPanel.Dock="Right">
-                                    <Button Content="-"
+                                    <StackPanel.Resources>
+                                        <Style TargetType="Button"
+                                               BasedOn="{StaticResource MaterialDesignRaisedDarkButton}">
+                                            <Setter Property="Width"
+                                                    Value="60" />
+                                            <Setter Property="Height"
+                                                    Value="60" />
+                                            <Setter Property="FontSize"
+                                                    Value="13" />
+                                            <Setter Property="Padding"
+                                                    Value="0" />
+                                            <Setter Property="HorizontalAlignment"
+                                                    Value="Center" />
+                                            <Setter Property="VerticalAlignment"
+                                                    Value="Center" />
+                                            <Setter Property="Margin"
+                                                    Value="2" />
+                                            <Setter Property="materialDesign:ButtonAssist.CornerRadius"
+                                                    Value="10" />
+                                        </Style>
+                                    </StackPanel.Resources>
+                                    <Button
                                             Width="60"
                                             Height="36"
                                             Margin="6,0"
                                             Style="{StaticResource MaterialDesignRaisedDarkButton}"
                                             Command="{Binding DataContext.AdditionalAxisJogPlusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
-                                            CommandParameter="{Binding}" />
-                                    <Button Content="+"
+                                            CommandParameter="{Binding}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowLeftBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="+"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
+                                    <Button 
                                             Width="60"
                                             Height="36"
                                             Margin="6,0"
                                             Style="{StaticResource MaterialDesignRaisedDarkButton}"
                                             Command="{Binding DataContext.AdditionalAxisJogMinusCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
-                                            CommandParameter="{Binding}" />
+                                            CommandParameter="{Binding}">
+                                        <StackPanel Orientation="Vertical">
+                                            <materialDesign:PackIcon Kind="ArrowRightBold"
+                                                                     Width="26"
+                                                                     Height="26" />
+                                            <TextBlock Text="-"
+                                                       HorizontalAlignment="Center" />
+                                        </StackPanel>
+                                    </Button>
                                     <Button Content="上使能"
                                             Width="60"
                                             Height="36"

+ 1 - 0
TeamAAS-VM/Views/Product/PlcPointParams.xaml

@@ -1313,6 +1313,7 @@
                                     <RowDefinition Height="auto" />
                                     <RowDefinition Height="auto" />
                                     <RowDefinition Height="auto" />
+                                    <RowDefinition Height="auto" />
                                 </Grid.RowDefinitions>
                                 <Grid.Resources>
                                     <Style TargetType="Button"

+ 10 - 0
TeamAAS-VM/Views/Setting/EditCamera.xaml

@@ -126,6 +126,7 @@
                                 <RowDefinition Height="auto" />
                                 <RowDefinition Height="auto" />
                                 <RowDefinition Height="auto" />
+                                <RowDefinition Height="auto" />
                             </Grid.RowDefinitions>
                             <materialDesign:PackIcon Kind="CameraOutline"
                                                      Grid.Row="0"
@@ -164,6 +165,15 @@
                                     </MultiBinding>
                                 </TextBlock.Text>
                             </TextBlock>
+                            <TextBlock Grid.Row="3"
+                                       Grid.Column="1"
+                                       Margin="0,2">
+                                <TextBlock.Text>
+                                    <MultiBinding StringFormat="{}IP: {0}">
+                                        <Binding Path="CameraIp" />
+                                    </MultiBinding>
+                                </TextBlock.Text>
+                            </TextBlock>
                         </Grid>
                     </DataTemplate>
                 </ComboBox.ItemTemplate>

+ 10 - 0
TeamAAS-VM/Views/SettingView.xaml

@@ -1451,6 +1451,11 @@
                                                 <Setter Property="Visibility"
                                                         Value="Visible" />
                                             </DataTrigger>
+                                            <DataTrigger Binding="{Binding SelectLightController.LightModel}"
+                                                         Value="{x:Static coreLights:LightModel.KCS_KDC3_24V300W_8T}">
+                                                <Setter Property="Visibility"
+                                                        Value="Visible" />
+                                            </DataTrigger>
                                         </Style.Triggers>
                                     </Style>
                                 </GroupBox.Style>
@@ -1524,6 +1529,11 @@
                                                 <Setter Property="Visibility"
                                                         Value="Collapsed" />
                                             </DataTrigger>
+                                            <DataTrigger Binding="{Binding SelectLightController.LightModel}"
+                                                         Value="{x:Static coreLights:LightModel.KCS_KDC3_24V300W_8T}">
+                                                <Setter Property="Visibility"
+                                                        Value="Collapsed" />
+                                            </DataTrigger>
                                         </Style.Triggers>
                                     </Style>
                                 </GroupBox.Style>