fix: Fix stop scan process while emergency button pushed.
This commit is contained in:
@@ -393,11 +393,11 @@ void DeviceManager::prepareFinishScan(bool isNormalFinish, const QString& aReaso
|
||||
bool isCompleteNotify = JsonObject::Instance()->getCompleteNotify();
|
||||
if(!isNormalFinish)
|
||||
{
|
||||
TRIGGER_EVENT(InvokeOperationEnd, nullptr, var);
|
||||
if(!mIsEmptyScan)
|
||||
{
|
||||
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
|
||||
}
|
||||
TRIGGER_EVENT(InvokeOperationEnd, nullptr, var);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ void DeviceManager::processAlarm(const QString& aAlarm)
|
||||
{
|
||||
QJsonObject jsonObj = toJsonObject(aAlarm);
|
||||
int alarmCode = jsonObj["code"].toInt();
|
||||
QString alarm = QString::number(alarmCode);
|
||||
QString alarm = tr("Error: ") + QString::number(alarmCode);
|
||||
qDebug()<<"processAlarm : "<<alarmCode;
|
||||
LOG_SYS_OPERATION("Dms alarm reported. code: " + alarm)
|
||||
if(alarmCode >= 400 && alarmCode < 500)
|
||||
@@ -1299,12 +1299,14 @@ void DeviceManager::startScanProcess()
|
||||
return;
|
||||
}
|
||||
AppGlobalValues::setInProcessing(true);
|
||||
mIsScanning = true;
|
||||
startAutoLocate();
|
||||
}
|
||||
|
||||
void DeviceManager::stopScanProcess()
|
||||
{
|
||||
AppGlobalValues::setInProcessing(false);
|
||||
mIsScanning = false;
|
||||
LOG_SYS_OPERATION("Stop scan process.")
|
||||
stopAutoLocate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user