fix
自动调焦bug修复:自动调焦完成后,移动到最佳位置;
This commit is contained in:
@ -498,19 +498,25 @@ void focusWindow::onAutoFocusFinished()
|
||||
|
||||
void focusWindow::moveAfterAutoFocus(int motorID, double location)
|
||||
{
|
||||
//QObject* obj = sender();
|
||||
|
||||
//if (obj == m_multiAxisController)
|
||||
//{
|
||||
// qDebug() << "sender is m_multiAxisController.";
|
||||
//}
|
||||
|
||||
if (!m_isMoveAfterAutoFocus)
|
||||
{
|
||||
//std::cout << "focusWindow::moveAfterAutoFocus" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "\n已经到达位置:" << location << std::endl;
|
||||
|
||||
//移动马达到最佳位置
|
||||
emit move2LocSignal(0, (double)m_goodPos, m_dSpeed, 1000);
|
||||
|
||||
double tmp = abs(location - m_goodPos) / m_goodPos * 100;
|
||||
if (tmp<5)
|
||||
if (tmp < 5)
|
||||
{
|
||||
m_isMoveAfterAutoFocus = false;
|
||||
if (!m_isAutoFocusSuccess)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
@ -523,7 +529,11 @@ void focusWindow::moveAfterAutoFocus(int motorID, double location)
|
||||
msgBox.setText(QString::fromLocal8Bit("自动调焦成功!"));
|
||||
msgBox.exec();
|
||||
}
|
||||
m_isMoveAfterAutoFocus = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//移动马达到最佳位置
|
||||
emit move2LocSignal(0, (double)m_goodPos, m_dSpeed, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user