remove inaccurate battery charging indicator

This commit is contained in:
Sundog Jones 2020-08-02 09:03:09 -07:00
parent c9cc8cfd89
commit 0d4c7430b1

View File

@ -81,10 +81,13 @@ class SoundslabDisplay:
battery_display = '{:02.2f}'.format(capacity) + '%'
battery_display_offset = 80
print("Battery: voltage: " + str(voltage) + " prev voltage: " + str(previous_voltage) + " capacity: " + str(capacity))
if voltage > previous_voltage:
# we're probably charging!
battery_display = 'Chrg ' + battery_display
battery_display_offset = 130
# below method doesn't work - very inaccurate!
# should probably track over a longer period of time, which will mean
# it's harder to come up with a valid "charging or not" decision
# if voltage > previous_voltage:
# # we're probably charging!
# battery_display = 'Chrg ' + battery_display
# battery_display_offset = 130
overlay.text((self.screen_size[0] - battery_display_offset, 0), battery_display, font=font, fill=self.fg_color)
# add progress meter