feat: Remove autolocate in scan process.
This commit is contained in:
@@ -193,18 +193,18 @@ void CoordinateXYWidget::updateStopFlash()
|
||||
|
||||
void CoordinateXYWidget::startFlash()
|
||||
{
|
||||
show();
|
||||
connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
|
||||
mStopGradientEnd = 1;
|
||||
mTimer->start(20);
|
||||
// show();
|
||||
// connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
|
||||
// mStopGradientEnd = 1;
|
||||
// mTimer->start(20);
|
||||
}
|
||||
|
||||
void CoordinateXYWidget::stopFlash()
|
||||
{
|
||||
disconnect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
|
||||
connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateStopFlash);
|
||||
mTimer->stop();
|
||||
mTimer->start(20);
|
||||
// disconnect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
|
||||
// connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateStopFlash);
|
||||
// mTimer->stop();
|
||||
// mTimer->start(20);
|
||||
}
|
||||
|
||||
void CoordinateXYWidget::quit()
|
||||
|
||||
@@ -115,18 +115,18 @@ void CoordinateZWidget::setBlinkPoint(int aZ)
|
||||
|
||||
void CoordinateZWidget::startFlash()
|
||||
{
|
||||
show();
|
||||
connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
|
||||
mStopGradientEnd = 1;
|
||||
mTimer->start(20);
|
||||
// show();
|
||||
// connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
|
||||
// mStopGradientEnd = 1;
|
||||
// mTimer->start(20);
|
||||
}
|
||||
|
||||
void CoordinateZWidget::stopFlash()
|
||||
{
|
||||
disconnect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
|
||||
connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateStopFlash);
|
||||
mTimer->stop();
|
||||
mTimer->start(20);
|
||||
// disconnect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
|
||||
// connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateStopFlash);
|
||||
// mTimer->stop();
|
||||
// mTimer->start(20);
|
||||
}
|
||||
|
||||
void CoordinateZWidget::updateFlash()
|
||||
|
||||
@@ -1365,7 +1365,7 @@ void DeviceManager::stopScanProcess()
|
||||
AppGlobalValues::setInProcessing(false);
|
||||
mIsScanning = false;
|
||||
LOG_SYS_OPERATION("Stop scan process.")
|
||||
stopAutoLocate();
|
||||
//stopAutoLocate();
|
||||
}
|
||||
|
||||
bool DeviceManager::startAutoLocate()
|
||||
@@ -1375,25 +1375,28 @@ bool DeviceManager::startAutoLocate()
|
||||
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||
return false;
|
||||
}
|
||||
auto result = mStartAutoLocateAction->execute();
|
||||
if(result.mIsSucessful)
|
||||
{
|
||||
mIsAutoLocating = true;
|
||||
QJsonObject jsonObj = toJsonObject(result.mData);
|
||||
if(jsonObj["code"].toInt() == 0 )
|
||||
{
|
||||
emit startAutoLocateResult(true);
|
||||
mEffectivePositionCount = 0;
|
||||
mGetAutoLocatePositionTimer = startTimer(1000);
|
||||
ScanProcessSequence::getInstance()->startFullScan();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
emit startAutoLocateResult(false);
|
||||
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||
QString errorMessage = tr("Start auto locate failed") + AlarmHelper::getAlarmString(toJsonObject(result.mData)["info"].toInt());
|
||||
THROW_ERROR(errorMessage)
|
||||
LOG_SYS_OPERATION("Start auto locate failed.")
|
||||
return false;
|
||||
// auto result = mStartAutoLocateAction->execute();
|
||||
// if(result.mIsSucessful)
|
||||
// {
|
||||
// mIsAutoLocating = true;
|
||||
// QJsonObject jsonObj = toJsonObject(result.mData);
|
||||
// if(jsonObj["code"].toInt() == 0 )
|
||||
// {
|
||||
// emit startAutoLocateResult(true);
|
||||
// mEffectivePositionCount = 0;
|
||||
// mGetAutoLocatePositionTimer = startTimer(1000);
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// emit startAutoLocateResult(false);
|
||||
// TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||
// QString errorMessage = tr("Start auto locate failed") + AlarmHelper::getAlarmString(toJsonObject(result.mData)["info"].toInt());
|
||||
// THROW_ERROR(errorMessage)
|
||||
// LOG_SYS_OPERATION("Start auto locate failed.")
|
||||
// return false;
|
||||
}
|
||||
|
||||
void DeviceManager::stopAutoLocate()
|
||||
|
||||
Reference in New Issue
Block a user