Add finished percent judge to DeviceManager.cpp

This commit is contained in:
Krad
2022-05-20 13:45:10 +08:00
parent 32279305b4
commit 23f0d40694

View File

@@ -241,13 +241,15 @@ void DeviceManager::scanProcess(int sProgress) {
(scanPhase != 3)) ? "": ", patient can leave";
QVariant var(QString("%1%3\r\n progress:%2%").arg(getPhaseName(scanPhase)).arg(progress).arg(extraMsg));
TRIGGER_EVENT(InvokeOperationProgress, nullptr, (QObject *) &var);
// 300 means finished
if (sProgress == 300) return;
//phase control
//no change return
if (scanPhase == phase) return;
// error phase
if (phase > 3 || scanPhase > phase) {
QString errorMsg = QString("Error Scan Phase code, current Phase code:%1, new Phase code:%2!").arg(
scanPhase, phase);
scanPhase).arg(phase);
THROW_ERROR(errorMsg)
exitScanTimer();
return;