NEW: add track events for debugging network

Change-Id: I671f91b4af00277236ca71014f8d667109756d00
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li authored and Lane.Wei committed 2023-04-17 15:39:02 +08:00
1 parent bd75af4a43
commit 6827b41eb3
13 files changed
+187 -12

No files matched your search

+1 -3
View File
@@ -481,14 +481,12 @@ void PrinterFileSystem::DownloadNextFile()
download->index = FindFile(download->index, download->name);
if (download->index != size_t(-1)) {
int progress = data.size * 100 / data.total;
if (result > CONTINUE)
progress = -2;
auto & file = m_file_list[download->index];
if (result == ERROR_CANCEL)
file.flags &= ~FF_DOWNLOAD;
else if (file.progress != progress) {
file.progress = progress;
SendChangedEvent(EVT_DOWNLOAD, download->index, file.path, data.size);
SendChangedEvent(EVT_DOWNLOAD, download->index, file.path, result);
}
}
if (result != CONTINUE) DownloadNextFile();