Adjusted calculating the number of battery hearts

This commit is contained in:
Milan Vit 2018-07-12 10:56:12 +09:00 committed by GitHub
parent 6257332372
commit 77d008f792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,7 @@ def battery(pl, format='{ac_state} {capacity:3.0%}', steps=5, gamify=False, full
ret = []
if gamify:
denom = int(steps)
numer = int(denom * capacity / 100)
numer = int(round(denom * capacity / 100.0, 0))
ret.append({
'contents': online if ac_powered else offline,
'draw_inner_divider': False,