diff --git a/SoundslabDisplay.py b/SoundslabDisplay.py index 4e609e7..0a04c38 100644 --- a/SoundslabDisplay.py +++ b/SoundslabDisplay.py @@ -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