From 5fd9bee6e1083edcb0174430a683b75520da1c38 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Wed, 4 Mar 2020 00:22:13 -0700 Subject: [PATCH] fix battery voltage gain --- Software/python/hwtest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Software/python/hwtest.py b/Software/python/hwtest.py index 2768e63..50ed5bc 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -221,8 +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 = vadc * 12.21/1.68 vbat_text.text = f"Battery Voltage: {vbat:2.1f}V" if vbat < VBAT_THRESHOLD: stop_controller()