From 62130172a667142fa68cc842f0df0069021a0a00 Mon Sep 17 00:00:00 2001 From: liuwf Date: Tue, 20 Aug 2024 13:47:42 +0800 Subject: [PATCH] . --- SlnMesnac.Business/LogoBusiness.cs | 12 +++++++----- SlnMesnac.Common/LightHelper.cs | 2 +- SlnMesnac.WPF/SlnMesnac.WPF.csproj | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/SlnMesnac.Business/LogoBusiness.cs b/SlnMesnac.Business/LogoBusiness.cs index 1b6de30..9b28d49 100644 --- a/SlnMesnac.Business/LogoBusiness.cs +++ b/SlnMesnac.Business/LogoBusiness.cs @@ -110,9 +110,9 @@ namespace SlnMesnac.Business { CameraHandler(); } - else //光电释放暂不使用 + else //光电释放 { - + lightHelper.SendData("CLOSE"); } } @@ -203,9 +203,7 @@ namespace SlnMesnac.Business } else { - //需要检测 - //打开灯光 - lightHelper.SendData("OPEN"); + BarCodeModel barCodeModel = new BarCodeModel(); barCodeModel.BarCode = materialCodeStr; barCodeModel.logoConfig = logoConfig; @@ -231,6 +229,10 @@ namespace SlnMesnac.Business { try { + //需要检测 + //打开灯光 + lightHelper.SendData("OPEN"); + logger.LogInformation("相机流程开始:"); //照片 byte[] ImageData = null; diff --git a/SlnMesnac.Common/LightHelper.cs b/SlnMesnac.Common/LightHelper.cs index 0cd3c72..d7f0e43 100644 --- a/SlnMesnac.Common/LightHelper.cs +++ b/SlnMesnac.Common/LightHelper.cs @@ -42,7 +42,7 @@ namespace SlnMesnac.Common { try { - + SendData("CLOSE"); serialPort.PortName = config.LightPort;// portName; serialPort.BaudRate = int.Parse(config.LightBaudRate); diff --git a/SlnMesnac.WPF/SlnMesnac.WPF.csproj b/SlnMesnac.WPF/SlnMesnac.WPF.csproj index f3dfef2..27de711 100644 --- a/SlnMesnac.WPF/SlnMesnac.WPF.csproj +++ b/SlnMesnac.WPF/SlnMesnac.WPF.csproj @@ -1,7 +1,7 @@  - Exe + WinExe net6.0-windows enable true