Battery to report more averaged reading?

While parts of ProffieOS can benefit from instant readings from the battery monitor, I feel like too much real time reporting causes great variation in the Spoken Battery Level and On-Demand battery level reporting. The former tends to say something like 3.7x volts then 4.01 volts in an immediate 2nd report, while the blade animation is sensitive to itself, lowering the battery level as the blade fades in and showing a higher level with less LED brightness (expected).

Is there something that can be borrowed from charging.h or somewhere and used in some function that would allow these features to call for a more averaged reading? Like the average over the past 10 seconds or so?

It’s already doing a bunch of averaging. It takes several seconds for battery readings to adjust. (Which also causes some problems.)

A large part of the problem is that battery voltage vary with load. You might have 4.1 volts when the blade is off, but 3.7 volts when the blade is on.

IMHO, the solution is for ProffieOS to estimate the load. Then calculate the battery voltage as if there was a small unknown resistor in series with the battery. (Because essentially, there is) Once the resistor value has been estimated, it can be used to calculate the battery voltage as if there was no load, which is probably what people want.

Don’t think I’m going to do this until 7.x though.

Cool, thanks! I’ll put a feature request in issues as a reminder.