Closed ledvinap closed 2 weeks ago
Do you want to test this code? You can flash it directly from Betaflight Configurator:
#13599
(this pull request number) in the Select commit
field of the Configurator firmware flasher tab (you need to Enable expert mode
, Show release candidates
and Development
).WARNING: It may be unstable. Use only for testing!
battery - improve stable voltage detection
Tested, works fine on H7NANO.
I've extended detection window to 1s - now filtered voltage is close to final value. Default time constant is ~.5s (Its really bad idea to specify inverse of filter cutoff - time constant would make much more time) It seems that resulting value is roughly within VOLTAGE_STABLE_MAX_DELTA of final value under these conditions (anyone wants to do the math?).
@pfeerick it takes some time for the voltage filter to stabilize plus 1s detection window. Are the initial beeps a big problem?
Not as far as I'm concerned... If I were being pedantic, sure, it should do just the initial fast startup beeps and zip it... but my preference is more that it doesn't beep incessantly all the frigging time if you have beeper active on middle position, and don't have the handset on. :partying_face:
backport to 4.5-maintenance?
Detection logic is refactored:
slowly changing voltage will update threshold, but voltage will be considered stable, 1 update/s (100mV/s) is tolerated