double check state for stop
This commit is contained in:
@@ -85,8 +85,13 @@ void DeviceManager::initDevice() {
|
||||
// check device status=========================================
|
||||
//device is ready return
|
||||
if (inf.status != SCANNING) {
|
||||
//double check
|
||||
QThread::msleep(100);
|
||||
inf = GetStatus();
|
||||
if (inf.status != SCANNING){
|
||||
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (inf.status == BUSY) {
|
||||
// QString msg("Device is busy, Stop operation fail!");
|
||||
@@ -293,7 +298,7 @@ void DeviceManager::processScan(const char* json, bool empty) {
|
||||
lastStatus = SCANNING;
|
||||
previewing = false;
|
||||
qDebug() << "Start progress timer";
|
||||
timerID = startTimer(300);
|
||||
timerID = startTimer(500);
|
||||
return;
|
||||
}
|
||||
QString errmsg("ScanControl start fail!");
|
||||
|
||||
Reference in New Issue
Block a user