liuwf 3 months ago
parent fbced5e564
commit 62130172a6

@ -110,9 +110,9 @@ namespace SlnMesnac.Business
{ {
CameraHandler(); CameraHandler();
} }
else //光电释放暂不使用 else //光电释放
{ {
lightHelper.SendData("CLOSE");
} }
} }
@ -203,9 +203,7 @@ namespace SlnMesnac.Business
} }
else else
{ {
//需要检测
//打开灯光
lightHelper.SendData("OPEN");
BarCodeModel barCodeModel = new BarCodeModel(); BarCodeModel barCodeModel = new BarCodeModel();
barCodeModel.BarCode = materialCodeStr; barCodeModel.BarCode = materialCodeStr;
barCodeModel.logoConfig = logoConfig; barCodeModel.logoConfig = logoConfig;
@ -231,6 +229,10 @@ namespace SlnMesnac.Business
{ {
try try
{ {
//需要检测
//打开灯光
lightHelper.SendData("OPEN");
logger.LogInformation("相机流程开始:"); logger.LogInformation("相机流程开始:");
//照片 //照片
byte[] ImageData = null; byte[] ImageData = null;

@ -42,7 +42,7 @@ namespace SlnMesnac.Common
{ {
try try
{ {
SendData("CLOSE");
serialPort.PortName = config.LightPort;// portName; serialPort.PortName = config.LightPort;// portName;
serialPort.BaudRate = int.Parse(config.LightBaudRate); serialPort.BaudRate = int.Parse(config.LightBaudRate);

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>

Loading…
Cancel
Save