rocketpants
Member
I use a 100k resistor between A0 and Vbat. This gives me a nice 100k/420k voltage divider to use with the Li-ion battery voltage of 4.2V. The symmetry suits my anal retentiveness well. Although this is different to the standard design having the ability to change the battery conversion factor should allow this quite easily.
However when ever I change the battery conversion factor in the wifi manager configuration it never sticks - it always reverts to the default 191.8. All other parameters in wifi manager can be changed and stay changed.
Looking at the code we have
but given that my_vfact is 244 compared to default ADCDIVISOR of 191.8 this statement shouldn't apply.
Any ideas how I could sort this out? Has anyone else had issues changing the battery conversion factor?
However when ever I change the battery conversion factor in the wifi manager configuration it never sticks - it always reverts to the default 191.8. All other parameters in wifi manager can be changed and stay changed.
Looking at the code we have
Code:
if (my_vfact < ADCDIVISOR * 0.8 || my_vfact > ADCDIVISOR * 1.2)
my_vfact = ADCDIVISOR;
Any ideas how I could sort this out? Has anyone else had issues changing the battery conversion factor?