Merge remote-tracking branch 'origin/zhangzhuo'

This commit is contained in:
xin
2022-02-28 18:06:18 +08:00
2 changed files with 30 additions and 25 deletions

View File

@ -181,7 +181,7 @@ int CAbstractFSController::PerformAutoExposure()
}
double dTemp = dSum / iCount;
qDebug() << "Avg " << dTemp;
qDebug() << "Avg " << dTemp << " Thread ID:" << m_iThreadID;
if (dTemp >= iDeviceDepth * 0.99)
{
@ -226,33 +226,38 @@ int CAbstractFSController::PerformAutoExposure()
dFactor = dTemp / (iDeviceDepth * m_fsInfo.fMaxFactor);
iExposureTime = (float)(iExposureTime / dFactor);
}
if (/*fExposureTime > 100 || */iExposureTime < m_daDeviceAttr.iMinIntegrationTimeInMS)
{
bFlagIsAutoExposureOK = false;
bFlagIsAutoExposureFailed = true;
bFlagIsLowerMinExposureTime = true;
}
}
bIsLastValueOverflow = bIsValueOverflow;
fLastExposureTime = fTempExposureTime;
if (iExposureTime > m_daDeviceAttr.iMaxIntegrationTimeInMS - 1)
if (/*fExposureTime > 100 || */iExposureTime <= m_daDeviceAttr.iMinIntegrationTimeInMS)
{
bFlagIsAutoExposureOK = false;
bFlagIsAutoExposureFailed = true;
bFlagIsLowerMinExposureTime = true;
qDebug() << "Warning:PerformAutoExposure lower than min integration time.Will be limited to " << m_daDeviceAttr.iMaxIntegrationTimeInMS - 1 << "MS" << " Thread ID:" << m_iThreadID;
break;
}
if (iExposureTime > m_daDeviceAttr.iMaxIntegrationTimeInMS-1)
{
bFlagIsAutoExposureOK = false;
bFlagIsAutoExposureFailed = true;
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;
return 3;
}
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-1 << "MS" << " Thread ID:" << m_iThreadID;
}
bFlagIsOverMaxExposureTime = true;
//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;
//return 3;
//}
//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-1 << "MS" << " Thread ID:" << m_iThreadID;
//}
break;
}