New Stop operation logic
This commit is contained in:
@@ -81,13 +81,15 @@ void DeviceManager::initDevice() {
|
|||||||
|
|
||||||
// check device status=========================================
|
// check device status=========================================
|
||||||
//device is ready return
|
//device is ready return
|
||||||
if (inf.status == READY) return;
|
if (inf.status != SCANNING) {
|
||||||
if (inf.status == BUSY) {
|
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
|
||||||
QString msg("Device is busy, Stop operation fail!");
|
|
||||||
THROW_ERROR(msg);
|
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
if (inf.status == SCANNING) {
|
// if (inf.status == BUSY) {
|
||||||
|
// QString msg("Device is busy, Stop operation fail!");
|
||||||
|
// THROW_ERROR(msg);
|
||||||
|
// return;
|
||||||
|
// };
|
||||||
TRIGGER_EVENT(GUIEvents::InvokeOperationStart, nullptr, nullptr);
|
TRIGGER_EVENT(GUIEvents::InvokeOperationStart, nullptr, nullptr);
|
||||||
//ScanControl fail
|
//ScanControl fail
|
||||||
qDebug() << "Request stop!";
|
qDebug() << "Request stop!";
|
||||||
@@ -111,9 +113,6 @@ void DeviceManager::initDevice() {
|
|||||||
TRIGGER_EVENT(GUIEvents::GlobalBannerMessage, nullptr, (QObject *) &s);
|
TRIGGER_EVENT(GUIEvents::GlobalBannerMessage, nullptr, (QObject *) &s);
|
||||||
TRIGGER_EVENT(GUIEvents::InvokeOperationEnd, nullptr, nullptr);
|
TRIGGER_EVENT(GUIEvents::InvokeOperationEnd, nullptr, nullptr);
|
||||||
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
|
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
|
|||||||
Reference in New Issue
Block a user