From bd5297c64f39c360a7bf41435a88ae5e70840fc2 Mon Sep 17 00:00:00 2001 From: jace.tang <1536884497@qq.com> Date: 星期二, 14 六月 2022 14:28:54 +0800 Subject: [PATCH] merge --- HeightDetection.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/HeightDetection.cs b/HeightDetection.cs index 4342ac2..415b929 100644 --- a/HeightDetection.cs +++ b/HeightDetection.cs @@ -229,18 +229,32 @@ if (heightResult != MeasureState.OK) { - heightFileName = VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + $"_{heightResult.ToString()}\\{ tempFileName}"); + + if (CommonUtil.DetectionOption == DetectionOption.doStandardBlock) + { + VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"\" + tempFileName); + } + else + { + heightFileName = VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + $"_{heightResult.ToString()}\\{ tempFileName}"); + } + } else { - if (opcConfig.IsSaveHeightOKImage || CommonUtil.DetectionOption == DetectionOption.doStandardBlock) + if (opcConfig.IsSaveHeightOKImage||CommonUtil.DetectionOption == DetectionOption.doStandardBlock) { //DateTime dt = DateTime.Now; - //if (dt.Second >= 10 && dt.Second <= 15) + if (CommonUtil.DetectionOption == DetectionOption.doStandardBlock) + { + VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"\" + tempFileName); + } + else { VisionDetect.SaveImageAs(hi, CommonUtil.ProductHeightImageDir + @"_OK\" + tempFileName); } + } } -- Gitblit v1.8.0