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