From e171c12421a1020ce3f723f201f6352bccec64b9 Mon Sep 17 00:00:00 2001 From: Ananda Ravuri <33236856+anandaravuri@users.noreply.github.com> Date: Mon, 22 Jan 2024 11:10:08 -0800 Subject: [PATCH] fix: fpgasudpate maximum progress bar calculations to 100%. (#3078) fpgasudpate estimated time (0.04 seconds) less than a timeout( 1 second), the progress bar shows 100%. set the estimated time to timeout if the estimated time is below 1 second (progress time set to 100%). Signed-off-by: anandaravuri --- python/opae.admin/opae/admin/tools/fpgasupdate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/opae.admin/opae/admin/tools/fpgasupdate.py b/python/opae.admin/opae/admin/tools/fpgasupdate.py index 11610b64d80a..80ec44261d50 100755 --- a/python/opae.admin/opae/admin/tools/fpgasupdate.py +++ b/python/opae.admin/opae/admin/tools/fpgasupdate.py @@ -699,6 +699,9 @@ def update_fw_sysfs(infile, pac): retries = 0 max_retries = 60 * 60 * 3 + if estimated_time < timeout: + estimated_time = timeout + with progress(time=estimated_time, **progress_cfg) as prg: while status.value in ('writing', 'programming', 'transferring'): time.sleep(timeout)