1.更改了自动曝光最大曝光时间,改为设备读出的最大时间(MS)-1.

This commit is contained in:
2022-02-28 16:48:48 +08:00
committed by xin
parent 5c7e775a92
commit 7275a2819e

View File

@ -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;