From a22bcd01f7cf64b54e9632b9a6a617cb596ee1e1 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 12 Jun 2020 17:13:45 +0200 Subject: [PATCH] Attempt to fix the progress bar issue on Companion Read Firmware function on Windows, dfu-util 0.7 (DFU mode) --- companion/src/process_flash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/process_flash.cpp b/companion/src/process_flash.cpp index 77a77ea4d..50a07e522 100644 --- a/companion/src/process_flash.cpp +++ b/companion/src/process_flash.cpp @@ -161,7 +161,7 @@ void FlashProcess::analyseStandardOutput(const QString & text) progress->setValue(pos); } else if (currStdoutLine.startsWith("[") && progress->getText().contains("bytes_per_hash=2048")) { - int pos = (currStdoutLine.lastIndexOf("#") - 1) * 2048 / (2 * 1024 * 1024); // TODO depends on bin size + int pos = (currStdoutLine.lastIndexOf("#") - 1) * 2048 * 100 / (2 * 1024 * 1024); // TODO depends on bin size progress->setValue(pos); } }