add battery voltage print

This commit is contained in:
Brendan Haines 2020-03-04 00:21:22 -07:00
parent 0775309220
commit c5d77ac9b3

View File

@ -221,6 +221,7 @@ def update_battery_voltage(attrname=None, old=None, new=None):
global vbat_text
vadc = get_mux_adc(BAT_MUX_CHAN)
# vbat = vadc * (10+1)/1
print(vadc)
vbat = vadc * 12.21/1.018
vbat_text.text = f"Battery Voltage: {vbat:2.1f}V"
if vbat < VBAT_THRESHOLD: