You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Remove comments
This commit is contained in:
@@ -143,8 +143,6 @@ def get_battery_percentage(raw_adc_value=None):
|
||||
"""
|
||||
voltage = read_battery_voltage(raw_adc_value=raw_adc_value)
|
||||
percentage = (voltage - MIN_VOLTAGE) * 100.0 / (MAX_VOLTAGE - MIN_VOLTAGE)
|
||||
print(f"percentage = {percentage}")
|
||||
print(f"min = {min(100.0, percentage)}")
|
||||
return max(0,min(100.0, percentage)) # limit to 100.0% and make sure it's positive
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user