Preview error handle.7
This commit is contained in:
@@ -43,7 +43,7 @@ void ErrorCallback(const char* msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DeviceManager::emitErrorCallback(const char *msg) {
|
void DeviceManager::emitErrorCallback(const char *msg) {
|
||||||
this->setErrorOccurred(true);
|
errorOccurred=true;
|
||||||
printf("Error Callback , message:%s\r\n", msg);
|
printf("Error Callback , message:%s\r\n", msg);
|
||||||
QString m(msg);
|
QString m(msg);
|
||||||
emit raiseGlobalError( m);
|
emit raiseGlobalError( m);
|
||||||
@@ -132,7 +132,7 @@ void DeviceManager::initDevice() {
|
|||||||
if (!ScanControl(PREVIEW_SCAN))
|
if (!ScanControl(PREVIEW_SCAN))
|
||||||
{
|
{
|
||||||
qDebug() << "Preview success!";
|
qDebug() << "Preview success!";
|
||||||
lastStatus = SCANNING;
|
// lastStatus = SCANNING;
|
||||||
previewing = true;
|
previewing = true;
|
||||||
// timerID = startTimer(500);
|
// timerID = startTimer(500);
|
||||||
TRIGGER_EVENT(GUIEvents::ResponsePreview, nullptr, nullptr);
|
TRIGGER_EVENT(GUIEvents::ResponsePreview, nullptr, nullptr);
|
||||||
@@ -180,7 +180,7 @@ void DeviceManager::initDevice() {
|
|||||||
qDebug() << "Preview data response event end!";
|
qDebug() << "Preview data response event end!";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
lastStatus = READY;
|
// lastStatus = READY;
|
||||||
previewing = false;
|
previewing = false;
|
||||||
AppGlobalValues::setInProcessing(false);
|
AppGlobalValues::setInProcessing(false);
|
||||||
QThread::sleep(3);
|
QThread::sleep(3);
|
||||||
@@ -226,7 +226,7 @@ void DeviceManager::timerEvent(QTimerEvent* event) {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//未发生错误并且,之前状态是扫描,代表正常扫描完成
|
//未发生错误并且,之前状态是扫描,代表正常扫描完成
|
||||||
if (lastStatus == SCANNING ) {
|
if (lastStatus == SCANNING && ! errorOccurred) {
|
||||||
prepareFinishScan();
|
prepareFinishScan();
|
||||||
}
|
}
|
||||||
//一般不会出现其他情况
|
//一般不会出现其他情况
|
||||||
|
|||||||
Reference in New Issue
Block a user