-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
battery - fix BATTERY_NOT_PRESENT detection, detection logic change (#…
…13599) * battery - fix BATTERY_NOT_PRESENT detection, detection logic change 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). * battery - improve stable voltage detection - voltageStablePrevFiltered every time delta is exceeded - voltage within range is ANDed over 100ms periods - voltage is stable if it was within range for 10 out of 11 periods - slowly changing voltage will update threshold, but voltage will be considered stable - 1 update/s (100mV/s) is tolerated * battery - fuix typos, improve comments
- Loading branch information
Showing
3 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters