Skip to content

Commit

Permalink
5 bars; round to nearest
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcomm committed Feb 18, 2024
1 parent 71a4796 commit 97cd44a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wificom/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def meter(self):
'''
Return text representing fullness, or a message if charging.
'''
sections = 10
sections = 5
ratio = self.ratio()
if ratio is None:
return "(On USB)"
filled = (int)(sections * ratio)
filled = (int)(sections * ratio + 0.5)
unfilled = sections - filled
return "[" + "=" * filled + " " * unfilled + "]"

Expand Down

0 comments on commit 97cd44a

Please sign in to comment.