Skip to content

Commit

Permalink
fix: fpgasudpate maximum progress bar calculations to 100%. (#3078)
Browse files Browse the repository at this point in the history
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 <ananda.ravuri@intel.com>
  • Loading branch information
anandaravuri committed Jan 22, 2024
1 parent 01ddb08 commit ee71c52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/opae.admin/opae/admin/tools/fpgasupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ee71c52

Please sign in to comment.