Skip to content

Commit 502d604

Browse files
authored
No rounding of battery percent
Baris - your system of rolling average seems to work really well. I'd originally included the rounding to make the levels jump about less but that isn't needed with the rolling average code. So have set the rounding to 1.
1 parent 0f56912 commit 502d604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

batt_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self):
1919
self.res1 = 180 # resistor connected to VBATT (/1000)
2020
self.res2 = 100 # resistor connected to GND (/1000)
2121
self.reps = 10 # how many times to take each measurement for averaging
22-
self.pcround = 5 # round % battery to nearest
22+
self.pcround = 1 # round % battery to nearest
2323

2424
# Define Pins/Ports on ADC
2525
self.SPICLK = 16

0 commit comments

Comments
 (0)