Skip to content
Snippets Groups Projects
Verified Commit fa5c577f authored by dos's avatar dos
Browse files

Revert "aaa"

This reverts commit 4eed8eb7.
parent 1fdc7adc
No related branches found
No related tags found
No related merge requests found
Pipeline #12717 failed
......@@ -143,7 +143,7 @@ class Power:
self._ts = time.ticks_ms()
def _battery_voltage_sample(self) -> float:
return self._adc.read_uv() * 1.5 / 1e6
return self._adc.read_uv() * 2 / 1e6
def _update(self) -> None:
ts = time.ticks_ms()
......@@ -186,7 +186,7 @@ class Power:
percentage = 0
voltage_readings = []
for i in range(5):
voltage_readings.append(self._battery_voltage_sample())
voltage_readings.append(self._adc.read_uv() * 2 / 1e6)
voltage_readings.sort()
# take median
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment