betaflight / betaflight

Open Source Flight Controller Firmware
GNU General Public License v3.0
8k stars 2.86k forks source link

[4.5.1] battery - fix BATTERY_NOT_PRESENT detection, detection logic change #13623

Closed haslinghuis closed 1 week ago

haslinghuis commented 2 weeks ago

Detection logic is refactored - battery voltage delta is tested each 50ms, voltage is considered stable when difference of last 10 samples is smaller than 100mV This makes stable threshold more forgiving than #13350 (time for comparison is 50 instead of 500ms).

github-actions[bot] commented 2 weeks ago

Do you want to test this code? You can flash it directly from Betaflight Configurator:

WARNING: It may be unstable. Use only for testing!