|
|
@@ -30,6 +30,7 @@ using Team.FFFeederService;
|
|
|
using Team.FFFeederService.Interfaces;
|
|
|
using TeamAAS_VP.Core;
|
|
|
using TeamAAS_VP.Core.Cameras;
|
|
|
+using TeamAAS_VP.Core.Lights;
|
|
|
using TeamAAS_VP.Data;
|
|
|
using TeamAAS_VP.Enums;
|
|
|
using TeamAAS_VP.Events;
|
|
|
@@ -2060,6 +2061,30 @@ namespace TeamAAS_VP.Services
|
|
|
//RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
//GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
});
|
|
|
+ if (procedure.ToolBlock.Inputs["InputImage2"].Value != null)
|
|
|
+ {
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+ //Image = (ICogImage)procedure.ToolBlock.Outputs["OriImage"].Value,
|
|
|
+ Image = (ICogImage)procedure.ToolBlock.Inputs["InputImage2"].Value,
|
|
|
+ Graphic = outputCollection["Graphic"].Value as CogGraphicCollection,
|
|
|
+ Record = record,
|
|
|
+ Result = Found,
|
|
|
+ IsShow = true,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ IsCompress = procedure.IsCompress,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName+ "222222",
|
|
|
+ Is3DModel = is3dmodel,
|
|
|
+ //RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
+ //GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2084,6 +2109,30 @@ namespace TeamAAS_VP.Services
|
|
|
RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
});
|
|
|
+ if (procedure.ToolBlock.Inputs["InputImage2"].Value != null)
|
|
|
+ {
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+ //Image = (ICogImage)procedure.ToolBlock.Outputs["OriImage"].Value,
|
|
|
+ Image = (ICogImage)procedure.ToolBlock.Inputs["InputImage2"].Value,
|
|
|
+ Graphic = outputCollection["Graphic"].Value as CogGraphicCollection,
|
|
|
+ Record = record,
|
|
|
+ Result = Found,
|
|
|
+ IsShow = true,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ IsCompress = procedure.IsCompress,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName+ "222222",
|
|
|
+ Is3DModel = is3dmodel,
|
|
|
+ RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
+ GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
@@ -2108,6 +2157,29 @@ namespace TeamAAS_VP.Services
|
|
|
Is3DModel = is3dmodel
|
|
|
|
|
|
});
|
|
|
+ if (procedure.ToolBlock.Inputs["InputImage2"].Value != null)
|
|
|
+ {
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+ //Image = (ICogImage)procedure.ToolBlock.Outputs["OriImage"].Value,
|
|
|
+ Image = (ICogImage)procedure.ToolBlock.Inputs["InputImage2"].Value,
|
|
|
+ Graphic = outputCollection["Graphic"].Value as CogGraphicCollection,
|
|
|
+ Record = record,
|
|
|
+ Result = Found,
|
|
|
+ IsShow = true,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ IsCompress = procedure.IsCompress,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName+ "222222",
|
|
|
+ Is3DModel = is3dmodel
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
@@ -2155,6 +2227,28 @@ namespace TeamAAS_VP.Services
|
|
|
RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
});
|
|
|
+ if (procedure.ToolBlock.Inputs["InputImage2"].Value != null)
|
|
|
+ {
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+ //Image = (ICogImage)procedure.ToolBlock.Outputs["OriImage"].Value,
|
|
|
+ Image = (ICogImage)procedure.ToolBlock.Inputs["InputImage2"].Value,
|
|
|
+ Graphic = new CogGraphicCollection(),
|
|
|
+ Result = false,
|
|
|
+ IsShow = true,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName+ "222222",
|
|
|
+ Is3DModel = is3dmodel,
|
|
|
+ RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
+ GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2175,6 +2269,26 @@ namespace TeamAAS_VP.Services
|
|
|
ImageFileName = imgName,
|
|
|
Is3DModel = is3dmodel
|
|
|
});
|
|
|
+ if (procedure.ToolBlock.Inputs["InputImage2"].Value != null)
|
|
|
+ {
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+ //Image = (ICogImage)procedure.ToolBlock.Outputs["OriImage"].Value,
|
|
|
+ Image = (ICogImage)procedure.ToolBlock.Inputs["InputImage2"].Value,
|
|
|
+ Graphic = new CogGraphicCollection(),
|
|
|
+ Result = false,
|
|
|
+ IsShow = true,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName+"222222",
|
|
|
+ Is3DModel = is3dmodel
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
@@ -2195,7 +2309,7 @@ namespace TeamAAS_VP.Services
|
|
|
/// </summary>
|
|
|
/// <param name="procedure"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task <(bool IsSucceed, ICogImage[] Image, string Msg)> ExecuteGrabImageAsync(ProcedureModel procedure,bool Is3dPhoto)
|
|
|
+ public async Task <(bool IsSucceed, ICogImage[] Image, string Msg)> ExecuteGrabImageAsync(ProcedureModel procedure,bool Is3dPhoto,int index)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
@@ -2211,21 +2325,103 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
if (i == 1)
|
|
|
{
|
|
|
- //bool isSucceed = false;
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(0, procedure.Photo1Light1);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道1亮度{procedure.Photo1Light1}失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(1, procedure.Photo1Light2);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道2亮度{procedure.Photo1Light2}失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(2, procedure.Photo1Light3);
|
|
|
- //if (!isSucceed)
|
|
|
+ if (true)
|
|
|
+ {
|
|
|
+ bool isSucceed = false;
|
|
|
+ SendTaskMessage("打开光源", MessageLevel.Debug);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync2(new Dictionary<int, int> { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 3, 0 }, { 4, 0 }, { 5, 0 }, { 6, 255 }, { 7, 255 } });//, { 6, 255 }, { 7, 255 }
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ SendTaskMessage("光源控制失败!", MessageLevel.Error);
|
|
|
+ }
|
|
|
+ if (!isSucceed)
|
|
|
+ {
|
|
|
+ LogHelper.WriteLogInfo($"设置光源通道亮度失败");
|
|
|
+ }
|
|
|
+ SendTaskMessage("打开光源完成", MessageLevel.Debug);
|
|
|
+ //if (procedure.LightChannels != null)
|
|
|
+ //{
|
|
|
+ // if (procedure.IsControlLightChannels)
|
|
|
+ // {
|
|
|
+ // bool isSucceed = false;
|
|
|
+ // //打开所有需要控制的光源通道
|
|
|
+ // foreach (var lightChannel in procedure.LightChannels)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // if (lightChannel.GlobalIndex == 6)
|
|
|
+ // {
|
|
|
+ // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(6, 255);
|
|
|
+ // if (!isSucceed)
|
|
|
+ // {
|
|
|
+ // LogHelper.WriteLogInfo($"设置光源通道7亮度{procedure.Photo1Light7}失败!");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(lightChannel.GlobalIndex);
|
|
|
+ // if (!isSucceed)
|
|
|
+ // {
|
|
|
+ // SendTaskMessage($"设置光源通道{lightChannel.GlobalIndex}关闭失败!", MessageLevel.Debug);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ }
|
|
|
+ //if (index == 3)
|
|
|
//{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道3亮度{procedure.Photo1Light3}失败!");
|
|
|
+ // bool isSucceed = false;
|
|
|
+ // SendTaskMessage("打开光源", MessageLevel.Debug);
|
|
|
+ // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync2(new Dictionary<int, int> { { 0, 150 }, { 1, 130 }, { 2, 150 }, { 3, 130 }, { 4, 150 }, { 5, 130 }, { 6, 0 } });
|
|
|
+ // if (!isSucceed)
|
|
|
+ // {
|
|
|
+ // LogHelper.WriteLogInfo($"设置光源通道亮度失败");
|
|
|
+ // }
|
|
|
+ // SendTaskMessage("打开光源完成", MessageLevel.Debug);
|
|
|
+ // //if (procedure.LightChannels != null)
|
|
|
+ // //{
|
|
|
+ // // if (procedure.IsControlLightChannels)
|
|
|
+ // // {
|
|
|
+ // // bool isSucceed = false;
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(6, 0);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道7亮度{procedure.Photo1Light7}失败!");
|
|
|
+ // // }
|
|
|
+ // // //打开所有需要控制的光源通道
|
|
|
+ // // foreach (var lightChannel in procedure.LightChannels)
|
|
|
+ // // {
|
|
|
+
|
|
|
+ // // if (lightChannel.GlobalIndex == 6)
|
|
|
+ // // {
|
|
|
+
|
|
|
+ // // }
|
|
|
+ // // else
|
|
|
+ // // {
|
|
|
+ // // if (lightChannel.GlobalIndex == 0 || lightChannel.GlobalIndex == 2 || lightChannel.GlobalIndex == 4)
|
|
|
+ // // {
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(lightChannel.GlobalIndex, 150);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // SendTaskMessage($"设置光源通道{lightChannel.GlobalIndex}打开失败!", MessageLevel.Debug);
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // if (lightChannel.GlobalIndex == 1 || lightChannel.GlobalIndex == 3 || lightChannel.GlobalIndex == 5)
|
|
|
+ // // {
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(lightChannel.GlobalIndex, 130);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // SendTaskMessage($"设置光源通道{lightChannel.GlobalIndex}打开失败!", MessageLevel.Debug);
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+
|
|
|
+ // // }
|
|
|
+ // //}
|
|
|
//}
|
|
|
bool succed = camera.SetExposureTime(procedure.ExposureTime);
|
|
|
if (!succed)
|
|
|
@@ -2238,41 +2434,100 @@ namespace TeamAAS_VP.Services
|
|
|
SendTaskMessage($"相机增益设置失败!", MessageLevel.Error);
|
|
|
}
|
|
|
image = camera.Grab();
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(0);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道0关闭失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(1);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道1关闭失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(2);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道2关闭失败!");
|
|
|
- //}
|
|
|
|
|
|
}
|
|
|
else if (i == 2)
|
|
|
{
|
|
|
- //bool isSucceed = false;
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(0, procedure.Photo2Light1);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道1亮度{procedure.Photo2Light1}失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(1, procedure.Photo2Light2);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道2亮度{procedure.Photo2Light2}失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(2, procedure.Photo2Light3);
|
|
|
- //if (!isSucceed)
|
|
|
+
|
|
|
+ bool isSucceed = false;
|
|
|
+ SendTaskMessage("打开光源", MessageLevel.Debug);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync2(new Dictionary<int, int> { { 0, 255 }, { 1, 255 }, { 2, 255 }, { 3, 255 }, { 4, 255 }, { 5, 255 }, { 6, 0 }, { 7, 0 } });//
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ SendTaskMessage($"光源控制失败!", MessageLevel.Error);
|
|
|
+ }
|
|
|
+ if (!isSucceed)
|
|
|
+ {
|
|
|
+ LogHelper.WriteLogInfo($"设置光源通道亮度失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ //if (index == 3)
|
|
|
//{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道3亮度{procedure.Photo2Light3}失败!");
|
|
|
+ // if (procedure.LightChannels != null)
|
|
|
+ // {
|
|
|
+ // if (procedure.IsControlLightChannels)
|
|
|
+ // {
|
|
|
+ // bool isSucceed = false;
|
|
|
+ // isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(7);
|
|
|
+ // if (!isSucceed)
|
|
|
+ // {
|
|
|
+ // SendTaskMessage($"设置光源通道7关闭失败!", MessageLevel.Debug);
|
|
|
+ // }
|
|
|
+ // //打开所有需要控制的光源通道
|
|
|
+ // foreach (var lightChannel in procedure.LightChannels)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // if (lightChannel.GlobalIndex == 7)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // isSucceed = await _lightManagerService.TurnOnGlobalChannelAsync(lightChannel.GlobalIndex);
|
|
|
+ // if (!isSucceed)
|
|
|
+ // {
|
|
|
+ // SendTaskMessage($"设置光源通道{lightChannel.GlobalIndex}打开失败!", MessageLevel.Debug);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ // //if (procedure.LightChannels != null)
|
|
|
+ // //{
|
|
|
+ // // bool isSucceed = false;
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(0, procedure.Photo1Light1);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道1亮度{procedure.Photo1Light1}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(1, procedure.Photo1Light2);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道2亮度{procedure.Photo1Light2}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(2, procedure.Photo1Light3);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道3亮度{procedure.Photo1Light3}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(3, procedure.Photo1Light4);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道4亮度{procedure.Photo1Light4}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(4, procedure.Photo1Light5);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道5亮度{procedure.Photo1Light5}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(5, procedure.Photo1Light6);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道6亮度{procedure.Photo1Light6}失败!");
|
|
|
+ // // }
|
|
|
+ // // isSucceed = await _lightManagerService.SetGlobalChannelBrightnessAsync(6, 0);
|
|
|
+ // // if (!isSucceed)
|
|
|
+ // // {
|
|
|
+ // // LogHelper.WriteLogInfo($"设置光源通道7亮度{procedure.Photo1Light7}失败!");
|
|
|
+ // // }
|
|
|
+ // //}
|
|
|
//}
|
|
|
+
|
|
|
SendTaskMessage($"开始设置相机曝光!", MessageLevel.Info);
|
|
|
bool succed = camera.SetExposureTime(procedure.ExposureTime2);
|
|
|
if (!succed)
|
|
|
@@ -2286,22 +2541,6 @@ namespace TeamAAS_VP.Services
|
|
|
SendTaskMessage($"相机增益设置失败!", MessageLevel.Error);
|
|
|
}
|
|
|
image2 = camera.Grab();
|
|
|
-
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(0);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道0关闭失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(1);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道1关闭失败!");
|
|
|
- //}
|
|
|
- //isSucceed = await _lightManagerService.TurnOffGlobalChannelAsync(2);
|
|
|
- //if (!isSucceed)
|
|
|
- //{
|
|
|
- // LogHelper.WriteLogInfo($"设置光源通道2关闭失败!");
|
|
|
- //}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -2445,7 +2684,7 @@ namespace TeamAAS_VP.Services
|
|
|
string[] PhotoRes = new string[100];
|
|
|
for (int k = 1; k <= Count; k++)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
PhotoRes[k] = (string)(outputCollection[$"dis{k}"].Value);
|
|
|
//PhotoRes[k] = "222";
|
|
|
}
|
|
|
@@ -2480,14 +2719,14 @@ namespace TeamAAS_VP.Services
|
|
|
LogHelper.WriteLogError("执行相机取图并获取单点位时出错!", ex);
|
|
|
return (false, null, 0);
|
|
|
}
|
|
|
- finally
|
|
|
- {
|
|
|
- var sysConfig = _configService.GetSystemConfiguration();
|
|
|
- if (sysConfig.TurnOffAllLightUse == false)
|
|
|
- {
|
|
|
- await TurnOffLightAfterPhoto(procedure);
|
|
|
- }
|
|
|
- }
|
|
|
+ //finally
|
|
|
+ //{
|
|
|
+ // var sysConfig = _configService.GetSystemConfiguration();
|
|
|
+ // if (sysConfig.TurnOffAllLightUse == false)
|
|
|
+ // {
|
|
|
+ // await TurnOffLightAfterPhoto(procedure);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -3372,7 +3611,6 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 在拍照后关闭光源
|
|
|
/// </summary>
|