修改不传ng文件夹下的图片以及相机掉电以后定时器到时间继续传送未发送的图片

CigaretteSH
Flamingo 9 months ago
parent 8b7f95fbad
commit 9dcfd050a6

@ -325,7 +325,7 @@ void ExportDataThread::run()
} }
} }
if (b_quit && (!tmpListToZip.isEmpty())) { if ((b_quit || (!timer->isActive() && !readyToSendZip)) && (!tmpListToZip.isEmpty())) {
listToZip += tmpListToZip; listToZip += tmpListToZip;
tmpListToZip.clear(); tmpListToZip.clear();
readyToSendZip = true; readyToSendZip = true;
@ -403,6 +403,7 @@ void ExportDataThread::run()
} }
fileNg.remove(); fileNg.remove();
fileOk.remove(); fileOk.remove();
listToZip.clear();
readyToSendZip = false; readyToSendZip = false;
} }
} }
@ -505,20 +506,23 @@ void ExportDataThread::GetDataFromSaveThread(QString filePath) {
QString remotePath; QString remotePath;
if (timer->isActive()) { if (timer->isActive()) {
if ((filePath.indexOf("ng_result") != -1) || (filePath.indexOf("ng") == -1)) { if (filePath.indexOf("ng") == -1) {
tmpListToZip.append(filePath); tmpListToZip.append(filePath);
} }
} }
else { else {
if (!tmpListToZip.isEmpty()) {
listToZip = tmpListToZip; listToZip = tmpListToZip;
tmpListToZip.clear(); tmpListToZip.clear();
if ((filePath.indexOf("ng_result") != -1) || (filePath.indexOf("ng") == -1)) {
tmpListToZip.append(filePath);
} }
if (!listToZip.isEmpty()) { if (!listToZip.isEmpty()) {
readyToSendZip = true; readyToSendZip = true;
} }
if (filePath.indexOf("ng") == -1) {
tmpListToZip.append(filePath);
}
//remotePath = filePath.mid(filePath.indexOf("image") - 1); //remotePath = filePath.mid(filePath.indexOf("image") - 1);
//ConnectServer(filePath, remotePath); //ConnectServer(filePath, remotePath);
timer->start(1000 * 60 * 5); // 5min timer->start(1000 * 60 * 5); // 5min

Loading…
Cancel
Save