From c38c0283aa9be1afb30b82e3e284f29a135aea1b Mon Sep 17 00:00:00 2001 From: modehua Date: Wed, 15 Nov 2023 22:49:01 -0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=A1=E6=AD=A3R=20?= =?UTF-8?q?=E6=9B=9D=E5=85=89=E8=BF=87=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zynq_7010_code/MultiFrameCapture.cpp | 9 +++++++-- zynq_7010_code/Sensor.cpp | 10 ++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/zynq_7010_code/MultiFrameCapture.cpp b/zynq_7010_code/MultiFrameCapture.cpp index 01e934c..b18aa8f 100644 --- a/zynq_7010_code/MultiFrameCapture.cpp +++ b/zynq_7010_code/MultiFrameCapture.cpp @@ -751,8 +751,13 @@ bool MultiFrameCapture::saveLutImg(int dpi, int mode, bool black) // diff = 190 - *((double *)values + k); // else // diff = 240 - *((double *)values + k); - - int diff = 200 - *((double *)values + k); + int diff; + if (x==0) + { + diff = 130 - *((double *)values + k); //R曝光值拉低 + } + else + diff = 240 - *((double *)values + k); log += " 明场:" + std::to_string(k) + ";diff:" + std::to_string(diff) + "\r\n"; diff --git a/zynq_7010_code/Sensor.cpp b/zynq_7010_code/Sensor.cpp index 655f992..9792197 100644 --- a/zynq_7010_code/Sensor.cpp +++ b/zynq_7010_code/Sensor.cpp @@ -165,9 +165,7 @@ void Sensor::monitor() if (indx % 10 == 0) { printf("扫描传感器消抖数:%d\r\n",indx); - } - - + } sw.reset(); ret = poll(&pfd, 1, 1); if (ret > 0) @@ -200,8 +198,7 @@ void Sensor::monitor() { printf("没有检测到纸张进入\r\n"); continue; - } - + } } edges[ret]->notify_all(); @@ -282,12 +279,9 @@ void Sensor::monitor2() } if (i != 2 && i != 3) { - int val = i * 2 + ret; - if (is_open_cover && (val == 1 || val == 2 ||val == 3)) //这个地方主要作用是在开盖以防其他状态消息发送 break; - if(val == 1) { is_open_cover = true;