Skip to content

Commit

Permalink
Merge pull request #22 from bitcraze/krichardsson/fix-progress-bar
Browse files Browse the repository at this point in the history
Use int for progress bars
  • Loading branch information
knmcguire authored Apr 20, 2022
2 parents 411ec87 + b6bf0bb commit f614861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lpstools/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ def _programming_done(self):
self.state = STATE_DFU_DONE

def _programming_progress(self, str, progress):
self.dfu_progress.setValue(progress * 100)
self.dfu_progress.setValue(int(progress * 100))

def _config_done(self):
self.cfg_progress.setValue(100)
self.cfg_progress.setFormat("Success!")

def _config_progress(self, progress):
self.cfg_progress.setFormat("%p%")
self.cfg_progress.setValue(progress * 100)
self.cfg_progress.setValue(int(progress * 100))

# UI State handling

Expand Down

0 comments on commit f614861

Please sign in to comment.