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