Merge remote-tracking branch 'origin/zhangzhuo'

This commit is contained in:
xin
2022-03-01 11:40:34 +08:00

View File

@ -231,13 +231,37 @@ int CAbstractFSController::PerformAutoExposure()
bIsLastValueOverflow = bIsValueOverflow; bIsLastValueOverflow = bIsValueOverflow;
fLastExposureTime = fTempExposureTime; fLastExposureTime = fTempExposureTime;
if (/*fExposureTime > 100 || */iExposureTime <= m_daDeviceAttr.iMinIntegrationTimeInMS) if (/*fExposureTime > 100 || */iExposureTime <= m_daDeviceAttr.iMinIntegrationTimeInMS)
{ {
bFlagIsAutoExposureOK = false; bFlagIsAutoExposureOK = false;
bFlagIsAutoExposureFailed = true; bFlagIsAutoExposureFailed = true;
bFlagIsLowerMinExposureTime = true; bFlagIsLowerMinExposureTime = true;
qDebug() << "Warning:PerformAutoExposure lower than min integration time.Will be limited to " << m_daDeviceAttr.iMaxIntegrationTimeInMS - 1 << "MS" << " Thread ID:" << m_iThreadID; // qDebug() << "Warning:PerformAutoExposure lower than min integration time.Will be limited to " << m_daDeviceAttr.iMinIntegrationTimeInMS - 1 << "MS" << " Thread ID:" << m_iThreadID;
// iRes = m_pFSCtrl->SetExposureTime((int)iExposureTime);
// if (iRes != 0)
// {
// qDebug() << "Err:PerformAutoExposure Failed.Exit Code:4" << " Thread ID:" << m_iThreadID;
// return 3;
// }
// else
// {
// qDebug() << "Success:PerformAutoExposure. Value" << iExposureTime << " Thread ID:" << m_iThreadID;
// }
iRes = m_pFSCtrl->SetExposureTime(m_daDeviceAttr.iMinIntegrationTimeInMS);
if (iRes != 0)
{
qDebug() << "Err:PerformAutoExposure Failed.Exit Code:3" << " Thread ID:" << m_iThreadID;
return 3;
}
else
{
qDebug() << "Warning:PerformAutoExposure lower than min integration time.Will be limited to " << m_daDeviceAttr.iMinIntegrationTimeInMS << "MS" << " Thread ID:" << m_iThreadID;
}
break; break;
} }
@ -256,21 +280,34 @@ int CAbstractFSController::PerformAutoExposure()
//else //else
//{ //{
//qDebug() << "Warning:PerformAutoExposure exceed max integration time.Will be limited to 30sec"; //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;
//} //}
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 " << m_daDeviceAttr.iMaxIntegrationTimeInMS - 1 << "MS" << " Thread ID:" << m_iThreadID;
}
break; break;
} }
iRes = m_pFSCtrl->SetExposureTime((int)iExposureTime);
if (iRes != 0)
{
qDebug() << "Err:PerformAutoExposure Failed.Exit Code:4" << " Thread ID:" << m_iThreadID;
return 3;
}
else
{
qDebug() << "Success:PerformAutoExposure. Value" << iExposureTime << " Thread ID:" << m_iThreadID;
}
} }
iRes = m_pFSCtrl->SetExposureTime((int)iExposureTime);
if (iRes != 0)
{
qDebug() << "Err:PerformAutoExposure Failed.Exit Code:4" << " Thread ID:" << m_iThreadID;
return 3;
}
else
{
qDebug() << "Success:PerformAutoExposure. Value" << iExposureTime << " Thread ID:" << m_iThreadID;
}
fPredictedExposureTime = iExposureTime; fPredictedExposureTime = iExposureTime;
qDebug() << "--------------------------Stop PerformAutoExposure" << " Thread ID:" << m_iThreadID; qDebug() << "--------------------------Stop PerformAutoExposure" << " Thread ID:" << m_iThreadID;
//emit SignalAcqFinished(m_iThreadID, 1); //emit SignalAcqFinished(m_iThreadID, 1);