From 7275a2819e47b56a8da5046cd5b4d500c0daf89d Mon Sep 17 00:00:00 2001 From: zhangzhuo Date: Mon, 28 Feb 2022 16:48:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9B=B4=E6=94=B9=E4=BA=86=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9B=9D=E5=85=89=E6=9C=80=E5=A4=A7=E6=9B=9D=E5=85=89=E6=97=B6?= =?UTF-8?q?=E9=97=B4=EF=BC=8C=E6=94=B9=E4=B8=BA=E8=AE=BE=E5=A4=87=E8=AF=BB?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E6=9C=80=E5=A4=A7=E6=97=B6=E9=97=B4=EF=BC=88?= =?UTF-8?q?MS=EF=BC=89-1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/CaptureThread/AbstractFSController.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/CaptureThread/AbstractFSController.cpp b/source/CaptureThread/AbstractFSController.cpp index 38b9aa3..8496078 100644 --- a/source/CaptureThread/AbstractFSController.cpp +++ b/source/CaptureThread/AbstractFSController.cpp @@ -226,7 +226,7 @@ int CAbstractFSController::PerformAutoExposure() dFactor = dTemp / (iDeviceDepth * m_fsInfo.fMaxFactor); iExposureTime = (float)(iExposureTime / dFactor); } - if (/*fExposureTime > 100 || */iExposureTime < 10) + if (/*fExposureTime > 100 || */iExposureTime < m_daDeviceAttr.iMinIntegrationTimeInMS) { bFlagIsAutoExposureOK = false; bFlagIsAutoExposureFailed = true; @@ -236,12 +236,12 @@ int CAbstractFSController::PerformAutoExposure() bIsLastValueOverflow = bIsValueOverflow; fLastExposureTime = fTempExposureTime; - if (iExposureTime > 120000) + if (iExposureTime > m_daDeviceAttr.iMaxIntegrationTimeInMS - 1) { bFlagIsAutoExposureOK = false; bFlagIsAutoExposureFailed = true; - float fPredictedExposureTime = 120000; - iRes = m_pFSCtrl->SetExposureTime(120000); + float fPredictedExposureTime = m_daDeviceAttr.iMaxIntegrationTimeInMS-1; + iRes = m_pFSCtrl->SetExposureTime(m_daDeviceAttr.iMaxIntegrationTimeInMS-1); if (iRes != 0) { qDebug() << "Err:PerformAutoExposure Failed.Exit Code:3" << " Thread ID:" << m_iThreadID; @@ -250,7 +250,7 @@ int CAbstractFSController::PerformAutoExposure() else { //qDebug() << "Warning:PerformAutoExposure exceed max integration time.Will be limited to 30sec"; - qDebug() << "Warning:PerformAutoExposure exceed max integration time.Will be limited to " << m_daDeviceAttr.iMaxIntegrationTimeInMS << "MS" << " Thread ID:" << m_iThreadID; + qDebug() << "Warning:PerformAutoExposure exceed max integration time.Will be limited to " << m_daDeviceAttr.iMaxIntegrationTimeInMS-1 << "MS" << " Thread ID:" << m_iThreadID; } bFlagIsOverMaxExposureTime = true; break;