We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bd9ce5 commit a7712f0Copy full SHA for a7712f0
internal_filesystem/lib/mpos/battery_voltage.py
@@ -143,8 +143,6 @@ def get_battery_percentage(raw_adc_value=None):
143
"""
144
voltage = read_battery_voltage(raw_adc_value=raw_adc_value)
145
percentage = (voltage - MIN_VOLTAGE) * 100.0 / (MAX_VOLTAGE - MIN_VOLTAGE)
146
- print(f"percentage = {percentage}")
147
- print(f"min = {min(100.0, percentage)}")
148
return max(0,min(100.0, percentage)) # limit to 100.0% and make sure it's positive
149
150
0 commit comments