mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-25 18:38:09 -07:00
change vbat gain
This commit is contained in:
parent
c0c371ec4e
commit
94b0cd95b6
|
@ -220,8 +220,8 @@ def update_battery_voltage(attrname=None, old=None, new=None):
|
|||
global VBAT_THRESHOLD
|
||||
global vbat_text
|
||||
vadc = get_mux_adc(BAT_MUX_CHAN)
|
||||
vbat = vadc * (10+1)/1
|
||||
# vbat = vadc * 12.21/1.68
|
||||
# vbat = vadc * (10+1)/1
|
||||
vbat = vadc * 12.21/1.022
|
||||
vbat_text.text = f"Battery Voltage: {vbat:2.1f}V"
|
||||
if vbat < VBAT_THRESHOLD:
|
||||
stop_controller()
|
||||
|
|
Loading…
Reference in New Issue
Block a user